unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10996: 24.0.94; Splash screen causes first character to beep with emacsclient
@ 2012-03-12  0:07 Aaron Meurer
  2012-03-21 16:24 ` Chong Yidong
  0 siblings, 1 reply; 7+ messages in thread
From: Aaron Meurer @ 2012-03-12  0:07 UTC (permalink / raw)
  To: 10996

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)





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#10996: 24.0.94; Splash screen causes first character to beep with emacsclient
  2012-03-12  0:07 bug#10996: 24.0.94; Splash screen causes first character to beep with emacsclient Aaron Meurer
@ 2012-03-21 16:24 ` Chong Yidong
  2012-03-30 22:00   ` Aaron Meurer
  0 siblings, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2012-03-21 16:24 UTC (permalink / raw)
  To: Aaron Meurer; +Cc: 10996

Aaron Meurer <asmeurer@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).





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#10996: 24.0.94; Splash screen causes first character to beep with emacsclient
  2012-03-21 16:24 ` Chong Yidong
@ 2012-03-30 22:00   ` Aaron Meurer
  2012-04-08 13:47     ` Chong Yidong
  0 siblings, 1 reply; 7+ messages in thread
From: Aaron Meurer @ 2012-03-30 22:00 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 10996

On Wed, Mar 21, 2012 at 10:24 AM, Chong Yidong <cyd@gnu.org> wrote:
> Aaron Meurer <asmeurer@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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#10996: 24.0.94; Splash screen causes first character to beep with emacsclient
  2012-03-30 22:00   ` Aaron Meurer
@ 2012-04-08 13:47     ` Chong Yidong
  2012-04-08 16:42       ` Chong Yidong
  0 siblings, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2012-04-08 13:47 UTC (permalink / raw)
  To: Aaron Meurer; +Cc: 10996

Aaron Meurer <asmeurer@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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#10996: 24.0.94; Splash screen causes first character to beep with emacsclient
  2012-04-08 13:47     ` Chong Yidong
@ 2012-04-08 16:42       ` Chong Yidong
  2012-04-10 16:51         ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2012-04-08 16:42 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 10996, Aaron Meurer

Chong Yidong <cyd@gnu.org> writes:

> Aaron Meurer <asmeurer@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@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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#10996: 24.0.94; Splash screen causes first character to beep with emacsclient
  2012-04-08 16:42       ` Chong Yidong
@ 2012-04-10 16:51         ` Stefan Monnier
  2012-04-10 17:55           ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2012-04-10 16:51 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 10996, Aaron Meurer

>> 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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#10996: 24.0.94; Splash screen causes first character to beep with emacsclient
  2012-04-10 16:51         ` Stefan Monnier
@ 2012-04-10 17:55           ` Stefan Monnier
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2012-04-10 17:55 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 10996-done, Aaron Meurer

> 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."






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-04-10 17:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-12  0:07 bug#10996: 24.0.94; Splash screen causes first character to beep with emacsclient Aaron Meurer
2012-03-21 16:24 ` Chong Yidong
2012-03-30 22:00   ` Aaron Meurer
2012-04-08 13:47     ` Chong Yidong
2012-04-08 16:42       ` Chong Yidong
2012-04-10 16:51         ` Stefan Monnier
2012-04-10 17:55           ` Stefan Monnier

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).