GNU bug report logs - #14662
24.3.50; add-function problem

Previous Next

Package: emacs;

Reported by: Gerard Brunick <gbrunick <at> gmail.com>

Date: Wed, 19 Jun 2013 06:26:04 UTC

Severity: normal

Tags: notabug

Found in version 24.3.50

Done: Glenn Morris <rgm <at> gnu.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 14662 in the body.
You can then email your comments to 14662 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 bug-gnu-emacs <at> gnu.org:
bug#14662; Package emacs. (Wed, 19 Jun 2013 06:26:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gerard Brunick <gbrunick <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 19 Jun 2013 06:26:12 GMT) Full text and rfc822 format available.

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

From: Gerard Brunick <gbrunick <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; add-function problem
Date: Tue, 18 Jun 2013 21:27:17 -0700
There seems to be a problem with add-function:

1. emacs -Q
2. M-x run-python
3. Eval "(comint-redirect-send-command-to-process "print 'test'" "test" 
"*Python*" t)" and observe that there are no errors.
4. Copy the text of comint-redirect-send-command-to-process from 
comint.el to the scratch buffer, and eval-defun it.
5. Now eval "(comint-redirect-send-command-to-process "print 'test'" 
"test" "*Python*" t)" again and suddenly I get:

Debugger entered--Lisp error: (void-variable v)
  (process-filter v)
  (lambda nil (process-filter v))()
  advice--add-function(:around ((lambda nil (process-filter v)) lambda 
(gv--val) (set-process-filter v gv--val)) comint-redirect-filter nil)
  (save-current-buffer (set-buffer process-buffer) (and 
comint-redirect-perform-sanity-check (save-excursion (goto-char 
(point-max)) (or (re-search-backward comint-prompt-regexp nil t) (error 
"No prompt found or `comint-prompt-regexp' not set properly")))) 
(comint-redirect-setup output-buffer (current-buffer) 
comint-prompt-regexp echo) (advice--add-function :around (let* ((v 
proc)) (cons (function (lambda nil (process-filter v))) (function 
(lambda (gv--val) (set-process-filter v gv--val))))) (function 
comint-redirect-filter) nil) (process-send-string (current-buffer) 
(concat command "\n")) (or no-display (display-buffer (get-buffer-create 
(if (listp output-buffer) (car output-buffer) output-buffer)))))
  (let* ((process-buffer (if (processp process) (process-buffer 
process) process)) (proc (get-buffer-process process-buffer))) 
(save-current-buffer (set-buffer process-buffer) (and 
comint-redirect-perform-sanity-check (save-excursion (goto-char 
(point-max)) (or (re-search-backward comint-prompt-regexp nil t) (error 
"No prompt found or `comint-prompt-regexp' not set properly")))) 
(comint-redirect-setup output-buffer (current-buffer) 
comint-prompt-regexp echo) (advice--add-function :around (let* ((v 
proc)) (cons (function (lambda nil (process-filter v))) (function 
(lambda (gv--val) (set-process-filter v gv--val))))) (function 
comint-redirect-filter) nil) (process-send-string (current-buffer) 
(concat command "\n")) (or no-display (display-buffer (get-buffer-create 
(if (listp output-buffer) (car output-buffer) output-buffer))))))
  comint-redirect-send-command-to-process("print 'test'" "test" 
"*Python*" t)
  eval((comint-redirect-send-command-to-process "print 'test'" "test" 
"*Python*" t) nil)
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

If I omit step 4 and eval-defun the code right in comint.el, I don't see 
this behaviour.  I assume that the emacs notices nothing has changed and 
ignores the eval-defun.  This is somehow related to the compile-time 
macro expansion in add-function.

Other configuration info follows:

In GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
 of 2013-06-11 on papaya, modified by Debian
 (emacs-snapshot package, version 2:20130611-1~ppa1~precise1)
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
System Description:    Ubuntu 12.04.2 LTS

Configured using:
 `configure --build x86_64-linux-gnu --host x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man
 --with-pop=yes
 --enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.3.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3.50/site-lisp:/usr/share/emacs/site-lisp
 --without-compress-info --with-crt-dir=/usr/lib/x86_64-linux-gnu/
 --with-x=yes --with-x-toolkit=gtk3 --with-imagemagick=yes
 CFLAGS='-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2'
 CPPFLAGS='-D_FORTIFY_SOURCE=2' LDFLAGS='-g -Wl,--as-needed
 -znocombreloc''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  eldoc-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-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-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<left> <left> <left> <left> <right> i <S-backspace>
* <right> <right> <right> <right> <right> <right> *
C-e C-x e C-x C-e q <left> <left> <left> <left> <left>
<left> <left> <left> <left> <left> <left> <left> C-x
o C-x b <up> <up> <up> <down> <down> <down> <up> C-k
<tab> q <escape> <escape> C-g <up> <down> C-x o h C-h
C-h q <backspace> <backspace> P C-e C-x C-e <left>
<right> <right> <right> <right> <down> C-x o <up> <down>
C-x b <return> <down> <left> <up> <S-down> <S-down>
<S-down> <S-down> <S-down> <up> <down> C-M-. <escape>
<escape> <escape> <escape> <up> C-u <up> <down> C-S-x
<up> C-M-x C-x o C-x e C-x C-e <up> <down> C-x C-e
C-x o C-x b <return> <up> <up> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-down> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-down> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-down> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-down> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-down> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-down> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-down> <S-down> <S-down> <S-down>
<S-up> <S-up> M-w <help-echo> C-x o <help-echo> <return>
<return> C-v C-y k <backspace> <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> <down>
<down> <down> <down> <down> <down> <down> <down> <up>
<up> <up> <down> <return> C-M-x <up> <up> <up> <up>
<left> C-x e C-x C-e <help-echo> q <help-echo> C-x
o <help-echo> <up> C-x 0 <help-echo> M-x <help-echo>
b u g - r e <tab> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
p o <tab> <help-echo> <backspace> <backspace> <backspace>
<tab> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
r e p o r <tab> <return>

Recent messages:
kmacro-call-macro: No kbd macro has been defined
#<window 0x11a1ab0 on test> [2 times]
Mark set
Saved text from "(defun comint-redirect-send-command-to-p"
scroll-up-command: End of buffer
Mark set
comint-redirect-send-command-to-process
kmacro-call-macro: No kbd macro has been defined
Entering debugger...
Back to top level.

Load-path shadows:
None found.

Features:
(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 gv etags nadvice kmacro debug eldoc jka-compr
find-func help-mode help-fns compile python rx easymenu comint ring
ansi-color time-date tooltip 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 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)

Cheers,
Gerard




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14662; Package emacs. (Wed, 19 Jun 2013 07:40:02 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> suse.de>
To: Gerard Brunick <gbrunick <at> gmail.com>
Cc: 14662 <at> debbugs.gnu.org
Subject: Re: bug#14662: 24.3.50; add-function problem
Date: Wed, 19 Jun 2013 09:39:29 +0200
Gerard Brunick <gbrunick <at> gmail.com> writes:

> If I omit step 4 and eval-defun the code right in comint.el, I don't see
> this behaviour.

comint.el requires lexical binding, but *scratch* doesn't enable it.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 01 Jul 2013 18:22:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 14662 <at> debbugs.gnu.org and Gerard Brunick <gbrunick <at> gmail.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 01 Jul 2013 18:22:02 GMT) Full text and rfc822 format available.

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

This bug report was last modified 11 years and 330 days ago.

Previous Next


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