GNU bug report logs - #5645
23.1.92; read-event blocks in batch mode

Previous Next

Package: emacs;

Reported by: Michael Albinus <michael.albinus <at> gmx.de>

Date: Thu, 25 Feb 2010 04:49:02 UTC

Severity: normal

Done: Michael Albinus <michael.albinus <at> gmx.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 5645 in the body.
You can then email your comments to 5645 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5645; Package emacs. (Thu, 25 Feb 2010 04:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Albinus <michael.albinus <at> gmx.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 25 Feb 2010 04:49:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1.92; read-event blocks in batch mode
Date: Thu, 25 Feb 2010 05:47:48 +0100
Call 

# emacs -Q --batch --eval '(read-event nil nil 0.1)'

It does not return.


In GNU Emacs 23.1.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.3)
 of 2010-01-30 on detlef
Windowing system distributor `The X.Org Foundation', version 11.0.10604000
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: Emacs-Lisp

Minor modes in effect:
  diff-auto-refine-mode: t
  display-time-mode: t
  shell-dirtrack-mode: t
  iswitchb-mode: t
  icomplete-mode: t
  partial-completion-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-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-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: (only . t)

Recent input:
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <return> <up> ( m e s 
s a g e SPC " H a l l o " ) C-x C-s <kp-add> C-x C-s 
<down-mouse-1> <mouse-1> <down-mouse-3> <mouse-3> <double-down-mouse-3> 
<double-mouse-3> C-x C-s <kp-divide> C-x C-s <home> 
C-s n o n - b l o c k C-s C-s C-s <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <return> <up> <insert> C-x u ( m e s s a g e 
SPC " H a l l o " ) C-x C-s <kp-add> <up> <up> <up> 
<up> <up> <up> <up> <up> <insert> C-x C-s <up> <kp-add> 
C-x C-s <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <left> <left> <return> <insert> C-x C-s 
<help-echo> <help-echo> <help-echo> <up> <up> <right> 
<right> <right> <right> <right> <right> <right> <right> 
C-h f <return> C-a ; <left> <down> ; C-x C-s <help-echo> 
<help-echo> <help-echo> <down-mouse-1> <help-echo> 
<mouse-movement> <mouse-2> C-x 0 <up> <backspace> C-x 
C-s C-x v u <up> <return> C-x v u <up> <return> C-x 
C-f t r a <tab> . e <tab> <return> C-x v l q C-x 0 
C-x C-f C-g C-x k <return> <down-mouse-1> <mouse-1> 
<down-mouse-3> <mouse-3> <escape> x r e p o r t <tab> 
<return>

Recent messages:
Type C-x 1 to delete the help window.
Saving file /home/albinus/src/emacs/lisp/net/dbus.el...
Wrote /home/albinus/src/emacs/lisp/net/dbus.el
Saving file /home/albinus/src/emacs/lisp/net/dbus.el...
Wrote /home/albinus/src/emacs/lisp/net/dbus.el
Finding changes in /home/albinus/src/emacs/lisp/net/dbus.el...
Reverting /home/albinus/src/emacs/lisp/net/dbus.el...done
Finding changes in /home/albinus/src/emacs/lisp/net/dbus.el...
No changes between working revision and workfile
Reverting /home/albinus/src/emacs/lisp/net/dbus.el...done
Quit

Load-path shadows:
~/src/tramp/lisp/tramp-imap hides ~/lisp/tramp-imap
~/src/tramp/lisp/tramp-gvfs hides ~/lisp/tramp-gvfs
~/src/tramp/lisp/tramp-cache hides /usr/local/share/emacs/23.1.92/lisp/net/tramp-cache
~/src/tramp/lisp/tramp-uu hides /usr/local/share/emacs/23.1.92/lisp/net/tramp-uu
~/src/tramp/lisp/tramp-smb hides /usr/local/share/emacs/23.1.92/lisp/net/tramp-smb
~/src/tramp/lisp/tramp-cmds hides /usr/local/share/emacs/23.1.92/lisp/net/tramp-cmds
~/src/tramp/lisp/tramp-gw hides /usr/local/share/emacs/23.1.92/lisp/net/tramp-gw
~/src/tramp/lisp/tramp-imap hides /usr/local/share/emacs/23.1.92/lisp/net/tramp-imap
~/src/tramp/lisp/tramp-fish hides /usr/local/share/emacs/23.1.92/lisp/net/tramp-fish
~/src/tramp/lisp/tramp-gvfs hides /usr/local/share/emacs/23.1.92/lisp/net/tramp-gvfs
~/lisp/dbus hides /usr/local/share/emacs/23.1.92/lisp/net/dbus
~/src/tramp/lisp/trampver hides /usr/local/share/emacs/23.1.92/lisp/net/trampver
~/src/tramp/lisp/tramp-compat hides /usr/local/share/emacs/23.1.92/lisp/net/tramp-compat
~/src/tramp/lisp/tramp hides /usr/local/share/emacs/23.1.92/lisp/net/tramp
~/src/tramp/lisp/tramp-ftp hides /usr/local/share/emacs/23.1.92/lisp/net/tramp-ftp

Features:
(shadow warnings emacsbug add-log log-view pcvs-util diff-mode vc-bzr
ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult
ediff-init ediff find-func mule-util find-dired sh-script executable
vc-svn cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs browse-url gnus-dup gnus-fun mailalias vc-cvs ange-ftp
newcomment noutline outline easy-mmode debug help-mode view pp
multi-isearch nnimap imap time-stamp sort gnus-cite html2text smiley
ansi-color flow-fill mail-extr gnus-agent gnus-srvr nnvirtual gnus-async
gnus-bcklg parse-time timezone gnus-score score-mode gnus-ml gnus-msg
gnus-art mm-uu mml2015 epg-config mm-view smime dig disp-table
gnus-cache gnus-sum nnfolder pop3 byte-opt bytecomp byte-compile nnml
nndraft nnmh nnnil smtpmail gnus-demon nntp gnus-group gnus-undo nnmail
mail-source nnoo gnus-start gnus-spec gnus-int gnus-range message
sendmail ecomplete rfc822 mml mml-sec mm-decode mm-bodies mm-encode
mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev
gmm-utils mailheader canlock sha1 hex-util hashcash gnus-win gnus
gnus-ems nnheader mail-utils wid-edit cperl-mode easymenu time
tramp-imap assoc tramp-gw tramp-gvfs url-parse url-vars mm-util
mail-prsvr tramp-fish tramp-smb tramp-cache tramp-ftp tramp-cmds tramp
auth-source gnus-util netrc time-date advice help-fns advice-preload
shell comint ring password-cache format-spec tramp-compat cl cl-19
trampver iswitchb jka-compr icomplete complete paren ps-samp zeroconf
dbus xml printing ps-print ps-def lpr vc-dir ewoc vc vc-dispatcher dired
regexp-opt tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win
x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register
page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse 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 loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5645; Package emacs. (Sat, 27 Feb 2010 00:10:03 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 5645 <at> debbugs.gnu.org
Subject: Re: bug#5645: 23.1.92; read-event blocks in batch mode
Date: Fri, 26 Feb 2010 19:09:02 -0500
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Call
>
> # emacs -Q --batch --eval '(read-event nil nil 0.1)'
>
> It does not return.

This is a technical limitation of batch mode.  Input is acquired via
getchar(): see kbd_buffer_get_event in keyboard.c.  Unfortunately,
getchar() blocks until input in submitted on standard input.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5645; Package emacs. (Sun, 28 Feb 2010 09:42:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 5645 <at> debbugs.gnu.org
Subject: Re: bug#5645: 23.1.92; read-event blocks in batch mode
Date: Sun, 28 Feb 2010 10:40:55 +0100
Chong Yidong <cyd <at> stupidchicken.com> writes:

> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
>> Call
>>
>> # emacs -Q --batch --eval '(read-event nil nil 0.1)'
>>
>> It does not return.
>
> This is a technical limitation of batch mode.  Input is acquired via
> getchar(): see kbd_buffer_get_event in keyboard.c.  Unfortunately,
> getchar() blocks until input in submitted on standard input.

I see. In my use case, which has caused this bug report, I am waiting
for D-Bus events. This shall be possible also in batch mode; maybe we
can fix this later.

For the time being (23.2 preparation), I'll document this limitation in
dbus.texi, and I'll avoid asynchronous calls in dbus.el, when
noninteractive is nil.

Best regards, Michael.




Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Tue, 17 Jul 2012 13:23:02 GMT) Full text and rfc822 format available.

Notification sent to Michael Albinus <michael.albinus <at> gmx.de>:
bug acknowledged by developer. (Tue, 17 Jul 2012 13:23:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 5645-done <at> debbugs.gnu.org
Subject: Re: bug#5645: 23.1.92; read-event blocks in batch mode
Date: Tue, 17 Jul 2012 15:16:27 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

>> This is a technical limitation of batch mode.  Input is acquired via
>> getchar(): see kbd_buffer_get_event in keyboard.c.  Unfortunately,
>> getchar() blocks until input in submitted on standard input.
>
> I see. In my use case, which has caused this bug report, I am waiting
> for D-Bus events. This shall be possible also in batch mode; maybe we
> can fix this later.

With the solution of bug#11415, this problems is solved. Closed.

Best regards, Michael.




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

This bug report was last modified 12 years and 311 days ago.

Previous Next


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