From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oLrIDuFummCmWwAAgWs5BA (envelope-from ) for ; Tue, 11 May 2021 13:47:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cOtxCuFummAPOwAA1q6Kng (envelope-from ) for ; Tue, 11 May 2021 11:47:45 +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 CAC8825680 for ; Tue, 11 May 2021 13:47:42 +0200 (CEST) Received: from localhost ([::1]:34696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgQrW-0003E9-1H for larch@yhetil.org; Tue, 11 May 2021 07:47:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgQpe-0002ev-0C for emacs-orgmode@gnu.org; Tue, 11 May 2021 07:45:49 -0400 Received: from ciao.gmane.io ([116.202.254.214]:38124) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgQpb-0005vl-GV for emacs-orgmode@gnu.org; Tue, 11 May 2021 07:45:44 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lgQpZ-0005Rw-FY for emacs-orgmode@gnu.org; Tue, 11 May 2021 13:45:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Maxim Nikulin Subject: Re: [PATCH 2/2] org-refile.el: Fix test case Date: Tue, 11 May 2021 18:45:34 +0700 Message-ID: References: <20210509155531.26615-1-doublequotation@gmail.com> <20210509160506.26873-1-doublequotation@gmail.com> 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.8.1 In-Reply-To: <20210509160506.26873-1-doublequotation@gmail.com> 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.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, 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=1620733662; 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=X8u9L6SDdiiB1otM3ewAbky1TX2MK/O1vIdN2mFg2BI=; b=V9ibfJaM7hN2ObKc7yi1KI4VA7IH5lJ14npWLsRYZam/q5VCR7O4E52tFYqixsQxuBBK0L R+jOxQsUKdQRpEQzuY8Upq01ORvopBiuapojcj1VvcEKa0TSx7aGy4uARxubg86egYms9q qVWYQBoRchs5MLprdPC39DnVw1uc8VGNwogJgVIBwfXquz6ENzlJYzMaIjTKryZlY7gbLB 9qwI9sEK5ili1aB1z8sI7khBm0rJS4y00+9nWIPTfir7JvsGN2v2egUOLCTaFDRDIT4TL+ aK9k1KOwJMqRzkvdY0MDEIggqFyLBMDqHxKs5w25TjtR59gmK1DmXqqT2nYjNA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620733662; a=rsa-sha256; cv=none; b=K7PQMkYri/ci5+VR3aTGc4lQ3tlfO2gUhSnQ+w3v80iWuAlg8mmUq9VYOpN2qkdwQSN7ha zDLYon4bRsmzMLOkuoXXjDE2upoilBCjfJf5EdcEmgG2Pbvy4d5+LMOK1hy96Pcs2nb8Ix 8GdXKIf2VTwoq6BZHMMAJkbWGY28gWzHiimSK2bhqIRG5KoXiuLiGxhH5A+Xvij5kDQ/gb BEUwia3VmDapAx65KVMVGEbUpOzgY4FUZ67qv4wJeP8Y0DFAr+4xotWQvffs1uZ94Q4G+7 oMEd0Ga/c4uzPIc596VlRVaxLovF41J8poL2RtpNNVg+U8eyYiHDVVDyVfPQvQ== 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.85 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: CAC8825680 X-Spam-Score: -1.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1Mq4y9Rr8pdn On 09/05/2021 23:05, satotake wrote: > * lisp/org-refile.el (org-refile-get-targets): Check > `buffer-file-name' return value instead of `buffer-base-buffer'. > > To pass the related tests, we need to check `buffer-file-name'. Thank you for the patches. Maybe I have missed something, but it seems 2 patches are not logically independent, second one touches the same code to fix regression in tests. If so, could you, please, squash both patches into a single one (e.g. using git rebase --interactive)? I hope, it will help to review the change and to avoid confusion with several versions of second patch in 2 threads. Code around has at least one more problem: questionable behavior in the case of indirect buffers (e.g. C-x 4 c). Refile targets cache, when enabled, is not reused for indirect buffer. On 09/05/2021 21:47, satotake wrote: > I often use org-mode for note-taking and so on. > Sometimes, I would like to refile the headings in the scratch to other > org files while I am writing. Have you tried org-capture? https://orgmode.org/manual/Capture.html https://sachachua.com/blog/2015/02/learn-take-notes-efficiently-org-mode/#unnumbered-3 I think, existence of this feature is the reason why this bug was remaining unnoticed.