From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: possible `with-current-buffer' bug Date: Sun, 06 Feb 2011 20:10:27 +0100 Message-ID: <87mxm9rnbw.fsf@escher.home> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1297019475 16178 80.91.229.12 (6 Feb 2011 19:11:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 Feb 2011 19:11:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 06 20:11:10 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PmA0q-0000Hp-Hx for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Feb 2011 20:11:08 +0100 Original-Received: from localhost ([127.0.0.1]:37202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmA0q-0004X9-0y for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Feb 2011 14:11:08 -0500 Original-Received: from [140.186.70.92] (port=47708 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmA0U-0004Wo-Gg for help-gnu-emacs@gnu.org; Sun, 06 Feb 2011 14:10:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmA0T-0003sm-FB for help-gnu-emacs@gnu.org; Sun, 06 Feb 2011 14:10:46 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:56455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmA0T-0003si-8G for help-gnu-emacs@gnu.org; Sun, 06 Feb 2011 14:10:45 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PmA0R-0008V2-HX for help-gnu-emacs@gnu.org; Sun, 06 Feb 2011 20:10:43 +0100 Original-Received: from i59f56f18.versanet.de ([89.245.111.24]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Feb 2011 20:10:43 +0100 Original-Received: from stephen.berman by i59f56f18.versanet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Feb 2011 20:10:43 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 45 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: i59f56f18.versanet.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78991 Archived-At: On Mon, 7 Feb 2011 01:30:30 +0800 Le Wang wrote: > Hi, > > > Could someone follow these steps and tell me if I'm going insane? >  "compilation-disable-input" seems to be set by with-current-buffer. > > 1. emacs -Q > > 2. paste into scratch: > > (require 'compile) > > (defun foo () >   (interactive) >   (compilation-start "blahasdfasdf" 'grep-mode)) > > 3. M-x eval-current-buffer > 4. M-x foo > 5. (confirm "compilation-disable-input" is nil) C-h v > compilation-disable-input > 5. (instrument compilation-start and step through it) C-h f compilation-start > C-x o M-x edebug-defun M-x foo > > As soon as I get inside the first "(with-current-buffer () ... " form, the > value of "compilation-disable-input" changes from nil to t.  I''ve seen this > with NTEmacs 23.2.1 and CVS build 20110112. See grep.el: (define-compilation-mode grep-mode "Grep" "Sets `grep-last-buffer' and `compilation-window-height'." (setq grep-last-buffer (current-buffer)) (set (make-local-variable 'tool-bar-map) grep-mode-tool-bar-map) (set (make-local-variable 'compilation-error-face) grep-hit-face) (set (make-local-variable 'compilation-error-regexp-alist) grep-regexp-alist) (set (make-local-variable 'compilation-process-setup-function) 'grep-process-setup) (set (make-local-variable 'compilation-disable-input) t)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Steve Berman