GNU bug report logs - #52053
29.0.50; Nonsensical button "C-x C-f" in scratch buffer

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Tue, 23 Nov 2021 10:06:02 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52053 in the body.
You can then email your comments to 52053 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Tue, 23 Nov 2021 10:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Po Lu <luangruo <at> yahoo.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 23 Nov 2021 10:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Tue, 23 Nov 2021 18:05:32 +0800
Start emacs with `emacs -Q', and click on the "C-x C-f" in the initial
scratch message.  You will get this nonsensical error:

Debugger entered--Lisp error: (error "Current buffer is not in Help mode")
  signal(error ("Current buffer is not in Help mode"))
  error("Current buffer is not in Help mode")
  help-buffer()
  help-setup-xref((#f(compiled-function #'buffer #<bytecode -0x1c5aa85c15071043>) find-file #<buffer *scratch*>) nil)
  describe-function(find-file)

I also don't understand why it makes sense to have a button there.

Thanks.

In GNU Emacs 29.0.50 (build 290, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4)
 of 2021-11-23 built on trinity
Repository revision: 5c4136f56465c6b2c65fb3577603879cdbbe7f97
Repository branch: x-window-xwidget
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Fedora Linux 35 (Workstation Edition)

Configured using:
 'configure'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM
XPM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media rmc puny
dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068
epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json map
text-property-search seq gv byte-opt bytecomp byte-compile cconv
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils help-fns radix-tree time-date subr-x help-mode cl-loaddefs
cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads xwidget-internal dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 56631 6540)
 (symbols 48 6880 1)
 (strings 32 22129 1214)
 (string-bytes 1 717211)
 (vectors 16 14316)
 (vector-slots 8 191056 8952)
 (floats 8 23 55)
 (intervals 56 201 0)
 (buffers 992 10))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Wed, 24 Nov 2021 06:18:01 GMT) Full text and rfc822 format available.

Message #8 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Wed, 24 Nov 2021 19:17:08 +1300
On 2021-11-23 23:05, Po Lu wrote:
> Start emacs with `emacs -Q', and click on the "C-x C-f" in the initial
> scratch message.  You will get this nonsensical error:
> 
> Debugger entered--Lisp error: (error "Current buffer is not in Help 
> mode")

Bug #41836 is related to this.

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41836





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Wed, 24 Nov 2021 07:54:01 GMT) Full text and rfc822 format available.

Message #11 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Wed, 24 Nov 2021 08:53:42 +0100
Po Lu <luangruo <at> yahoo.com> writes:

