GNU bug report logs - #53391
First keypress doesn't work when scratch buffer is killed in emacs 28, emacs daemon + emacs client is used

Previous Next

Package: emacs;

Reported by: Евгений Курневский <kurnevsky <at> gmail.com>

Date: Thu, 20 Jan 2022 13:50:02 UTC

Severity: normal

To reply to this bug, email your comments to 53391 AT debbugs.gnu.org.

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#53391; Package emacs. (Thu, 20 Jan 2022 13:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Евгений Курневский <kurnevsky <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 20 Jan 2022 13:50:02 GMT) Full text and rfc822 format available.

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

From: Евгений Курневский
 <kurnevsky <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: First keypress doesn't work when scratch buffer is killed in emacs
 28, emacs daemon + emacs client is used
Date: Thu, 20 Jan 2022 13:49:19 +0000
[Message part 1 (text/plain, inline)]
I have encountered a problem with emacs 28 - sometimes it skips the first
button press in a very specific case. To reproduce write the following as a
config file:

(kill-buffer "*scratch*")

Start emacs daemon with: emacs -Q -l this_init_file.el --daemon
Launch emacs client with: emacsclient -nw some_file.txt
Try to type some key, like 'x', and you will see 'x is undefined'

Probably I shouldn't have killed the scratch buffer in the first place, so
I'm fine if it's not considered as a bug. But this used to work fine with
emacs 27 and causes this strange behavior with emacs 28 which was
unexpected to me.

Emacs version I use: 28.0.91

Initially reported here: https://github.com/jwiegley/use-package/issues/973
[Message part 2 (text/html, inline)]

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

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Евгений Курневский
 <kurnevsky <at> gmail.com>
Cc: 53391 <at> debbugs.gnu.org
Subject: Re: bug#53391: First keypress doesn't work when scratch buffer is
 killed in emacs 28, emacs daemon + emacs client is used
Date: Thu, 20 Jan 2022 15:13:07 +0100
Евгений Курневский <kurnevsky <at> gmail.com> writes:

> I have encountered a problem with emacs 28 - sometimes it skips the
> first button press in a very specific case. To reproduce write the
> following as a config file:
>
> (kill-buffer "*scratch*")
>
> Start emacs daemon with: emacs -Q -l this_init_file.el --daemon
> Launch emacs client with: emacsclient -nw some_file.txt
> Try to type some key, like 'x', and you will see 'x is undefined'

I'm unable to reproduce this in Emacs 28 on Debian/bookworm.  Can you
include the information that `M-x report-emacs-bug' outputs?

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




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 20 Jan 2022 14:14:02 GMT) Full text and rfc822 format available.

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

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

From: Евгений Курневский
 <kurnevsky <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 53391 <at> debbugs.gnu.org
Subject: Re: bug#53391: First keypress doesn't work when scratch buffer is
 killed in emacs 28, emacs daemon + emacs client is used
Date: Thu, 20 Jan 2022 14:19:00 +0000
[Message part 1 (text/plain, inline)]
In GNU Emacs 28.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30,
cairo version 1.16.0)
Repository revision: emacs-28.0.91
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: NixOS 21.11 (Porcupine)

Configured using:
 'configure
 --prefix=/nix/store/1a8vlvdff3s7a9ymx38yg9vrg3w6gmxs-emacs-gcc-28.0.91
 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
 --with-cairo --with-native-compilation'

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

Important settings:
  value of $EMACSLOADPATH:
/nix/store/dywjh8zmfvyxsppx613yh8zyfcxmcxqr-emacs-packages-deps/share/emacs/site-lisp:
  value of $EMACSNATIVELOADPATH:
/nix/store/dywjh8zmfvyxsppx613yh8zyfcxmcxqr-emacs-packages-deps/share/emacs/native-lisp::
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Messages

Minor modes in effect:
  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
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
/nix/store/dywjh8zmfvyxsppx613yh8zyfcxmcxqr-emacs-packages-deps/share/emacs/site-lisp/elpa/transient-20220117.1122/transient
hides
/nix/store/1a8vlvdff3s7a9ymx38yg9vrg3w6gmxs-emacs-gcc-28.0.91/share/emacs/28.0.91/lisp/transient
/nix/store/dywjh8zmfvyxsppx613yh8zyfcxmcxqr-emacs-packages-deps/share/emacs/site-lisp/elpa/let-alist-1.0.6/let-alist
hides
/nix/store/1a8vlvdff3s7a9ymx38yg9vrg3w6gmxs-emacs-gcc-28.0.91/share/emacs/28.0.91/lisp/emacs-lisp/let-alist

Features:
(shadow sort mail-extr emacsbug message 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 time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
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 hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 70501 6217)
 (symbols 48 6638 0)
 (strings 32 19836 2949)
 (string-bytes 1 766284)
 (vectors 16 14132)
 (vector-slots 8 299534 10510)
 (floats 8 23 29)
 (intervals 56 225 0)
 (buffers 992 10))


On Thu, Jan 20, 2022 at 2:13 PM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Евгений Курневский <kurnevsky <at> gmail.com> writes:
>
> > I have encountered a problem with emacs 28 - sometimes it skips the
> > first button press in a very specific case. To reproduce write the
> > following as a config file:
> >
> > (kill-buffer "*scratch*")
> >
> > Start emacs daemon with: emacs -Q -l this_init_file.el --daemon
> > Launch emacs client with: emacsclient -nw some_file.txt
> > Try to type some key, like 'x', and you will see 'x is undefined'
>
> I'm unable to reproduce this in Emacs 28 on Debian/bookworm.  Can you
> include the information that `M-x report-emacs-bug' outputs?
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>


