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 ix99MRhlQWDfBAAA0tVLHw (envelope-from ) for ; Thu, 04 Mar 2021 22:54:16 +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 CAc3LRhlQWAbMQAA1q6Kng (envelope-from ) for ; Thu, 04 Mar 2021 22:54:16 +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 086F0329BB for ; Thu, 4 Mar 2021 23:54:16 +0100 (CET) Received: from localhost ([::1]:46202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHwrH-0003A9-4t for larch@yhetil.org; Thu, 04 Mar 2021 17:54:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHwqC-0002uy-IC for emacs-orgmode@gnu.org; Thu, 04 Mar 2021 17:53:08 -0500 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]:43714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHwq9-0006X0-1d for emacs-orgmode@gnu.org; Thu, 04 Mar 2021 17:53:08 -0500 Received: by mail-lf1-x136.google.com with SMTP id d3so526208lfg.10 for ; Thu, 04 Mar 2021 14:53:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=73cpfXOWjf2eSrQUXMxVYRtAAjzTFZ+R/cx278ylsSI=; b=dKp1+Q/cVBHXxs8f+WdEuw9c3axOFj74iGttJH3hq8EnWqg1zIHMNPV25f3oFQ2jyu 7IDSiftOPSD8VnJAAerGNBN1GKBScI+Sm7iBbT4in/IKZwFxsw/qnzvonrrWViSoag3M Eqv5+yHpm0IgXDkyQ7t5dNHnISl5Z5L4CN6FZ8HQVR0ifIRHkTzGwH5zy7dzjxbxKri0 SAUuwuz5IFUqLVhzWAD5rIdHyZA+mbgBhMabjhOncjMHJVh52AbA6GmqMZ1grhUOOjUh UrXyYfI8jSVYpAp78qdi5aeBxFTdKhzU+ZzWfXiEoUnVrMkc0x0OFn/COJobMTMz9WId vwfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=73cpfXOWjf2eSrQUXMxVYRtAAjzTFZ+R/cx278ylsSI=; b=lRoLa74DGabqu08HKAXlGxNSwu9feUhHxD2FD/ZAXz/CSgvrkIrq9aBjzXhux8aR80 r+rQaC7vr+XKr3TUzw3upK44CREX3QVYx1nj0tyVkzaFQeo46TDDihqnpDc2d2wNTtP7 b/NuD1/sQpzy+rFwCPwHEVOKEE/6VUIdhyjJJCGJJt0+1obuYNDsvGeQcHtPqy6yJMCM sCfGpoEidpta6KcVH2iu0SUDazr2/QP/cHtJDyNm30x5bbEFj80qzf1KVbl6Zmx9NzFX D+VJ++gsug9LLYJqdl0yPZfgair/sMPrf+buWGzxAIicTm2ZncHgxKt1ze8jOxG4ez3X pNUQ== X-Gm-Message-State: AOAM531K0KENlUlHQOC1XVo51sP5oLK5vQsCwjaaaCGJ+QzDV+Zy7T/p GMENgZ5/eDG+DkGmVuhLvUAQhJscqTxEvTVzbC4= X-Google-Smtp-Source: ABdhPJzVlfp+8o8fsvcBgugIyxEhddvlA3Mpjo6bZlM0wzcWQCFEBk5TdqY/g9MtESsvfQufVTH33CWBZ+KkqxItWH0= X-Received: by 2002:a19:8048:: with SMTP id b69mr3761028lfd.458.1614898383047; Thu, 04 Mar 2021 14:53:03 -0800 (PST) MIME-Version: 1.0 Received: by 2002:ab3:7842:0:0:0:0:0 with HTTP; Thu, 4 Mar 2021 14:53:02 -0800 (PST) In-Reply-To: References: From: Samuel Wales Date: Thu, 4 Mar 2021 15:53:02 -0700 Message-ID: Subject: Re: org-refile failed due to default option stored by org-goto To: Maxim Nikulin Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=samologist@gmail.com; helo=mail-lf1-x136.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org 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=1614898456; 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=73cpfXOWjf2eSrQUXMxVYRtAAjzTFZ+R/cx278ylsSI=; b=kHh/1wisvW72iGj50Ieu84W+Iywsz8Ml8JST+HoHaE1D56TvC1w7i4yM10AjmYAzkEBptr Y1tBFAywJQvbIwDSeECBEbGGQgFjgMKtUtY1ttJdBb4WXgngOS9tI2QofDwdv+edGxKWxC wfBdnYvjWUEkKTzaWF0PjUQhXXHaq5sXZGVzjeqVGx4mlSzNUcjHsiZrpGzqgpiznKhgdv 7gm2n3m56TJWFlLYF/iPERZWz76/9tLo7c8ieeA1OSbaXUzrEQo0nQgAAKOi+XS6C/Rmch ZaAcGeNJtk3uQdy22OG9cuyurur5JawvWg5nQaKdZHQpE7N98A8fgl4hLFFgqg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614898456; a=rsa-sha256; cv=none; b=gAlE0XLCLVhjh64A6ZzSaBwBaD1vRdm11dZCDiUtjZ8X0oK3igidmIiIaUHI3Hi5o7EveW VoCWgLPCE6bU8nrNc+2gxZ6ta4Zll34c0HsRrLpvVGEiubESNLyiu3dPyz/JhEU74th1CB eFqhWEXyoJTZCXgcXZKvRIKSXziyhmkjzQyn/Csi53tdNlwGqAAbLDh1tNEw0k39sfiBnr 0otiUYPOY3nSw2RyitnUUgW/UXCwHstyyI3Fw1ZISleU7AXjj2QYyLKzLlbPAeSmH/9FW6 dWap/P2PFJnlt7XX+Ka4qq3Fltiz530yunZ3RyCSDBQMnDoUOkqIvGInD/daxg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="dKp1+Q/c"; dmarc=pass (policy=none) header.from=gmail.com; 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: -3.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="dKp1+Q/c"; dmarc=pass (policy=none) header.from=gmail.com; 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: 086F0329BB X-Spam-Score: -3.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: RTuZ/tIHaXxm if you are willing to try something as a complete stab in the dark, here is something i have had from many years ago that fixed issues possibly including a defaulting issue. the issues include other stuff too, but i do not understand the code now for health reasons to rule this out as a solution to your problem in addition to the problem i put in the comment and name. i havce carried along this patch for eyars. commit deaa14b6ed264c259a1f3b805b67b2db3951ba20 Author: Your Name Date: 2020-09-20 13:30:55 -0700 === alpha remove the parens from ido completion of olpaths Modified lisp/org-refile.el 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)) ")") On 3/4/21, Maxim Nikulin wrote: > 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. > > > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html