> Start emacs with `emacs -Q', and click on the "C-x C-f" in the initial
> scratch message.  You will get this nonsensical error:
>
> Debugger entered--Lisp error: (error "Current buffer is not in Help mode")
>   signal(error ("Current buffer is not in Help mode"))
>   error("Current buffer is not in Help mode")
>   help-buffer()
>   help-setup-xref((#f(compiled-function #'buffer #<bytecode -0x1c5aa85c15071043>) find-file #<buffer *scratch*>) nil)
>   describe-function(find-file)
>
> I also don't understand why it makes sense to have a button there.

I don't think we're meant to have a button here, but we're running this:

(defcustom initial-scratch-message (purecopy "\
;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with \\[find-file] and enter text in its buffer.

")

through substitute-command-keys so that the find-file is expanded.

The problem is two-fold: substitute-command-keys shouldn't buttonise the
keys here, so perhaps it should grow a new parameter to inhibit that.

The other problem is that the font-locking in the buffer removes the
nice fontification of the key binding, so that should also be fixed.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Wed, 24 Nov 2021 09:29:01 GMT) Full text and rfc822 format available.

Message #14 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Wed, 24 Nov 2021 17:28:10 +0800
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I don't think we're meant to have a button here, but we're running this:
>
> (defcustom initial-scratch-message (purecopy "\
> ;; This buffer is for text that is not saved, and for Lisp evaluation.
> ;; To create a file, visit it with \\[find-file] and enter text in its buffer.
>
> ")
>
> through substitute-command-keys so that the find-file is expanded.
>
> The problem is two-fold: substitute-command-keys shouldn't buttonise the
> keys here, so perhaps it should grow a new parameter to inhibit that.
>
> The other problem is that the font-locking in the buffer removes the
> nice fontification of the key binding, so that should also be fixed.

FWIW, I don't think it makes sense to fontify key bindings specially in
lisp-interaction-mode.  I expect to see only the comment face there.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Wed, 24 Nov 2021 10:59:02 GMT) Full text and rfc822 format available.

Message #17 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Wed, 24 Nov 2021 11:58:01 +0100
Po Lu <luangruo <at> yahoo.com> writes:

> FWIW, I don't think it makes sense to fontify key bindings specially in
> lisp-interaction-mode.  I expect to see only the comment face there.

We should fontify key bindings the same everywhere (that a user could be
seeing them), I think.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Wed, 24 Nov 2021 11:16:01 GMT) Full text and rfc822 format available.

Message #20 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Wed, 24 Nov 2021 19:15:13 +0800
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>> FWIW, I don't think it makes sense to fontify key bindings specially in
>> lisp-interaction-mode.  I expect to see only the comment face there.

> We should fontify key bindings the same everywhere (that a user could be
> seeing them), I think.

Does that include inside comments in Lisp code?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Wed, 24 Nov 2021 11:29:01 GMT) Full text and rfc822 format available.

Message #23 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Wed, 24 Nov 2021 12:27:49 +0100
Po Lu <luangruo <at> yahoo.com> writes:

>> We should fontify key bindings the same everywhere (that a user could be
>> seeing them), I think.
>
> Does that include inside comments in Lisp code?

Probably not -- that's not something that's for the user to peruse.  But
perhaps it should?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Wed, 24 Nov 2021 11:38:01 GMT) Full text and rfc822 format available.

Message #26 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Wed, 24 Nov 2021 19:36:41 +0800
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>> Does that include inside comments in Lisp code?

> Probably not -- that's not something that's for the user to peruse.  But
> perhaps it should?

I don't think it should, and similarly, it shouldn't apply to
lisp-interaction-mode, which is simply Emacs Lisp mode but slightly more
interactive.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Wed, 24 Nov 2021 16:40:01 GMT) Full text and rfc822 format available.

Message #29 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Wed, 24 Nov 2021 17:39:45 +0100
Po Lu <luangruo <at> yahoo.com> writes:

> I don't think it should, and similarly, it shouldn't apply to
> lisp-interaction-mode, which is simply Emacs Lisp mode but slightly more
> interactive.

Sure, but that ;; comment there is put there explicitly as a message to
the user.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Wed, 24 Nov 2021 17:06:01 GMT) Full text and rfc822 format available.

Message #32 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Po Lu <luangruo <at> yahoo.com>, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Wed, 24 Nov 2021 18:05:51 +0100
On Nov 24 2021, Lars Ingebrigtsen wrote:

> Po Lu <luangruo <at> yahoo.com> writes:
>
>> I don't think it should, and similarly, it shouldn't apply to
>> lisp-interaction-mode, which is simply Emacs Lisp mode but slightly more
>> interactive.
>
> Sure, but that ;; comment there is put there explicitly as a message to
> the user.

Then it should probably get some special property.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Thu, 25 Nov 2021 00:47:01 GMT) Full text and rfc822 format available.

Message #35 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Thu, 25 Nov 2021 08:45:54 +0800
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>> I don't think it should, and similarly, it shouldn't apply to
>> lisp-interaction-mode, which is simply Emacs Lisp mode but slightly more
>> interactive.

> Sure, but that ;; comment there is put there explicitly as a message to
> the user.

We could make it something like the explanations for novice users in
`report-emacs-bug'.  It needn't be a comment.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Thu, 25 Nov 2021 10:24:01 GMT) Full text and rfc822 format available.

Message #38 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Thu, 25 Nov 2021 10:23:38 +0000
[Message part 1 (text/plain, inline)]
Patch attached.
[Do-not-buttonize-key-bindings-outside-of-Help-buffer.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Thu, 25 Nov 2021 11:00:01 GMT) Full text and rfc822 format available.

