From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UH8QG6s3DmP1LwAAbAwnHQ (envelope-from ) for ; Tue, 30 Aug 2022 18:15:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id PwX6Gqs3DmOeKQAAauVa8A (envelope-from ) for ; Tue, 30 Aug 2022 18:15:39 +0200 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 16A46ADCD for ; Tue, 30 Aug 2022 18:15:39 +0200 (CEST) Received: from localhost ([::1]:57118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oT3DE-0005so-Jy for larch@yhetil.org; Tue, 30 Aug 2022 11:31:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT3B3-0005pH-TW for emacs-orgmode@gnu.org; Tue, 30 Aug 2022 11:29:21 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:48129) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT3B1-0000lE-6G for emacs-orgmode@gnu.org; Tue, 30 Aug 2022 11:29:21 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B5EC25C018F; Tue, 30 Aug 2022 11:29:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 30 Aug 2022 11:29:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eml.cc; h=cc:cc :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1661873358; x=1661959758; bh=wPhlMHVlWN 4FZaUcNbgJ6UC3dGjlcGmogNboFRLNiGU=; b=Sc0ajWqTigDXUq6bFa4s0ZkgHm POsO2NvJUsEAph7uQnhxiAwbF+b9hov7R6EfPGY1IZSkyvwFKAJ9/ITbrHU5C8Fn VIycXD/jqPeX3Ww2QvRuIt6FQQMQxTdqB7xwSCs8Z1e+bBGpGoqgGCqklOB/6Cm3 glAQJUqdzIvswQG/r6ucIs5rTiF/2ATzJ0vhJ1VlQFeB4s0az8EQfsSK2RgdUrMp 88Ay052T0QeHRm3XJR7BJe9EwX09DA1qBFkEGBVnbJeXMKsRAPWVBpxt9rxvFb0u Mex/CNEkRXQYZUiMFH6YQwQxFVeLTTYj3/o27QxoeWpXd+MO9fLNAyYR7s2g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1661873358; x=1661959758; bh=wPhlMHVlWN4FZaUcNbgJ6UC3dGjl cGmogNboFRLNiGU=; b=sN82OStp5tp5SUXqUFBC4qRMH+rqRNuHk7qPowaROhPK LHAacBLD9T78dl2jmgBzU706jqC5G2i9lI9EZ3hhQTTGYmsRymLGdk/lefp4yNIL 0aOFdUNxQg7U056jg1wC+yRlG5R6XDkOEfX+BuQaWjVQpsU1WIazm2b43jjtYgX6 vG+wLNOe2Ecf+b2tGxDtmJ6pniEsqhXWPqifIFrj1/wT9rq5iOBva4wX4wjCd+sl liOgZaPYGBt9XaKJCb92yhq2e0xo8joo98QnppoK6Q5C9JKeRzWIytprAr07iSRN XE9qU2FEeAzbJAKWQffADEmV7XBE2z/QTOcaVMgt5A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdekfedgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefhvfevuffffhgfjgfkgggtsehmtderredt reejnecuhfhrohhmpefoihhkhhgrihhlucfukhhorhiihhhishhnkhhiihcuoehmshhkoh hriihhihhnshhkihhisegvmhhlrdgttgeqnecuggftrfgrthhtvghrnhepueejteetjeel keehffettdetveeltedvieeijedvtdefffeuheeufeeigefhgeegnecuffhomhgrihhnpe hgnhhurdhorhhgpdhorhhgmhhouggvrdhorhhgnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomhepmhhskhhorhiihhhinhhskhhihiesvghmlhdrtg gt X-ME-Proxy: Feedback-ID: i171146f6:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 30 Aug 2022 11:29:17 -0400 (EDT) From: Mikhail Skorzhisnkii To: Ihor Radchenko Cc: Mikhail Skorzhinskii , Org Mode Subject: Re: [PATCH] org-refile.el: show refile targets with doc. title Date: Tue, 30 Aug 2022 15:53:00 +0200 References: <80f7d99b0cf16fefbcdd2db62c35f53946895162.camel@eml.cc> <87h7avsbzy.fsf@localhost> <87a6b2e67k.fsf@localhost> User-agent: mu4e 1.8.7; emacs 29.0.50 In-reply-to: <87a6b2e67k.fsf@localhost> Message-ID: <87mtblj0fv.fsf@eml.cc> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=66.111.4.29; envelope-from=mskorzhinskiy@eml.cc; helo=out5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1661876139; 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=wPhlMHVlWN4FZaUcNbgJ6UC3dGjlcGmogNboFRLNiGU=; b=evp/JoOhGjOAsdMEtCTuonuJWy4Cph6IHLB2I+VG97dUhoiCW+V2wgcTbM3xkwzcB4lFCO MgvwiDZyPf9w9rtpxuAtrKXIpg6hBGTvhMgyF8BGe3Ag2p9exLBlljROkOsDh6TDQ9Rvts lcU9b39dGhjVjC+/sqi+qx1fT+sgONXGbvPAywxdBm+Z6FHaJU44/SIraeL9/YjkKRyI/t xtu1HB0EadHFk5IjL3B9El2PqnYpAzjSGFxy12Uvj98wSuobVzzVXTPSN/7pf4e5vjsPFY w8F86ju+gdmvu7bpK8RVzd9jtpGa454azsulWmSbh/bSRjb4mB598THU2/DiPQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661876139; a=rsa-sha256; cv=none; b=Az57o68WvqlzocEEfEK72W2MDL2h9I4rDEEuuDSW8cX2FREbJYSp9dp1Filj3DvwKqvWIr BDUriyfFbHWOGlJrKDQLHokBGCYcbNRuFBbg4bHSGox6gTAQSrs8T3hSkg4JFyHkzTmNmz Kr+8WV7aB5h5UPpZfbpYUU6O5mr/9V6Wa7WNT42pmpXJRcivk/JCqGEqSw4ov6WcHf3Buj BDTs0nZunbC6tYB3YRtg+oOHe0Nomh73mu4rhJKirI0HDLG5hO8thm0pFy6C/9LWFPZ1l0 v8emRyC5N8dGZ71ELE2BXJd0G9zXsHjZwrsT42/oRFHS+HHpD+hbuY25km1jhQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=eml.cc header.s=fm1 header.b=Sc0ajWqT; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=sN82OStp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=eml.cc (policy=none); 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" X-Migadu-Spam-Score: 7.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=eml.cc header.s=fm1 header.b=Sc0ajWqT; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=sN82OStp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=eml.cc (policy=none); 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" X-Migadu-Queue-Id: 16A46ADCD X-Spam-Score: 7.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: PzxdLrkY6cf1 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I have signed the FSF papers. However for the simplicity I will send renewe= d patch in different thread. You may consider this thread to be closed.q E-Mail thread I am going to use is: Thanks, Mikhail Skorzhinskii Ihor Radchenko writes: > Mikhail Skorzhinskii writes: > >> Thank you for reviewing the changes. Sorry for the sloppy patch, I=E2=80= =99ve >> retested everything and added a few additional fixes, there were more >> problems. > > Thanks! And sorry for the slow review. Your email was lost near the tail > of the todo list. > >> I=E2=80=99ve added a couple of test cases too. (BTW, test framework is a= wesome >> and really easy to use!) > > Great! > >> * lisp/org-refile.el (org-refile-use-outline-path): add an option =E2=80= =99title >> * lisp/org-refile.el (org-refile-get-targets): start refile target >> outline with document title (#+title) instead of file name > > Note that changes like this should be detailed in etc/ORG-NEWS > >> - (const :tag =E2=80=9CStart with buffer name=E2=80=9D buffer-name))) >> + (const :tag =E2=80=9CStart with buffer name=E2=80=9D buffer-name) >> + (const :tag =E2=80=9CStart with document title=E2=80=9D title))) > > You also need to document the new option in the docstring. > >> + ;; When `org-refile-use-outline-path=E2=80=99 is `title=E2=80=99 and = document do not >> + ;; have an extracted document title, return just the file name >> + (should >> + (org-test-with-temp-text-in-file =E2=80=9C* H1=E2=80=9D >> + (let* ((filename (buffer-file-name)) >> + (org-refile-use-outline-path =E2=80=99title) >> + (org-refile-targets `(((,filename) :level . 1)))) >> + (member (file-name-nondirectory filename) >> + (mapcar #=E2=80=99car (org-refile-get-targets))))))) > > It would also make sense to add a test when document is a temporary > buffer without filename and also does not contain a title. > > Finally, your patch is exceeding 15LOC. You need to do copyright > paperwork to get the patch merged. See > > > Best, > Ihor --=-=-=--