From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: [21.1.90]: point put at point-min in *compilation* Date: Thu, 07 Feb 2008 21:57:25 +0200 Organization: JURTA Message-ID: <8763x0v8pu.fsf@jurta.org> References: <6EE216E1AA959543A555C60FF34FB76702CD2B19@maileube01.misys.global.ad> <6EE216E1AA959543A555C60FF34FB76702D254AF@maileube01.misys.global.ad> <87fxw5tqrx.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202414647 7370 80.91.229.12 (7 Feb 2008 20:04:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Feb 2008 20:04:07 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Simon.Marshall@misys.com, rms@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 07 21:04:29 2008 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 1JNCyx-0005UP-MB for ged-emacs-devel@m.gmane.org; Thu, 07 Feb 2008 21:04:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JNCyU-0007AW-S5 for ged-emacs-devel@m.gmane.org; Thu, 07 Feb 2008 15:03:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JNCxn-0006u5-Na for emacs-devel@gnu.org; Thu, 07 Feb 2008 15:03:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JNCxn-0006tl-At for emacs-devel@gnu.org; Thu, 07 Feb 2008 15:03:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JNCxn-0006ti-33 for emacs-devel@gnu.org; Thu, 07 Feb 2008 15:03:15 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JNCxm-00034p-Mb for emacs-devel@gnu.org; Thu, 07 Feb 2008 15:03:14 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JNCxm-0001dF-Cw for emacs-pretest-bug@gnu.org; Thu, 07 Feb 2008 15:03:14 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JNCxj-00034F-CF for emacs-pretest-bug@gnu.org; Thu, 07 Feb 2008 15:03:14 -0500 Original-Received: from anti-4.kiev.sovam.com ([62.64.120.202]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JNCxi-00032y-Rv; Thu, 07 Feb 2008 15:03:11 -0500 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by anti-4.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1JNCxf-000JWF-Nx; Thu, 07 Feb 2008 22:03:08 +0200 In-Reply-To: (Stefan Monnier's message of "Wed, 06 Feb 2008 22:30:01 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Scanner-Signature: b46f4584ea35a5bfe65e3be67b2b2352 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 2195 [Feb 07 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: 11 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 6.x (1) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:88455 gmane.emacs.pretest.bugs:20935 Archived-At: > Feel free to extend this feature. It probably makes sense to make it > either not jump to the source (only jump to the error message itself) The patch below adds a third option to compilation-scroll-output, as Richard suggested, by reusing a part of the functionality of compilation-auto-jump-to-first-error. > or to use pop-to-buffer (so that people who set pop-up-frames do not > get bothered either). Maybe, the default value of compilation-auto-jump-to-first-error should depend on pop-up-frames? Index: lisp/progmodes/compile.el =================================================================== RCS file: /sources/emacs/emacs/lisp/progmodes/compile.el,v retrieving revision 1.451 diff -c -r1.451 compile.el *** lisp/progmodes/compile.el 14 Jan 2008 15:41:33 -0000 1.451 --- lisp/progmodes/compile.el 7 Feb 2008 19:57:04 -0000 *************** *** 762,768 **** (defun compilation-auto-jump (buffer pos) (with-current-buffer buffer (goto-char pos) ! (compile-goto-error))) ;; This function is the central driver, called when font-locking to gather ;; all information needed to later jump to corresponding source code. --- 762,769 ---- (defun compilation-auto-jump (buffer pos) (with-current-buffer buffer (goto-char pos) ! (if compilation-auto-jump-to-first-error ! (compile-goto-error)))) ;; This function is the central driver, called when font-locking to gather ;; all information needed to later jump to corresponding source code. *************** *** 1054,1061 **** Setting it causes the Compilation mode commands to put point at the end of their output window so that the end of the output is always ! visible rather than the beginning." ! :type 'boolean :version "20.3" :group 'compilation) --- 1055,1067 ---- Setting it causes the Compilation mode commands to put point at the end of their output window so that the end of the output is always ! visible rather than the beginning. ! ! The value `first-error' stops scrolling on encountering the first error, ! and moves point to its location in the *compilation* buffer." ! :type '(choice (const :tag "No scrolling" nil) ! (const :tag "Scroll compilation output" t) ! (const :tag "Stop scrolling on the first error" first-error)) :version "20.3" :group 'compilation) *************** *** 1168,1174 **** (if highlight-regexp (set (make-local-variable 'compilation-highlight-regexp) highlight-regexp)) ! (if compilation-auto-jump-to-first-error (set (make-local-variable 'compilation-auto-jump-to-next) t)) ;; Output a mode setter, for saving and later reloading this buffer. (insert "-*- mode: " name-of-mode --- 1174,1181 ---- (if highlight-regexp (set (make-local-variable 'compilation-highlight-regexp) highlight-regexp)) ! (if (or compilation-auto-jump-to-first-error ! (eq compilation-scroll-output 'first-error)) (set (make-local-variable 'compilation-auto-jump-to-next) t)) ;; Output a mode setter, for saving and later reloading this buffer. (insert "-*- mode: " name-of-mode *************** *** 2159,2165 **** ;; compilations, to set the beginning of "this compilation", it's a good ;; place to reset compilation-auto-jump-to-next. (set (make-local-variable 'compilation-auto-jump-to-next) ! compilation-auto-jump-to-first-error)) ;;;###autoload (add-to-list 'auto-mode-alist '("\\.gcov\\'" . compilation-mode)) --- 2166,2173 ---- ;; compilations, to set the beginning of "this compilation", it's a good ;; place to reset compilation-auto-jump-to-next. (set (make-local-variable 'compilation-auto-jump-to-next) ! (or compilation-auto-jump-to-first-error ! (eq compilation-scroll-output 'first-error)))) ;;;###autoload (add-to-list 'auto-mode-alist '("\\.gcov\\'" . compilation-mode)) -- Juri Linkov http://www.jurta.org/emacs/