GNU bug report logs - #53322
28.0.91; "C-h c" errors out for menu-bar clicks

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Mon, 17 Jan 2022 18:04:02 UTC

Severity: normal

Found in version 28.0.91

Done: Eli Zaretskii <eliz <at> gnu.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 53322 in the body.
You can then email your comments to 53322 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#53322; Package emacs. (Mon, 17 Jan 2022 18:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 17 Jan 2022 18:04:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.91; "C-h c" errors out for menu-bar clicks
Date: Mon, 17 Jan 2022 20:03:05 +0200
  C-h c
  Click File->Open File from the menu bar

This signals an error:

  posn-set-point: Position not in text area of window

Same thing happens with "C-h k".


In GNU Emacs 28.0.91 (build 2, i686-pc-mingw32)
 of 2022-01-09 built on HOME-C4E4A596F7
Windowing system distributor 'Microsoft Corp.', version 5.1.2600
System Description: Microsoft Windows XP Service Pack 3 (v5.1.0.2600)

Configured using:
 'configure --prefix=/d/usr --with-wide-int --with-native-compilation'

Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES
NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS XPM ZLIB

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1255

Major mode: RMAIL

Minor modes in effect:
  shell-dirtrack-mode: t
  desktop-save-mode: t
  save-place-mode: t
  display-battery-mode: t
  display-time-mode: t
  tooltip-mode: t
  global-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
  temp-buffer-resize-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t

Load-path shadows:
d:/usr/share/emacs/site-lisp/soap-client hides d:/usr/share/emacs/28.0.91/lisp/net/soap-client

Features:
(shadow emacsbug debug backtrace completion pulse etags fileloop
generator compare-w apropos smerge-mode diff whitespace skeleton
texinfo texinfo-loaddefs cl-print mouse-copy mouse-drag vc-mtn vc-hg
vc-src vc-sccs vc-svn rmailout eieio-opt speedbar ezimage dframe
find-func shortdoc thingatpt help-fns radix-tree dabbrev misearch
multi-isearch shell pcomplete comint ansi-color rfc2104 gnutls
network-stream nsm mail-extr smtpmail mailalias sendmail cc-awk
conf-mode make-mode jka-compr bat-mode noutline outline vc-cvs vc-rcs
dired-aux vc-bzr generic flyspell add-log vc vc-git diff-mode
easy-mmode vc-dispatcher bug-reference mule-util info rmailsum
shr-color color shr kinsoku svg dom browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util url-parse url-vars mailcap qp rmailmm message rmc puny rfc822
mml mml-sec epa epg rfc6068 epg-config gnus-util text-property-search
time-date mm-decode mm-bodies mm-encode mailabbrev gmm-utils
mailheader mail-parse rfc2231 rmail rmail-loaddefs auth-source eieio
eieio-core eieio-loaddefs password-cache json map rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils desktop frameset server
find-lisp dired dired-loaddefs filecache mairix cus-edit pp cus-load
wid-edit saveplace midnight facemenu ispell derived generic-x cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs xref project ring format-spec battery dbus xml time
comp comp-cstr warnings subr-x rx cl-seq cl-macs cl-extra help-mode
seq byte-opt gv cl-loaddefs cl-lib bytecomp byte-compile cconv
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table
term/w32-win w32-win w32-vars term/common-win 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 hashtable-print-readable backquote threads
w32notify w32 lcms2 multi-tty make-network-process native-compile
emacs)

