help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to force auto-save of buffers not visiting files, right now?


From: Emanuel Berg
Subject: Re: how to force auto-save of buffers not visiting files, right now?
Date: Tue, 22 Mar 2022 22:45:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

hw wrote:

>>> (with-current-buffer transient_buffer (auto-save-mode nil))
>>> 
>> 
>> Same.
>
> Yes, explicitly :)

This makes even less sense actually. It doesn't make sense in
the sense I already mentioned, but it also doesn't make sense
in the sense that intuitively, that looks like you are
_disabling_ the mode! When in fact you are enabling it.

I don't know the reason for this counter-intuitive use of nil,
but if I'm allowed to theorize it is a side-effect of making
the argument, ARG, optional and having

  (auto-save-mode) 

enabling the mode (this is so for all minor modes and is
intuitive), however technically that implies ARG being nil so
for that to happen it must happen when ARG is nil.

If this is indeed the reason I consider explicit use of nil to
enable a mode not just poor style but a bug.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]