[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overlay arrow in *compilation* and *grep* buffers
From: |
Nick Roberts |
Subject: |
Re: Overlay arrow in *compilation* and *grep* buffers |
Date: |
Sat, 30 Apr 2005 00:19:43 +1200 |
> 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)
Re: Overlay arrow in *compilation* and *grep* buffers, Richard Stallman, 2005/04/25
Overlay arrow in *compilation* and *grep* buffers, Nick Roberts, 2005/04/28