[Top][All Lists]

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

Re: [PATCH] find-file-noselect-1

From: Nick Roberts
Subject: Re: [PATCH] find-file-noselect-1
Date: Sun, 13 Feb 2005 18:31:27 +1300
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.1) Gecko/20020826

Why call find-file-noselect there?  If this is meant to operate on the
file that was just visited, it already has a buffer, and it is the
current buffer when gdb-find-file-hook runs.  Why not just use
that buffer?

That might have been true but I'm now using this function to address Kim's
point about enabling gud-minor-mode for existing buffers.

I don't understand this explanation.  In the case where you're enabling
gud-minor-mode in existing buffers, the buffers also already exist so you
shouldn't call find-file-noselect (which may cause new files to be visited).
Maybe you want something like find-buffer-visiting, but even that sounds
doubtful because it seems that you always know the buffer before you even
know the file name

I am just using find-file-noselect to recover the name of the buffer. I have a buffer and a file associated with it. Generally, I don't see the big deal whether I pass the buffer-name or filename across the functions. However since the code is part of find-file-hook, I'll pass the buffer-name to avoid the possibility of some kind of


reply via email to

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