Package: emacs;
Reported by: raman <raman <at> google.com>
Date: Tue, 29 Jul 2014 01:59:01 UTC
Severity: normal
Tags: unreproducible
Found in version 24.4.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
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 18139 in the body.
You can then email your comments to 18139 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
bug-gnu-emacs <at> gnu.org
:bug#18139
; Package emacs
.
(Tue, 29 Jul 2014 01:59:02 GMT) Full text and rfc822 format available.raman <raman <at> google.com>
:bug-gnu-emacs <at> gnu.org
.
(Tue, 29 Jul 2014 01:59:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: raman <raman <at> google.com> To: bug-gnu-emacs <at> gnu.org Subject: 24.4.50; called-interactively-p and skip advice: Date: Mon, 28 Jul 2014 18:58:11 -0700
Hi, I've used a check of the form (when (interactive-p) ...) within advice forms in emacspeak to speak *if and only if* a command i is called by the user -- as opposed from within other lisp functions. When we transitioned to Emacs 24, I replaced that check with (when (called-interactively-p 'interactive) ..) and this has again worked without any issues --- until now. We're seeing a problem now in ruby-mode when command electric-newline-and-maybe-indent is invoked -- that function for ruby-mode goes through a complex dance with smie-next-sexp. The long and short of it is that we eventually deadlock within a call to advice--called-interactively-skip -- the comments in nadvice.el where that function is implemented looks pretty scary. What emacspeak really needs is a clean way of checking whether something is called interactively, and this is the f first time in 20 years that the test is failing. For now, the only fix I have is to avoid the electric newline insertion in ruby-mode -- but the comments in nadvice.el make me worry that this will fail in the case of other around advices -- that said, there are lots of cases where it works, this is the only failure case for now. --Raman In GNU Emacs 24.4.50.2 (i686-pc-linux-gnu, GTK+ Version 2.16.1) of 2014-06-24 on labrador Repository revision: %N System Description: Ubuntu 9.04 Configured using: `configure --prefix=/usr/local --without-compress-install' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE XFT ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Shell Minor modes in effect: recentf-mode: t gpm-mouse-mode: t global-semantic-idle-summary-mode: t global-semanticdb-minor-mode: t semantic-mode: t savehist-mode: t ido-everywhere: t display-time-mode: t auto-insert-mode: t jabber-activity-mode: t jabber-mode-line-mode: t erc-list-mode: t erc-menu-mode: t erc-autojoin-mode: t erc-ring-mode: t erc-networks-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-match-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-netsplit-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t dynamic-completion-mode: t dired-omit-mode: t desktop-save-mode: t dirtrack-procfs-mode: t global-voice-lock-mode: t voice-lock-mode: t tooltip-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 Recent input: C-p C-e e DEL DEL ) C-n C-n C-n m ESC m ESC m C-p ESC m C-n C-p ESC C-a C-s d e f a ESC < C-s d e f a ESC m ESC m ESC C-q C-x C-g C-n C-n C-n C-p C-e e ESC b ESC d w h e n ESC DEL w h e n SPC C-n ESC m C-d ESC m ESC ^ C-n C-n ESC m C-k C-p C-n C-n C-p C-p C-x C-o C-n C-e e ) ) ) C-x C-e C-x @ h s c d RET C-x b / t m RET C-g C-x @ h s c d RET c d SPC / t m TAB RET C-x C-f t e s t . RET ESC M ESC x d DEL a d SPC d i s TAB a d TAB RET b C-x @ h s ESC x a d SPC d i s TAB a d TAB RET b a c k w TAB s e x TAB RET a r o u TAB RET RET C-e m ESC [ [ C ESC < ESC m C-d ESC m C-e e C-j C-e m ESC m ESC < ESC x t o g g l TAB d e TAB RET q TAB RET ESC m C-e C-e C-j ESC < C-n C-n C-n C-n C-e m q ESC x ESC p RET C-x @ h s c d RET C-x C-g ESC x C-g C-e m C-e ; m C-x @ h s c d RET c d RET c d SPC s o u TAB e m a c s RET . / b u i l d RET C-e m ESC x r e p o r t SPC e m a TAB RET Recent messages: Making completion list... Debug on Quit enabled globally Turned t debug on quit Entering debugger... Back to top level. Debug on Quit disabled globally Turned nil debug on quit C-x C-g is undefined Quit [2 times] End of buffer Load-path shadows: /home/raman/emacs/lisp/site-lisp/vm/lisp/tapestry hides /home/raman/emacs/lisp/emacspeak/lisp/tapestry /home/raman/emacs/lisp/emacspeak/lisp/tetris hides /usr/local/share/emacs/24.4.50/lisp/play/tetris /home/raman/.emacs.d/elpa/emms-20140630.1158/tq hides /usr/local/share/emacs/24.4.50/lisp/emacs-lisp/tq Features: (shadow emacsbug amixer recentf tree-widget debug emacspeak-ruby ruby-mode smie ffap tramp-cache tramp tramp-compat tramp-loaddefs trampver pcmpl-unix semantic/db-file data-debug cedet-files semantic/bovine/c semantic/decorate/include semantic/decorate/mode semantic/decorate pulse hideif semantic/bovine/c-by semantic/lex-spp 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 cc-langs emacspeak-c cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs eieio-opt emacspeak-speedbar speedbar sb-image dframe misearch multi-isearch vm-virtual vm-delete tapestry vm-rfaddons vm-menu vm-window vm-toolbar vm-mouse vm-page vm-minibuf emacspeak-vm vm emacspeak-wizards emacspeak-eterm term ehelp emacspeak-texinfo texinfo emacspeak-table-ui emacspeak-table emacspeak-find-dired find-dired eldoc lisp-mnt t-mouse cal-china lunar cal-bahai cal-islam cal-hebrew holidays hol-loaddefs gcal g-app g-auth mule-util cal-move server bbdb-vm vm-mime vm-folder vm-summary vm-motion vm-undo vm-misc bbdb-snarf mail-extr bbdb-com emacspeak-reftex reftex reftex-vars Save-visited-files-autoloads emacspeak-auctex tex-site color-theme-autoloads finder-inf gopher-autoloads emacspeak-info info memory-usage-autoloads slime-repl-autoloads slime-autoloads ssh-config-mode-autoloads package emacs-startup semantic/idle semantic/format ezimage semantic/tag-ls semantic/find semantic/ctxt semantic/db-mode semantic/db eieio-base saveplace midnight emacspeak-cedet semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet savehist emacspeak-ido ido emacspeak-m-player time autoinsert emacspeak-twittering twittering-mode epa epg ssl emacspeak-jabber jabber jabber-libnotify jabber-awesome jabber-osd jabber-wmii jabber-xmessage jabber-festival jabber-sawfish jabber-ratpoison jabber-tmux jabber-screen jabber-socks5 jabber-ft-server jabber-si-server jabber-ft-client jabber-ft-common jabber-si-client jabber-si-common jabber-feature-neg jabber-truncate jabber-time jabber-autoaway jabber-vcard-avatars jabber-chatstates jabber-events jabber-vcard jabber-avatar jabber-activity jabber-watch jabber-modeline jabber-ahc-presence jabber-ahc jabber-version jabber-ourversion jabber-muc-nick-completion hippie-exp jabber-browse jabber-search jabber-register jabber-roster jabber-presence jabber-muc jabber-bookmarks jabber-private jabber-muc-nick-coloring hexrgb jabber-widget jabber-disco jabber-chat jabber-history jabber-chatbuffer jabber-alert jabber-iq jabber-core jabber-console emacspeak-sgml-mode sgml-mode ewoc jabber-keymap jabber-sasl sasl sasl-anonymous sasl-login sasl-plain fsm jabber-logon jabber-conn srv dns starttls gnutls jabber-xml jabber-menu jabber-util jabber-autoloads erc-list erc-menu erc-join erc-ring erc-networks erc-pcomplete erc-track erc-match erc-button erc-fill erc-stamp erc-netsplit emacspeak-erc erc-goodies erc erc-backend erc-compat pp emacspeak-org org org-macro org-footnote org-pcomplete org-list org-faces org-entities emacspeak-outline foldout 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 emacspeak-find-func find-func emacspeak-calendar appt diary-lib diary-loaddefs solar cal-dst cal-menu calendar cal-loaddefs emacspeak-tcl tcl emacspeak-folding folding w3-prepare w3 w3-menu w3-emulate w3-auto w3-parse w3-fast-parse emacspeak-w3 emacspeak-google html2text gmaps emacspeak-we emacspeak-xslt w3-display w3-mouse w3-imap url-handlers w3-widget w3-vars w3-keymap w3-cus css font disp-table devices ange-ftp w3-cfg w3-compat emacspeak-sigbegone sigbegone emacspeak-custom cus-edit cus-start smtpmail sendmail gnus-prepare gnus-demon nntp emacspeak-gnus gm-nnir nnir gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range emacspeak-message message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win emacspeak-hide gnus gnus-ems nnheader mail-utils emacspeak-mspools mspools emacspeak-bbdb bbdb timezone bbdb-autoloads vm-pine vm-macro vm-message vm-autoloads vm-vars vm-version my-functions completion dired-aux dired-x emacspeak-dired emacspeak-desktop desktop frameset dired emacspeak-aumix emacspeak-forms forms-mode forms emacspeak-setup emacspeak-dbus nm dbus xml emacspeak-webspace emacspeak-feeds emacspeak-webutils browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source eieio eieio-core gnus-util mm-util mail-prsvr password-cache url-vars mailcap gf gweb gfeeds g-utils json emacspeak-alsaplayer emacspeak-amark derived emacspeak-advice shell pcomplete comint ring emacspeak-ansi-color ansi-color emacspeak-replace emacspeak-redefine emacspeak-personality emacspeak emacspeak-widget warnings wid-edit emacspeak-facemenu emacspeak-fix-interactive emacspeak-buff-menu g-cus-load cus-load emacspeak-preamble emacspeak-keymap emacspeak-speak time-date emacspeak-pronounce thingatpt dtk-speak flite-voices dtk-interp voice-setup emacspeak-sounds dectalk-voices espeak-voices mac-voices multispeech-voices outloud-voices dtk-unicode byte-opt bytecomp byte-compile cconv descr-text help-mode easymenu dtk-css-speech acss-structure emacspeak-load-path advice help-fns vc-git vc-dispatcher vc-svn cl-macs cl gv cl-loaddefs cl-lib 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 inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 8 679346 166711) (symbols 24 90221 0) (miscs 20 4938 2979) (strings 16 217446 40224) (string-bytes 1 5774236) (vectors 8 74336) (vector-slots 4 1079976 43510) (floats 8 1126 556) (intervals 28 3408 1943) (buffers 512 41) (heap 1024 56659 2138))
bug-gnu-emacs <at> gnu.org
:bug#18139
; Package emacs
.
(Wed, 30 Jul 2014 00:09:02 GMT) Full text and rfc822 format available.Message #8 received at 18139 <at> debbugs.gnu.org (full text, mbox):
From: Glenn Morris <rgm <at> gnu.org> To: raman <raman <at> google.com> Cc: 18139 <at> debbugs.gnu.org Subject: Re: bug#18139: 24.4.50; called-interactively-p and skip advice: Date: Tue, 29 Jul 2014 20:08:56 -0400
A minimal example starting from emacs -Q would be very helpful.
bug-gnu-emacs <at> gnu.org
:bug#18139
; Package emacs
.
(Wed, 30 Jul 2014 00:41:02 GMT) Full text and rfc822 format available.Message #11 received at 18139 <at> debbugs.gnu.org (full text, mbox):
From: raman <raman <at> google.com> To: Glenn Morris <rgm <at> gnu.org> Cc: 18139 <at> debbugs.gnu.org Subject: Re: bug#18139: 24.4.50; called-interactively-p and skip advice: Date: Tue, 29 Jul 2014 17:40:37 -0700
A minimal example would be nice, but the minimal example doesn't break. The insanely complex code that gets invoked when you call electric newline and indent from ruby mode appears to be the only pattern to date that triggers this.
bug-gnu-emacs <at> gnu.org
:bug#18139
; Package emacs
.
(Wed, 30 Jul 2014 04:00:03 GMT) Full text and rfc822 format available.Message #14 received at 18139 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: raman <raman <at> google.com> Cc: rgm <at> gnu.org, 18139 <at> debbugs.gnu.org Subject: Re: bug#18139: 24.4.50; called-interactively-p and skip advice: Date: Wed, 30 Jul 2014 06:59:46 +0300
> From: raman <raman <at> google.com> > Date: Tue, 29 Jul 2014 17:40:37 -0700 > Cc: 18139 <at> debbugs.gnu.org > > A minimal example would be nice, but the minimal example doesn't > break. The insanely complex code that gets invoked when you call > electric newline and indent from ruby mode appears to be the only > pattern to date that triggers this. Then include in your recipe the steps necessary to load whatever packages you need to reproduce the problem. But do start with "emacs -Q", as that will help identify the necessary players that contribute to this problem. Thanks.
bug-gnu-emacs <at> gnu.org
:bug#18139
; Package emacs
.
(Wed, 30 Jul 2014 13:58:02 GMT) Full text and rfc822 format available.Message #17 received at 18139 <at> debbugs.gnu.org (full text, mbox):
From: raman <raman <at> google.com> To: Eli Zaretskii <eliz <at> gnu.org> Cc: rgm <at> gnu.org, 18139 <at> debbugs.gnu.org Subject: Re: bug#18139: 24.4.50; called-interactively-p and skip advice: Date: Wed, 30 Jul 2014 06:56:45 -0700
This should hopefully produce the backtrace -- I'll give two recipes below -- the first is impossible for me to try 1. emacs -q 2. load-library ruby-mode 3. evaluate this form: (defadvice backward-sexp (around test pre act comp) (when (called-interactively-p 'interactive) (message "advice!")) ad-do-it) 3. Open a ruby file test.rb 4. type puts "foo" 5. Invoke electric-newline-and-indent -- to trigger the bug. Recipe 2: Do the same as above with emacspeak loaded -- and without bothering with the additional piece of advice. I'll attach the emacspeak generated backtrace below. Debugger entered--Lisp error: (quit) advice--called-interactively-skip(3 (t ad-Advice-backward-sexp #[256 "\211\204\300\262\301[!\207" [1 forward-sexp] 3 2382034 "^p"] 1) (t apply ad-Advice-backward-sexp #[256 "\211\204\300\262\301[!\207" [1 forward-sexp] 3 2382034 "^p"] 1)) run-hook-with-args-until-success(advice--called-interactively-skip 3 (t ad-Advice-backward-sexp #[256 "\211\204\300\262\301[!\207" [1 forward-sexp] 3 2382034 "^p"] 1) (t apply ad-Advice-backward-sexp #[256 "\211\204\300\262\301[!\207" [1 forward-sexp] 3 2382034 "^p"] 1)) called-interactively-p(interactive) ad-Advice-backward-sexp(#[256 "\211\204\300\262\301[!\207" [1 forward-sexp] 3 2382034 "^p"] 1) apply(ad-Advice-backward-sexp #[256 "\211\204\300\262\301[!\207" [1 forward-sexp] 3 2382034 "^p"] 1) #[128 "\300\301\302#\207" [apply ad-Advice-backward-sexp #[256 "\211\204\300\262\301[!\207" [1 forward-sexp] 3 2382034 "^p"] nil] 5 nil "^p"](1) #[0 "\300\301!\210\302\207" [#[128 "\300\301\302#\207" [apply ad-Advice-backward-sexp #[256 "\211\204\300\262\301[!\207" [1 forward-sexp] 3 2382034 "^p"] nil] 5 nil "^p"] 1 nil] 2 "\n\n(fn)"]() funcall(#[0 "\300\301!\210\302\207" [#[128 "\300\301\302#\207" [apply ad-Advice-backward-sexp #[256 "\211\204\300\262\301[!\207" [1 forward-sexp] 3 2382034 "^p"] nil] 5 nil "^p"] 1 nil] 2 "\n\n(fn)"]) #[0 "\304\242;\205 \306\304\242\"AC\304\307\240\210`\300 \306 \"A\211\204XG\310U\203$\311\312\313\310\314\315\316\301!\317\"\320\321%D\322\312\313\323\324\315\316!\325\"\326\327%\311EDC\217\210`=\203$\330\331\332`D\"\210\202$\303!\247\204t\302!\247\204l\333\334\335C\"\210\211B\262\202$\203\212\303!\302@!W\203\212A\262\202t\204\266\304\242\203\242\302!\247\203\242\211B\262\202$\330\331\302!\206\253\332`Eb\210\"\210\202$\211\203\313\303!\302@!U\203\313A\262\203\336\302!\247\203#B\262\202#\302!\247\204\361\330\331\307`E\"\210\202#\336!\204\377B\262\202#\211\203 \336@!\203 \330\331\302!\206\332`Eb\210\"\210\202#\211\262\210\266\203\2051\304\307\240\210\202 \207" [#[nil "`\304`[!\210\305 V\203 \306 \203 \307\310w\210\311\202\364n\203-o\204-\312`\313\"b\210\311\202\364`V\203An\204A\314!\203A\315\202\364\316 \317 \203O\320\nP`Sf\321=\203e\322\323\n\"\203e\313u\210\324\nP\n\325\235\203x\326 \203t\n\202\363\327\202\363\n\330\232\203\224\331 \203\207\332\202\363\333 \203\220\334\202\363\n\202\363\335\n\310\336\322#)\266\203\203\256\337u\210\n\337\310O\202\363\n\340\232\203\312`Sf\341=\203\312\342\343!\203\312\313u\210\344 \202\363\n\345\232\203\362\346 \204\331\n\202\363\212\337v\210\304d!\210`)\305 V\203\356\344 \202\363\311\202\363\n*)\207" [pos dot tok inhibit-changing-match-data forward-comment line-end-position ruby-smie--implicit-semi-p " " nil ";" scan-sexps -1 ruby-smie--args-separator-p " @ " smie-default-backward-token ruby-smie--at-dot-call "." 58 string-match "\\`\\s." ":" ("unless" "if" "while" "until") ruby-smie--bosp "iuwu-mod" "|" ruby-smie--opening-pipe-p "opening-|" ruby-smie--closing-pipe-p "closing-|" "\\`|[*&]\\'" t 1 "" 92 looking-at "\n" ruby-smie--backward-token "do" ruby-smie--redundant-do-p] 7] #[128 "\300\301\302#\207" [apply ad-Advice-backward-sexp #[256 "\211\204\300\262\301[!\207" [1 forward-sexp] 3 2382034 "^p"] nil] 5 nil "^p"] #<subr car> #[257 "\211A@\207" [] 2 1633439] (nil) smie-grammar assoc nil 0 err funcall make-byte-code "\300\301!\210\302\207" vconcat vector [1 nil] 2 "\n\n(fn)" scan-error 257 "\3018`X\203 \3028\202 \211\300b\210\303\304\305\306\211`W\203%\307\202&\310\\\"E\"\207" [2 3 throw return t buffer-substring-no-properties -1 1] 12 "\n\n(fn ERR)" throw return t signal cl-assertion-failed (numberp (funcall op-forw toklevels)) smie--associative-p] 14 "\n\n(fn)"]() funcall(#[0 "\304\242;\205 \306\304\242\"AC\304\307\240\210`\300 \306 \"A\211\204XG\310U\203$\311\312\313\310\314\315\316\301!\317\"\320\321%D\322\312\313\323\324\315\316!\325\"\326\327%\311EDC\217\210`=\203$\330\331\332`D\"\210\202$\303!\247\204t\302!\247\204l\333\334\335C\"\210\211B\262\202$\203\212\303!\302@!W\203\212A\262\202t\204\266\304\242\203\242\302!\247\203\242\211B\262\202$\330\331\302!\206\253\332`Eb\210\"\210\202$\211\203\313\303!\302@!U\203\313A\262\203\336\302!\247\203#B\262\202#\302!\247\204\361\330\331\307`E\"\210\202#\336!\204\377B\262\202#\211\203 \336@!\203 \330\331\302!\206\332`Eb\210\"\210\202#\211\262\210\266\203\2051\304\307\240\210\202 \207" [#[nil "`\304`[!\210\305 V\203 \306 \203 \307\310w\210\311\202\364n\203-o\204-\312`\313\"b\210\311\202\364`V\203An\204A\314!\203A\315\202\364\316 \317 \203O\320\nP`Sf\321=\203e\322\323\n\"\203e\313u\210\324\nP\n\325\235\203x\326 \203t\n\202\363\327\202\363\n\330\232\203\224\331 \203\207\332\202\363\333 \203\220\334\202\363\n\202\363\335\n\310\336\322#)\266\203\203\256\337u\210\n\337\310O\202\363\n\340\232\203\312`Sf\341=\203\312\342\343!\203\312\313u\210\344 \202\363\n\345\232\203\362\346 \204\331\n\202\363\212\337v\210\304d!\210`)\305 V\203\356\344 \202\363\311\202\363\n*)\207" [pos dot tok inhibit-changing-match-data forward-comment line-end-position ruby-smie--implicit-semi-p " " nil ";" scan-sexps -1 ruby-smie--args-separator-p " @ " smie-default-backward-token ruby-smie--at-dot-call "." 58 string-match "\\`\\s." ":" ("unless" "if" "while" "until") ruby-smie--bosp "iuwu-mod" "|" ruby-smie--opening-pipe-p "opening-|" ruby-smie--closing-pipe-p "closing-|" "\\`|[*&]\\'" t 1 "" 92 looking-at "\n" ruby-smie--backward-token "do" ruby-smie--redundant-do-p] 7] #[128 "\300\301\302#\207" [apply ad-Advice-backward-sexp #[256 "\211\204\300\262\301[!\207" [1 forward-sexp] 3 2382034 "^p"] nil] 5 nil "^p"] #<subr car> #[257 "\211A@\207" [] 2 1633439] (nil) smie-grammar assoc nil 0 err funcall make-byte-code "\300\301!\210\302\207" vconcat vector [1 nil] 2 "\n\n(fn)" scan-error 257 "\3018`X\203 \3028\202 \211\300b\210\303\304\305\306\211`W\203%\307\202&\310\\\"E\"\207" [2 3 throw return t buffer-substring-no-properties -1 1] 12 "\n\n(fn ERR)" throw return t signal cl-assertion-failed (numberp (funcall op-forw toklevels)) smie--associative-p] 14 "\n\n(fn)"]) smie-next-sexp(#[nil "`\304`[!\210\305 V\203 \306 \203 \307\310w\210\311\202\364n\203-o\204-\312`\313\"b\210\311\202\364`V\203An\204A\314!\203A\315\202\364\316 \317 \203O\320\nP`Sf\321=\203e\322\323\n\"\203e\313u\210\324\nP\n\325\235\203x\326 \203t\n\202\363\327\202\363\n\330\232\203\224\331 \203\207\332\202\363\333 \203\220\334\202\363\n\202\363\335\n\310\336\322#)\266\203\203\256\337u\210\n\337\310O\202\363\n\340\232\203\312`Sf\341=\203\312\342\343!\203\312\313u\210\344 \202\363\n\345\232\203\362\346 \204\331\n\202\363\212\337v\210\304d!\210`)\305 V\203\356\344 \202\363\311\202\363\n*)\207" [pos dot tok inhibit-changing-match-data forward-comment line-end-position ruby-smie--implicit-semi-p " " nil ";" scan-sexps -1 ruby-smie--args-separator-p " @ " smie-default-backward-token ruby-smie--at-dot-call "." 58 string-match "\\`\\s." ":" ("unless" "if" "while" "until") ruby-smie--bosp "iuwu-mod" "|" ruby-smie--opening-pipe-p "opening-|" ruby-smie--closing-pipe-p "closing-|" "\\`|[*&]\\'" t 1 "" 92 looking-at "\n" ruby-smie--backward-token "do" ruby-smie--redundant-do-p] 7] #[128 "\300\301\302#\207" [apply ad-Advice-backward-sexp #[256 "\211\204\300\262\301[!\207" [1 forward-sexp] 3 2382034 "^p"] nil] 5 nil "^p"] #<subr car> #[257 "\211A@\207" [] 2 1633439] ";") smie-backward-sexp(";") smie-indent-keyword() run-hook-with-args-until-success(smie-indent-keyword) smie-indent-calculate() smie-indent-virtual() smie-indent-after-keyword() run-hook-with-args-until-success(smie-indent-after-keyword) smie-indent-calculate() #[0 "\212\301y\210\302\303w\210`\300\242Y\203 \300\303\240\210\304 \206 \301)\207" [(nil) 0 " " nil smie-indent-calculate] 2 "\n\n(fn)"]() funcall(#[0 "\212\301y\210\302\303w\210`\300\242Y\203 \300\303\240\210\304 \206 \301)\207" [(nil) 0 " " nil smie-indent-calculate] 2 "\n\n(fn)"]) smie-indent-line() indent-according-to-mode() #[0 "\300\301!\210\302\303\301\"\210\304 \207" [delete-horizontal-space t newline nil indent-according-to-mode] 3 1970172 "*"]() ad-Advice-newline-and-indent(#[0 "\300\301!\210\302\303\301\"\210\304 \207" [delete-horizontal-space t newline nil indent-according-to-mode] 3 1970172 "*"]) apply(ad-Advice-newline-and-indent #[0 "\300\301!\210\302\303\301\"\210\304 \207" [delete-horizontal-space t newline nil indent-according-to-mode] 3 1970172 "*"] nil) newline-and-indent() electric-newline-and-maybe-indent() funcall-interactively(electric-newline-and-maybe-indent) call-interactively(electric-newline-and-maybe-indent nil nil) command-execute(electric-newline-and-maybe-indent)
bug-gnu-emacs <at> gnu.org
:bug#18139
; Package emacs
.
(Fri, 01 Aug 2014 16:13:01 GMT) Full text and rfc822 format available.Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):
From: raman <raman <at> google.com> To: bug-gnu-emacs <at> gnu.org Cc: tv.raman.tv <at> gmail.com, emacs-devel <at> gnu.org Subject: Re: 24.4.50; called-interactively-p and skip advice: Date: Fri, 01 Aug 2014 09:12:28 -0700
Following up on this bug with additional info: I just confirmed that this bug was not present in emacs 24.3 --- where interactive-p was implemented in C -- that function was declared obsolete in 23.2. In 24.4 when we transitioned to nadvice.el is when this appears to have broken. Looking at the code in 24.4; the code for called-interactively-p and its subsequent call through to advice--called-interactively-skip --- one of the functions placed on called-interactively-p-functions -- appears to introduce large level of complexity. advice--called-interactively-skip is defined in nadvice.el Going back to the specific issue from the Emacspeak side: What I really need is a way to tell if an interactive command was called by the user pressing a key e.g. M-f for forward-word -- or M-x forward-word -- those are the only situations in which the emacspeak advice that speaks the "current word" should be invoked. Using (called-interactively-p 'interactive) for this use-case now that I look at what that code does feels extremely tangled. Could we perhaps introduce a C-level variable -- say "interactivep" that is exposed to elisp -- code in callint.c could set that variable appropriately and clear it upon completing command execution. At the time nadvice.el was introduced, Stefane had me check through with emacspeak to make sure that nothing broke -- and I had confirmed it -- admittedly, the current breakage in ruby-mode is caused by a large number of complex recursive calls that are happening within that mode. Note that there is only one emacspeak advice invoked even then -- the one to backward-sexp -- but the call stack is deep enough that called-interactively-p gets very confused. --Raman
Lars Ingebrigtsen <larsi <at> gnus.org>
to control <at> debbugs.gnu.org
.
(Sat, 26 Dec 2015 16:01:02 GMT) Full text and rfc822 format available.bug-gnu-emacs <at> gnu.org
:bug#18139
; Package emacs
.
(Sat, 25 Mar 2017 15:55:02 GMT) Full text and rfc822 format available.Message #25 received at 18139 <at> debbugs.gnu.org (full text, mbox):
From: npostavs <at> users.sourceforge.net To: raman <raman <at> google.com> Cc: rgm <at> gnu.org, Eli Zaretskii <eliz <at> gnu.org>, 18139 <at> debbugs.gnu.org Subject: Re: bug#18139: 24.4.50; called-interactively-p and skip advice: Date: Sat, 25 Mar 2017 11:55:54 -0400
tags 18139 unreproducible quit raman <raman <at> google.com> writes: > This should hopefully produce the backtrace -- > > I'll give two recipes below -- the first is impossible for me to try > > 1. emacs -q > 2. load-library ruby-mode > 3. evaluate this form: > > (defadvice backward-sexp (around test pre act comp) > (when (called-interactively-p 'interactive) > (message "advice!")) > ad-do-it) > 3. Open a ruby file test.rb > 4. type > puts "foo" > 5. Invoke electric-newline-and-indent -- to trigger the bug. I assume this should be `electric-newline-and-maybe-indent' (C-j). Nothing happens when I do this (except that a newline is inserted). > Recipe 2: > > Do the same as above with emacspeak loaded -- and without bothering with > the additional piece of advice. Nothing happens when I do this (except that a newline is inserted). Probably because now emacspeak has a workaround by setting a `ems-called-interactively-p' flag. Do you know which version of emacspeak triggers the bug?
npostavs <at> users.sourceforge.net
to control <at> debbugs.gnu.org
.
(Sat, 25 Mar 2017 15:55:02 GMT) Full text and rfc822 format available.bug-gnu-emacs <at> gnu.org
:bug#18139
; Package emacs
.
(Tue, 10 Aug 2021 16:25:02 GMT) Full text and rfc822 format available.Message #30 received at 18139 <at> debbugs.gnu.org (full text, mbox):
From: Lars Ingebrigtsen <larsi <at> gnus.org> To: npostavs <at> users.sourceforge.net Cc: rgm <at> gnu.org, Eli Zaretskii <eliz <at> gnu.org>, 18139 <at> debbugs.gnu.org, raman <raman <at> google.com> Subject: Re: bug#18139: 24.4.50; called-interactively-p and skip advice: Date: Tue, 10 Aug 2021 18:23:55 +0200
npostavs <at> users.sourceforge.net writes: >> Do the same as above with emacspeak loaded -- and without bothering with >> the additional piece of advice. > > Nothing happens when I do this (except that a newline is inserted). > Probably because now emacspeak has a workaround by setting a > `ems-called-interactively-p' flag. Do you know which version of > emacspeak triggers the bug? More information was requested, but no response was given within four years, so I'm closing this bug report. If the problem still exists, please respond to this email and we'll reopen the bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no
Lars Ingebrigtsen <larsi <at> gnus.org>
to control <at> debbugs.gnu.org
.
(Tue, 10 Aug 2021 16:25:02 GMT) Full text and rfc822 format available.Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Wed, 08 Sep 2021 11:24:04 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.