From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SGqdKNhsR2DBfgAA0tVLHw (envelope-from ) for ; Tue, 09 Mar 2021 12:40:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oJpzJNhsR2CodgAA1q6Kng (envelope-from ) for ; Tue, 09 Mar 2021 12:40:56 +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 019DB2D7E5 for ; Tue, 9 Mar 2021 13:40:54 +0100 (CET) Received: from localhost ([::1]:47642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJbfR-00008N-Hy for larch@yhetil.org; Tue, 09 Mar 2021 07:40:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJazH-0008Iy-Dl for emacs-orgmode@gnu.org; Tue, 09 Mar 2021 06:57:19 -0500 Received: from ciao.gmane.io ([116.202.254.214]:44354) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJazG-0006oy-04 for emacs-orgmode@gnu.org; Tue, 09 Mar 2021 06:57:19 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lJazD-0003Ly-8t for emacs-orgmode@gnu.org; Tue, 09 Mar 2021 12:57:15 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Maxim Nikulin Subject: Re: org-refile failed due to default option stored by org-goto Date: Tue, 9 Mar 2021 18:57:09 +0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615293656; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=IKhP1o5LioH/gyH6VNb+4kDnEPbyF0mQ+QiWA+Yd+P8=; b=AL7RJ1IML2jfFPoXCC1gfn8a6k64wlzbX375Z0R4kgL/wHJXHC04W5JRSn4Nh9o8ATrZIc Y/gdK+yxW3cCwx1g1C+zb5JGfLMVpn8uuTcCLIphXBC7Z0udtEq/2otIrIIeMfL58D98eg rXynfEZAIw47S6SyEwXNavLOHQbSrYqafDCJ8oNpFEAKzni9yG7eIkFfCgeO1bXOkI5115 Sq6K8H5QbIOBP9CKjR14YJsGAJFMM5HhrrbhIlwHsBItU+hAn/XWNpyO+RvhPRxqjVnPcp DaJHVtkRy7Pd8HogaWPzcsIwmFgjdGk3VdBGUt10+GTDZjivq6QadHEZ2daUPQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615293656; a=rsa-sha256; cv=none; b=e+ouwnrZkl5NBsfWs1ImZZrynXRaaYeDd8BmbiHcE/9WZH9srerD+doSQSXnZ626a2dGk0 ZPPs1LjL0OrXUy/ZeM9/sSA3eq+o9bZC7WlGXWaDTUzVzqbQT0i+F070ip6IMMdR99f9kp Bqzq1pYVV8MadUE9E6uHnkZeXkHku+xyireyfLUzTLvgd1ifoo6VgqBsCr8kzCVJ+EfKX0 KrBBVxlHWlHJjOm1/cDABXrv41N1lDxoHs3KTD7XyDg/WSh8TtV3eS3tm/b0XoZ989QeOZ zrA/4Ikt5I7sMeRLiUs/KjD/LCRJUC/9f2RDO8CtKaWlfmbJWiHtGNhgzh8P8g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.78 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 019DB2D7E5 X-Spam-Score: -1.78 X-Migadu-Scanner: scn1.migadu.com X-TUID: Uu3eSxzHAhNq On 05/03/2021 05:53, Samuel Wales wrote: > diff --git a/lisp/org-refile.el b/lisp/org-refile.el > index 1e6872b46..8f98e9cf9 100644 > --- a/lisp/org-refile.el > +++ b/lisp/org-refile.el > @@ -617,7 +617,9 @@ this function appends the default value from > (tbl (mapcar > (lambda (x) > (if (and (not (member org-refile-use-outline-path > - '(file full-file-path))) > + ;; === alpha remove the parens > from ido completion of olpaths > + '(nil full-file-path))) > + ;; '(file full-file-path))) > (not (equal filename (nth 1 x)))) > (cons (concat (car x) extra " (" > (file-name-nondirectory (nth 1 x)) ")") The patch changes appearance of "(file.org)" at the end of each completion option. I do not know value of your org-refile-use-outline-path setting so I am unsure if your are trying to avoid it or vice versa to force it. I do not think that the patch is relevant to sharing of default option between org-goto and org-refile. I think, buffer (or file) name should be stored separately from outline path within the buffer in org-refile history and merged accordingly to current settings just before completing-read. org-refile-cache likely requires a similar approach. Personally I was confused by behavior of (org-refile-use-outline-path t). Completion options appears as "A (file.org)", "A/B (file.org)", and I could not figure out how to refile directly to "A" headings. I suspect that org-refile-allow-creating-parent-nodes does not work with "t" at all. Recently I have realized that after typing of "A/B" TAB completes option to "A/B (file.org)" and I was trying RET after "A". It is necessary to add space "A " to refile to a non-leaf node. That was the reason why I set (org-refile-use-outline-path 'file). Completion options appears as "file.org/A/B". I have to press TAB at first to get "file.org/" but then after "file.org/A" RET works fine.