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 qIOOGF8ImGAsKQAAgWs5BA (envelope-from ) for ; Sun, 09 May 2021 18:05:51 +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 aLxEFF8ImGCeCgAA1q6Kng (envelope-from ) for ; Sun, 09 May 2021 16:05:51 +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 ECBAA113F6 for ; Sun, 9 May 2021 18:05:50 +0200 (CEST) Received: from localhost ([::1]:60658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lflwD-0002wQ-BP for larch@yhetil.org; Sun, 09 May 2021 12:05:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lfltF-0007kG-4i for emacs-orgmode@gnu.org; Sun, 09 May 2021 12:02:49 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:43793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lfltD-0000Di-P6 for emacs-orgmode@gnu.org; Sun, 09 May 2021 12:02:44 -0400 Received: by mail-pg1-x52e.google.com with SMTP id p12so11540623pgj.10 for ; Sun, 09 May 2021 09:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:reply-to:mime-version :content-transfer-encoding; bh=ejc81tF+RxyhqmplQQSPwhfL5J9Oi+PulYSUpdEtkwc=; b=VPddvVjL3cIzRofFPNtJupDvwVwFhOnBPonCcA3mMueke3/eP/txmMExFxQcyvifAV fEqqm+CRiQOChtji/EzYi3E/Y3knlSL4V3eAdax9O6RBy1FBX121R4GI5sUyuqAl7t14 +SmkOe/HHODWM8Sjxl+vRqlKzhRw48OUtkqhBvXJgLdrU8AMDs1Pt8TDHiBbuCjjAVzl cDvA1DjychV71Et1KkqvRSX93mQwava1FHBr/2UYnpZJgFCLAOEoDm8bujWat8gldsbZ LBZ7AKBMlO5xcTwNZEGqpMmdNukkWg4MH1CCMB+oGy2b3UNeb96d4XXao6aSPWndGvbj HtMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :mime-version:content-transfer-encoding; bh=ejc81tF+RxyhqmplQQSPwhfL5J9Oi+PulYSUpdEtkwc=; b=f1i6Pe/gPbdtc06zyQ/+FVlxBKZnQjUvTX2OTYF/GrtQDBmGcQ2TPOuxmQ2y8+FeSS RasE+yWK2nFsXzaZFZ1+fVDU09HHak6abgXAMA/rTCTc3mbU4hadcnQsXGZrlgamoPhx lnKlSIHU9MBeV/YCPQnwPF53fYAt7Nmy8mboKb41M3UIj+NdE1DRfD1U9VKKQC42nhzc pbGqELqzyE4nmD4D96m+kYM56q2VUZ/SLaMDlfn1dx1m6p3Cw4NAaaxE3uyALkUwsaxk 356Y/IqJ66S3Md58GTy2IW+W3vxx+p1ZRMRRyxXWnr1TQFpyu6Ek1kPtiLDUBoMD2v2D E9XQ== X-Gm-Message-State: AOAM532KrxFF06mIcG2KntSgDISVzrql75mvUR396dvWmcqqNkti4egu T6rZ54sO9GLqrWccJctEvj3CYtQ8ljwdIA== X-Google-Smtp-Source: ABdhPJwP+NFQe9Vq272GHNOs+d+t7W+/pBywrk9XwfVMvR83r12quQ9DIm0fjVehjs3JvJKiQ+zopg== X-Received: by 2002:a62:d108:0:b029:25d:497e:2dfd with SMTP id z8-20020a62d1080000b029025d497e2dfdmr21296714pfg.29.1620576161901; Sun, 09 May 2021 09:02:41 -0700 (PDT) Received: from localhost.localdomain (KD106154103141.au-net.ne.jp. [106.154.103.141]) by smtp.gmail.com with ESMTPSA id r32sm9163694pgm.49.2021.05.09.09.02.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 May 2021 09:02:41 -0700 (PDT) From: satotake To: emacs-orgmode@gnu.org Subject: [PATCH 2/2] org-refile.el: Fix test case Date: Mon, 10 May 2021 01:02:08 +0900 Message-Id: <20210509160208.26778-1-doublequotation@gmail.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=doublequotation@gmail.com; helo=mail-pg1-x52e.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_REPLYTO=1, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Reply-To: 20210509155531.26615-1-doublequotation@gmail.com Cc: satotake 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=1620576351; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ejc81tF+RxyhqmplQQSPwhfL5J9Oi+PulYSUpdEtkwc=; b=jy1L1vIf2ZY+E7LeHCTVcMz6pRBVJyXOyo0mWq7b42pdynRK/BDHpF8/VrY0d7ZkyxQAGy 5unWEyuc1jRzlD0BsyzlmCJ7lQK5ARniH8t4yu2amPpcSwZIfSLlmJXTxCYpl+utajr4lu 8jR1C1iyL83D9p1PYf8Dw49ZaWMOxiGaSM8YFhau6vSE2p0oN98TczGtLl15ghyjrV/Kz7 xAFIJunm+++QucMmqkHHw+NJXhIhTwbylWpq1mJH2MhNuB02anHsT7TjOvJLC9Q47oCNEZ 5Ac2K7Rfo0yOx4yTP7bCw+3d8TJP6rowcLEw3N6tCX1KpPCseI7a9009+gwARA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620576351; a=rsa-sha256; cv=none; b=dd1rMbxj1XqHsryMKR7ab/ozKXa+txy9ow0AMtFAKyzKF5VNVfqg5DfqGUYVWUYknpxgeP 1qefntinaXZzcUBHsRiou9HscyV0sKHZIgtklXkePz+Sr31t3X9ciUHkC1WZFag3OsjY7r E3S5uIbtaHoMN7ZXgkj4eUAxf9L3tU+bnEu3EIIvR4Z1lv7ZH9ws/O/eDMoub8/SjL3emx YTdd6jo14LdoogVq64iItKn0VNdt6KMu+aGWa5RPw5Gvlfv3Yfm8EMOsifO21ZoYzzMgTf zs1ihEe/17JQ4Jk9gmfXzfmMD1m2n9k2rhfj11+LnvSShGOtWDo5tXZBBP1Kyw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=VPddvVjL; dmarc=fail reason="SPF not aligned (relaxed)" 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: 3.65 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=VPddvVjL; dmarc=fail reason="SPF not aligned (relaxed)" 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: ECBAA113F6 X-Spam-Score: 3.65 X-Migadu-Scanner: scn0.migadu.com X-TUID: KO3OX3f+/jPh * 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'. TINYCHANGE --- lisp/org-refile.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lisp/org-refile.el b/lisp/org-refile.el index 6f5b8acee..2900be27e 100644 --- a/lisp/org-refile.el +++ b/lisp/org-refile.el @@ -310,13 +310,12 @@ converted to a headline before refiling." (setq f (buffer-file-name (buffer-base-buffer f)))) (setq f (and f (expand-file-name f))) (when (eq org-refile-use-outline-path 'file) - (push (list (if f (file-name-nondirectory f) nil) f nil nil) tgs)) + (push (list (and f (file-name-nondirectory f)) f nil nil) tgs)) (when (eq org-refile-use-outline-path 'buffer-name) (push (list (buffer-name (buffer-base-buffer)) f nil nil) tgs)) (when (eq org-refile-use-outline-path 'full-file-path) - (push (list (if (buffer-base-buffer) - (file-truename (buffer-file-name (buffer-base-buffer))) - nil) + (push (list (and (buffer-file-name (buffer-base-buffer)) + (file-truename (buffer-file-name (buffer-base-buffer)))) f nil nil) tgs)) (org-with-wide-buffer (goto-char (point-min)) @@ -341,10 +340,9 @@ converted to a headline before refiling." (append (pcase org-refile-use-outline-path (`file (list - (if (buffer-base-buffer) - (file-name-nondirectory - (buffer-file-name (buffer-base-buffer))) - nil))) + (and (buffer-file-name (buffer-base-buffer)) + (file-name-nondirectory + (buffer-file-name (buffer-base-buffer)))))) (`full-file-path (list (buffer-file-name (buffer-base-buffer)))) -- 2.30.0