emacs-devel
[Top][All Lists]
Advanced

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

Re: rename buffer but overwrite already existing one


From: Uwe Brauer
Subject: Re: rename buffer but overwrite already existing one
Date: Mon, 23 Mar 2020 20:24:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>>> "SM" == Stefan Monnier <address@hidden> writes:

   >> Couldn't rename-buffer, optionally, overwrite the content of a buffer.
   > Yes and no: it depends on what you mean by "overwrite the content of a 
buffer".

   > Here's what I think could be done easily:

   > - say you have buffers "mybuf" "otherbuf"
   > - you're in "mybuf" and you do `M-x rename-buffer RET otherbuf RET`.
   > - Emacs currently refuses it but it could accept your command by
   >   first renaming "otherbuf" to "otherbuf<1>", or by 
   >   killing "otherbuf",
^^^^^^^^^^^^^^^^^^^^^^^^^^
this is what I would prefer! Kill it.

   >   or by asking you for a new name to use for that other buffer.

   > But the two buffers can be unified into a single one.

   > Of course, another option might be to tweak `rename-uniquely` so it
   > automatically chooses a more informative name than what you get by
   > adding a "<N>".  I think such a feature might be a good idea
   > in general.  E.g. we could add a variable `buffer-name-suffix-function`
   > which some major modes could set to provide "meaningful" unique names.

Yeah, but I tend to loose the track easily of these buffers. 



   >         Stefan



Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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