Memory information:
((conses 16 3957439 320550)
 (symbols 48 24492 2)
 (strings 16 170808 24807)
 (string-bytes 1 5539140)
 (vectors 16 77302)
 (vector-slots 8 2085405 310684)
 (floats 8 382 369)
 (intervals 40 875430 6079)
 (buffers 888 332))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53322; Package emacs. (Mon, 17 Jan 2022 18:49:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 53322 <at> debbugs.gnu.org
Subject: Re: bug#53322: 28.0.91; "C-h c" errors out for menu-bar clicks
Date: Mon, 17 Jan 2022 20:48:35 +0200
> Date: Mon, 17 Jan 2022 20:03:05 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> 
>   C-h c
>   Click File->Open File from the menu bar
> 
> This signals an error:
> 
>   posn-set-point: Position not in text area of window
> 
> Same thing happens with "C-h k".

Juri, this is a direct consequence of your changes in commit 8230a47:

  commit 8230a47ecc8c11f518ee20a9055c0c27339a6730
  Author:     Juri Linkov <juri <at> linkov.net>
  AuthorDate: Wed Dec 1 19:36:00 2021 +0200
  Commit:     Juri Linkov <juri <at> linkov.net>
  CommitDate: Wed Dec 1 19:36:00 2021 +0200

      * lisp/help.el (help--analyze-key): Prefer posn-set-point over mouse-set-point

      * lisp/help.el (help--analyze-key): Use posn-set-point instead of
      mouse-set-point that runs the hook mouse-leave-buffer-hook via
      mouse-minibuffer-check.  Using posn-set-point also unnecessitates
      extra conditions added in bug#51421.

The sad part is that the "unnecessary extra conditions" added in
bug#51421 fixed the very problem that your change now reintroduced.

Did you test that change with the original recipe which was solved in
bug#51421?  Did it work for you back then?

Any suggestions for how to fix this regression, except by reverting
the above commit?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53322; Package emacs. (Tue, 18 Jan 2022 18:57:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53322 <at> debbugs.gnu.org
Subject: Re: bug#53322: 28.0.91; "C-h c" errors out for menu-bar clicks
Date: Tue, 18 Jan 2022 20:25:45 +0200
>   C-h c
>   Click File->Open File from the menu bar
>
> This signals an error:
>
>   posn-set-point: Position not in text area of window
>
> Same thing happens with "C-h k".

This is not reproducible, neither in gtk, nor in no-toolkit.
Anyway, it's a pain to look at the File menu
with the glaring blunder of the added item
that has no place in this overlong menu.
No other app has such a weird thing as enabling
a mode that makes no sense when the user already
deleted the frame and wants to bring it back.
Instead of this, it makes more sense to immediately
display the item "Undelete Frame" when the user
accidentally deleted the frame.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53322; Package emacs. (Tue, 18 Jan 2022 19:43:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 53322 <at> debbugs.gnu.org
Subject: Re: bug#53322: 28.0.91; "C-h c" errors out for menu-bar clicks
Date: Tue, 18 Jan 2022 21:41:59 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Cc: 53322 <at> debbugs.gnu.org
> Date: Tue, 18 Jan 2022 20:25:45 +0200
> 
> >   C-h c
> >   Click File->Open File from the menu bar
> >
> > This signals an error:
> >
> >   posn-set-point: Position not in text area of window
> >
> > Same thing happens with "C-h k".
> 
> This is not reproducible, neither in gtk, nor in no-toolkit.

That's expected.  But it is still a problem.

Can you explain the rationale for the change in 8230a47?  I've read
the commit log, but I still don't get it: what exactly is the problem
with running the mouse-leave-buffer-hook in that case?  Also, are
there other reasons for that change?  It was committed together with a
change in isearch.el, so is that related in some way?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53322; Package emacs. (Wed, 19 Jan 2022 18:40:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53322 <at> debbugs.gnu.org
Subject: Re: bug#53322: 28.0.91; "C-h c" errors out for menu-bar clicks
Date: Wed, 19 Jan 2022 20:30:31 +0200
>       * lisp/help.el (help--analyze-key): Use posn-set-point instead of
>       mouse-set-point that runs the hook mouse-leave-buffer-hook via
>       mouse-minibuffer-check.  Using posn-set-point also unnecessitates
>       extra conditions added in bug#51421.
>
> The sad part is that the "unnecessary extra conditions" added in
> bug#51421 fixed the very problem that your change now reintroduced.
>
> Did you test that change with the original recipe which was solved in
> bug#51421?  Did it work for you back then?

Naturally, I tested this change with the original recipe from bug#51421.
And it did work then as well as it's working now.  I don't understand
where is the problem?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53322; Package emacs. (Wed, 19 Jan 2022 18:40:03 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53322 <at> debbugs.gnu.org
Subject: Re: bug#53322: 28.0.91; "C-h c" errors out for menu-bar clicks
Date: Wed, 19 Jan 2022 20:34:19 +0200
>> >   C-h c
>> >   Click File->Open File from the menu bar
>> >
>> > This signals an error:
>> >
>> >   posn-set-point: Position not in text area of window
>> >
>> > Same thing happens with "C-h k".
>>
>> This is not reproducible, neither in gtk, nor in no-toolkit.
>
> That's expected.  But it is still a problem.
>
> Can you explain the rationale for the change in 8230a47?  I've read
> the commit log, but I still don't get it: what exactly is the problem
> with running the mouse-leave-buffer-hook in that case?  Also, are
> there other reasons for that change?  It was committed together with a
> change in isearch.el, so is that related in some way?

The rationale was explained at the end of bug#51173 that begins
with the error in isearch.  But I see no problem, there is no error now
when clicking any menu after C-h c.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53322; Package emacs. (Wed, 19 Jan 2022 20:16:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 53322 <at> debbugs.gnu.org
Subject: Re: bug#53322: 28.0.91; "C-h c" errors out for menu-bar clicks
Date: Wed, 19 Jan 2022 22:15:50 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Cc: 53322 <at> debbugs.gnu.org
> Date: Wed, 19 Jan 2022 20:30:31 +0200
> 
> >       * lisp/help.el (help--analyze-key): Use posn-set-point instead of
> >       mouse-set-point that runs the hook mouse-leave-buffer-hook via
> >       mouse-minibuffer-check.  Using posn-set-point also unnecessitates
> >       extra conditions added in bug#51421.
> >
> > The sad part is that the "unnecessary extra conditions" added in
> > bug#51421 fixed the very problem that your change now reintroduced.
> >
> > Did you test that change with the original recipe which was solved in
> > bug#51421?  Did it work for you back then?
> 
> Naturally, I tested this change with the original recipe from bug#51421.
> And it did work then as well as it's working now.  I don't understand
> where is the problem?

I reported the problem: it's posn-set-point that barfs when the event
is outside of the text area.  The menu-bar menus have some of their
items (the first ones) at coordinates that are outside of the text
area, assuming the tool bar and/or the tab bar are displayed.  So
posn-set-point barfs.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53322; Package emacs. (Wed, 19 Jan 2022 20:29:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 53322 <at> debbugs.gnu.org
Subject: Re: bug#53322: 28.0.91; "C-h c" errors out for menu-bar clicks
Date: Wed, 19 Jan 2022 22:28:01 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Cc: 53322 <at> debbugs.gnu.org
> Date: Wed, 19 Jan 2022 20:34:19 +0200
> 
> > Can you explain the rationale for the change in 8230a47?  I've read
> > the commit log, but I still don't get it: what exactly is the problem
> > with running the mouse-leave-buffer-hook in that case?  Also, are
> > there other reasons for that change?  It was committed together with a
> > change in isearch.el, so is that related in some way?
> 
> The rationale was explained at the end of bug#51173 that begins
> with the error in isearch.

But you proposed a solution for that which didn't involve using
posn-set-point, so there's an alternative that doesn't reintroduce the
bug with "C-h k" on menu-bar items.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53322; Package emacs. (Wed, 19 Jan 2022 20:37:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 53322 <at> debbugs.gnu.org
Subject: Re: bug#53322: 28.0.91; "C-h c" errors out for menu-bar clicks
Date: Wed, 19 Jan 2022 22:35:55 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Cc: 53322 <at> debbugs.gnu.org
> Date: Wed, 19 Jan 2022 20:34:19 +0200
> 
> I see no problem, there is no error now when clicking any menu after
> C-h c.

In which version of Emacs are you trying that?  The bug report is
about Emacs 28.0.91.




bug closed, send any further explanations to 53322 <at> debbugs.gnu.org and Eli Zaretskii <eliz <at> gnu.org> Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 20 Jan 2022 12:23:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53322; Package emacs. (Thu, 20 Jan 2022 18:56:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53322 <at> debbugs.gnu.org
Subject: Re: bug#53322: 28.0.91; "C-h c" errors out for menu-bar clicks
Date: Thu, 20 Jan 2022 20:44:59 +0200
>> I see no problem, there is no error now when clicking any menu after
>> C-h c.
>
> In which version of Emacs are you trying that?  The bug report is
> about Emacs 28.0.91.

There is no error in 28.0.91 with gtk, lucid, no-toolkit.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 18 Feb 2022 12:24:07 GMT) Full text and rfc822 format available.

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

Previous Next


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