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 WLvxBBb0QGDQbQAA0tVLHw (envelope-from ) for ; Thu, 04 Mar 2021 14:52:06 +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 4DzOABb0QGB+aAAA1q6Kng (envelope-from ) for ; Thu, 04 Mar 2021 14:52:06 +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 6F43624B03 for ; Thu, 4 Mar 2021 15:52:05 +0100 (CET) Received: from localhost ([::1]:38428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHpKd-0004vD-J8 for larch@yhetil.org; Thu, 04 Mar 2021 09:52:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHpGk-0001We-Mj for emacs-orgmode@gnu.org; Thu, 04 Mar 2021 09:48:02 -0500 Received: from ciao.gmane.io ([116.202.254.214]:49502) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHpGh-0007oY-NL for emacs-orgmode@gnu.org; Thu, 04 Mar 2021 09:48:02 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lHpGg-0004d4-2D for emacs-orgmode@gnu.org; Thu, 04 Mar 2021 15:47:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Maxim Nikulin Subject: org-refile failed due to default option stored by org-goto Date: Thu, 4 Mar 2021 21:47:51 +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, 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=1614869525; 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=PRCAXJMPSEV3vPNgS2RC5CiU+S20uQ3E6KGkIibpn48=; b=JWXp2oMRWLWqgm3uQzpEgOwxz8PP5i+He4tnUIbZUKk+zcXMZ9cUvinP7hG5jBYOmxHVKX b4CtQIWxyNsgW9jTY8jdX3zOYv0fveSfE4XDrl6xH467AS5Ew3IuEsF85fM4MiUoE5p64z +TRx2tZCxt7F8UnoktQlvpmWXYm9qwgsA7zGDxIx4F5KXo5aLyFN8Q+PgPkp3PHmcVls7T 6nX0M+0kIukWVUHGITSAiIUv0+1sVqJolG+aB2iL0rggBrVN4EZLgn14U/EXJOfa5mrBf7 ulXyT1KuxMlYP/DxZX030/n6lIpyEYjVqoP2opth7SmR5lFj5AaM9/vTWRNE1A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614869525; a=rsa-sha256; cv=none; b=tGLlHxxwAKzbVZPrWt9hYinrpVzxPJL1ntvRacVpmtE0rOifnvgQK27vtq86PqxI/TP7vP IKWhqnf4N6vsFWfbm6TxCc0PfqsO8B17WLOrGPZfik58VcrU0thrHruZ+URb6oiVmEtd5O 8v+NCpYt+vZUNTOKSr9NJ4E1ZIKO5EX1tg8Xm19BwyFmpUEJF92WbTCp9jQ6+4o+R6wUKp YIF26vgqy8MBMdBfaILqJzAZr8BmZnCuT148HnIG6RM4iTOJkyi2yB1VIjXTnUq6oiq3XX p4wXdlWfl9Nb65SxvMtwOx11qjbIrFF/rDN1CjfVNnWeVArQtxO4iqYwa6fS7g== 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.76 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: 6F43624B03 X-Spam-Score: -1.76 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7CIWImf/IGrF On 03/03/2021 00:15, Maxim Nikulin wrote: > > There is one issue however. Default option option does not work if after > cache clean other command is called, e.g. > - jump using C-u C-c C-j > - clean cache C-u C-u C-u C-c C-w > - try to jump or to refile [C-u] C-c C-w to default offered option > - "user-error: Invalid target location" I have realized that this issue is rather loosely related to org-refile-use-cache and I have seen it in a worse variant with disabled cache. file init-refile.el: (package-initialize) (custom-set-variables '(org-agenda-files (quote ("~/examples/org/test-notes.org"))) '(org-capture-templates (quote (("t" "Test" entry (file "") "* %?\n\n%U\n" :empty-lines 1)))) '(org-default-notes-file "~/examples/org/capture.org") '(org-directory "~/examples/org/") '(org-modules (quote (org-refile))) '(org-outline-path-complete-in-steps nil) '(org-refile-targets (quote ((nil :maxlevel . 5) (org-agenda-files :maxlevel . 5)))) '(org-refile-use-outline-path t) ) emacs -Q -L ~/src/emacs/org-mode/lisp/ -L ~/src/emacs/org-mode/contrib/lisp/ -l ~/examples/org/init-refile.el ~/examples/org/test-notes.org - C-u C-c C-j (org-goto) to some heading in the test-notes.org, e.g. "Two" / "Third" / "Theme" - M-x org-capture RET t to capture some note - Let's assume that target of previously executed org-goto suits for this note - C-c C-w RET to refile the note from capture.org file to the heading in test-notes.org offered as the default option. Actual result: - "Invalid target location" - Captured note is still in the capture.org file but it is not apparent since capture frame is closed. Expected result: - Default option works for refile even if it is remained from org-goto command Side note. In some cases it not so easy to close capture frame. If org-default-note-file is configured to a file in a non-existing directory then C-c C-k asks to create that directory but does not discards the note.