-- 
С уважением, Курневский Евгений.
[Message part 2 (text/html, inline)]

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

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Евгений Курневский
 <kurnevsky <at> gmail.com>
Cc: larsi <at> gnus.org, 53391 <at> debbugs.gnu.org
Subject: Re: bug#53391: First keypress doesn't work when scratch buffer is
 killed in emacs 28, emacs daemon + emacs client is used
Date: Thu, 20 Jan 2022 22:32:59 +0200
> From: Евгений Курневский
>  <kurnevsky <at> gmail.com>
> Date: Thu, 20 Jan 2022 14:19:00 +0000
> Cc: 53391 <at> debbugs.gnu.org
> 
> In GNU Emacs 28.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)
> Repository revision: emacs-28.0.91
> Repository branch: master

According to this, you've built from some Git repository that is not
the upstream Emacs repository?  Are you sure there are no local
changes in your master branch?




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

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

From: Евгений Курневский
 <kurnevsky <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 53391 <at> debbugs.gnu.org
Subject: Re: bug#53391: First keypress doesn't work when scratch buffer is
 killed in emacs 28, emacs daemon + emacs client is used
Date: Thu, 20 Jan 2022 20:42:51 +0000
[Message part 1 (text/plain, inline)]
I use nixos with emacs-overlay, and in particular this version of emacs:
https://github.com/nix-community/emacs-overlay/blob/master/repos/emacs/emacs-unstable.json
It can't be my local changes because the build process in nix is completely
automated and deterministic.
It's also compiled with NATIVE_FULL_AOT=1 - could it be the difference?

On Thu, Jan 20, 2022 at 8:33 PM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Евгений Курневский
> >  <kurnevsky <at> gmail.com>
> > Date: Thu, 20 Jan 2022 14:19:00 +0000
> > Cc: 53391 <at> debbugs.gnu.org
> >
> > In GNU Emacs 28.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version
> 3.24.30, cairo version 1.16.0)
> > Repository revision: emacs-28.0.91
> > Repository branch: master
>
> According to this, you've built from some Git repository that is not
> the upstream Emacs repository?  Are you sure there are no local
> changes in your master branch?
>


