From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Uniquify change [PATCH] Date: Sat, 12 Sep 2020 13:50:07 +0200 Message-ID: <20200912115007.tze35edwcdo5vdoc@Ergus> References: <20200912115007.tze35edwcdo5vdoc.ref@Ergus> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="lgitophigv4j6taa" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28466"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 12 13:50:57 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 1kH43U-0007FZ-4q for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Sep 2020 13:50:56 +0200 Original-Received: from localhost ([::1]:59948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kH43T-0005d1-7A for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Sep 2020 07:50:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kH42r-00057S-NR for emacs-devel@gnu.org; Sat, 12 Sep 2020 07:50:17 -0400 Original-Received: from sonic310-13.consmr.mail.bf2.yahoo.com ([74.6.135.123]:38254) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kH42p-0001d7-CR for emacs-devel@gnu.org; Sat, 12 Sep 2020 07:50:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1599911413; bh=Hg6bOtKKz8niyX/vjsYekLPQkLXLmpO6knD0SxiND4c=; h=Date:From:To:Subject:References:From:Subject; b=K+21e4mqe/6roMzGCyWuoMJSp6FBtkzdoKL1NSXqWyL1nEOLee7t1AEaKge8+6CONuI8U968iuo7+m30YbM9bqN3EGUrTe/X92L6IrEOyb3I28JbMJNnFoGuiGzor2OK6GUJn1TlMlfLu1FGDgvlQPW6Icwu8ERBL7wQzOZD6iYrNKVMKp+ffiAr6PTEQFHgXBF5hba8m9hl50ky0ibd0Wrh7cQB1+j/2ZrbMBdQkNVDQobkYG4aznQKsVCyJ2aj2WkDtZM0iL4urN0QX9cNtj4IDNr8OfKcH9/gmy5/1PTgJ0iqrdmXpjl+xtE3i8wtD7W4qnF9rJ4CpG6IKElwNA== X-YMail-OSG: jLTnHecVM1mgUcmA06ENa0o.AHDiP7gBDAsQDPWLFiOgJvBgvXbob8C5xpLbr4H BlNB.w_nTTCnSYGpwfpq.SUEjbbYADHp9iEfSZaA_jLBLWutiwlq1vqdb4sCDUCpcP0X_1N2zb4r DflU43qgy5XQdGuJ38ljwpKkXH1I5jP.RWOdylJvHFOCA_Xm5umBs2DoXApFyYVoqDAyVm1KYI_N 4z8mugAp9bz9QcWPJ1ECKRddmWHQ8HfisC6WiNrqak.M2WP2fmiW0ClsuXv.dSCvaLbamgU66nqq XPxmwqjrlt9EDmmISAhFL6CJjr_kYP2IfEo3Gk6A5qTAv_72yZuYeHApZix7LqAaQ8RDtqIYqKyy LnqmPchZNs6Wjlh6Y_PjYiZtq3bqTCrjCN9TlOIvBjAzHbROxicojQbOtv.nHqzE__eNPjF7ll20 qO1uE1GRwuHn9i1Tz0BBAzZfGf1XXjJ.tiqA8mg0VZWv8YCodKAmat52Ijiz2orIpNeU0QXU4OZs P2YTXcYoR.CvUridwv1le.acYfRGP2_1AaBvkc0mjnE.4TnyEaXpTXZiN8GI9QNFSny92rrr6qXX Read9e29ZfrsnPnYFsf0Ru_Vv32ljiCKuX1.xY.gXmiyt.jRrSeSKfcgFCerMsUAjBgzFEg5XAUX _a8qFMSOQZryRydw5E7K2u03rRpforQE4XU_VYZiQAQlTIfXh4X2i01f6exeAgj3MwF_ZEdD6fWe 8Q97D_PEX1q3y4qJhjIMjSwE2_9dB.nvV9fqKYF1IG.PSUp9tZjgurYi0GvsCKSud5ZJM689UDxT gOkm4bvzWac.XfXPvknrmkncLgyPDEITfzariDRokH Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.bf2.yahoo.com with HTTP; Sat, 12 Sep 2020 11:50:13 +0000 Original-Received: by smtp407.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 44643808e91c65ea8895117afb522f8f; Sat, 12 Sep 2020 11:50:11 +0000 (UTC) Content-Disposition: inline X-Mailer: WebService/1.1.16583 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Apache-HttpAsyncClient/4.1.4 (Java/11.0.7) Received-SPF: pass client-ip=74.6.135.123; envelope-from=spacibba@aol.com; helo=sonic310-13.consmr.mail.bf2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/12 06:44:50 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:255311 Archived-At: --lgitophigv4j6taa Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Hi: I want to add this patch to master. Could you give it a look and suggest where in NEWS I should mention this? Best, Ergus --lgitophigv4j6taa Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="uniquify.patch" diff --git a/lisp/uniquify.el b/lisp/uniquify.el index 70e8ecee74..8439d9d874 100644 --- a/lisp/uniquify.el +++ b/lisp/uniquify.el @@ -104,6 +104,13 @@ uniquify-buffer-name-style post-forward-angle-brackets name name nil name name<2> +The value can be set to a customized function with two mandatory +arguments. For example the current implementation for +post-forward-angle-brackets could be: + +(defun my-post-forward-angle-brackets (base extra-string) + (concat base \"<\" (mapconcat 'identity extra-string \"/\") \">\")) + The \"mumble\" part may be stripped as well, depending on the setting of `uniquify-strip-common-suffix'. For more options that you can set, browse the `uniquify' custom group." @@ -111,6 +118,7 @@ uniquify-buffer-name-style (const reverse) (const post-forward) (const post-forward-angle-brackets) + (function :tag "Other") (const :tag "numeric suffixes" nil)) :version "24.4" :require 'uniquify) @@ -378,6 +386,8 @@ uniquify-get-proposed-name ((eq uniquify-buffer-name-style 'post-forward-angle-brackets) (concat base "<" (mapconcat 'identity extra-string "/") ">")) + ((functionp uniquify-buffer-name-style) + (funcall uniquify-buffer-name-style base extra-string)) (t (error "Bad value for uniquify-buffer-name-style: %s" uniquify-buffer-name-style))))) --lgitophigv4j6taa--