unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: 48798@debbugs.gnu.org
Subject: bug#48798: 26.3; `define-minor-mode': Message should name the current buffer where enabled/disabled
Date: Wed, 2 Jun 2021 19:36:22 +0000	[thread overview]
Message-ID: <CO1PR10MB4466980E0B9B19CBCDC30F7BF33D9@CO1PR10MB4466.namprd10.prod.outlook.com> (raw)

A user can easily think s?he's in one window when another is actually
selected.  Or s?he can think that the buffer in the selected window is a
different one from what it actually is.

The confirmation/status message you get when you toggle a (local) minor
mode just tells you that the mode is enabled or disabled "in the current
buffer".  It should provide more help than that, naming the buffer.
That confirms what you expected or lets you know that you were wrong
about your expectation.

For example, when you use `C-x C-q', it's better to see "Read-Only mode
enabled in buffer `foobar'" than it is to see "Read-Only mode enabled in
current buffer".  Just that bit of information and reassurance can help.

Without bothering with a complete patch, I think this is the only code
change needed, in library `easy-mmode.el':

  (let ((local ,(if globalp "" " in current buffer")))

should be 

  (let ((local ,(if globalp
                    ""
                  '(format " in buffer `%s'" (current-buffer)))))

In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.19041
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''






             reply	other threads:[~2021-06-02 19:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02 19:36 Drew Adams [this message]
2021-06-02 20:59 ` bug#48798: 26.3; `define-minor-mode': Message should name the current buffer where enabled/disabled Drew Adams
2021-06-03  8:06 ` Lars Ingebrigtsen
2021-07-01 11:45   ` Lars Ingebrigtsen
2021-07-01 14:16     ` bug#48798: [External] : " Drew Adams
2021-10-16 21:57 ` Drew Adams
2023-01-28 21:55   ` Drew Adams
2023-07-04 15:08     ` bug#33076: " Drew Adams
2023-07-04 15:25       ` Drew Adams

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=CO1PR10MB4466980E0B9B19CBCDC30F7BF33D9@CO1PR10MB4466.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=48798@debbugs.gnu.org \
    /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).