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

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

Re: renaming current file and buffer


From: Dieter Wilhelm
Subject: Re: renaming current file and buffer
Date: Tue, 03 Jan 2006 11:16:19 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Ian Zimmerman <nobrowser@gmail.com> writes:

> Dieter> Every so often I'm working on a file whose name I've not chosen
> Dieter> appropriately.  So far I couldn't find an elegant way in Emacs to
> Dieter> rename the file and the buffer at the same time.  I found the function
> Dieter> definitions below in the net, which serve my needs perfectly, but I'm
> Dieter> wondering whether I've overlooked something equally fitting from 
> standard
> Dieter> emacs packages? What are you doing in this situation? Yes I know:
> Dieter> Thinking in advance, but ...
>
> Doesn't C-x C-w (`write-file') work for you?

Agreed, write-file gives me the opportunity for choosing another name
(with the corresponding buffer name).  But then I'd have to kill the badly
named file in a second step (e.g. in a dired buffer) since the old,
now redundant file remains on the file system.

> It does have the side effect of saving the buffer at that time, sorry if
> that's not what you want.

Thank you for your reply.  I'm new to newsgroups, may I ask why you've
written to my email address directly and copied your message to
`help-gnu-emacs@gnu.org', isn't it usual posting directly (and solely)
to the newsgroup?
-- 
Best wishes

     Dieter Wilhelm




reply via email to

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