From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6KWLDoE4x2F6LAEAgWs5BA (envelope-from ) for ; Sat, 25 Dec 2021 16:28:01 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WGQgCoE4x2HHTQAAbx9fmQ (envelope-from ) for ; Sat, 25 Dec 2021 15:28:01 +0000 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 DA63E25E17 for ; Sat, 25 Dec 2021 16:28:00 +0100 (CET) Received: from localhost ([::1]:59358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n18xk-0004bJ-46 for larch@yhetil.org; Sat, 25 Dec 2021 10:28:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n18ud-0002DV-LL for emacs-orgmode@gnu.org; Sat, 25 Dec 2021 10:24:47 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:42189) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n18uc-00036g-8i for emacs-orgmode@gnu.org; Sat, 25 Dec 2021 10:24:47 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id D74175C0101 for ; Sat, 25 Dec 2021 10:24:45 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 25 Dec 2021 10:24:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eml.cc; h= message-id:subject:from:to:content-type:date:mime-version :content-transfer-encoding; s=fm2; bh=+yBKIZPnPjweVO9Cpf+lu0f/eD IGU1+yEwpBZTux4mA=; b=lGAfvoFPm8aTD19dLIEwDwyP+pLWLx4rjRVgoKQhoQ d6/+fo8naksOsasn3pHGjxPqQyrZ64KJOyjr3/9dG/3iqUHc5dy94bkOWaZhRsFD wullEb29fB6yCk8PgSqMd7L3yw2P5oOuBuDwZcdXHCppnd2A5WsdmdVMmZCf4VZA rB0Sf+kmLqOFI1SZHAAsuDnBQXmYgslPCTeLH2vdxgNCL7uQ651spv/ZlNiOdqux v9r0+u2ehwqcd934Gg1GtW40epGlxzt6s0OZMP+MghMUv11Cyxd+s/khimOTmJgf DCYAq3QZNhAs9Ifk6eJtB7WwaI35p6ATOzOvbKKhaqHg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=+yBKIZ PnPjweVO9Cpf+lu0f/eDIGU1+yEwpBZTux4mA=; b=LxvAfpJaeV88T9b0vz7cTy GM9oTWsBi6xXQq6oMdY8jlruhck9NfeSbpVyYbvjo0lWGIRPYKPeofwraFHbnonP oYMUk6+Uo3VI7IUXf9eCR03jfDJUIK+u3PohSWHfwkJ0m/aaCMC6D76Ja/UvorR/ R6jAcXs1p2zdC7JCXA9BsfbfaV7tV6t8JHXFoLHsqQz6y8arCLWeHXF//wyypJg9 FaMhvufWw/RLtN4rOHZ9Wj0c8rOkKb6Uakof3bii9I7wdez6cpQSin/GSGCllnmH 8g/CYzzVq000qude1jv2kriPBN4KCrBLc3kklIaARvmbM+GXeBb81Qwtmj3JU3iw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudduvddgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfedtmdenucfjughrpefkuffhvfgtffggfgfgsehtkeertddtreej necuhfhrohhmpefoihhkhhgrihhlucfukhhorhiihhhinhhskhhiihcuoehmshhkohhrii hhihhnshhkihihsegvmhhlrdgttgeqnecuggftrfgrthhtvghrnhephefggfehiedtleev ffetgfeiffegjeevuddtkeeiveeufffhffdtleektdettdefnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhskhhorhiihhhinhhskhhihies vghmlhdrtggt X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 25 Dec 2021 10:24:44 -0500 (EST) Message-ID: <80f7d99b0cf16fefbcdd2db62c35f53946895162.camel@eml.cc> Subject: [PATCH] org-refile.el: show refile targets with doc. title From: Mikhail Skorzhinskii To: Org Mode Content-Type: text/plain; charset="UTF-8" Date: Sat, 25 Dec 2021 16:23:42 +0100 MIME-Version: 1.0 User-Agent: Evolution 3.40.0-1 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=66.111.4.26; envelope-from=mskorzhinskiy@eml.cc; helo=out2-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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640446080; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=+yBKIZPnPjweVO9Cpf+lu0f/eDIGU1+yEwpBZTux4mA=; b=Cr0/uHy+G+y6DdU6kI5VwsUk58Tu/EEC3HcOZFGfinV7HAW7/8ZLNM7T0PcFZLPxYYAboL 5BAxSCJ8u/K4SuVFuv+WLZh6eM4Ilnmih51vkTNtaxEw39ntt3HJqfCI7c72AHLgfE12Iy 3uEa2D1dOa8Z713gTxXM3f2VH8fy2F+Buh+SvLayHGD/WKQ421QzizFUPqCHUcJhI+g2Fl elHzaLpO1pJhgfVD353xcnUZfGbmwpzDtvnzM7etvPTmt5/BTYSWnHLeMegJhr2UQrRTqU UaufCI9f7vQvsrkf0lKTUbyNI//6ZWaIrkcXOt/+vyTAS0Q/gSbnVkwc9dmakQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640446080; a=rsa-sha256; cv=none; b=DQ6NG91RjByBVPw7lR+GhnaZ3P/SMDAmWKUKuvDI5DFDU2rHgpAWRLqUkB4ce1V5O+R6zM Y2jeLC8pm21ggNSf4fVRfRK1m4vzKJQh+aZhY89reYiSw2s7OsckjXwhAUZsGeDCPN73yY DaocYxGh3FzeYr1CNeRHXyag5UUu+d1A73FL5TbNX5KhDy0JBvGK8fMjn9iCKup4ju7Ax2 r4jyWMhTRaUPddQH53TRIhoOXngWhsEuRcEYPDHEDqh8DLcwTdb53mrFZqPO97HO6IzzjC JxBzyIRkGnLWOLgS8/mJHgi3Y0uU7uRf0NhBaFxzGAzE7aZxefnX6+81BdC2gA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=eml.cc header.s=fm2 header.b=lGAfvoFP; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=LxvAfpJa; dmarc=pass (policy=none) header.from=eml.cc; 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.56 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=eml.cc header.s=fm2 header.b=lGAfvoFP; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=LxvAfpJa; dmarc=pass (policy=none) header.from=eml.cc; 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: DA63E25E17 X-Spam-Score: -7.56 X-Migadu-Scanner: scn0.migadu.com X-TUID: kbMFtq3l2Imh * lisp/org-refile.el (org-refile-use-outline-path): add an option 'title * lisp/org-refile.el (org-refile-get-targets): start refile target outline with document title (#+title) instead of file name ---  lisp/org-refile.el | 5 ++++-  1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/org-refile.el b/lisp/org-refile.el index 678759e10..8ff1b2f5b 100644 --- a/lisp/org-refile.el +++ b/lisp/org-refile.el @@ -158,7 +158,8 @@ When `buffer-name', use the buffer name."           (const :tag "Yes" t)           (const :tag "Start with file name" file)           (const :tag "Start with full file path" full-file-path) -         (const :tag "Start with buffer name" buffer-name))) +         (const :tag "Start with buffer name" buffer-name) +         (const :tag "Start with document title" title)))    (defcustom org-outline-path-complete-in-steps t    "Non-nil means complete the outline path in hierarchical steps. @@ -317,6 +318,8 @@ converted to a headline before refiling."                  (push (list (and (buffer-file-name (buffer-base- buffer))                                    (file-truename (buffer-file-name (buffer-base-buffer))))                               f nil nil) tgs)) +              (when (eq org-refile-use-outline-path 'title) +                (push (list (org-get-title-from-file (file-truename (buffer-file-name (buffer-base-buffer)))) f nil nil) tgs))                (org-with-wide-buffer                 (goto-char (point-min))                 (setq org-outline-path-cache nil)