auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] [PATCH] C-c C-c compiles either the buffer or the master


From: Damien Cassou
Subject: [AUCTeX-devel] [PATCH] C-c C-c compiles either the buffer or the master depending on variable
Date: Sat, 11 Dec 2010 13:09:16 +0100

Hi,

I attach a patch I've just written.

Use case:

C-c C-c is encoded in your brain to compile your document. When you
work on a big document (e.g., a thesis or book) you often want to
compile just the current buffer. However, your fingers always press
C-c C-c when you'd prefer them to type C-c C-b to compile the buffer
only (and C-c C-c is easier to type). This results in a long time to
compile the whole document when you'd prefer to have the result
immediately.

Solution:

Use C-c C-c to compile either the whole document or the current buffer
depending on a variable.

My patch contains:

- a new boolean variable TeX-master-compilation to store the choice
which defaults to t (= current behavior)
- a new function TeX-toggle-master-compilation to toggle this variable
- a new shortcut to call the function C-c C-t C-m (m = master)
- an adaptation of the TeX-command-master (C-c C-c) function to
compile either the document or the buffer depending on the variable

Backward compatibility:

People won't see any changes unless they press C-c C-t C-m. If they
press this shortcut again, they have the default behavior back.

What do you think?

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry

Attachment: tex.el.patch
Description: Binary data

Attachment: tex-buf.el.patch
Description: Binary data


reply via email to

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