From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 4HR8Gm9DsmTsXwEASxT56A (envelope-from ) for ; Sat, 15 Jul 2023 08:57:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mDRfGm9DsmSPOQEAauVa8A (envelope-from ) for ; Sat, 15 Jul 2023 08:57:51 +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 409245E9C8 for ; Sat, 15 Jul 2023 08:57:50 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OCFQEmjz; 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=1689404270; a=rsa-sha256; cv=none; b=cgHU6HKyM0Jzc1Uz+hS5oh4wDCK9jSu+4cDUgMfP65DUQLAdZsgZpw0cgBollgOfXOrHPf VIkEUjYJkwmhqricYJ82FrX932rHKfkZoFWfik/ME8hU67gSW7Kdwy9T9AToSt+jObfzKq ogJGQD8S07XBj5fF/VyAxLYITsWW/eeRWg03ptDfgmXritQD2aeYluL68K6wICqa9K+mdG bxCyCoj/qFbPTyHeGivTu32mUoY8JXa5XV/sPEQ8RJ5XU0S/MEUk+t0hpvX2s2HmOlpOix MTcCz391CtFGca3TH7S4LT7AIOzqCzTmObBI1N9RdD+oYbPr1rrYkx/8l2IqAg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OCFQEmjz; 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=1689404270; 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=O13kgy162O+fNctRpfS8RfXHAhXr/PPm4h1yWxS7kMA=; b=kJbA0MFr8eOpo7RyAhtFWmDic2ZvXiMZmYPjgCYR/my4AInY3G9tZSqQxYDX9XVWzP/30o udoxezGo2PR6vM2DBgJgt0BJDa9FhOdrUWSksBm2rCrOp8fHtmSCaYus653rTqMxSejwpk 6IEE1WUCgfomQs6ux2gpjJ0/BAq7I/71WuAWcbeB2xgL6rmp7985aLCjHhp2sttp3SPSnh DjL/qJdLA+4S7HJ4/JRQYzaIPfgQcNT/o+AUDUwx4KhJ5t/fx+KobzgphQjk8qslRhjsBD v5h3yd2oTHjs+wwUCvPPZ3rZbgArwuGL4PFpvfRPh5xt1BYIYiPgBFP3X/z79Q== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKZD8-0006sJ-GJ; Sat, 15 Jul 2023 02:56:58 -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 1qKZD6-0006sB-TJ for emacs-orgmode@gnu.org; Sat, 15 Jul 2023 02:56:56 -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 1qKZD4-0007Yu-W0 for emacs-orgmode@gnu.org; Sat, 15 Jul 2023 02:56:56 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B4B7E240028 for ; Sat, 15 Jul 2023 08:56:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1689404212; bh=O13kgy162O+fNctRpfS8RfXHAhXr/PPm4h1yWxS7kMA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=OCFQEmjz6P1mYcskmpaI0TpVeT7pbTqrtj3PVTiFvFsxIOErx5NOnZP3FDEaizx5O 7ddHK1BD4KAlXtv1dtk7XA/KCHh6jaS5qonWEYDYcjQa1LVkZp9TYN1UnusJawAnRh oKA3+IYW4TKKB41cupQQebaudBo39/YMZ022eNI66hEUENGN43SX4rByN+ckXv5glC QXKEjUDkMEotliBILaGzBX9BHp8IkkTawgtnPgAtcLBr3wgdhH7g1IxjLhsSOWoiyp 05C7ZzXuCm/kUDEFI/mJPxvoBWyu6gxJrYNatDx+MfQeICOfi7H7vHzLpF5CO5R10q XS+DB7bGXyXeQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R2zfR0Bhbz9rxK; Sat, 15 Jul 2023 08:56:45 +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: <3d69c850.69db.18953ae45da.Coremail.zhyznd@163.com> References: <3d69c850.69db.18953ae45da.Coremail.zhyznd@163.com> Date: Sat, 15 Jul 2023 06:56:50 +0000 Message-ID: <87r0p9hdcd.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: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.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=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 409245E9C8 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -0.81 X-Spam-Score: -0.81 X-TUID: 1qohrT3V+e7e =E8=B5=B5=E4=B8=80=E5=AE=87 writes: > When I try to execute ob-block in a narrowed buffer, there seems to have > a error on org-babel-result-to-file, with msg "wrong argument type > stringp, nil" > .... > and the reason is at line marked as -2->, which "buffer-file-name" would > be nil when in narrowed buffer. Thanks for the report, but there seems to be either some terminology issue of a problem with analysis. Narrowing a buffer (`narrow-to-region') definitely does not change `buffer-file-name'; it just limits the visible and accessible text in buffer to a subset of text in buffer. Maybe you mean indirect buffer? But `buffer-base-buffer' should take care about this. So, may you please provide a reproducer, so that I can see and investigate the problem on my side? See https://orgmode.org/worg/org-faq.html#bug-reporting --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at