unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Karl Fogel <kfogel@red-bean.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Should `revert-buffer' preserve text-scaling by default?
Date: Mon, 02 Dec 2019 11:19:08 -0600	[thread overview]
Message-ID: <87pnh6ve5v.fsf@red-bean.com> (raw)
In-Reply-To: <83o8wqln5f.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 02 Dec 2019 18:15:08 +0200")

On 02 Dec 2019, Eli Zaretskii wrote:
>> Even though Eli unconvinced me of that earlier, it turns out I'm
>> weak-minded enough to have already fallen back into thinking it's a
>> good idea now that you suggest it.  So I'm +1 on what you say, at
>> least until Eli posts again?
>
>If we use a special value of the argument, not just C-u, I'm okay with
>that (and I think I already said that in this discussion, didn't I?).

I think the first question is what the default behavior of `revert-buffer' should be -- after we decide that, we can decide what special prefix arg is used to access the non-default behavior.

Stefan proposed that the new default be to *not* reset modes, and that C-u could be reassigned to mean "and reset the modes".  Here is what he said:

>Currently, the revert-buffer's C-u is used to choose between "revert
>from file or revert from the auto-save file".  Personally I never use
>that (probably the most obvious reason is that I don't use auto-save
>files at all), so I'd gladly change this C-u to mean "and reset the
>modes".

To consider Stefan's proposal, we'd have to first decide that `revert-buffer' will no longer reset modes by default.  I had thought you were opposed to that change, on compatibility grounds.  But maybe you just meant that revert-buffer's `preserve-modes' argument should retain its current meaning when called non-interactively from Lisp, but that it would be okay for interactive `revert-buffer' to stop resetting modes by default?  In other words, the default interactive behavior could be changed to be the opposite of the default non-interactive behavior.

Was that what you were saying?

Regarding Stefan's proposal: I don't know how often people depend on the current C-u behavior of reverting from auto-save file.  But if we're changing the interactive default to not reset modes, then I think a special prefix -- different from C-u -- to access the old reset-modes behavior would be fine, partly because it would be rarely used!  Also, I presume we would have a new customizeable variable `revert-buffer-reset-modes' (defaulting to nil) that people who have a permanent preference could set.

Best regards,
-Karl



  reply	other threads:[~2019-12-02 17:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29 20:24 Should `revert-buffer' preserve text-scaling by default? Karl Fogel
2019-11-29 20:39 ` Eli Zaretskii
2019-11-29 21:02   ` Karl Fogel
2019-11-30  7:24     ` Eli Zaretskii
2019-11-29 21:09   ` Stefan Monnier
2019-11-29 21:20     ` Karl Fogel
2019-11-30  7:22       ` Eli Zaretskii
2019-12-01  8:15         ` Karl Fogel
2019-12-01  9:47           ` Stefan Kangas
2019-12-01 10:24             ` Juanma Barranquero
2019-12-01 17:38               ` Eli Zaretskii
2019-12-01 10:27             ` Michael Albinus
2019-12-01 17:35               ` Karl Fogel
2019-12-01 18:25           ` Stefan Monnier
2019-12-02  2:01             ` Karl Fogel
2019-12-02 16:15               ` Eli Zaretskii
2019-12-02 17:19                 ` Karl Fogel [this message]
2019-12-02 17:42                   ` Eli Zaretskii
2019-12-02 22:29                     ` Karl Fogel
2019-12-02 22:49                       ` Stefan Monnier
2019-12-03  0:36                         ` Karl Fogel
2019-12-03 16:11                           ` Eli Zaretskii
2019-12-03 16:10                         ` Eli Zaretskii
2019-12-03 16:09                       ` Eli Zaretskii
2019-12-03 17:35                         ` Karl Fogel
2019-12-01 21:49 ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pnh6ve5v.fsf@red-bean.com \
    --to=kfogel@red-bean.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).