help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: buffer-name in find-file-hook


From: Nikolaj Schumacher
Subject: Re: buffer-name in find-file-hook
Date: Sun, 14 Sep 2008 23:10:54 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin)

Joe Bloggs <who@cares.invalid> wrote:

> Nikolaj Schumacher <me@nschum.de> writes:
>
>> Joe Bloggs <who@cares.invalid> wrote:
>>
>>> Hi, I am writing a function to add to find-file-hook for hiding text
>>> regions saved in a list. I need to know the buffer-name of the opened
>>> file, so that I can compare it with the buffer names of the saved
>>> regions.
>>
>> Why are you using the buffer name?  Wouldn't it be better to use
>> something more unique, i.e. the file name?
>>
>>
>> regards,
>> Nikolaj Schumacher
>
> I figured that I may want to move the file, but still keep the hidden
> regions.

Unfortunately files of the same name (say "README") will then also share
the same hidden regions.  On the other hand, buffers can be renamed or
"uniquified" and lose settings.

Maybe you could generate a hash to catch renamed files.


regards,
Nikolaj Schumacher




reply via email to

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