auctex
[Top][All Lists]
Advanced

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

[AUCTeX] Re: reftex: visiting files


From: Rasmus Villemoes
Subject: [AUCTeX] Re: reftex: visiting files
Date: Tue, 26 Jan 2010 13:26:53 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Ralf Angeli <address@hidden> writes:

> * Rasmus Villemoes (2010-01-25) writes:
>
>> When using, for example, the "C-c =" feature or M-x
>> reftex-search-document, files which are part of the current document
>> are automatically opened if they don't already have a buffer. This is
>> of course great, but I was wondering if there was a way to configure
>> reftex so that the files are opened in read-only mode if the buffer in
>> which the command was issued is read-only.
>
> This cannot be configured.  (RefTeX simply calls `find-file-noselect'
> when opening a file from the table of contents, for example.)  I don't
> know how you made the original buffer read-only, but couldn't you do the
> same with the files opened from the toc or with `reftex-search-document'?

The original file is simply visited/opened using C-x C-r. The
background for the question is that I often find myself thinking "I
did something like X in projectY", so I open projectY's masterfile
using C-x C-r and then find the code snip I need using either a
regexp-search or the ToC buffer. I prefer readonly to make sure that I
don't accidentally make changes to projectY. (Of course, I could call
M-x toggle-read-only on each new buffer, but I think it would make
sense that thay are automatically read-only if the "original" is).

I can see that find-file-noselect unfortunately does not have an
option to set the read-only status of new buffers, so it is probably
not just a question of passing the current value of
buffer-read-only. I don't know if there is a simple solution, nor if I
am the only one who would find this useful.

-- 
Rasmus Villemoes
<http://rasmusvillemoes.dk/>





reply via email to

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