From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Uwe Brauer Newsgroups: gmane.emacs.devel Subject: Re: rename buffer but overwrite already existing one Date: Mon, 23 Mar 2020 20:24:56 +0100 Message-ID: <87sghy98mv.fsf@mat.ucm.es> References: <874kuf9cbg.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=sha256; protocol="application/pkcs7-signature" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="104279"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Cancel-Lock: sha1:Ik82W/5uGt7mEtBshk/q/yLx+u4= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 23 20:27:00 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jGSix-000Qzs-Dk for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Mar 2020 20:26:59 +0100 Original-Received: from localhost ([::1]:38790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGSiw-0006vr-GP for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Mar 2020 15:26:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45041) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGSh6-0004Tj-TC for emacs-devel@gnu.org; Mon, 23 Mar 2020 15:25:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGSh5-00022s-K2 for emacs-devel@gnu.org; Mon, 23 Mar 2020 15:25:04 -0400 Original-Received: from ciao.gmane.io ([159.69.161.202]:48654) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jGSh5-00022Q-Bp for emacs-devel@gnu.org; Mon, 23 Mar 2020 15:25:03 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1jGSh4-000OaI-2a for emacs-devel@gnu.org; Mon, 23 Mar 2020 20:25:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Mail-Copies-To: never X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 159.69.161.202 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245732 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable >>> "SM" =3D=3D Stefan Monnier 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=20 > 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 "". 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.=20 > Stefan --=-=-= Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7s MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCCE8cw ggWDMIIDa6ADAgECAg9dk40wZzbIBh0ax1SEaQcwDQYJKoZIhvcNAQELBQAwOzELMAkGA1UEBhMC RVMxETAPBgNVBAoMCEZOTVQtUkNNMRkwFwYDVQQLDBBBQyBSQUlaIEZOTVQtUkNNMB4XDTA4MTAy OTE1NTk1NloXDTMwMDEwMTAwMDAwMFowOzELMAkGA1UEBhMCRVMxETAPBgNVBAoMCEZOTVQtUkNN MRkwFwYDVQQLDBBBQyBSQUlaIEZOTVQtUkNNMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKC AgEAunGAekyGbn/IE23Axn0cAJePLAwjuxCaQKkat4eI+JtWavvme46Lko6nJV1ZEds2LrdRFx+p CB8EFyRYqjdKGN/lOdRX/dfBLJEBkeIi1APAWPx3R+yPPnRDuqw0jU04dmeOsMhvMDNYcVy09Wtu 1AFQuBN+bEqjSdEgGe68wCkYZafe/u/dCpAh5xpnkkIQmF9PMLw+HEW0ENdoQBTAQPrndxd65guP ZVs82ZpS27W9nkbPPeuRBQLAlrJ2TE0QljuS+px/D5nfviM1RR4CXP61qJuZJdpe8yLDOfXkKi7T xh/EbKrFHGoBBUov0sXBqDQmXWal0gIh+Ri3BvVOmW+oq0xR6M9QGMV3yDkJLEmSMpmouxcXebBa xeajxFllRzWDXqnoNQuZu+TNIMabSgY5tWj8IrruVYwrTurzseP8tpma1UL6cU0Iz4ceanF9+dO0 6aVxgXvCTkeWpfZ2haMoj+mAboFTpW1fuEj5wvk2pi5J/7iWwowHs5uIWPzrGxzeLXDil5IwoYnj vFWoJ9ZL7ZCti/pjJVktqDXdypczvOXNx53R7O9eDkqQBiZjrbnZNS0HunZlLKxXj330B5TXgQKW XaMHSdV60Ff5G+dTRnWqsHlCy2hxCOlgvTlpzvSvw1ZAx61Sognkb4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