From: Dieter Wilhelm <dieter@duenenhof-wilhelm.de>
Subject: Re: renaming current file and buffer
Date: Wed, 04 Jan 2006 00:51:25 +0100 [thread overview]
Message-ID: <87k6dg7tvm.fsf@hans.local.net> (raw)
In-Reply-To: 4078D06C-770A-46C1-9E50-8E5853409B25@Web.DE
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 03.01.2006 um 11:16 schrieb Dieter Wilhelm:
>
>>> 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.
>
> I now remember how I handle this: I rename in dired-mode the file I
> am editing (having it saved before). The buffer name follows this
> change after some time.
Knowing the behaviour of `rename-file' (not changing the buffer name)
I was somehow prejudiced against testing this possibility with
dired. But it actually works, thanks a lot for this hint!
With the standard dired it's a tad slow albeit. It means getting into
dired (C-x 4 d, lest I don't forget the filename), then looking for
the file (possibly searching with C-s). This might, just might
justify the hassle of using a home-made function. But with the
dired-x package - I just discovered - its working like a charm. Just
typing C-x C-j in the respective buffer is getting one into a dired
buffer with point already at the corresponding file! Then R NEW-NAME
RET RET and here we are again.
Great stuff
--
Best wishes
Dieter Wilhelm
next prev parent reply other threads:[~2006-01-03 23:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-02 22:29 renaming current file and buffer Dieter Wilhelm
2006-01-03 3:37 ` Ian Zimmerman
2006-01-03 10:16 ` Dieter Wilhelm
2006-01-03 20:39 ` Peter Dyballa
2006-01-03 23:51 ` Dieter Wilhelm [this message]
2006-01-03 23:58 ` Peter Dyballa
2006-01-04 1:03 ` Dieter Wilhelm
2006-01-04 11:23 ` Peter Dyballa
[not found] ` <mailman.21367.1136381051.20277.help-gnu-emacs@gnu.org>
2006-02-01 1:11 ` David Combs
2006-02-01 9:20 ` Peter Dyballa
2006-02-11 12:32 ` Dieter Wilhelm
[not found] ` <mailman.488.1138786073.3044.help-gnu-emacs@gnu.org>
2006-02-09 6:40 ` David Combs
2006-01-04 0:03 ` Ian Zimmerman
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k6dg7tvm.fsf@hans.local.net \
--to=dieter@duenenhof-wilhelm.de \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).