GNU bug report logs - #46373
28.0.50; "Not in most nested minibuffer" error when selecting date in calendar

Previous Next

Package: emacs;

Reported by: Sébastien Le Callonnec <sebastien <at> weblogism.com>

Date: Sun, 7 Feb 2021 21:28:02 UTC

Severity: normal

Found in version 28.0.50

Done: Alan Mackenzie <acm <at> muc.de>

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 46373 in the body.
You can then email your comments to 46373 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#46373; Package emacs. (Sun, 07 Feb 2021 21:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sébastien Le Callonnec <sebastien <at> weblogism.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 07 Feb 2021 21:28:02 GMT) Full text and rfc822 format available.

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

From: Sébastien Le Callonnec <sebastien <at> weblogism.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; "Not in most nested minibuffer" error when selecting date in
 calendar
Date: Sun, 7 Feb 2021 21:27:30 +0000
Hi,

When picking a date in a calendar to insert a date in an Org mode file,
the following error appears:

Debugger entered--Lisp error: (error "Not in most nested minibuffer")
signal(error ("Not in most nested minibuffer"))
error("%s" "Not in most nested minibuffer")
exit-minibuffer()
org-calendar-select-mouse((mouse-1 (#<window 3 on *Calendar*> 479 (160 . 
111) 1580058 nil 479 (17 . 6) nil (7 . 3) (9 . 18))))
funcall-interactively(org-calendar-select-mouse (mouse-1 (#<window 3 on 
*Calendar*> 479 (160 . 111) 1580058 nil 479 (17 . 6) nil (7 . 3) (9 . 
18))))
call-interactively(org-calendar-select-mouse nil nil)
command-execute(org-calendar-select-mouse)
read-string("Date+time [2021-02-07]: " nil org-read-date-history nil)
org-read-date(nil totime nil nil nil nil nil)
org-time-stamp(nil)
funcall-interactively(org-time-stamp nil)
call-interactively(org-time-stamp nil nil)
command-execute(org-time-stamp)


Here are the steps to reproduce the issue following `emacs -Q`:

M-: (setq debug-on-error t) RET
C-x C-f /tmp/example.org RET
C-c .
Click on date in calendar


git bisect indicates commit c7c154bb5756e0ae71d342c5d8aabf725877f186 is 
the first bad commit




In GNU Emacs 28.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 
3.24.23, cairo version 1.16.0)
of 2021-02-07 built on pyjama
Repository revision: 7c5938ad7d8884d03471e2395937e11611faadb9
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Ubuntu 20.10

Configured using:
'configure --with-imagemagick --with-rsvg --with-gnutls
--with-mailutils --with-harfbuzz'

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

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

Major mode: Org

