auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] Key bindings for TeX-next-error


From: David Kastrup
Subject: Re: [AUCTeX-devel] Key bindings for TeX-next-error
Date: Fri, 22 Apr 2005 12:50:26 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Ralf Angeli <address@hidden> writes:

> * David Kastrup (2005-04-22) writes:
>
>> Ralf Angeli <address@hidden> writes:
>>
>>> As `C-c `' really is a pain in the, uh, fingers I finally want to get
>>> a decision on and implementation of a better key binding for
>>> `TeX-next-error'.
>>>
>>> In recent CVS Emacs the bindings `M-g M-n' and `M-g n' were
>>> introduced for `next-error' besides the traditional `C-x `'.
>>
>> Not that I know of.  It was one of the main rationales for making M-g
>> M-g do goto-line, but the bindings have not yet been introduced
>> themselves.
>
> Well, why am I able to use them already?  From bindings.el (1.145):
>
> (define-key esc-map "gn" 'next-error)
> (define-key esc-map "g\M-n" 'next-error)
> (define-key ctl-x-map "`" 'next-error)

Hmmm.  Maybe I need to recompile, or make bootstrap or something.

>>> I'd be fine if we simply took the bindings for `next-error' and use
>>> them for `TeX-next-error'.  This could be done with something like
>>>
>>>     (if (featurep 'xemacs)
>>>     (substitute-key-definition 'next-error 'TeX-next-error map global-map)
>>>       (define-key map [remap next-error] 'TeX-next-error))
>>
>> Just set next-error-function on Emacs 22.
>
> Hm, I'll have to check how something like this can be done in Emacs 21
> and XEmacs.
>
>> However, I think it would
>> make more sense if we tried interfacing to
>> compilation-parse-errors-function in the long run.
>
> I just looked into compile.el for that and it seems that this is only
> there for compatibility reasons.

In Emacs 22, yes.  I don't know what is supposed to replace it,
though.

> Again, I'd need to have a more thorough look to understand what is
> involved here.

Agreed.

In any case, it would make sense to integrate further into the native
mechanisms rather then diverge farther.

>> I would not want to hold up releasing 11.80 for that, though, as it
>> seems a pretty invasive change.
>
> If only key bindings are changed it is not very invasive.
>
>> I am not yet sure about the best choice.  C-c ! seems somewhat
>> natural, but it assumes that people are familiar with TeX error
>> messages.  And AUCTeX helps you not getting too familiar with TeX.
>
> First, we currently have a button for jumping to the next error
> which holds an exclamation mark.  (Of course, this might change.)
> Second, an exclamation mark is connotated with attention which is
> something an error should really get. (c;

This sounds like good reasons.  It conflicts with the global binding

C-c ! a runs the command Footnote-add-footnote
   which is an interactive compiled Lisp function in `footnote'.
It is bound to C-c ! a.
(Footnote-add-footnote &optional ARG)

Add a numbered footnote.
The number the footnote receives is dependent upon the relative location
of any other previously existing footnotes.
If the variable `footnote-narrow-to-footnotes-when-editing' is set,
the buffer is narrowed to the footnote body.  The restriction is removed
by using `Footnote-back-to-message'.

[back]

but it does not sound like one would be needing the footnote package
in TeX modes, anyway.

Ah, that makes me remember what has been the problem:

(info "(Elisp) Major Mode Conventions")

   * The key sequences bound in a major mode keymap should usually
     start with `C-c', followed by a control character, a digit, or `{',
     `}', `<', `>', `:' or `;'.  The other punctuation characters are
     reserved for minor modes, and ordinary letters are reserved for
     users.

It happens that RefTeX illegitimately steals C-c < and C-c > (which
might have been choices for previous-error and next-error).

The question is whether we should really violate the convention here.
Not that C-c ` is any better in that regard...

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]