Ralf Angeli <
angeli@caer...> 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/>
_______________________________________________
auctex mailing list
auctex@gnu....
http://lists.gnu.org/mailman/listinfo/auctex
opensubscriber is not affiliated with the authors of this message nor responsible for its content.