Message #41 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Thu, 25 Nov 2021 12:59:15 +0200
> Date: Thu, 25 Nov 2021 10:23:38 +0000
> From: Gregory Heytings <gregory <at> heytings.org>
> Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 52053 <at> debbugs.gnu.org
> 
> --- a/lisp/help.el
> +++ b/lisp/help.el
> @@ -1105,7 +1105,9 @@ substitute-command-keys
>      ;; itself.
>      (let ((keymap overriding-local-map)
>            (inhibit-modification-hooks t)
> -          (orig-buf (current-buffer)))
> +          (orig-buf (current-buffer))
> +          (in-help (eq (car temp-buffer-window-setup-hook)
> +                       'help-mode-setup)))

Thanks, but I'd prefer a less obscure way of telling whether this
is going into *Help* buffers.  Is this really the only way?  Or maybe
the mouse-face etc. should not be put as part of
substitute-command-keys, but by the Help mode itself, when the text is
already in the *Help* buffer?  As we use substitute-command-keys more
and more, these problems will probably pop up more and more, so maybe
we should rethink whether this part is really something it should do.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Thu, 25 Nov 2021 11:08:01 GMT) Full text and rfc822 format available.

Message #44 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Thu, 25 Nov 2021 11:07:44 +0000
>
> Thanks, but I'd prefer a less obscure way of telling whether this is 
> going into *Help* buffers.  Is this really the only way?
>

I agree with you that it's a bit obscure, and I tried to find a better 
way, but couldn't.  Someone else might have a better idea.  I think 
another possible way would be to query this-command:

(in-help (or (eq major-mode 'help-mode)
             (and this-command
                  (where-is-internal this-command help-map t))))

But somehow I find this even less elegant, and I'm less certain about its 
correctness.

>
> Or maybe the mouse-face etc. should not be put as part of 
> substitute-command-keys, but by the Help mode itself, when the text is 
> already in the *Help* buffer?  As we use substitute-command-keys more 
> and more, these problems will probably pop up more and more, so maybe we 
> should rethink whether this part is really something it should do.
>

With this patch it shouldn't happen outside of Help mode anymore.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Thu, 25 Nov 2021 11:22:02 GMT) Full text and rfc822 format available.

Message #47 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Thu, 25 Nov 2021 13:21:02 +0200
> Date: Thu, 25 Nov 2021 11:07:44 +0000
> From: Gregory Heytings <gregory <at> heytings.org>
> cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
> 
> > Thanks, but I'd prefer a less obscure way of telling whether this is 
> > going into *Help* buffers.  Is this really the only way?
> 
> I agree with you that it's a bit obscure, and I tried to find a better 
> way, but couldn't.  Someone else might have a better idea.  I think 
> another possible way would be to query this-command:
> 
> (in-help (or (eq major-mode 'help-mode)
>               (and this-command
>                    (where-is-internal this-command help-map t))))
> 
> But somehow I find this even less elegant, and I'm less certain about its 
> correctness.

It's definitely not more elegant, agreed.

I do hope a better idea emerges.  Anybody?

> > Or maybe the mouse-face etc. should not be put as part of 
> > substitute-command-keys, but by the Help mode itself, when the text is 
> > already in the *Help* buffer?  As we use substitute-command-keys more 
> > and more, these problems will probably pop up more and more, so maybe we 
> > should rethink whether this part is really something it should do.
> >
> 
> With this patch it shouldn't happen outside of Help mode anymore.

Yes, but that's somewhat blunt a weapon, I think.  My idea was to
maybe let the caller decide whether this is wanted or not, if we are
going to use substitute-command-keys in way more contexts than it was
originally meant to.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Thu, 25 Nov 2021 12:48:02 GMT) Full text and rfc822 format available.

Message #50 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, Gregory Heytings <gregory <at> heytings.org>,
 52053 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Thu, 25 Nov 2021 13:47:36 +0100
>>>>> On Thu, 25 Nov 2021 13:21:02 +0200, Eli Zaretskii <eliz <at> gnu.org> said:

    Eli> Yes, but that's somewhat blunt a weapon, I think.  My idea was to
    Eli> maybe let the caller decide whether this is wanted or not, if we are
    Eli> going to use substitute-command-keys in way more contexts than it was
    Eli> originally meant to.

Callers can just bind help-link-key-to-documentation to nil, no? What
am I missing>

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Thu, 25 Nov 2021 13:21:02 GMT) Full text and rfc822 format available.

Message #53 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: luangruo <at> yahoo.com, gregory <at> heytings.org, 52053 <at> debbugs.gnu.org,
 larsi <at> gnus.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Thu, 25 Nov 2021 15:20:03 +0200
> From: Robert Pluim <rpluim <at> gmail.com>
> Cc: Gregory Heytings <gregory <at> heytings.org>,  luangruo <at> yahoo.com,
>   larsi <at> gnus.org,  52053 <at> debbugs.gnu.org
> Date: Thu, 25 Nov 2021 13:47:36 +0100
> 
> >>>>> On Thu, 25 Nov 2021 13:21:02 +0200, Eli Zaretskii <eliz <at> gnu.org> said:
> 
>     Eli> Yes, but that's somewhat blunt a weapon, I think.  My idea was to
>     Eli> maybe let the caller decide whether this is wanted or not, if we are
>     Eli> going to use substitute-command-keys in way more contexts than it was
>     Eli> originally meant to.
> 
> Callers can just bind help-link-key-to-documentation to nil, no? What
> am I missing>

Maybe we should make it nil by default and have Help commands bind it
to non-nil.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Thu, 25 Nov 2021 13:36:02 GMT) Full text and rfc822 format available.

Message #56 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Thu, 25 Nov 2021 14:34:48 +0100
Po Lu <luangruo <at> yahoo.com> writes:

> We could make it something like the explanations for novice users in
> `report-emacs-bug'.  It needn't be a comment.

The nice thing about it being a comment is that you can still say `M-x
eval-buffer' without it getting in the way.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Thu, 25 Nov 2021 13:37:01 GMT) Full text and rfc822 format available.

Message #59 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, Robert Pluim <rpluim <at> gmail.com>, 52053 <at> debbugs.gnu.org,
 gregory <at> heytings.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Thu, 25 Nov 2021 14:36:20 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> Maybe we should make it nil by default and have Help commands bind it
> to non-nil.

Sounds like a good solution to me.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Thu, 25 Nov 2021 13:42:01 GMT) Full text and rfc822 format available.

