[Top][All Lists]

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

Re: [AUCTeX-devel] Make TeX output buffer inherit from special-mode

From: Tassilo Horn
Subject: Re: [AUCTeX-devel] Make TeX output buffer inherit from special-mode
Date: Thu, 24 Jan 2013 10:50:31 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Ivan Andrus <address@hidden> writes:

Hi Ivan,

[I've added the list back to Cc.]

>>> +(defvar TeX-output-mode-map
>>> +  (let ((map (make-sparse-keymap)))
>>> +    (set-keymap-parent map TeX-special-mode-map)
>>> +    (define-key map "n" 'TeX-next-error)
>>> +    ;; (define-key map "p" 'TeX-previous-error)
>>> +    (define-key map "b" 'TeX-toggle-debug-bad-boxes)
>>> +    (define-key map "w" 'TeX-toggle-debug-warnings)
>>> +    (define-key map "i" (lambda ()
>>> +                          (interactive)
>>> +                          (with-current-buffer TeX-command-buffer
>>> +                            (TeX-interactive-mode (if TeX-interactive-mode 
>>> -1 1)))))
>>> +    (define-key map "p" (lambda ()
>>> +                          (interactive)
>>> +                          (with-current-buffer TeX-command-buffer
>>> +                            (TeX-PDF-mode (if TeX-PDF-mode -1 1)))))
>>> +    (define-key map "s" (lambda ()
>>> +                          (interactive)
>>> +                          (with-current-buffer TeX-command-buffer
>>> + (TeX-source-correlate-mode (if TeX-source-correlate-mode -1 1)))))
>>> +    map)
>>> +  "Keymap for `TeX-output-mode'.")
>> In my opinion, jumping to the previous error is more important in
>> output buffers than toggling TeX-PDF-mode.  The latter has nothing to
>> do with debugging the output.
> I agree, but it isn't supported.  If you mean that I should
> reserve the key for when it is supported, that's probably a good
> idea.

Oh, that's a pitty!

Hm, if we'd save the current error number in addition to file, offset,
and point, then we could define `TeX-previous-error' as (TeX-next-error
(1- TeX-error-number)), right?  Feel free to give that a try (or any
other solution to this problem).

> Perhaps `TeX-PDF-mode' could go on "P"?

No objection from my side, although I see no point in it.

> or just not be bound at all?

That's what I prefer, unless you come up with a usecase where it would
make sense to toggle to/from PDF mode while debugging the compilation.

> If not at all then probably `TeX-source-correlate-mode' shouldn't be
> bound either since it's even less important.

Not sure.  I can imagine enabling `TeX-source-correlate-mode' while
debugging warnings or bad boxes, i.e., I want to jump to the location in
the PDF where a given bad box was reported.

>> And these two commands would also make very much sense here:
>> ,----[ (info "(auctex)Debugging") ]
>> |  -- Command: TeX-toggle-debug-bad-boxes
>> |      (`C-c C-t C-b') Toggle whether AUCTeX should stop at bad boxes
>> |      (i.e. overfull and underfull boxes) as well as normal errors.
>> | 
>> |  -- Command: TeX-toggle-debug-warnings
>> |      (`C-c C-t C-w') Toggle whether AUCTeX should stop at warnings as
>> |      well as normal errors.
>> `----
> Those are already there, on "b" and "w" respectively.

Oh yeah, I've completely overlooked them. :-)


reply via email to

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