[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: I want an unsaveable buffer
From: |
Doug Lewan |
Subject: |
RE: I want an unsaveable buffer |
Date: |
Mon, 4 Aug 2014 21:41:34 +0000 |
Very reasonable. Thanks.
,Doug
Douglas Lewan
Shubert Ticketing
(201) 489-8600 ext 224
Hazmat condition: There's some emacs on the floor.
> -----Original Message-----
> From: help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org
> [mailto:help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org] On
> Behalf Of Michael Heerdegen
> Sent: Monday, 2014 August 04 14:38
> To: help-gnu-emacs@gnu.org
> Subject: Re: I want an unsaveable buffer
>
> Doug Lewan <dougl@shubertticketing.com> writes:
>
> > Does anyone know of a natural approach to this?
>
> Maybe the following approach would be simpler:
>
> - define a command `my-save-buffer-maybe' that calls
> `buffer-file-name', and does `save-buffer' when it returns a file,
> but does nothing when it returns nil
>
> - define a minor-mode that binds [remap save-buffer] to
> `my-save-buffer-maybe' (or use just `global-set-key')
>
> Michael.
>