Message #62 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Thu, 25 Nov 2021 13:41:50 +0000
>
> Yes, but that's somewhat blunt a weapon, I think.  My idea was to maybe 
> let the caller decide whether this is wanted or not, if we are going to 
> use substitute-command-keys in way more contexts than it was originally 
> meant to.
>

AFAICS, the options are:

1. Detect inside substitute-command-keys whether the string is for a 
*Help* buffer.  That's what the patch does, it's the simplest solution 
from the point of view of those who call s-c-k.

2. Add an optional parameter to s-c-k to indicate whether the string is 
for a non-*Help* buffer.  That's a reasonable alternative, but there are 
~450 calls to s-c-k in the trunk, each would have to be checked.

3. Add a variable and let-bind it around the calls to s-c-k to indicate 
when the string is for a non-*Help* buffer.

4. Let-bind help-link-key-to-documentation to nil around the calls to 
s-c-k to indicate that the calls to help-mode--add-function-link should be 
skipped.  ISTM that this is not generic enough, if in six months we had 
another similar feature it would be necessary to let-bind two variables 
around calls for non-*Help* buffers, and so forth.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Thu, 25 Nov 2021 14:17:02 GMT) Full text and rfc822 format available.

Message #65 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Thu, 25 Nov 2021 16:16:18 +0200
> Date: Thu, 25 Nov 2021 13:41:50 +0000
> From: Gregory Heytings <gregory <at> heytings.org>
> cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
> 
> AFAICS, the options are:
> 
> 1. Detect inside substitute-command-keys whether the string is for a 
> *Help* buffer.  That's what the patch does, it's the simplest solution 
> from the point of view of those who call s-c-k.
> 
> 2. Add an optional parameter to s-c-k to indicate whether the string is 
> for a non-*Help* buffer.  That's a reasonable alternative, but there are 
> ~450 calls to s-c-k in the trunk, each would have to be checked.
> 
> 3. Add a variable and let-bind it around the calls to s-c-k to indicate 
> when the string is for a non-*Help* buffer.
> 
> 4. Let-bind help-link-key-to-documentation to nil around the calls to 
> s-c-k to indicate that the calls to help-mode--add-function-link should be 
> skipped.  ISTM that this is not generic enough, if in six months we had 
> another similar feature it would be necessary to let-bind two variables 
> around calls for non-*Help* buffers, and so forth.

I think the best solution is to change the default value of
help-link-key-to-documentation to be nil, and then bind it to non-nil
in Help commands.

