unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
	Katsumi Yamaoka <yamaoka@jpl.org>,
	51173@debbugs.gnu.org
Subject: bug#51173: 28.0.60; gnus-article-describe-key doesn't work
Date: Wed, 13 Oct 2021 16:01:51 -0400	[thread overview]
Message-ID: <jwv35p4pus6.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87h7dkx2g5.fsf@mail.linkov.net> (Juri Linkov's message of "Wed,  13 Oct 2021 20:24:42 +0300")

>> I think this is mea culpa - commit 2d1564103e.
>> It was changed to handle context menu clicks
>> in the displayed window.
>
> This patch should handle only mouse events specially:
>
> diff --git a/lisp/help.el b/lisp/help.el
> index fa4eaee417..956a3d0d32 100644
> --- a/lisp/help.el
> +++ b/lisp/help.el
> @@ -699,7 +699,10 @@ help--analyze-key
>           ;; is selected from the context menu that should describe KEY
>           ;; at the position of mouse click that opened the context menu.
>           ;; When no mouse was involved, it defaults to window-point.
> -	 (defn (save-excursion (mouse-set-point event) (key-binding key t))))
> +         (defn (if (consp event)
> +                   (save-excursion
> +                     (mouse-set-point event) (key-binding key t))
> +                 (key-binding key t))))
>      ;; Handle the case where we faked an entry in "Select and Paste" menu.
>      (when (and (eq defn nil)
>  	       (stringp (aref key (1- (length key))))

But this will still use "the wrong buffer" for mouse clicks, no?

BTW, maybe a cleaner fix would be as follows:
- Add a `buffer` argument to `describe-key(-briefly)`.
- Pass that argument from `gnus-article-describe-key`.
And to get the behavior that Juri just pushed that `buffer` argument
would default to (if (consp event) (window-buffer (posn-window
(event-start event))) (current-buffere)).


        Stefan






  parent reply	other threads:[~2021-10-13 20:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13  1:05 bug#51173: 28.0.60; gnus-article-describe-key doesn't work Katsumi Yamaoka
2021-10-13 11:59 ` Lars Ingebrigtsen
2021-10-13 16:33   ` Juri Linkov
2021-10-13 17:24     ` Juri Linkov
2021-10-13 18:49       ` Lars Ingebrigtsen
2021-10-13 19:18         ` Juri Linkov
2021-10-13 20:01       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-10-14 16:16         ` Juri Linkov
2021-10-14 18:41           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-15  6:49         ` Juri Linkov
2021-10-15 18:32           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-16 17:55             ` Juri Linkov
2021-10-16 19:53               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-18 16:20                 ` Juri Linkov
2021-10-20 17:55                   ` Juri Linkov
2021-10-21 16:43                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-29 18:49                       ` Juri Linkov
2021-11-29 20:57                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-30  3:26                           ` Eli Zaretskii
2021-11-30 13:06                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-30  8:54                           ` Juri Linkov
2021-12-01 17:36                             ` 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=jwv35p4pus6.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=51173@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=yamaoka@jpl.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).