From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id GD7VLuZKJGC4AgAA0tVLHw (envelope-from ) for ; Wed, 10 Feb 2021 21:06:46 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id INyNKuZKJGB1DgAAbx9fmQ (envelope-from ) for ; Wed, 10 Feb 2021 21:06:46 +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 07DA8940485 for ; Wed, 10 Feb 2021 21:06:46 +0000 (UTC) Received: from localhost ([::1]:47664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9whA-0002Hv-Vi for larch@yhetil.org; Wed, 10 Feb 2021 16:06:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9wXV-0004lm-Ex for emacs-orgmode@gnu.org; Wed, 10 Feb 2021 15:56:45 -0500 Received: from mout-p-101.mailbox.org ([2001:67c:2050::465:101]:27174) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1l9wXJ-0006Rp-UJ for emacs-orgmode@gnu.org; Wed, 10 Feb 2021 15:56:45 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4DbX9j01Y1zQlHv for ; Wed, 10 Feb 2021 21:56:25 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=guelker.eu; s=MBO0001; t=1612990577; h=from:from: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; bh=Pv4bD/0H9KEV2S0lvdAjJ8hdPLrFD+z4Nlups/kYNig=; b=YZHw1NY+BxXlhKxI8gMOT2PkPsMvMeU4dZ8uPMxZ46MN4e2vylU1BLYAoBoGQ3VMD7tKDf 6aymweYBtjnEJN2SR2VJs3P3rPtLkNbTZ5XKcBZdripE7pMGChA9IqhzZtQQgIX/HQ8eJo Yuw/5GvqH/ej8hzIqDUujukwrLQsYoLsQLHv5PlqCEwoHeo3/us8hDdoJPbmZ8b6oBea6M pRiODYaFPHoxKTE/9UFR8NXBqJv+v6r9+obQwWgIMARHyJwO5naMkAa/zvcX++EEJcSH7Z k4o3JWKdATIkVLlHFkToXNQTT3ZeY+cbfqjx92U/1CNuMf5hhCTpnJcvpeoPPg== Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id gKzX8lrus2FA for ; Wed, 10 Feb 2021 21:56:12 +0100 (CET) Date: Wed, 10 Feb 2021 21:56:10 +0100 From: =?utf-8?B?TS4g4oCYcXVpbnR1c+KAmSBHw7xsa2Vy?= To: emacs-orgmode@gnu.org Subject: Re: local variables and export processing in hooks Message-ID: <20210210205610.GC6355@atlantis> Mail-Followup-To: emacs-orgmode@gnu.org References: <87sg65tuqa.fsf@ucl.ac.uk> <20210209113052.GF21978@tuxteam.de> <87a6sdtphg.fsf@ucl.ac.uk> <5917189e-3c8d-0854-561d-3af02a3868b4@posteo.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5917189e-3c8d-0854-561d-3af02a3868b4@posteo.eu> X-MBO-SPAM-Probability: X-Rspamd-Score: -6.58 / 15.00 / 15.00 X-Rspamd-Queue-Id: F001E17BE X-Rspamd-UID: 5faa85 Received-SPF: pass client-ip=2001:67c:2050::465:101; envelope-from=post+orgmodeml@guelker.eu; helo=mout-p-101.mailbox.org 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, 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=guelker.eu header.s=MBO0001 header.b=YZHw1NY+; dmarc=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: 07DA8940485 X-Spam-Score: -2.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: mePoM0Faof6W Am 09. Februar 2021 um 14:21 Uhr +0100 schrieb Sébastien Miquel: > Eric S Fraga writes: > > I tried but this doesn't seem to be propagated to the export as the > > export works on a copy of the buffer, not the buffer itself. That's > > what #+BIND is for, supposedly... > > I think this buffer copy preserves local variables. I know I use a such a > local variable and its value can be read during macro expansion. > > It seems the org-export-before-parsing-hook functions are run before the > #+BIND values are collected (see org-export-as in ox.el). Interesting. I did not know about #+BIND, but just today I came about the issue where I needed file-local variables to be available both in the org-export-before-parsing-hook and in macro expansion. I circumvented the problem by picking the original buffer out of `buffer-list' and temporaryly switching to that buffer with `with-current-buffer'. Now I wonder whether #+BIND is more elegant. But my macro expansion function modifies a buffer-local variable. Does #+BIND allow for that, so that the changed value is available in the original org buffer? -quintus -- Dipl.-Jur. M. Gülker | https://mg.guelker.eu | For security: Passau, Germany | kontakt@guelker.eu | () Avoid HTML e-mail European Union | PGP: see homepage | /\ http://asciiribbon.org