I'm not sure I understand what additional feature you have in mind and
how such an additional feature could be related to this discussion.
So please elaborate on that part.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Thu, 25 Nov 2021 14:56:01 GMT) Full text and rfc822 format available.

Message #68 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Thu, 25 Nov 2021 14:55:15 +0000
>> 4. Let-bind help-link-key-to-documentation to nil around the calls to 
>> s-c-k to indicate that the calls to help-mode--add-function-link should 
>> be skipped.  ISTM that this is not generic enough, if in six months we 
>> had another similar feature it would be necessary to let-bind two 
>> variables around calls for non-*Help* buffers, and so forth.
>
> I think the best solution is to change the default value of 
> help-link-key-to-documentation to be nil, and then bind it to non-nil in 
> Help commands.
>
> I'm not sure I understand what additional feature you have in mind and 
> how such an additional feature could be related to this discussion. So 
> please elaborate on that part.
>

I have no idea what that feature could be, but the 
help-link-key-to-documentation feature was added a month ago, and 
substitute-command-key is rather complex, so I can very well imagine that 
a new help-frobnicate feature could be added in a not too far future.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Thu, 25 Nov 2021 15:16:02 GMT) Full text and rfc822 format available.

Message #71 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Thu, 25 Nov 2021 17:15:31 +0200
> Date: Thu, 25 Nov 2021 14:55:15 +0000
> From: Gregory Heytings <gregory <at> heytings.org>
> cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
> 
> 
> >> 4. Let-bind help-link-key-to-documentation to nil around the calls to 
> >> s-c-k to indicate that the calls to help-mode--add-function-link should 
> >> be skipped.  ISTM that this is not generic enough, if in six months we 
> >> had another similar feature it would be necessary to let-bind two 
> >> variables around calls for non-*Help* buffers, and so forth.
> >
> > I think the best solution is to change the default value of 
> > help-link-key-to-documentation to be nil, and then bind it to non-nil in 
> > Help commands.
> >
> > I'm not sure I understand what additional feature you have in mind and 
> > how such an additional feature could be related to this discussion. So 
> > please elaborate on that part.
> >
> 
> I have no idea what that feature could be, but the 
> help-link-key-to-documentation feature was added a month ago, and 
> substitute-command-key is rather complex, so I can very well imagine that 
> a new help-frobnicate feature could be added in a not too far future.

At which point we will either make it dependent on the same variable,
or maybe rename the variable if its name no longer fits what it
controls.

Would that resolve the issue?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Thu, 25 Nov 2021 22:46:01 GMT) Full text and rfc822 format available.

Message #74 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Thu, 25 Nov 2021 22:45:02 +0000
[Message part 1 (text/plain, inline)]
Updated patch attached.
[Do-not-buttonize-key-bindings-outside-of-Help-buffer.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Fri, 26 Nov 2021 00:39:02 GMT) Full text and rfc822 format available.

Message #77 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Fri, 26 Nov 2021 08:38:11 +0800
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> The nice thing about it being a comment is that you can still say `M-x
> eval-buffer' without it getting in the way.

The `report-emacs-bug' message is displayed with a display property.
The actual text in the buffer is empty.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Fri, 26 Nov 2021 06:27:02 GMT) Full text and rfc822 format available.

Message #80 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Fri, 26 Nov 2021 08:26:54 +0200
> Date: Thu, 25 Nov 2021 22:45:02 +0000
> From: Gregory Heytings <gregory <at> heytings.org>
> cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
> 
> Updated patch attached.

Thanks.  This approach is fine by me, but the variable you introduced
should not be internal, and it probably should be called out in NEWS
(in the Lisp section), because I believe the intent was to allow other
callers to use it, even though currently we have only one such caller.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Fri, 26 Nov 2021 09:25:02 GMT) Full text and rfc822 format available.

Message #83 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, Gregory Heytings <gregory <at> heytings.org>,
 52053 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Fri, 26 Nov 2021 10:24:22 +0100
>>>>> On Fri, 26 Nov 2021 08:26:54 +0200, Eli Zaretskii <eliz <at> gnu.org> said:

    >> Date: Thu, 25 Nov 2021 22:45:02 +0000
    >> From: Gregory Heytings <gregory <at> heytings.org>
    >> cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
    >> 
    >> Updated patch attached.

    Eli> Thanks.  This approach is fine by me, but the variable you introduced
    Eli> should not be internal, and it probably should be called out in NEWS
    Eli> (in the Lisp section), because I believe the intent was to allow other
    Eli> callers to use it, even though currently we have only one such caller.

