From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: Overlay arrow in *compilation* and *grep* buffers Date: Sat, 30 Apr 2005 00:19:43 +1200 Message-ID: <17010.9823.661722.54130@farnswood.snap.net.nz> References: <01c548ba$Blat.v2.4$e4827900@zahav.net.il> <17008.51785.631924.784654@farnswood.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1114777258 7941 80.91.229.2 (29 Apr 2005 12:20:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Apr 2005 12:20:58 +0000 (UTC) Cc: juri@jurta.org, eliz@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 29 14:20:55 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DRUTc-0003hc-6w for ged-emacs-devel@m.gmane.org; Fri, 29 Apr 2005 14:20:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DRUZv-000482-QO for ged-emacs-devel@m.gmane.org; Fri, 29 Apr 2005 08:26:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DRUZ4-00047q-1E for emacs-devel@gnu.org; Fri, 29 Apr 2005 08:25:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DRUZ3-00047e-2n for emacs-devel@gnu.org; Fri, 29 Apr 2005 08:25:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DRUZ2-00047Z-MC for emacs-devel@gnu.org; Fri, 29 Apr 2005 08:25:48 -0400 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DRUWl-0000lm-34; Fri, 29 Apr 2005 08:23:27 -0400 Original-Received: from farnswood.snap.net.nz (p248-tnt1.snap.net.nz [202.124.110.248]) by viper.snap.net.nz (Postfix) with ESMTP id DEADF4AFC1F; Sat, 30 Apr 2005 00:18:51 +1200 (NZST) Original-Received: by farnswood.snap.net.nz (Postfix, from userid 501) id 5B85462A99; Fri, 29 Apr 2005 13:19:44 +0100 (BST) Original-To: rms@gnu.org In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.0.50.1 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:36502 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36502 > SM> I recently realized that while the 0-context sometimes makes sense > for SM> C-x `, the "don't move" behavior would be preferable when > getting SM> to an error by using RET or mouse-2 on the actual error > text. > > That is true *if* we use the overlay arrow. However, as has just been > pointed out, using the overlay arrow in error message lists is very > annoying on text consoles. On text consoles, I think it would be > better to move to the top, even for RET or Mouse-2, than to display > the overlay arrow. This patch does what you are suggesting. It doesn't do what Stefan suggested (not because I don't think it is a good idea, but because I don't know how to implement it cleanly). It might be better to change the condition for a text terminal to one that checks for a left-hand fringe, if thats possible. Nick *** /home/nick/emacs/lisp/progmodes/compile.el.~1.352.~ 2005-04-24 07:39:26.000000000 +1200 --- /home/nick/emacs/lisp/progmodes/compile.el 2005-04-30 00:15:11.000000000 +1200 *************** *** 1247,1253 **** (make-local-variable 'compilation-messages-start) (make-local-variable 'compilation-error-screen-columns) (make-local-variable 'overlay-arrow-position) ! (set (make-local-variable 'overlay-arrow-string) "=>") (setq next-error-overlay-arrow-position nil) (add-hook 'kill-buffer-hook (lambda () (setq next-error-overlay-arrow-position nil)) nil t) --- 1247,1253 ---- (make-local-variable 'compilation-messages-start) (make-local-variable 'compilation-error-screen-columns) (make-local-variable 'overlay-arrow-position) ! (set (make-local-variable 'overlay-arrow-string) "") (setq next-error-overlay-arrow-position nil) (add-hook 'kill-buffer-hook (lambda () (setq next-error-overlay-arrow-position nil)) nil t) *************** *** 1576,1593 **** (defcustom compilation-context-lines 0 "*Display this many lines of leading context before message. ! If nil, don't scroll the compilation output window." :type '(choice integer (const :tag "No window scrolling" nil)) :group 'compilation :version "22.1") (defsubst compilation-set-window (w mk) "Align the compilation output window W with marker MK near top." ! (if (integerp compilation-context-lines) ! (set-window-start w (save-excursion ! (goto-char mk) ! (beginning-of-line (- 1 compilation-context-lines)) ! (point)))) (set-window-point w mk)) (defvar next-error-highlight-timer) --- 1576,1599 ---- (defcustom compilation-context-lines 0 "*Display this many lines of leading context before message. ! If nil, don't scroll the compilation output window. Text terminals never ! scroll because no overlay arrow is present." :type '(choice integer (const :tag "No window scrolling" nil)) :group 'compilation :version "22.1") (defsubst compilation-set-window (w mk) "Align the compilation output window W with marker MK near top." ! (if (display-graphic-p) ! (if (integerp compilation-context-lines) ! (set-window-start w (save-excursion ! (goto-char mk) ! (beginning-of-line (- 1 compilation-context-lines)) ! (point)))) ! (set-window-start w (save-excursion ! (goto-char mk) ! (beginning-of-line 1) ! (point)))) (set-window-point w mk)) (defvar next-error-highlight-timer)