GNU bug report logs - #10996
24.0.94; Splash screen causes first character to beep with emacsclient

Previous Next

Package: emacs;

Reported by: Aaron Meurer <asmeurer <at> gmail.com>

Date: Mon, 12 Mar 2012 01:48:02 UTC

Severity: important

Found in version 24.0.94

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

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 10996 in the body.
You can then email your comments to 10996 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#10996; Package emacs. (Mon, 12 Mar 2012 01:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aaron Meurer <asmeurer <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 12 Mar 2012 01:48:02 GMT) Full text and rfc822 format available.

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

From: Aaron Meurer <asmeurer <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.94; Splash screen causes first character to beep with emacsclient
Date: Sun, 11 Mar 2012 18:07:35 -0600
See the discussion at
http://lists.gnu.org/archive/html/help-gnu-emacs/2012-03/msg00079.html.
When starting emacsclient, sometimes, the first character I type would
not enter the character, but rather beep the screen.  I did a lot of
debugging of this, discovering that it does not happen with emacs -Q,
but removing all of my init files did not solve the problem.

Finally, I discovered that the problem is the splash screen.  If I start
the emacs daemon with --no-splash, the problem goes away.  It appears
that somehow the splash screen is taking the first keypress from
emacsclient, even though the buffer that is visible is the one for the
file I opened.


In GNU Emacs 24.0.94.2 (x86_64-apple-darwin11.3.0)
 of 2012-03-11 on Aaron-Meurer.local
