emacs-devel
[Top][All Lists]
Advanced

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

Re: Horrible new unsaved buffers dialog


From: Sergey Organov
Subject: Re: Horrible new unsaved buffers dialog
Date: Sat, 29 Jan 2022 12:07:48 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Tomas Hlavaty <tom@logand.com> writes:

> On Fri 28 Jan 2022 at 14:55, Lars Ingebrigtsen <larsi@gnus.org> wrote:
>> Po Lu <luangruo@yahoo.com> writes:
>>
>>> In this morning's master, it only shows a single "unsaved buffers"
>>> dialog, which is completely inadequate when there is more than one
>>> unsaved file.  I don't understand why this change was made which turns
>>> said dialog box from a convenient feature into an eyesore.
>>
>> The old dialog box was incomprehensible and user hostile.
>
> Why does Emacs pops up native dialog at all?
>
> Even the minibuffer based version is not so convenient.
>
> Would not it be better to show a new buffer listing all the unsaved
> changes and relevant buttons in one place, not sequentially popping up
> in dialog or minibuffer?
>
> Something like:
>
> Modified buffers exist.
>   [Save all buffers and quit]
>   [Exit anyway]
> Save file /tmp/a?
>   [Save]
>   [Discard changes]
>   [View]
>   [View and quit]
>   [View changes]
>   [Save this but no more]
> Save file /tmp/b?
>   [Save]
>   [Discard changes]
>   [View]
>   [View and quit]
>   [View changes]
>   [Save this but no more]
> Save file /tmp/c?
>   [Save]
>   [Discard changes]
>   [View]
>   [View and quit]
>   [View changes]
>   [Save this but no more]

This idea to have buffer rather dialog/minibuffer is rather appealing.
I'd like to have an option to bring such a buffer not only on Quit, but
on any invocation of 'save-some-buffers'.

It's also great to see "Discard changes" item that is not there in the
default minibuffer version of 'save-some-buffers'. I've unsuccessfully
tried to convince community it's useful enough to be there by default,
and I'm now locally use the following tweak to get the option:

#+BEGIN_SRC emacs-lisp
;; Support "revert buffer" in 'save-some-buffers'. Especially useful
;; for prompts when run 'compile' and friends.
(require 'files)
(push
  `(?R
    ,(lambda (buf)
      (with-current-buffer buf
        (revert-buffer)))
    "revert this buffer")
  save-some-buffers-action-alist)
#+END_SRC


Thanks,
-- Sergey Organov



reply via email to

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