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

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

bug#56229: title: add a function to move a file from one place to anothe


From: Zachary Kanfer
Subject: bug#56229: title: add a function to move a file from one place to another
Date: Sun, 26 Jun 2022 11:16:24 -0400

Thanks! I agree the name is not exactly right.

It's more complicated because if the buffer is *not* visiting a file, the right thing for this function to just save the buffer to the location selected. I don't know if the name that needs to take that into account.

Is there a name for the file a buffer is visiting? Maybe "move-associated-file"? "move-visited-file"?

On Sun, Jun 26, 2022, 10:50 AM Lars Ingebrigtsen <larsi@gnus.org> wrote:
Zachary Kanfer <zkanfer@gmail.com> writes:

> So, attached is a patch for an interactive function that prompts for a
> new location, then writes the current buffer to that
> location. Assuming it's successful, and the buffer previously was
> associated with a file, it deletes the old file.

I think this sounds like a useful command, but I'm not sure about the
name:

[...]

> +(defun move-file (new-location)
> +  "Move the current file to NEW-LOCATION.

This is about moving the file the current buffer is visiting -- there's
no such thing as a "current file" in Emacs -- so the command name (and
doc string) should reflect that.  I don't really have a suggestion for a
better command name, though.  Anybody?

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

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