-- 
С уважением, Курневский Евгений.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53391; Package emacs. (Fri, 21 Jan 2022 09:13:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Евгений Курневский
 <kurnevsky <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 53391 <at> debbugs.gnu.org
Subject: Re: bug#53391: First keypress doesn't work when scratch buffer is
 killed in emacs 28, emacs daemon + emacs client is used
Date: Fri, 21 Jan 2022 10:12:28 +0100
Евгений Курневский <kurnevsky <at> gmail.com> writes:

> I use nixos with emacs-overlay, and in particular this version of emacs:
> https://github.com/nix-community/emacs-overlay/blob/master/repos/emacs/emacs-unstable.json

What is emacs-overlay?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53391; Package emacs. (Fri, 21 Jan 2022 09:19:01 GMT) Full text and rfc822 format available.

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

From: Евгений Курневский
 <kurnevsky <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 53391 <at> debbugs.gnu.org
Subject: Re: bug#53391: First keypress doesn't work when scratch buffer is
 killed in emacs 28, emacs daemon + emacs client is used
Date: Fri, 21 Jan 2022 09:18:05 +0000
[Message part 1 (text/plain, inline)]
Just a repository with additional emacs packages:
https://github.com/nix-community/emacs-overlay
Overlay is a nixos term: https://nixos.wiki/wiki/Overlays

On Fri, Jan 21, 2022 at 9:12 AM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Евгений Курневский <kurnevsky <at> gmail.com> writes:
>
> > I use nixos with emacs-overlay, and in particular this version of emacs:
> >
> https://github.com/nix-community/emacs-overlay/blob/master/repos/emacs/emacs-unstable.json
>
> What is emacs-overlay?
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>


-- 
С уважением, Курневский Евгений.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53391; Package emacs. (Fri, 21 Jan 2022 09:27:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Евгений Курневский
 <kurnevsky <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 53391 <at> debbugs.gnu.org
Subject: Re: bug#53391: First keypress doesn't work when scratch buffer is
 killed in emacs 28, emacs daemon + emacs client is used
Date: Fri, 21 Jan 2022 10:25:54 +0100
Евгений Курневский <kurnevsky <at> gmail.com> writes:

> Just a repository with additional emacs packages:
> https://github.com/nix-community/emacs-overlay
> Overlay is a nixos term: https://nixos.wiki/wiki/Overlays

So the problem could be in these packages?  Could you try to build a
plain emacs-28 and see whether you can reproduce the problems there?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53391; Package emacs. (Fri, 21 Jan 2022 09:33:02 GMT) Full text and rfc822 format available.

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

From: Евгений Курневский
 <kurnevsky <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 53391 <at> debbugs.gnu.org
Subject: Re: bug#53391: First keypress doesn't work when scratch buffer is
 killed in emacs 28, emacs daemon + emacs client is used
Date: Fri, 21 Jan 2022 09:32:11 +0000
[Message part 1 (text/plain, inline)]
It is a plain emacs built with nixos. These packages are just different
versions of emacs, like stable/unstable/master and with or without native
compilation/pgtk. Also it contains all elpa/melpa packages and functions to
install them in nixos.

On Fri, Jan 21, 2022 at 9:26 AM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Евгений Курневский <kurnevsky <at> gmail.com> writes:
>
> > Just a repository with additional emacs packages:
> > https://github.com/nix-community/emacs-overlay
> > Overlay is a nixos term: https://nixos.wiki/wiki/Overlays
>
> So the problem could be in these packages?  Could you try to build a
> plain emacs-28 and see whether you can reproduce the problems there?
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>


-- 
С уважением, Курневский Евгений.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53391; Package emacs. (Fri, 21 Jan 2022 10:02:02 GMT) Full text and rfc822 format available.

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

From: Евгений Курневский
 <kurnevsky <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 53391 <at> debbugs.gnu.org
Subject: Re: bug#53391: First keypress doesn't work when scratch buffer is
 killed in emacs 28, emacs daemon + emacs client is used
Date: Fri, 21 Jan 2022 10:01:23 +0000
[Message part 1 (text/plain, inline)]
Could it be some kind of a race? When originally tried with my complete
config I had different results with and without (require 'easy-mmode)
before killing scratch buffer. Probably you can try with this line as well?
Also I noticed that if you press q in this case emacs just kills this
opened buffer. So probably emacs is in some mode in this case - can I check
it somehow?

On Fri, Jan 21, 2022 at 9:32 AM Евгений Курневский <kurnevsky <at> gmail.com>
wrote:

> It is a plain emacs built with nixos. These packages are just different
> versions of emacs, like stable/unstable/master and with or without native
> compilation/pgtk. Also it contains all elpa/melpa packages and functions to
> install them in nixos.
>
> On Fri, Jan 21, 2022 at 9:26 AM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
>
>> Евгений Курневский <kurnevsky <at> gmail.com> writes:
>>
>> > Just a repository with additional emacs packages:
>> > https://github.com/nix-community/emacs-overlay
>> > Overlay is a nixos term: https://nixos.wiki/wiki/Overlays
>>
>> So the problem could be in these packages?  Could you try to build a
>> plain emacs-28 and see whether you can reproduce the problems there?
>>
>> --
>> (domestic pets only, the antidote for overdose, milk.)
>>    bloggy blog: http://lars.ingebrigtsen.no
>>
>
>
> --
> С уважением, Курневский Евгений.
>


-- 
С уважением, Курневский Евгений.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53391; Package emacs. (Fri, 21 Jan 2022 11:47:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Евгений Курневский
 <kurnevsky <at> gmail.com>
Cc: larsi <at> gnus.org, 53391 <at> debbugs.gnu.org
Subject: Re: bug#53391: First keypress doesn't work when scratch buffer is
 killed in emacs 28, emacs daemon + emacs client is used
Date: Fri, 21 Jan 2022 13:46:12 +0200
> From: Евгений Курневский <kurnevsky <at> gmail.com>
> Date: Fri, 21 Jan 2022 09:32:11 +0000
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 53391 <at> debbugs.gnu.org
> 
> It is a plain emacs built with nixos. These packages are just different versions of emacs, like
> stable/unstable/master and with or without native compilation/pgtk. Also it contains all elpa/melpa packages
> and functions to install them in nixos.

Does this mean you see the problem in stock Emacs 28 built from the
emacs-28 branch of the upstream Emacs repository on Savannah?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53391; Package emacs. (Fri, 21 Jan 2022 11:56:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Евгений Курневский
 <kurnevsky <at> gmail.com>
Cc: larsi <at> gnus.org, 53391 <at> debbugs.gnu.org
Subject: Re: bug#53391: First keypress doesn't work when scratch buffer is
 killed in emacs 28, emacs daemon + emacs client is used
Date: Fri, 21 Jan 2022 13:55:11 +0200
> From: Евгений Курневский <kurnevsky <at> gmail.com>
> Date: Fri, 21 Jan 2022 10:01:23 +0000
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 53391 <at> debbugs.gnu.org
> 
> Could it be some kind of a race? When originally tried with my complete config I had different results with
> and without (require 'easy-mmode) before killing scratch buffer. Probably you can try with this line as well?

I already did, and I don't see the problem.

> Also I noticed that if you press q in this case emacs just kills this opened buffer. So probably emacs is in
> some mode in this case - can I check it somehow?

Can you type C-g and show the backtrace?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53391; Package emacs. (Fri, 21 Jan 2022 12:12:02 GMT) Full text and rfc822 format available.

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

From: Евгений Курневский
 <kurnevsky <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 53391 <at> debbugs.gnu.org
Subject: Re: bug#53391: First keypress doesn't work when scratch buffer is
 killed in emacs 28, emacs daemon + emacs client is used
Date: Fri, 21 Jan 2022 12:10:42 +0000
[Message part 1 (text/plain, inline)]
> Does this mean you see the problem in stock Emacs 28 built from the
> emacs-28 branch of the upstream Emacs repository on Savannah?

Not exactly, it fetches
https://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-28.0.91.tar.gz
and builds it.
But it doesn't apply any custom changes, and to build emacs manually I'd
anyway have to get the same environment where it's built and do almost the
same things - nixos is a bit more complex system than usual linux.

> Can you type C-g and show the backtrace?

Tried to do it with (toggle-debug-on-quit), but just got 'Debugger
entered--Lisp error: (quit)'

On Fri, Jan 21, 2022 at 11:55 AM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Евгений Курневский <kurnevsky <at> gmail.com>
> > Date: Fri, 21 Jan 2022 10:01:23 +0000
> > Cc: Eli Zaretskii <eliz <at> gnu.org>, 53391 <at> debbugs.gnu.org
> >
> > Could it be some kind of a race? When originally tried with my complete
> config I had different results with
> > and without (require 'easy-mmode) before killing scratch buffer.
> Probably you can try with this line as well?
>
> I already did, and I don't see the problem.
>
> > Also I noticed that if you press q in this case emacs just kills this
> opened buffer. So probably emacs is in
> > some mode in this case - can I check it somehow?
>
> Can you type C-g and show the backtrace?
>


-- 
С уважением, Курневский Евгений.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53391; Package emacs. (Fri, 21 Jan 2022 12:58:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Евгений Курневский
 <kurnevsky <at> gmail.com>
Cc: larsi <at> gnus.org, 53391 <at> debbugs.gnu.org
Subject: Re: bug#53391: First keypress doesn't work when scratch buffer is
 killed in emacs 28, emacs daemon + emacs client is used
Date: Fri, 21 Jan 2022 14:57:30 +0200
> From: Евгений Курневский <kurnevsky <at> gmail.com>
> Date: Fri, 21 Jan 2022 12:10:42 +0000
> Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 53391 <at> debbugs.gnu.org
> 
> > Does this mean you see the problem in stock Emacs 28 built from the
> > emacs-28 branch of the upstream Emacs repository on Savannah?
> 
> Not exactly, it fetches https://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-28.0.91.tar.gz and builds
> it.
> But it doesn't apply any custom changes, and to build emacs manually I'd anyway have to get the same
> environment where it's built and do almost the same things - nixos is a bit more complex system than usual
> linux.
> 
> > Can you type C-g and show the backtrace?
> 
> Tried to do it with (toggle-debug-on-quit), but just got 'Debugger entered--Lisp error: (quit)'

I think I've succeeded in reproducing this.  However, given that it
only happens if the init file deletes the *scratch* buffer (which is
the current buffer available to the daemon initially), I wonder
whether it's important to solve this corner case.  I'm guessing that
this has something to do with the fact that the daemon performs some
initial processing of the client commands in the original buffer.

Why is it important to delete the *scratch* buffer in your case?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53391; Package emacs. (Fri, 21 Jan 2022 13:07:02 GMT) Full text and rfc822 format available.

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

From: Евгений Курневский
 <kurnevsky <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 53391 <at> debbugs.gnu.org
Subject: Re: bug#53391: First keypress doesn't work when scratch buffer is
 killed in emacs 28, emacs daemon + emacs client is used
Date: Fri, 21 Jan 2022 13:05:47 +0000
[Message part 1 (text/plain, inline)]
> Why is it important to delete the *scratch* buffer in your case?

It's not important. I just had it in my config for a long time since I
didn't know how emacs works - I just didn't want to have one more empty
buffer and wanted to see messages at startup. The problem was that I didn't
know what exactly led to this behavior after updating to emacs 28 - it was
unexpected for me that killing scratch buffer could cause this. But I'm
completely fine with not killing it and have already updated my configs to
avoid this problem.

On Fri, Jan 21, 2022 at 12:57 PM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Евгений Курневский <kurnevsky <at> gmail.com>
> > Date: Fri, 21 Jan 2022 12:10:42 +0000
> > Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 53391 <at> debbugs.gnu.org
> >
> > > Does this mean you see the problem in stock Emacs 28 built from the
> > > emacs-28 branch of the upstream Emacs repository on Savannah?
> >
> > Not exactly, it fetches
> https://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-28.0.91.tar.gz
> and builds
> > it.
> > But it doesn't apply any custom changes, and to build emacs manually I'd
> anyway have to get the same
> > environment where it's built and do almost the same things - nixos is a
> bit more complex system than usual
> > linux.
> >
> > > Can you type C-g and show the backtrace?
> >
> > Tried to do it with (toggle-debug-on-quit), but just got 'Debugger
> entered--Lisp error: (quit)'
>
> I think I've succeeded in reproducing this.  However, given that it
> only happens if the init file deletes the *scratch* buffer (which is
> the current buffer available to the daemon initially), I wonder
> whether it's important to solve this corner case.  I'm guessing that
> this has something to do with the fact that the daemon performs some
> initial processing of the client commands in the original buffer.
>
> Why is it important to delete the *scratch* buffer in your case?
>


-- 
С уважением, Курневский Евгений.
[Message part 2 (text/html, inline)]

Removed tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 19 Feb 2022 12:56:02 GMT) Full text and rfc822 format available.

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

Previous Next


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