unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org
Subject: Re: Tab/S-Tab in compile buffers
Date: Fri, 22 Jul 2005 21:22:55 +0300	[thread overview]
Message-ID: <87vf32yb04.fsf@jurta.org> (raw)
In-Reply-To: <36d7b3525e.3525e36d7b@net.lu.se> (LENNART BORGMAN's message of "Fri, 22 Jul 2005 12:15:36 +0200")

> A compilation buffer has a lot of underlined links. I would expect
> Tab/S-Tab to move between those just as they do in Help or Info (and
> in web-browsers ;-).
>
> Should Tab/S-Tab behave the same way in a compilation buffer?

A few days ago I added the [backtab] key binding to the existing [tab]
key binding in grep.el for symmetry.  I don't know why [tab] was
bound to `compilation-next-file' instead of `compilation-next-error'.
It is more natural to expect [tab] moving to the next underlined link
(which `compilation-next-error' does).  So what about the following patch
(I also deleted commented-out bindings for next-line because this is now
implemented by `next-error-follow-minor-mode'):

Index: lisp/progmodes/compile.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/compile.el,v
retrieving revision 1.365
diff -c -r1.365 compile.el
*** lisp/progmodes/compile.el	9 Jul 2005 20:45:26 -0000	1.365
--- lisp/progmodes/compile.el	22 Jul 2005 18:19:55 -0000
***************
*** 1158,1163 ****
--- 1173,1180 ----
      (define-key map "\M-p" 'compilation-previous-error)
      (define-key map "\M-{" 'compilation-previous-file)
      (define-key map "\M-}" 'compilation-next-file)
+     (define-key map "\t" 'compilation-next-error)
+     (define-key map [backtab] 'compilation-previous-error)
  
      (define-key map " " 'scroll-up)
      (define-key map "\^?" 'scroll-down)
Index: lisp/progmodes/grep.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/grep.el,v
retrieving revision 1.39
diff -c -r1.39 grep.el
*** lisp/progmodes/grep.el	19 Jul 2005 14:21:23 -0000	1.39
--- lisp/progmodes/grep.el	22 Jul 2005 18:19:57 -0000
***************
*** 187,203 ****
      (define-key map "\^?" 'scroll-down)
      (define-key map "\C-c\C-f" 'next-error-follow-minor-mode)
  
-     ;; This is intolerable -- rms
- ;;;    (define-key map [remap next-line] 'compilation-next-error)
- ;;;    (define-key map [remap previous-line] 'compilation-previous-error)
- 
      (define-key map "\r" 'compile-goto-error)  ;; ?
      (define-key map "n" 'next-error-no-select)
      (define-key map "p" 'previous-error-no-select)
      (define-key map "{" 'compilation-previous-file)
      (define-key map "}" 'compilation-next-file)
!     (define-key map [backtab] 'compilation-previous-file)
!     (define-key map "\t" 'compilation-next-file)
  
      ;; Set up the menu-bar
      (define-key map [menu-bar grep]
--- 187,199 ----
      (define-key map "\^?" 'scroll-down)
      (define-key map "\C-c\C-f" 'next-error-follow-minor-mode)
  
      (define-key map "\r" 'compile-goto-error)  ;; ?
      (define-key map "n" 'next-error-no-select)
      (define-key map "p" 'previous-error-no-select)
      (define-key map "{" 'compilation-previous-file)
      (define-key map "}" 'compilation-next-file)
!     (define-key map "\t" 'compilation-next-error)
!     (define-key map [backtab] 'compilation-previous-error)
  
      ;; Set up the menu-bar
      (define-key map [menu-bar grep]

-- 
Juri Linkov
http://www.jurta.org/emacs/

  reply	other threads:[~2005-07-22 18:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-22 10:15 Tab/S-Tab in compile buffers LENNART BORGMAN
2005-07-22 18:22 ` Juri Linkov [this message]
2005-07-22 22:43   ` Lennart Borgman
2005-07-22 22:43   ` Lennart Borgman
2005-07-22 22:52 ` Richard M. 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=87vf32yb04.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@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).