unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5645: 23.1.92; read-event blocks in batch mode
@ 2010-02-25  4:47 Michael Albinus
  2010-02-27  0:09 ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Albinus @ 2010-02-25  4:47 UTC (permalink / raw)
  To: 5645

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)







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

* bug#5645: 23.1.92; read-event blocks in batch mode
  2010-02-25  4:47 bug#5645: 23.1.92; read-event blocks in batch mode Michael Albinus
@ 2010-02-27  0:09 ` Chong Yidong
  2010-02-28  9:40   ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: Chong Yidong @ 2010-02-27  0:09 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 5645

Michael Albinus <michael.albinus@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.






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

* bug#5645: 23.1.92; read-event blocks in batch mode
  2010-02-27  0:09 ` Chong Yidong
@ 2010-02-28  9:40   ` Michael Albinus
  2012-07-17 13:16     ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Albinus @ 2010-02-28  9:40 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 5645

Chong Yidong <cyd@stupidchicken.com> writes:

> Michael Albinus <michael.albinus@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.






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

* bug#5645: 23.1.92; read-event blocks in batch mode
  2010-02-28  9:40   ` Michael Albinus
@ 2012-07-17 13:16     ` Michael Albinus
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Albinus @ 2012-07-17 13:16 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 5645-done

Michael Albinus <michael.albinus@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.





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

end of thread, other threads:[~2012-07-17 13:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-25  4:47 bug#5645: 23.1.92; read-event blocks in batch mode Michael Albinus
2010-02-27  0:09 ` Chong Yidong
2010-02-28  9:40   ` Michael Albinus
2012-07-17 13:16     ` Michael Albinus

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