From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id iNnRKzAFtWTFUQEASxT56A (envelope-from ) for ; Mon, 17 Jul 2023 11:09:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KJvkKjAFtWTjVAEAG6o9tA (envelope-from ) for ; Mon, 17 Jul 2023 11:09:04 +0200 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 639794136C for ; Mon, 17 Jul 2023 11:09:04 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=B9da9y8B; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689584944; a=rsa-sha256; cv=none; b=sG/MoyU1q16+LplzOqFJmCqDKTI06ZvOIio8rX31ukQFWLnWrHkrjlz6Ghxk4m+265kuZ9 mNjjHG6JEoaiSaW1l8KT955FZ4dTdM7cHTliKe6Z9OoQD0oO7VkHUhdqj8lQaQtYrH61Y4 U1tEI2XYm7snL4kkzPcL/i+vAKjn7nxybntYJZmkGfejqZQpnzsRuIjgzRIwhS04Kbpp3W lJNS9rtQOT/+sNw3PfU2BoOhXjqgHjtKV3frP2Laf2PiQcxReiT5+VgoGuNjxHerXRJN2n ZrkvLKiv6evKTIMCt4VJ3ThsgRyMXWjeFgHHngN+sxUWcRmS1zjUkFT5kRF4yQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=B9da9y8B; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689584944; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=tTytVxHfLrUN/2kffaSvl23TTUHooL9/OuYcXjakv/E=; b=sva0RpkiPoKOJMGCVQvAh+APAhWMwonZ5v3aNrKAFj3osJWdVMZOEjMVkX645dxC9ogd/W k4C6s21MEBLBKL5nkUIJ0NQhCRzv0Ln2ulNhBDz4247qHiFF+YvmmoEp6+qaoWVlG+B3OD 3lxddNixOOhBLRjRTkZPBuXjp8hjHSvmnfsYl6tYE9dfyRv66D3/H/OcmWGOX7rIsDYr0O XqPJ6XAmgoiXK/dAvLqtNDTuB47WivKioZNu3UCmyvytmuj/mvIofVfup0IVlIH7XkJeAr MimpvsV9/HUENLoggNKg4zni+ZywSsEwNlpZWMW0uNseN26pVxMbG32srizIzA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLKDj-0001OY-09; Mon, 17 Jul 2023 05:08:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLKDg-0001OM-JB for emacs-orgmode@gnu.org; Mon, 17 Jul 2023 05:08:40 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLKDZ-0007Cf-AX for emacs-orgmode@gnu.org; Mon, 17 Jul 2023 05:08:39 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 79219240028 for ; Mon, 17 Jul 2023 11:08:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1689584911; bh=86Zw1r4eQlGQkd3U7kxN/5cB4uZ7ZHiQoSfnLwXUh+o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=B9da9y8B9JXPPADd+NmNzaU8hAnienH1172RuooWGAPbaDjDoTLhPN9WMjEV6vUoj 44xAhJs6k8+DhCs0KULceidfoxzCZZYfKp+r7J9P/8DnTPpXBS27yMhBTOI1inWC/w zJi4IYkP6NlCiyiCqXgWQQec4sUduJzcMDvRKchgo7LfQPrkjLKqodB9CdxgJB1NRG 3mw37lbfMuX1KxxvoE5g1YZsG/Me1jYA3896CDJGqQpSeY8b3e+/DDNFkDv3HUbx0f BMXI6BcrQCut+8FASH2WTyCeudNCO9QWjGeQWDQnBfHw6Jt1MgXmHuV3RqQUlHqhNx vIVSPglTZoO+Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R4GTV5dHrz6tvm; Mon, 17 Jul 2023 11:08:30 +0200 (CEST) From: Ihor Radchenko To: =?utf-8?B?6LW15LiA5a6H?= Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-babel-result-to-file failed when buffer is narrowed [9.7 (9.7-??-f7aa8c1 @ c:/Users/yhht/.config/emacs/.local/straight/build-29.0.60/org/)] In-Reply-To: <60d56a04.17aa.1896168f62a.Coremail.zhyznd@163.com> References: <3d69c850.69db.18953ae45da.Coremail.zhyznd@163.com> <87r0p9hdcd.fsf@localhost> <60d56a04.17aa.1896168f62a.Coremail.zhyznd@163.com> Date: Mon, 17 Jul 2023 09:08:42 +0000 Message-ID: <87wmyyzyzp.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.32 X-Migadu-Scanner: mx2.migadu.com X-Spam-Score: -9.32 X-Migadu-Queue-Id: 639794136C X-TUID: TJEmV+dPYXcj =E8=B5=B5=E4=B8=80=E5=AE=87 writes: > Yes you're right. > The problem exists in indirect buffer, not narrowed buffer, in which base= -directory is nil in this case. That's why I wonder if=20 > (base-directory (and buffer-file-name > (file-name-directory base-file-name))) > should be > (base-directory (and base-file-name > (file-name-directory base-file-name))) > where base-file-name is non-nil. Makes sense. Fixed, on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3Dc730caf51 --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at