Minor modes in effect:
tooltip-mode: t
global-eldoc-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
transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug sendmail help-fns radix-tree cl-print
debug backtrace mule-util cal-move org-element avl-tree generator ol-eww
eww xdg url-queue thingatpt mm-url ol-rmail ol-mhe ol-irc ol-info
ol-gnus nnselect gnus-search eieio-opt cl-extra help-mode speedbar
ezimage dframe gnus-art mm-uu mml2015 mm-view mml-smime smime dig
gnus-sum 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 gnus-group gnus-undo gnus-start gnus-dbus
dbus xml gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time
gnus-spec gnus-int gnus-range message rmc puny rfc822 mml mml-sec epa
derived epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map rfc2047 rfc2045 ietf-drums
text-property-search seq byte-opt gv bytecomp byte-compile cconv
mail-utils mm-util mail-prsvr wid-edit ol-docview doc-view jka-compr
image-mode exif dired dired-loaddefs ol-bibtex bibtex iso8601 ol-bbdb
ol-w3m org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-footnote org-src ob-comint org-pcomplete pcomplete comint ansi-color
ring org-list org-faces org-entities time-date subr-x noutline outline
easy-mmode org-version ob-emacs-lisp ob-core ob-eval org-table ol
org-keys org-compat advice org-macs org-loaddefs format-spec find-func
cal-menu easymenu calendar cal-loaddefs cl-loaddefs cl-lib iso-transl
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
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 elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
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 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 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 177702 17376)
(symbols 48 19558 2)
(strings 32 67165 2399)
(string-bytes 1 2243425)
(vectors 16 33900)
(vector-slots 8 381904 26478)
(floats 8 243 156)
(intervals 56 636 0)
(buffers 984 17))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46373; Package emacs. (Mon, 08 Feb 2021 06:52:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Sébastien Le Callonnec <sebastien <at> weblogism.com>
Cc: Alan Mackenzie <acm <at> muc.de>, 46373 <at> debbugs.gnu.org
Subject: Re: bug#46373: 28.0.50; "Not in most nested minibuffer" error when
 selecting date in calendar
Date: Mon, 08 Feb 2021 07:50:52 +0100
Sébastien Le Callonnec <sebastien <at> weblogism.com> writes:

> Debugger entered--Lisp error: (error "Not in most nested minibuffer")
> signal(error ("Not in most nested minibuffer"))

[...]

> Here are the steps to reproduce the issue following `emacs -Q`:
>
> M-: (setq debug-on-error t) RET
> C-x C-f /tmp/example.org RET
> C-c .
> Click on date in calendar
>
> git bisect indicates commit c7c154bb5756e0ae71d342c5d8aabf725877f186
> is the first bad commit

An even simpler method to reproduce:

`M-x org-time-stamp RET'

then mouse-click on one of the dates in the calendar buffer.

I've added Alan to the CCs since c7c154bb5 is his change.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46373; Package emacs. (Mon, 08 Feb 2021 12:18:01 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: acm <at> muc.de, 46373 <at> debbugs.gnu.org,
 Sébastien Le Callonnec <sebastien <at> weblogism.com>
Subject: Re: bug#46373: 28.0.50; "Not in most nested minibuffer" error when
 selecting date in calendar
Date: Mon, 8 Feb 2021 12:17:15 +0000
Hello, Lars and Sébastien.

On Mon, Feb 08, 2021 at 07:50:52 +0100, Lars Ingebrigtsen wrote:
> Sébastien Le Callonnec <sebastien <at> weblogism.com> writes:

> > Debugger entered--Lisp error: (error "Not in most nested minibuffer")
> > signal(error ("Not in most nested minibuffer"))

> [...]

> > Here are the steps to reproduce the issue following `emacs -Q`:

> > M-: (setq debug-on-error t) RET
> > C-x C-f /tmp/example.org RET
> > C-c .
> > Click on date in calendar

> > git bisect indicates commit c7c154bb5756e0ae71d342c5d8aabf725877f186
> > is the first bad commit

> An even simpler method to reproduce:

> `M-x org-time-stamp RET'

> then mouse-click on one of the dates in the calendar buffer.

Sorry about the misunderstanding.  I'd neglected the case when
exit-minibuffer is called from Lisp code rather than from a keybinding.
Please try out the following patch, which I think fixes this bug:



diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 185d355ba7..b60775d457 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -2393,7 +2393,7 @@ Minibuffer Commands
 @deffn Command exit-minibuffer
 This command exits the active minibuffer.  It is normally bound to
 keys in minibuffer local keymaps.  The command throws an error if the
-current buffer is not the active minibuffer.
+current buffer is a minibuffer, but not the active minibuffer.
 @end deffn
 
 @deffn Command self-insert-and-exit
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 03cc70c0d4..a899a943d4 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -2116,13 +2116,15 @@ minibuffer-hide-completions
 (defun exit-minibuffer ()
   "Terminate this minibuffer argument."
   (interactive)
+  (when (or
+         (innermost-minibuffer-p)
+         (not (minibufferp)))
   ;; If the command that uses this has made modifications in the minibuffer,
   ;; we don't want them to cause deactivation of the mark in the original
   ;; buffer.
   ;; A better solution would be to make deactivate-mark buffer-local
   ;; (or to turn it into a list of buffers, ...), but in the mean time,
   ;; this should do the trick in most cases.
-  (when (innermost-minibuffer-p)
     (setq deactivate-mark nil)
     (throw 'exit nil))
   (error "%s" "Not in most nested minibuffer"))


> I've added Alan to the CCs since c7c154bb5 is his change.

Thanks!

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

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46373; Package emacs. (Mon, 08 Feb 2021 13:59:02 GMT) Full text and rfc822 format available.

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

From: Sébastien Le Callonnec <sebastien <at> weblogism.com>
To: Alan Mackenzie <acm <at> muc.de>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 46373 <at> debbugs.gnu.org
Subject: Re: bug#46373: 28.0.50; "Not in most nested minibuffer" error when
 selecting date in calendar
Date: Mon, 08 Feb 2021 13:54:00 +0000
Hi Alan,

On 2021-02-08 12:17:15, Alan Mackenzie wrote:
> Hello, Lars and Sébastien.
>
> On Mon, Feb 08, 2021 at 07:50:52 +0100, Lars Ingebrigtsen wrote:
>> Sébastien Le Callonnec <sebastien <at> weblogism.com> writes:
>
>> > Debugger entered--Lisp error: (error "Not in most nested minibuffer")
>> > signal(error ("Not in most nested minibuffer"))
>

[...]

>
> Sorry about the misunderstanding.  I'd neglected the case when
> exit-minibuffer is called from Lisp code rather than from a keybinding.
> Please try out the following patch, which I think fixes this bug:
>

Thanks Alan!  I have tested the fix, and this indeed solves the problem
for me.


Regards,
Sébastien.




Reply sent to Alan Mackenzie <acm <at> muc.de>:
You have taken responsibility. (Tue, 09 Feb 2021 09:52:02 GMT) Full text and rfc822 format available.

Notification sent to Sébastien Le Callonnec <sebastien <at> weblogism.com>:
bug acknowledged by developer. (Tue, 09 Feb 2021 09:52:02 GMT) Full text and rfc822 format available.

Message #19 received at 46373-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Sébastien Le Callonnec <sebastien <at> weblogism.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 46373-done <at> debbugs.gnu.org
Subject: Re: bug#46373: 28.0.50; "Not in most nested minibuffer" error when
 selecting date in calendar
Date: Tue, 9 Feb 2021 09:51:11 +0000
Hello Sébastien.

On Mon, Feb 08, 2021 at 13:54:00 +0000, Sébastien Le Callonnec wrote:
> Hi Alan,

> On 2021-02-08 12:17:15, Alan Mackenzie wrote:
> > Hello, Lars and Sébastien.

> > On Mon, Feb 08, 2021 at 07:50:52 +0100, Lars Ingebrigtsen wrote:
> >> Sébastien Le Callonnec <sebastien <at> weblogism.com> writes:

> >> > Debugger entered--Lisp error: (error "Not in most nested minibuffer")
> >> > signal(error ("Not in most nested minibuffer"))


> [...]


> > Sorry about the misunderstanding.  I'd neglected the case when
> > exit-minibuffer is called from Lisp code rather than from a keybinding.
> > Please try out the following patch, which I think fixes this bug:


> Thanks Alan!  I have tested the fix, and this indeed solves the problem
> for me.

Thanks for the testing.  I've committed the fix to master, and I'm
closing the bug with this post.

> Regards,
> Sébastien.

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46373; Package emacs. (Tue, 09 Feb 2021 12:59:02 GMT) Full text and rfc822 format available.

Message #22 received at 46373-done <at> debbugs.gnu.org (full text, mbox):

From: Sébastien Le Callonnec <sebastien <at> weblogism.com>
To: Alan Mackenzie <acm <at> muc.de>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 46373-done <at> debbugs.gnu.org
Subject: Re: bug#46373: 28.0.50; "Not in most nested minibuffer" error when
 selecting date in calendar
Date: Tue, 09 Feb 2021 12:55:58 +0000
Hi Alan,

On 2021-02-09 09:51:11, Alan Mackenzie wrote:

[...]

>
> Thanks for the testing.  I've committed the fix to master, and I'm
> closing the bug with this post.

I have verified that this works on master.  Thanks a lot for your quick
help on this!

Regards,
Sébastien.

ps.– Hoping that responding to this bug report won't re-open by mistake.
Apologies in advance if it does.




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

This bug report was last modified 3 years and 40 days ago.

Previous Next


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