all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#33076: 26; `read-only-mode' messages
@ 2018-10-17 17:04 Drew Adams
  2019-07-10 13:54 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2018-10-17 17:04 UTC (permalink / raw)
  To: 33076

It would be much clearer if the messages referred to the buffer by name,
rather than just "current buffer".  You can use `C-x C-q' in the
selected window even when the buffer might not be clearly displayed
(e.g. tiny or partly obscured window/frame).  Having the message tell
you which buffer you changed read-only for provides better confirmation.

In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
 of 2018-05-30
Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea
Windowing system distributor `Microsoft Corp.', version 10.0.16299
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#33076: 26; `read-only-mode' messages
  2018-10-17 17:04 bug#33076: 26; `read-only-mode' messages Drew Adams
@ 2019-07-10 13:54 ` Lars Ingebrigtsen
  2019-07-10 14:36   ` Drew Adams
  2020-08-20 15:49   ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-10 13:54 UTC (permalink / raw)
  To: Drew Adams; +Cc: 33076

Drew Adams <drew.adams@oracle.com> writes:

> It would be much clearer if the messages referred to the buffer by name,
> rather than just "current buffer".  You can use `C-x C-q' in the
> selected window even when the buffer might not be clearly displayed
> (e.g. tiny or partly obscured window/frame).  Having the message tell
> you which buffer you changed read-only for provides better confirmation.

(and "in current buffer" should perhaps have a "the" in it anyway?)

This is output by the define-minor-mode machinery:

           (if (called-interactively-p 'any)
               (progn
                 ,(if (and globalp (not variable))
                      `(customize-mark-as-set ',mode))
                 ;; Avoid overwriting a message shown by the body,
                 ;; but do overwrite previous messages.
                 (unless (and (current-message)
                              (not (equal ,last-message
                                          (current-message))))
                   (let ((local ,(if globalp "" " in current buffer")))
		     (message ,(format "%s %%sabled%%s" pretty-name)
			      (if ,getter "en" "dis") local)))))

So it looks easy enough to change, but it's a change that would affect
all minor mode.  Do we want all interactive minor modes to message the
buffer names?  I don't know what I think of it myself.

Perhaps mainly because some buffer names are so long that this would
increase the echo area sometimes, which is slightly annoying.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#33076: 26; `read-only-mode' messages
  2019-07-10 13:54 ` Lars Ingebrigtsen
@ 2019-07-10 14:36   ` Drew Adams
  2020-08-20 15:49   ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2019-07-10 14:36 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 33076

> it looks easy enough to change, but it's a change that would affect
> all minor mode.  Do we want all interactive minor modes to message the
> buffer names?  I don't know what I think of it myself.
> 
> Perhaps mainly because some buffer names are so long that this would
> increase the echo area sometimes, which is slightly annoying.

Why just say "in current buffer", when that can be
unclear?

There should be no problem with a long buffer name.
what's important is to give some indication of which
buffer is meant.  If the name is too long for the
echo area then either the message will wrap (no big
deal) or it will be truncated (still identifying the
buffer sufficiently in most cases - and *Messages*
holds the full name).

You can also drop the word "buffer".  Just say
"in `BUF'", where BUF is the buffer name.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#33076: 26; `read-only-mode' messages
  2019-07-10 13:54 ` Lars Ingebrigtsen
  2019-07-10 14:36   ` Drew Adams
@ 2020-08-20 15:49   ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-20 15:49 UTC (permalink / raw)
  To: Drew Adams; +Cc: 33076

> This is output by the define-minor-mode machinery:
>
>            (if (called-interactively-p 'any)
>                (progn
>                  ,(if (and globalp (not variable))
>                       `(customize-mark-as-set ',mode))
>                  ;; Avoid overwriting a message shown by the body,
>                  ;; but do overwrite previous messages.
>                  (unless (and (current-message)
>                               (not (equal ,last-message
>                                           (current-message))))
>                    (let ((local ,(if globalp "" " in current buffer")))
> 		     (message ,(format "%s %%sabled%%s" pretty-name)
> 			      (if ,getter "en" "dis") local)))))
>
> So it looks easy enough to change, but it's a change that would affect
> all minor mode.  Do we want all interactive minor modes to message the
> buffer names?  I don't know what I think of it myself.
>
> Perhaps mainly because some buffer names are so long that this would
> increase the echo area sometimes, which is slightly annoying.

After thinking about this for a year, I've come to the conclusion that
this would be more annoying than informative, so I'm closing this as a
"wontfix".

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-20 15:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-17 17:04 bug#33076: 26; `read-only-mode' messages Drew Adams
2019-07-10 13:54 ` Lars Ingebrigtsen
2019-07-10 14:36   ` Drew Adams
2020-08-20 15:49   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.