Configured using:
 `configure '--with-x=no''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  flyspell-mode: t
  show-paren-mode: t
  global-subword-mode: t
  subword-mode: t
  global-linum-mode: t
  linum-mode: t
  cua-mode: t
  predictive-which-dict-mode: t
  global-auto-complete-mode: t
  auto-complete-mode: t
  xterm-mouse-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-fill-mode: 1
  abbrev-mode: t

Recent input:
O C ESC O A ESC O A ESC O B ESC O B ESC O B ESC O B
ESC O B ESC O B ESC O B ESC O A ESC O A ESC O A ESC
O A ESC O C ESC O C ESC O C ESC O C RET C-g ESC O B
ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC
O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A
ESC O A ESC O A ESC O A ESC O A ESC O B ESC O B ESC
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B
ESC O B ESC O C ESC O C ESC O C ESC O C RET RET ESC
O A ESC O A ESC O A ESC O B ESC e ESC O A ESC O A ESC
O A ESC [ M SPC g 3 ESC [ M # g 3 ESC [ M SPC g 3 ESC
[ M # g 3 ESC [ M SPC ` 1 ESC [ M # ` 1 ESC [ M SPC
` 1 ESC [ M # ` 1 ESC [ M SPC g 7 ESC [ M # g 7 ESC
[ M SPC g 7 ESC [ M # g 7 ESC [ M SPC % 4 ESC [ M #
% 4 ESC [ M SPC H ( ESC [ M # H ( y e s RET q ESC [
M SPC Q / ESC [ M # Q / q ESC x r e p o TAB r TAB
RET

Recent messages:
Resetting customization items...done
Creating customization setup...done
Creating customization items...
Creating customization items ...done
Resetting customization items...done
Creating customization setup...done
widget-choose: Canceled
Saving file /Users/aaronmeurer/Documents/dotfiles/.emacs...
Wrote /Users/aaronmeurer/Documents/dotfiles/.emacs [2 times]
Making completion list...

Load-path shadows:
~/Documents/predictive/pos-tip hides ~/.emacs.d/lisp/pos-tip
~/.emacs.d/lisp/mwheel hides /Users/aaronmeurer/Documents/emacs/lisp/mwheel
~/Documents/predictive/avl-tree hides /Users/aaronmeurer/Documents/emacs/lisp/emacs-lisp/avl-tree

Features:
(rmail mail-hist epa-mail epa epg epg-config add-log mule-util mailalias
mailclient shadow sort gnus-util mail-extr emacsbug message format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils info debug sh-script executable
multi-isearch browse-url semantic/wisent/python semantic/db-mode
semantic/decorate/include semantic/db-find semantic/db-ref semantic/db
eieio-base semantic/decorate/mode semantic/tag-ls semantic/decorate
pulse semantic/ctxt semantic/dep semantic/wisent/python-wy
semantic/wisent semantic/wisent/wisent python-21 python rst compile
comint ansi-color ring image sgml-mode newcomment find-func ebnf2ps
ps-print ps-def lpr tool-bar cus-edit wid-edit apropos help-mode view
markdown-mode derived thingatpt noutline outline easy-mmode server
regexp-opt flyspell warnings saveplace time-date 1am-theme paren subword
linum cua-base cus-start cus-load highlight-indentation isearch+
predictive-html auto-overlay-flat predictive-texinfo predictive-latex
predictive-auto-overlay-auto-dict auto-overlay-nested auto-overlay-self
auto-overlay-line auto-overlay-word predictive ispell timerfunctions
auto-overlays auto-overlay-common dict-tree trie tNFA queue heap
avl-tree semantic/util-modes easymenu semantic/util semantic
semantic/tag semantic/lex semantic/fw eieio byte-opt bytecomp
byte-compile cconv macroexp mode-local cedet completion-ui-sources
completion-ui-menu completion-ui-tooltip completion-ui-echo
completion-ui-hotkeys completion-ui-dynamic completion-ui-popup-frame
completion-ui preview-latex tex-site auto-loads auto-complete-config
auto-complete popup pos-tip flymake-cursor cl disp-table mouse xt-mouse
edmacro kmacro advice help-fns advice-preload ediff-hook vc-hooks
lisp-float-type lisp-mode register page menu-bar rfn-eshadow timer
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10996; Package emacs. (Wed, 21 Mar 2012 16:56:02 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> gnu.org>
To: Aaron Meurer <asmeurer <at> gmail.com>
Cc: 10996 <at> debbugs.gnu.org
Subject: Re: bug#10996: 24.0.94;
	Splash screen causes first character to beep with emacsclient
Date: Thu, 22 Mar 2012 00:24:55 +0800
Aaron Meurer <asmeurer <at> gmail.com> writes:

> See the discussion at
> http://lists.gnu.org/archive/html/help-gnu-emacs/2012-03/msg00079.html.
> When starting emacsclient, sometimes, the first character I type would
> not enter the character, but rather beep the screen.  I did a lot of
> debugging of this, discovering that it does not happen with emacs -Q,
> but removing all of my init files did not solve the problem.
>
> Finally, I discovered that the problem is the splash screen.  If I start
> the emacs daemon with --no-splash, the problem goes away.  It appears
> that somehow the splash screen is taking the first keypress from
> emacsclient, even though the buffer that is visible is the one for the
> file I opened.

I'm afraid I can't reproduce it.  I tried:

1. touch .emacs    [empty .emacs file]
2. emacs --daemon
3. emacsclient -c
4. a

The keystroke takes effect as expected.  Could you provide a recipe for
showing the bug?

This is latest trunk, GNU Emacs 24.0.94.1 (x86_64-unknown-linux-gnu,
GTK+ Version 3.2.0).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10996; Package emacs. (Fri, 30 Mar 2012 22:02:01 GMT) Full text and rfc822 format available.

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

From: Aaron Meurer <asmeurer <at> gmail.com>
To: Chong Yidong <cyd <at> gnu.org>
Cc: 10996 <at> debbugs.gnu.org
Subject: Re: bug#10996: 24.0.94; Splash screen causes first character to beep
	with emacsclient
Date: Fri, 30 Mar 2012 16:00:38 -0600
On Wed, Mar 21, 2012 at 10:24 AM, Chong Yidong <cyd <at> gnu.org> wrote:
> Aaron Meurer <asmeurer <at> gmail.com> writes:
>
>> See the discussion at
>> http://lists.gnu.org/archive/html/help-gnu-emacs/2012-03/msg00079.html.
>> When starting emacsclient, sometimes, the first character I type would
>> not enter the character, but rather beep the screen.  I did a lot of
>> debugging of this, discovering that it does not happen with emacs -Q,
>> but removing all of my init files did not solve the problem.
>>
>> Finally, I discovered that the problem is the splash screen.  If I start
>> the emacs daemon with --no-splash, the problem goes away.  It appears
>> that somehow the splash screen is taking the first keypress from
>> emacsclient, even though the buffer that is visible is the one for the
>> file I opened.
>
> I'm afraid I can't reproduce it.  I tried:
>
> 1. touch .emacs    [empty .emacs file]
> 2. emacs --daemon
> 3. emacsclient -c
> 4. a
>
> The keystroke takes effect as expected.  Could you provide a recipe for
> showing the bug?
>

Maybe it matters that I start emacsclient with emacsclient -a "" -nw.

You can start the daemon with emacs -q --no-site-file --no-site-lisp
--daemon (basically, turn everything off except for the splash
screen).  If I do that, it reproduces nicely.  I'm assuming that the
above switches sufficiently isolate me from my configuration.

emacs --version gives me GNU Emacs 24.0.94.3 (this is probably also in
the original bug report generated by emacs.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10996; Package emacs. (Sun, 08 Apr 2012 13:49:01 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> gnu.org>
To: Aaron Meurer <asmeurer <at> gmail.com>
Cc: 10996 <at> debbugs.gnu.org
Subject: Re: bug#10996: 24.0.94;
	Splash screen causes first character to beep with emacsclient
Date: Sun, 08 Apr 2012 21:47:02 +0800
Aaron Meurer <asmeurer <at> gmail.com> writes:

> Maybe it matters that I start emacsclient with emacsclient -a "" -nw.
>
> You can start the daemon with emacs -q --no-site-file --no-site-lisp
> --daemon (basically, turn everything off except for the splash
> screen).  If I do that, it reproduces nicely.  I'm assuming that the
> above switches sufficiently isolate me from my configuration.

Thanks, I can reproduce this now.  Looks like a regression against 23.4.
Will investigate soon.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10996; Package emacs. (Sun, 08 Apr 2012 16:44:02 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> gnu.org>
To: Stefan Monnier  <monnier <at> iro.umontreal.ca>
Cc: 10996 <at> debbugs.gnu.org, Aaron Meurer <asmeurer <at> gmail.com>
Subject: Re: bug#10996: 24.0.94;
	Splash screen causes first character to beep with emacsclient
Date: Mon, 09 Apr 2012 00:42:35 +0800
Chong Yidong <cyd <at> gnu.org> writes:

> Aaron Meurer <asmeurer <at> gmail.com> writes:
>
>> Maybe it matters that I start emacsclient with emacsclient -a "" -nw.
>>
>> You can start the daemon with emacs -q --no-site-file --no-site-lisp
>> --daemon (basically, turn everything off except for the splash
>> screen).  If I do that, it reproduces nicely.  I'm assuming that the
>> above switches sufficiently isolate me from my configuration.
>
> Thanks, I can reproduce this now.  Looks like a regression against
> 23.4.

This regression was introduced by the following commit.  I think somehow
the keymap of the splash screen is getting applied to the first
character typed into the emacsclient frame (which should be in the
scratch buffer).  The commit log does not record any bug or rationale
for the commit.

Stefan, could you take a look?

  revno: 105993
  committer: Stefan Monnier <monnier <at> iro.umontreal.ca>
  branch nick: trunk
  timestamp: Mon 2011-10-03 16:50:54 -0400
  message:
  * src/keyboard.c (read_key_sequence_remapped): New var.
  (read_key_sequence): Compute remapping in the right buffer.
  (command_loop_1): Use read_key_sequence's remapping directly.




Severity set to 'important' from 'normal' Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 08 Apr 2012 16:44:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10996; Package emacs. (Tue, 10 Apr 2012 16:53:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Chong Yidong <cyd <at> gnu.org>
Cc: 10996 <at> debbugs.gnu.org, Aaron Meurer <asmeurer <at> gmail.com>
Subject: Re: bug#10996: 24.0.94;
	Splash screen causes first character to beep with emacsclient
Date: Tue, 10 Apr 2012 12:51:25 -0400
>> Thanks, I can reproduce this now.  Looks like a regression against 23.4.
> This regression was introduced by the following commit.  I think somehow
> the keymap of the splash screen is getting applied to the first
> character typed into the emacsclient frame (which should be in the
> scratch buffer).

Indeed, the problem is that the key is read using the
splash-screen-keymap.  My commit is not the actual cause since it only
affects command remapping, and if you try his recipe and hit `q' (which
is not using command-remapping), you'll see that it does something even
more interesting.  I.e. the same problem existed with `q' before
my change.

But indeed it's a regression compared to Emacs-23, tho I haven't yet
figured where the problem really comes from.


        Stefan




Reply sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
You have taken responsibility. (Tue, 10 Apr 2012 17:57:02 GMT) Full text and rfc822 format available.

Notification sent to Aaron Meurer <asmeurer <at> gmail.com>:
bug acknowledged by developer. (Tue, 10 Apr 2012 17:57:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Chong Yidong <cyd <at> gnu.org>
Cc: 10996-done <at> debbugs.gnu.org, Aaron Meurer <asmeurer <at> gmail.com>
Subject: Re: bug#10996: 24.0.94;
	Splash screen causes first character to beep with emacsclient
Date: Tue, 10 Apr 2012 13:55:16 -0400
> Indeed, the problem is that the key is read using the
> splash-screen-keymap.  My commit is not the actual cause since it only
> affects command remapping, and if you try his recipe and hit `q' (which
> is not using command-remapping), you'll see that it does something even
> more interesting.  I.e. the same problem existed with `q' before
> my change.

I installed the change below which doesn't actually fix the underlying
problem but works around it by disabling the splash screen code when
running as daemon (it doesn't get displayed anyway, so there's no point
running it).


        Stefan


=== modified file 'lisp/startup.el'
--- lisp/startup.el	2012-03-27 06:45:12 +0000
+++ lisp/startup.el	2012-04-10 17:51:56 +0000
@@ -2341,6 +2341,7 @@
     (if (or inhibit-startup-screen
 	    initial-buffer-choice
 	    noninteractive
+            (daemonp)
 	    inhibit-x-resources)
 
 	;; Not displaying a startup screen.  If 3 or more files
@@ -2383,9 +2384,7 @@
       ;; (with-no-warnings
       ;; 	(setq menubar-bindings-done t))
 
-      (if (> file-count 0)
-	  (display-startup-screen t)
-	(display-startup-screen nil)))))
+      (display-startup-screen (> file-count 0)))))
 
 (defun command-line-normalize-file-name (file)
   "Collapse multiple slashes to one, to handle non-Emacs file names."





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 09 May 2012 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 103 days ago.

Previous Next


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