unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-pretest-bug@gnu.org, Simon.Marshall@misys.com, rms@gnu.org
Subject: Re: [21.1.90]: point put at point-min in *compilation*
Date: Thu, 07 Feb 2008 21:57:25 +0200	[thread overview]
Message-ID: <8763x0v8pu.fsf@jurta.org> (raw)
In-Reply-To: <jwvve51igwz.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 06 Feb 2008 22:30:01 -0500")

> 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/




  reply	other threads:[~2008-02-07 19:57 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-04 14:49 [21.1.90]: point put at point-min in *compilation* Marshall, Simon
2008-02-04 15:14 ` Chong Yidong
2008-02-04 15:55   ` Marshall, Simon
2008-02-04 16:37     ` Drew Adams
2008-02-04 17:29       ` Marshall, Simon
2008-02-04 15:40 ` Chong Yidong
2008-02-04 20:50   ` Glenn Morris
2008-02-05  1:24 ` Richard Stallman
2008-02-05  9:19   ` Marshall, Simon
2008-02-05 16:15     ` Stefan Monnier
2008-02-06 16:11       ` Richard Stallman
2008-02-06 16:17         ` David Kastrup
2008-02-06 17:03           ` Marshall, Simon
2008-02-07  0:44             ` Richard Stallman
2008-02-07  2:41               ` Stefan Monnier
2008-02-07 19:52                 ` Richard Stallman
2008-02-07  9:55               ` Marshall, Simon
2008-02-07  9:59                 ` Miles Bader
2008-02-07 10:02                 ` David Kastrup
2008-02-07 15:10                   ` Marshall, Simon
2008-02-07 15:29                     ` David Kastrup
2008-02-07 15:50                       ` Marshall, Simon
2008-02-07 16:09                         ` David Kastrup
2008-02-07 16:35                           ` Marshall, Simon
2008-02-07 15:28                   ` Stefan Monnier
2008-02-07 19:59                 ` Juri Linkov
2008-02-08  4:16                 ` Richard Stallman
2008-02-06 17:14         ` Stefan Monnier
2008-02-07  1:57           ` Juri Linkov
2008-02-07  3:30             ` Stefan Monnier
2008-02-07 19:57               ` Juri Linkov [this message]
2008-02-08  9:22                 ` Marshall, Simon
2008-02-08 14:46                   ` Stefan Monnier
2008-02-06 21:10         ` Stephen J. Turnbull
2008-02-06 22:09           ` Stefan Monnier
2008-02-07 19:52           ` Richard Stallman
2008-02-07 21:13             ` Stephen J. Turnbull
2008-02-08  4:15               ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8763x0v8pu.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=Simon.Marshall@misys.com \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).