So a variable that code can set to say 'use this other variable'?
Again, why not just bind `help-link-key-to-documentation' directly?

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Fri, 26 Nov 2021 11:14:02 GMT) Full text and rfc822 format available.

Message #86 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: luangruo <at> yahoo.com, gregory <at> heytings.org, 52053 <at> debbugs.gnu.org,
 larsi <at> gnus.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Fri, 26 Nov 2021 13:13:28 +0200
> From: Robert Pluim <rpluim <at> gmail.com>
> Cc: Gregory Heytings <gregory <at> heytings.org>,  luangruo <at> yahoo.com,
>   larsi <at> gnus.org,  52053 <at> debbugs.gnu.org
> Date: Fri, 26 Nov 2021 10:24:22 +0100
> 
>     Eli> Thanks.  This approach is fine by me, but the variable you introduced
>     Eli> should not be internal, and it probably should be called out in NEWS
>     Eli> (in the Lisp section), because I believe the intent was to allow other
>     Eli> callers to use it, even though currently we have only one such caller.
> 
> So a variable that code can set to say 'use this other variable'?

Maybe I'm missing something, but where did you see that this new
variable is used to set help-link-key-to-documentation?

> Again, why not just bind `help-link-key-to-documentation' directly?

Presumably, because help-link-key-to-documentation is a user option,
and an option which is specific to Help commands?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Fri, 26 Nov 2021 11:18:01 GMT) Full text and rfc822 format available.

Message #89 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, gregory <at> heytings.org, 52053 <at> debbugs.gnu.org,
 larsi <at> gnus.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Fri, 26 Nov 2021 12:17:24 +0100
>>>>> On Fri, 26 Nov 2021 13:13:28 +0200, Eli Zaretskii <eliz <at> gnu.org> said:

    >> From: Robert Pluim <rpluim <at> gmail.com>
    >> Cc: Gregory Heytings <gregory <at> heytings.org>,  luangruo <at> yahoo.com,
    >> larsi <at> gnus.org,  52053 <at> debbugs.gnu.org
    >> Date: Fri, 26 Nov 2021 10:24:22 +0100
    >> 
    Eli> Thanks.  This approach is fine by me, but the variable you introduced
    Eli> should not be internal, and it probably should be called out in NEWS
    Eli> (in the Lisp section), because I believe the intent was to allow other
    Eli> callers to use it, even though currently we have only one such caller.
    >> 
    >> So a variable that code can set to say 'use this other variable'?

    Eli> Maybe I'm missing something, but where did you see that this new
    Eli> variable is used to set help-link-key-to-documentation?

Itʼs checked to see if help-link-key-to-documentation should be used
(not set).

    >> Again, why not just bind `help-link-key-to-documentation' directly?

    Eli> Presumably, because help-link-key-to-documentation is a user option,
    Eli> and an option which is specific to Help commands?

Right. So Help commands should bind it as necessary.

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Fri, 26 Nov 2021 12:37:02 GMT) Full text and rfc822 format available.

Message #92 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Fri, 26 Nov 2021 13:36:31 +0100
Po Lu <luangruo <at> yahoo.com> writes:

> The `report-emacs-bug' message is displayed with a display property.
> The actual text in the buffer is empty.

Yes, and that's really confusing.  I wouldn't want to do something that
weird in *scratch*.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Fri, 26 Nov 2021 12:54:02 GMT) Full text and rfc822 format available.

Message #95 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Fri, 26 Nov 2021 20:52:57 +0800
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Yes, and that's really confusing.  I wouldn't want to do something that
> weird in *scratch*.

Then I think we should not fontify the key binding specially in that
comment.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Sat, 27 Nov 2021 16:07:01 GMT) Full text and rfc822 format available.

Message #98 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Sat, 27 Nov 2021 16:06:45 +0000
>> Updated patch attached.
>
> Thanks.  This approach is fine by me, but the variable you introduced 
> should not be internal, and it probably should be called out in NEWS (in 
> the Lisp section), because I believe the intent was to allow other 
> callers to use it, even though currently we have only one such caller.
>

