* bug#19016: 24.4.50; tq.el does the wrong thing when enqueuing inside a callback
@ 2014-11-11 3:48 Andreas Politz
2019-08-03 14:33 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Politz @ 2014-11-11 3:48 UTC (permalink / raw)
To: 19016
[-- Attachment #1: Type: text/plain, Size: 712 bytes --]
tq calls the wrong callback in the some situations. The function
tq-process-buffer contains the following snippet.
(unwind-protect
(condition-case nil
(funcall (tq-queue-head-fn tq)
(tq-queue-head-closure tq)
answer)
(error nil))
(tq-queue-pop tq))
tq-queue-pop removes the top question and sends the next one. But here
a problem occurs, if the callback function adds another question, sends
it and waits for it's result. Because this invokes tq-process-buffer
recursively with the first question still at top. Resulting in the
callback to the first question called a second time, third time ... .
Here is a lisp file which should demonstrate this.
[-- Attachment #2: Type: application/emacs-lisp, Size: 1023 bytes --]
[-- Attachment #3: Type: text/plain, Size: 16 bytes --]
..and a patch
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: Patch --]
[-- Type: text/x-diff, Size: 1291 bytes --]
=== modified file 'lisp/emacs-lisp/tq.el'
*** lisp/emacs-lisp/tq.el 2014-02-10 01:34:22 +0000
--- lisp/emacs-lisp/tq.el 2014-11-11 03:39:31 +0000
***************
*** 153,167 ****
(buffer-name buf)))
(goto-char (point-min))
(if (re-search-forward (tq-queue-head-regexp tq) nil t)
! (let ((answer (buffer-substring (point-min) (point))))
(delete-region (point-min) (point))
! (unwind-protect
! (condition-case nil
! (funcall (tq-queue-head-fn tq)
! (tq-queue-head-closure tq)
! answer)
! (error nil))
! (tq-queue-pop tq))
(tq-process-buffer tq))))))))
(provide 'tq)
--- 153,167 ----
(buffer-name buf)))
(goto-char (point-min))
(if (re-search-forward (tq-queue-head-regexp tq) nil t)
! (let ((answer (buffer-substring (point-min) (point)))
! (fn (tq-queue-head-fn tq))
! (closure (tq-queue-head-closure tq)))
(delete-region (point-min) (point))
! (tq-queue-pop tq)
! (condition-case err
! (funcall fn closure answer)
! (error (message "Error while processing tq callback: %s"
! (error-message-string err))))
(tq-process-buffer tq))))))))
(provide 'tq)
[-- Attachment #5: Type: text/plain, Size: 21098 bytes --]
(Also adds messaging for errors in the callback, which should not get
unnoticed.)
A. Politz
In GNU Emacs 24.4.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
of 2014-11-01 on luca
Repository revision: 114441 politza@fh-trier.de-20140823093555-j5hxuaxih7d5vvxr
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description: Debian GNU/Linux 7.7 (wheezy)
Configured using:
`configure -C'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
Important settings:
value of $LC_COLLATE: C
value of $LC_MESSAGES: C
value of $LANG: de_DE.UTF-8
locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
Minor modes in effect:
diff-auto-refine-mode: t
ewm-mode-line-mode: t
ewm-mode: t
ewm-compat-mode: t
ewm-compat-calendar-mode: t
ewm-compat-calc-mode: t
global-semanticdb-minor-mode: t
global-semantic-decoration-mode: t
global-semantic-idle-scheduler-mode: t
global-semantic-stickyfunc-mode: t
semantic-mode: t
desktop-save-mode: t
yas-global-mode: t
yas-minor-mode: t
global-ede-mode: t
ede-minor-mode: t
mimo-mode: t
pc-completion-mode: t
ispell-track-input-method: t
doc-view-tidy-cache-mode: t
recentf-mode: t
show-paren-mode: t
window-numbering-mode: t
shell-dirtrack-mode: t
scroll-other-window-mode: t
savehist-mode: t
eldoc-in-minibuffer-mode: t
ekey-mode: t
winner-mode: t
eldoc-mode: t
tooltip-mode: t
electric-indent-mode: t
mouse-wheel-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
Recent input:
SPC SPC SPC SPC SPC SPC C-M-x g C-n C-n C-n M-m C-M-f
C-x C-e C-e q M-1 C-M-b M-f C-j M-f C-M-f C-M-f C-M-f
C-M-f C-M-f C-j C-p M-^ C-n C-e C-M-\ C-c l C-d C-M-\
C-c l C-M-a C-M-a C-M-a C-M-a C-l C-x b <return> C-v
C-v C-s i m a g e - s i z e C-s C-s C-s M-m C-l C-M-SPC
C-M-SPC M-; C-c l M-2 C-x 1 C-x 3 C-x b <return> C-x
+ C-x b m e s <return> M-v M-v C-r e r r o r C-r C-g
C-x b C-s C-s <return> C-l C-l C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-,
f c o n d i <tab> - <tab> M-h M-h w i t h - e r <return>
M-< C-v <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p M-m C-M-SPC M-w M-x r e p o r t - e m <tab> b u
g <return>
Recent messages:
Preloaded Page <39>
Preloaded Page <40>
Preloaded Page <41>
Quit
Type "q" in help window to restore its previous buffer.
Mark set
End of buffer [13 times]
Mark set
Starting new Ispell process aspell with en dictionary...
Checking spelling of ENQUEUING... [2 times]
Load-path shadows:
/home/politza/.emacs.d/plugins/s hides /home/politza/.emacs.d/elpa/s-20140714.707/s
/home/politza/.emacs.d/plugins/tblc hides /home/politza/.emacs.d/plugins/tblc/tblc
/home/politza/.emacs.d/plugins/haskell-mode/haskell-cabal hides /home/politza/.emacs.d/plugins/haskell/haskell-cabal
/home/politza/.emacs.d/plugins/haskell-mode/haskell-decl-scan hides /home/politza/.emacs.d/plugins/haskell/haskell-decl-scan
/home/politza/.emacs.d/plugins/haskell-mode/haskell-doc hides /home/politza/.emacs.d/plugins/haskell/haskell-doc
/home/politza/.emacs.d/plugins/haskell-mode/ghc-core hides /home/politza/.emacs.d/plugins/haskell/ghc-core
/home/politza/.emacs.d/plugins/haskell-mode/haskell-mode hides /home/politza/.emacs.d/plugins/haskell/haskell-mode
/home/politza/.emacs.d/plugins/haskell-mode/haskell-c hides /home/politza/.emacs.d/plugins/haskell/haskell-c
/home/politza/.emacs.d/plugins/haskell-mode/haskell-indentation hides /home/politza/.emacs.d/plugins/haskell/haskell-indentation
/home/politza/.emacs.d/plugins/haskell-mode/haskell-site-file hides /home/politza/.emacs.d/plugins/haskell/haskell-site-file
/home/politza/.emacs.d/plugins/haskell-mode/haskell-ghci hides /home/politza/.emacs.d/plugins/haskell/haskell-ghci
/home/politza/.emacs.d/plugins/haskell-mode/inf-haskell hides /home/politza/.emacs.d/plugins/haskell/inf-haskell
/home/politza/.emacs.d/plugins/haskell-mode/haskell-indent hides /home/politza/.emacs.d/plugins/haskell/haskell-indent
/home/politza/.emacs.d/plugins/haskell-mode/haskell-hugs hides /home/politza/.emacs.d/plugins/haskell/haskell-hugs
/home/politza/.emacs.d/plugins/haskell-mode/haskell-font-lock hides /home/politza/.emacs.d/plugins/haskell/haskell-font-lock
/home/politza/.emacs.d/plugins/haskell-mode/haskell-simple-indent hides /home/politza/.emacs.d/plugins/haskell/haskell-simple-indent
/home/politza/.emacs.d/plugins/saveplace hides /home/politza/src/emacs/override-redirect/lisp/saveplace
/home/politza/.emacs.d/plugins/imenu hides /home/politza/src/emacs/override-redirect/lisp/imenu
/home/politza/.emacs.d/plugins/term hides /home/politza/src/emacs/override-redirect/lisp/term
/home/politza/src/emacs/override-redirect/lisp/textmodes/flyspell hides /usr/share/emacs/site-lisp/dictionaries-common/flyspell
/home/politza/src/emacs/override-redirect/lisp/textmodes/ispell hides /usr/share/emacs/site-lisp/dictionaries-common/ispell
/home/politza/.emacs.d/plugins/boxquote hides /usr/share/emacs/site-lisp/emacs-goodies-el/boxquote
/home/politza/.emacs.d/plugins/bm hides /usr/share/emacs/site-lisp/emacs-goodies-el/bm
/home/politza/.emacs.d/plugins/eproject/eproject-extras hides /usr/share/emacs/site-lisp/emacs-goodies-el/eproject-extras
/home/politza/.emacs.d/plugins/matlab/matlab hides /usr/share/emacs/site-lisp/emacs-goodies-el/matlab
/home/politza/.emacs.d/plugins/eproject/eproject hides /usr/share/emacs/site-lisp/emacs-goodies-el/eproject
/home/politza/src/emacs/override-redirect/lisp/net/sasl-cram hides /usr/share/emacs/site-lisp/flim/sasl-cram
/home/politza/src/emacs/override-redirect/lisp/net/ntlm hides /usr/share/emacs/site-lisp/flim/ntlm
/home/politza/src/emacs/override-redirect/lisp/hex-util hides /usr/share/emacs/site-lisp/flim/hex-util
/home/politza/src/emacs/override-redirect/lisp/net/sasl hides /usr/share/emacs/site-lisp/flim/sasl
/home/politza/src/emacs/override-redirect/lisp/net/sasl-digest hides /usr/share/emacs/site-lisp/flim/sasl-digest
/home/politza/src/emacs/override-redirect/lisp/net/sasl-ntlm hides /usr/share/emacs/site-lisp/flim/sasl-ntlm
/home/politza/src/emacs/override-redirect/lisp/net/hmac-def hides /usr/share/emacs/site-lisp/flim/hmac-def
/home/politza/src/emacs/override-redirect/lisp/net/hmac-md5 hides /usr/share/emacs/site-lisp/flim/hmac-md5
/home/politza/src/emacs/override-redirect/lisp/md4 hides /usr/share/emacs/site-lisp/flim/md4
/home/politza/.emacs.d/plugins/haskell-mode/haskell-cabal hides /usr/share/emacs/site-lisp/haskell-mode/haskell-cabal
/home/politza/.emacs.d/plugins/haskell-mode/haskell-doc hides /usr/share/emacs/site-lisp/haskell-mode/haskell-doc
/home/politza/.emacs.d/plugins/haskell-mode/ghc-core hides /usr/share/emacs/site-lisp/haskell-mode/ghc-core
/home/politza/.emacs.d/plugins/haskell-mode/haskell-mode hides /usr/share/emacs/site-lisp/haskell-mode/haskell-mode
/home/politza/.emacs.d/plugins/haskell-mode/haskell-c hides /usr/share/emacs/site-lisp/haskell-mode/haskell-c
/home/politza/.emacs.d/plugins/haskell-mode/haskell-indentation hides /usr/share/emacs/site-lisp/haskell-mode/haskell-indentation
/home/politza/.emacs.d/plugins/haskell-mode/haskell-site-file hides /usr/share/emacs/site-lisp/haskell-mode/haskell-site-file
/home/politza/.emacs.d/plugins/haskell-mode/haskell-ghci hides /usr/share/emacs/site-lisp/haskell-mode/haskell-ghci
/home/politza/.emacs.d/plugins/haskell-mode/inf-haskell hides /usr/share/emacs/site-lisp/haskell-mode/inf-haskell
/home/politza/.emacs.d/plugins/haskell-mode/haskell-hugs hides /usr/share/emacs/site-lisp/haskell-mode/haskell-hugs
/home/politza/.emacs.d/plugins/haskell-mode/haskell-font-lock hides /usr/share/emacs/site-lisp/haskell-mode/haskell-font-lock
/home/politza/.emacs.d/plugins/haskell-mode/haskell-simple-indent hides /usr/share/emacs/site-lisp/haskell-mode/haskell-simple-indent
/home/politza/.emacs.d/plugins/haskell-mode/haskell-decl-scan hides /usr/share/emacs/site-lisp/haskell-mode/haskell-decl-scan
/home/politza/.emacs.d/plugins/haskell-mode/haskell-indent hides /usr/share/emacs/site-lisp/haskell-mode/haskell-indent
/home/politza/src/emacs/override-redirect/lisp/textmodes/remember hides /usr/share/emacs/site-lisp/remember-el/remember
/home/politza/src/emacs/override-redirect/lisp/timezone hides /usr/share/emacs/site-lisp/apel/attic/timezone
/home/politza/src/emacs/override-redirect/lisp/env hides /usr/share/emacs/site-lisp/apel/attic/env
/home/politza/src/emacs/override-redirect/lisp/gnus/mailcap hides /usr/share/emacs/site-lisp/flim/attic/mailcap
/home/politza/src/emacs/override-redirect/lisp/mail/smtpmail hides /usr/share/emacs/site-lisp/flim/attic/smtpmail
/home/politza/src/emacs/override-redirect/lisp/calendar/timeclock hides /usr/share/emacs/site-lisp/planner-el/contrib/timeclock
/home/politza/src/emacs/override-redirect/lisp/mail/rfc2368 hides /usr/share/emacs/site-lisp/w3m/attic/rfc2368
Features:
(shadow sort gnus-cite bbdb-message quail mail-extr nnir nndraft nnmh
utf-7 gnutls network-stream starttls nnmbox nnfolder bbdb-gnus nnnil
gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache
gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime dig
ispell emacsbug sendmail eieio-opt debug whitespace diff-mode vc
misearch multi-isearch pdf-view pdf-tools pdf-sync pdf-outline pdf-occur
pdf-links pdf-isearch pdf-history pdf-cache pdf-annot pdf-misc imenu
pdf-render pdf-util dired-aux pdf-info tq holidays hol-loaddefs
diary-lib diary-loaddefs ewm ewm-compat ewm-conf ewm-frame ewm-util
ewm-window semantic/bovine/make semantic/decorate/include
semantic/bovine/make-by ede/project-am ede/autoconf-edit autoconf
autoconf-mode ede/makefile-edit ede/make make-mode semantic/tag-file
ede/dired gnus-dired dired-eshell vc-dispatcher vc-svn vc-git ede/emacs
vc-bzr tempo url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap xml-parse doxymacs
semantic/db-file data-debug cedet-files cl-font-lock
emacs-customizations hypermedia-customizations eww-customizations
nogroup-customizations wp-customizations view-customizations
tex-customizations reftex-customizations
reftex-miscellaneous-configurations-customizations
reftex-label-support-customizations
reftex-referencing-labels-customizations
reftex-defining-label-environments-customizations reftex reftex-vars
AUCTeX-customizations preview-customizations
preview-latex-customizations preview-appearance-customizations
font-latex-customizations TeX-parse-customizations
TeX-file-customizations TeX-command-customizations
TeX-view-customizations LaTeX-customizations LaTeX-macro-customizations
LaTeX-math-customizations LaTeX-environment-customizations
LaTeX-indentation-customizations latex tex-style tex dbus xml
table-customizations table-hooks-customizations outlines-customizations
programming-customizations rnc-customizations tools-customizations
doxymacs-customizations eclim-customizations
eclim-problems-customizations vc-customizations log-edit-customizations
semantic-customizations pulse-customizations
semantic-imenu-customizations semantic/db-mode semantic/decorate/mode
semantic/decorate pulse lib-string makefile-customizations
etags-customizations ediff-customizations diff-customizations
diff-mode-customizations languages-customizations axiom-customizations
elpy-customizations matlab-customizations sh-customizations
python-customizations nxml-customizations relax-ng-customizations
haskell-customizations c-customizations semantic/bovine/c hideif
semantic/bovine/c-by semantic/lex-spp semantic/idle semantic/bovine/gcc
semantic/dep semantic/bovine semantic/analyze/refs semantic/db-find
semantic/db-ref semantic/analyze semantic/sort semantic/scope
semantic/analyze/fcn semantic/db semantic/ctxt semantic/format
semantic/tag-ls semantic/find asm-customizations
multimedia-customizations image-customizations pcase help-customizations
ekey-customizations info-lookup-customizations info-customizations
customize-customizations custom-buffer-customizations
apropos-customizations files-customizations uniquify-customizations
sunrise-customizations recentf-customizations lib-files
find-file-customizations ff-customizations backup-customizations
faces-customizations highlight-symbol-customizations
font-lock-customizations hi-lock-customizations facemenu-customizations
external-customizations server-customizations processes-customizations
shell-customizations proced-customizations gud-customizations
tooltip-customizations gud grep-customizations
compilation-customizations next-error-customizations
comint-customizations tablist tablist-filter semantic/wisent/comp
semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util
semantic semantic/tag semantic/lex semantic/fw mode-local
SQL-customizations man-customizations environment-customizations
xterm-customizations windows-customizations winner-customizations
minibuffer-customizations savehist-customizations menu-customizations
keyboard-customizations chistory-customizations
initialization-customizations frames-customizations
ediff-window-customizations desktop-customizations desktop frameset
dired-customizations dired-x-customizations dired-x
dired-details-customizations editing-customizations bm-customizations
yasnippet-customizations php-auto-yasnippets php-mode etags flymake
cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs add-log yasnippet help-mode
paragraphs-customizations matching-customizations
paren-matching-customizations paren-showing-customizations
isearch-customizations bookmark-customizations killing-customizations
indent-customizations fill-customizations filladapt-customizations
filladapt comment-customizations align-customizations
emulations-customizations electricity-customizations
editing-basics-customizations development-customizations
lisp-customizations re-builder-customizations
inferior-lisp-customizations ielm-customizations
find-function-customizations ert-customizations edebug-customizations
bytecomp-customizations advice-customizations internal-customizations
alloc-customizations extensions-customizations widgets-customizations
eldoc-customizations eldoc-eval-customizations ede-customizations
ede/cpp-root ede/speedbar ede/files ede ede/base ede/auto ede/source
eieio-base eieio-speedbar speedbar sb-image ezimage dframe eieio-custom
cedet cust-print-customizations data-customizations
save-place-customizations convenience-customizations
register-customizations eproject-customizations mimo-customizations mimo
diminish-customizations diminish iedit-customizations
imenu-tree-customizations tags-tree-customizations
company-customizations workgroups-customizations
window-numbering-customizations pabbrev-customizations
kmacro-customizations imenu-customizations ibuffer-customizations
ibuf-macs hl-line-customizations hippie-expand-customizations
file-cache-customizations ffap-customizations completion-customizations
pc-completion-customizations jedi-customizations jedi auto-complete
popup epc ctable concurrent deferred iswitchb-customizations
auto-complete-customizations pc switch-focus color hl-line
browse-kill-ring-customizations auto-revert-customizations
auto-insert-customizations autoinsert Buffer-menu-customizations
comm-customizations tramp-customizations browse-url-customizations
url-handlers applications-customizations mediawiki-customizations
w3m-customizations package-customizations mail-customizations
bbdb-customizations bbdb-sendmail-customizations bbdb-mua-customizations
bbdb-mua bbdb-com crm bbdb smtpmail-customizations shr-customizations
sendmail-customizations mime-display-customizations gnus-customizations
nnmail-customizations nnmail-split-customizations
mail-source-customizations gnus-summary-customizations
gnus-thread-customizations gnus-summary-various-customizations
gnus-summary-sort-customizations gnus-summary-marks-customizations
gnus-summary-maneuvering-customizations
gnus-summary-format-customizations parse-time-rfc2822
gnus-summary-exit-customizations gnus-sum gnus-group gnus-undo
gnus-start gnus-cloud gnus-spec gnus-win gnus-start-customizations
gnus-server-customizations gnus-message-customizations
message-customizations message-various-customizations
message-sending-customizations message-buffers-customizations
gnus-group-customizations gnus-group-visual-customizations
gnus-nnimap-format nnimap nnmail gnus-int gnus-range mail-source message
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader parse-time
tls utf7 netrc nnoo gnus gnus-ems nnheader mail-utils
gnus-group-various-customizations gnus-group-select-customizations
gnus-files-customizations gnus-newsrc-customizations
gnus-exit-customizations gnus-article-customizations
gnus-article-various-customizations gnus-article-hiding-customizations
ispell-customizations eshell-customizations eshell-module-customizations
eshell-smart-customizations eshell-hist-customizations
eshell-mode-customizations edebug doc-view-customizations
pdf-tools-customizations pdf-sync-customizations
pdf-annot-customizations pdf-isearch-customizations warnings
doc-view-tidy-cache calendar-customizations org-customizations
org-structure-customizations org-plain-lists-customizations
org-edit-structure-customizations org-startup-customizations
org-link-customizations org-latex-customizations
org-appearance-customizations holidays-customizations
diary-customizations calculator-customizations calc-customizations
server recentf tree-widget .autoload paren window-numbering w3m
browse-url doc-view jka-compr image-mode timezone w3m-hist w3m-fb
bookmark-w3m w3m-ems mule-util w3m-ccl ccl w3m-favicon w3m-image
w3m-proc w3m-util tramp tramp-compat tramp-loaddefs trampver shell
track-last-window scroll-other-window saveplace savehist pabbrev org
org-macro org-footnote org-pcomplete org-list org-faces org-entities
noutline outline easy-mmode org-version ob-emacs-lisp ob ob-tangle
org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval
org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar
cal-loaddefs lib-edit hsqldb sql view lib-window lib-isearch lib-buffer
reveal iswitchb info-look ibuffer hippie-exp grep compile filecache
edit-minibuffer eldoc-eval pcomplete esh-var esh-io esh-cmd esh-opt
esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util
ekey assoc dired-details+ dired dired-details cool-prefix-bindings
winner edmacro kmacro lib-basic lib-lispext lib-kbd comint-history
comint ansi-color ring browse-kill-ring cl-macs advice derived anticus
apropos ffap thingatpt url-parse auth-source eieio byte-opt bytecomp
byte-compile cconv eieio-core gnus-util mm-util mail-prsvr
password-cache url-vars eldoc help-fns cus-edit cus-start cus-load
wid-edit cl gv cl-loaddefs cl-lib bbdb-loaddefs info easymenu tex-site
cl-format-autoloads package time-date tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
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
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
Memory information:
((conses 16 1176885 84587)
(symbols 48 64749 18)
(miscs 40 8041 1491)
(strings 32 235828 76125)
(string-bytes 1 21626586)
(vectors 16 86945)
(vector-slots 8 1785625 101651)
(floats 8 844 607)
(intervals 56 32632 125)
(buffers 976 73)
(heap 1024 102900 52809))
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#19016: 24.4.50; tq.el does the wrong thing when enqueuing inside a callback
2014-11-11 3:48 bug#19016: 24.4.50; tq.el does the wrong thing when enqueuing inside a callback Andreas Politz
@ 2019-08-03 14:33 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-08-03 14:33 UTC (permalink / raw)
To: Andreas Politz; +Cc: 19016
Andreas Politz <politza@hochschule-trier.de> writes:
> tq-queue-pop removes the top question and sends the next one. But here
> a problem occurs, if the callback function adds another question, sends
> it and waits for it's result. Because this invokes tq-process-buffer
> recursively with the first question still at top. Resulting in the
> callback to the first question called a second time, third time ... .
>
> Here is a lisp file which should demonstrate this.
>
>
> ..and a patch
Makes sense to me. I've now applied this to Emacs 27.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-03 14:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-11 3:48 bug#19016: 24.4.50; tq.el does the wrong thing when enqueuing inside a callback Andreas Politz
2019-08-03 14:33 ` Lars Ingebrigtsen
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).