all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [PATCH] find-file-noselect-1
Date: Sun, 13 Feb 2005 18:31:27 +1300	[thread overview]
Message-ID: <420EE62F.5020400@snap.net.nz> (raw)
In-Reply-To: 87vf8x67yl.fsf-monnier+emacs@gnu.org

>
>
>>>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
recursion.

Nick

  reply	other threads:[~2005-02-13  5:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-10 20:36 [PATCH] find-file-noselect-1 Nick Roberts
2005-02-11  0:19 ` Miles Bader
2005-02-11  2:49   ` Nick Roberts
2005-02-11  3:03     ` Nick Roberts
2005-02-12  8:38       ` Richard Stallman
2005-02-12 10:30         ` Nick Roberts
2005-02-12 16:50           ` Stefan Monnier
2005-02-13  5:31             ` Nick Roberts [this message]
2005-02-13 16:14               ` Stefan Monnier
2005-02-13 12:38           ` Richard Stallman
2005-02-13 20:49             ` Nick Roberts
2005-02-15  6:15               ` Richard Stallman
2005-02-11  3:16     ` Stefan Monnier
2005-02-11  3:19 ` Stefan Monnier
2005-02-11  8:08   ` Nick Roberts
2005-02-11  8:51     ` Kim F. Storm
2005-02-11  9:53       ` Nick Roberts
2005-02-11 10:30         ` Kim F. Storm
2005-02-11 10:05       ` Miles Bader
2005-02-11 10:29         ` Kim F. Storm
2005-02-11 10:44           ` Nick Roberts
2005-02-11 13:05             ` Kim F. Storm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=420EE62F.5020400@snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.