Thanks for your feedback.  Updated (and much larger) patch attached.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Sat, 27 Nov 2021 16:10:01 GMT) Full text and rfc822 format available.

Message #101 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Sat, 27 Nov 2021 16:08:57 +0000
[Message part 1 (text/plain, inline)]
>>> Updated patch attached.
>> 
>> Thanks.  This approach is fine by me, but the variable you introduced 
>> should not be internal, and it probably should be called out in NEWS 
>> (in the Lisp section), because I believe the intent was to allow other 
>> callers to use it, even though currently we have only one such caller.
>
> Thanks for your feedback.  Updated (and much larger) patch attached.
>

Attached.
[Do-not-buttonize-key-bindings-outside-of-Help-buffer.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Mon, 29 Nov 2021 13:57:01 GMT) Full text and rfc822 format available.

Message #104 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: luangruo <at> yahoo.com, Eli Zaretskii <eliz <at> gnu.org>, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Mon, 29 Nov 2021 14:56:10 +0100
Gregory Heytings <gregory <at> heytings.org> writes:

>> Thanks for your feedback.  Updated (and much larger) patch attached.
>>
>
> Attached.

Eli, do you have any further comments, or should this be applied?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Mon, 29 Nov 2021 14:06:02 GMT) Full text and rfc822 format available.

Message #107 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: luangruo <at> yahoo.com, gregory <at> heytings.org, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Mon, 29 Nov 2021 16:05:28 +0200
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  luangruo <at> yahoo.com,  52053 <at> debbugs.gnu.org
> Date: Mon, 29 Nov 2021 14:56:10 +0100
> 
> Gregory Heytings <gregory <at> heytings.org> writes:
> 
> >> Thanks for your feedback.  Updated (and much larger) patch attached.
> >>
> >
> > Attached.
> 
> Eli, do you have any further comments, or should this be applied?

No further comments, thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Mon, 29 Nov 2021 14:14:02 GMT) Full text and rfc822 format available.

Message #110 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, gregory <at> heytings.org, 52053 <at> debbugs.gnu.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Mon, 29 Nov 2021 15:13:45 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Eli, do you have any further comments, or should this be applied?
>
> No further comments, thanks.

OK; patch pushed to Emacs 29, then.

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




bug marked as fixed in version 29.1, send any further explanations to 52053 <at> debbugs.gnu.org and Po Lu <luangruo <at> yahoo.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 29 Nov 2021 14:15:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52053; Package emacs. (Mon, 29 Nov 2021 18:01:02 GMT) Full text and rfc822 format available.

Message #115 received at 52053 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: luangruo <at> yahoo.com, Eli Zaretskii <eliz <at> gnu.org>, 52053 <at> debbugs.gnu.org,
 larsi <at> gnus.org
Subject: Re: bug#52053: 29.0.50; Nonsensical button "C-x C-f" in scratch buffer
Date: Mon, 29 Nov 2021 09:59:57 -0800
[[Sorry for the late comments here.]]

Gregory Heytings <gregory <at> heytings.org> writes:

> Attached.

The basic idea sounds good to me, but I have some minor questions:

> diff --git a/lisp/apropos.el b/lisp/apropos.el
[snip]
> +  (let ((help-buffer-under-preparation t))
> +    (help-setup-xref (list 'apropos-describe-plist symbol)
> +		     (called-interactively-p 'interactive))
> +    (with-help-window (help-buffer)
> +      (set-buffer standard-output)
> +      (princ "Symbol ")
> +      (prin1 symbol)
> +      (princ (substitute-command-keys "'s plist is\n ("))
> +      (put-text-property (+ (point-min) 7) (- (point) 14)
> +		         'face 'apropos-symbol)
> +      (insert (apropos-format-plist symbol "\n  "))
> +      (princ ")"))))

I'm fine with this but I ask myself if binding this variable should be
done in a macro (perhaps `with-help-window'?).  I'm too under the
weather to look at or think about this properly, so I'll just leave you
with the question.

> +(defvar help-buffer-under-preparation nil
> +  "Whether a *Help* buffer is being prepared.
> +This variable is bound to t during the preparation of a *Help*
> +buffer.")

Should we document what the practical effect of this is, instead of when
it is t?  Perhaps related, is this the best name for this variable?

Finally, does this call for updating the docstring of
`help-link-key-to-documentation'?




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 28 Dec 2021 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.