From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Compilation auto-jump bug (was: Info bug) Date: Tue, 22 Apr 2008 23:57:51 +0300 Organization: JURTA Message-ID: <87ej8xka66.fsf_-_@jurta.org> References: <87iqybasft.fsf@stupidchicken.com> <87fxte7q9f.fsf@jurta.org> <18445.9167.275354.249388@kahikatea.snap.net.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208898263 32233 80.91.229.12 (22 Apr 2008 21:04:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Apr 2008 21:04:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: Nick Roberts Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 22 23:04:55 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JoPfa-000371-KS for ged-emacs-devel@m.gmane.org; Tue, 22 Apr 2008 23:04:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JoPev-0007Xq-1A for ged-emacs-devel@m.gmane.org; Tue, 22 Apr 2008 17:04:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JoPeq-0007WQ-28 for emacs-devel@gnu.org; Tue, 22 Apr 2008 17:04:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JoPek-0007Tg-R6 for emacs-devel@gnu.org; Tue, 22 Apr 2008 17:04:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JoPek-0007TW-LR for emacs-devel@gnu.org; Tue, 22 Apr 2008 17:04:02 -0400 Original-Received: from relay01.kiev.sovam.com ([62.64.120.200]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JoPej-0001dX-TF for emacs-devel@gnu.org; Tue, 22 Apr 2008 17:04:02 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay01.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1JoPeg-000LYl-MR; Wed, 23 Apr 2008 00:03:59 +0300 In-Reply-To: <18445.9167.275354.249388@kahikatea.snap.net.nz> (Nick Roberts's message of "Tue, 22 Apr 2008 11:31:27 +1200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: 669e5d776fa0e81a52da9f410dfff76f X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 2692 [Apr 22 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: none X-SpamTest-Rate: 10 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:95805 Archived-At: > > @@ -2271,8 +2262,7 @@ > > ;; Note that `Info-complete-menu-buffer' could be current already, > > ;; so we want to save point. > > - (save-excursion > > - (set-buffer Info-complete-menu-buffer) > > + (with-current-buffer Info-complete-menu-buffer > > (let ((completion-ignore-case t) > > (case-fold-search t) > > (orignode Info-current-node) > > > > In theory, these constructs should be equivalent, but they are not. > > with-current-buffer is equivalent to > > (save-current-buffer > (set-buffer... BTW, there is also the opposite bug: when `compilation-scroll-output' is `first-error', but `compilation-auto-jump-to-first-error' is nil, when the current buffer is not the *compilation* buffer, then it doesn't keep point on the first error. This means when I switch to the *compilation* buffer, point is at the beginning of the *compilation* buffer instead of the position of the first error. But when the current buffer is the *compilation* buffer at the time when compilation moves point, then it keeps the correct position of the first error. This is due to the code: (defun compilation-auto-jump (buffer pos) (with-current-buffer buffer (goto-char pos) (if compilation-auto-jump-to-first-error (compile-goto-error)))) It doesn't use `save-excursion', so it is strange that it doesn't keep point on the new position after `goto-char'. But when `compilation-auto-jump-to-first-error' is t, then after calling `compile-goto-error' and switching to the source buffer, point keeps its new position on the first error in the *compilation* buffer. -- Juri Linkov http://www.jurta.org/emacs/