From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id AK9hJtOeCmZCsgAA62LTzQ:P1 (envelope-from ) for ; Mon, 01 Apr 2024 13:47:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id AK9hJtOeCmZCsgAA62LTzQ (envelope-from ) for ; Mon, 01 Apr 2024 13:47:31 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=gC6PqUjw; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711972051; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=O+L65Wt5/Uwaf3RU3aE4lWuKzTiX5J3lDC2xRfN4D3c=; b=g/RR8u9XFXssF/fcTp1hQvimhYv/ojxtnwUiFC+8a30td8+uIKHh3y1OAvyiHCo106DqcS B80zsGQC+pOCDVx7E/H3AiTEkzupnDqri8AJg6+uDIpEATjtR66dbVHq4AAeUMvu6ywMc2 TpzfoFjwwSw9697M73xB7UIq+onSfrp2b6e+qPXIuOsxM3yrubWOEifBSXKefZWR7vVZJw b+4wfjaqqaBuBfV32gzmqbAWcRoTdZ+Q2tfEKuQA/c/nkOcabHy6mp2hoBZA1Nk9YC3OGi ZziOpb/nfcB7H4OeiJJ942+6TFG7thhIoRRve2y/Aa6klujmRWVpea8dyFNlUA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=gC6PqUjw; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711972051; a=rsa-sha256; cv=none; b=oSOpoyW7Fa5Oo+/76juTf9vnwl+/tJG0Fa5Okp3xokSp3BhHJ4qRdz/OQ8s2nKsYf7YF66 DSTsqOQ5+jpnWvrSL9Vi35ySLqmpVReUyxU/zExqMhX/JFVUkdApSknH2wNzzftz2GTzhP 7yYnfmbck9GXe2q32bf8ih5G6VAmzAd/DegcrbOMiPDJBwIvvDA9k/FsYTxJncwk7P+Pxo fl8QFBsAUzS8PNlWy4i92ah9IQKQ6ClezpNhxqIewqkQB4iH9/nakaze4nQFyKdpS/Cj5D K/T+MfcSRLKAo4DY6lPccvTuaf1R7tuu8LW3+4nhWfR4TgI02kbpghxppr88aQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 432C863867 for ; Mon, 1 Apr 2024 13:47:30 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrG7h-0004kc-Vi; Mon, 01 Apr 2024 07:46:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rrG7R-0004jj-06 for emacs-orgmode@gnu.org; Mon, 01 Apr 2024 07:46:30 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rrG7O-0007Dz-Hn for emacs-orgmode@gnu.org; Mon, 01 Apr 2024 07:46:28 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 41A44240104 for ; Mon, 1 Apr 2024 13:46:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711971983; bh=Op4FYNZ4pI6x6mwqg6iFidM0cSgIH9S7Uy9DevjAH5k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=gC6PqUjwWMJxSNoKEcbK+tSLYegIPxw9CIx7qSBaWMiaviLEhvAFWMkci/Ga2rDfr 4cKAOHbudCX+UzOm1aXJl/nmvoz4VmA3D/GgvtiB9neFzPQVDwqlRosvYz1uAzFZ3c U79mUF+OP93hlPjJaxsag9XvBANt18YUEA+I12ZSkn/arOtHlvPNwhgc45Mw+S2Pxl SJadKJsyLyNwDetk1trXgNOZSk1D2OoeN4xEtUSqicIqeU5jU9k3YbWtY3A48Wy64v FIhGUHOjabBW6po67E8C/ktMKizHiUHsc1FklmRwKw5X3kr+L6smHdSNmWk6iSeVag YaMbGSVAhTaJg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V7Tk62gNvz6ty5; Mon, 1 Apr 2024 13:46:22 +0200 (CEST) From: Ihor Radchenko To: Morgan Smith Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] lisp/org-capture.el: Simplify 'org-capture-get-indirect-buffer' In-Reply-To: References: Date: Mon, 01 Apr 2024 11:46:34 +0000 Message-ID: <87a5md8fvp.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -7.96 X-Migadu-Queue-Id: 432C863867 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -7.96 X-TUID: lZvOTl9mU5Zn Morgan Smith writes: > * lisp/org-capture.el (org-capture-get-indirect-buffer): Simplify by > using 'generate-new-buffer-name'. > ... > - (let ((n 1) (base (buffer-name buffer)) bname) > - (setq bname (concat prefix "-" base)) > - (while (buffer-live-p (get-buffer bname)) > - (setq bname (concat prefix "-" (number-to-string (cl-incf n)) "-" base))) > + (let ((bname (generate-new-buffer-name (concat prefix "-" (buffer-name buffer))))) Thanks, but this is potentially backwards-incompatible. `generate-new-buffer-name' following a different naming scheme compared to the current implementation of `org-capture-get-indirect-buffer': CAPTURE--foo.org vs. CAPTURE-foo.org Different naming scheme may potentially break user customization in `display-buffer-alist'. The change is not justified. Canceled. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at