From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Cubizolles Subject: Re: org-latex-image-default-width ignored Date: Mon, 26 Mar 2018 10:39:58 +0200 Message-ID: <87h8p3kz6p.fsf@free.fr> References: <87k1u1jyf9.fsf@free.fr> <87in9lz793.fsf@gmail.com> <877eq0mw1m.fsf@free.fr> <87bmfcweqs.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0Nft-0004YY-Lj for emacs-orgmode@gnu.org; Mon, 26 Mar 2018 04:40:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0Nfq-0001CV-K7 for emacs-orgmode@gnu.org; Mon, 26 Mar 2018 04:40:17 -0400 Received: from [195.159.176.226] (port=39459 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f0Nfq-0001Br-CS for emacs-orgmode@gnu.org; Mon, 26 Mar 2018 04:40:14 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1f0Ndf-0002m4-Rz for emacs-orgmode@gnu.org; Mon, 26 Mar 2018 10:37:59 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Eric S Fraga writes: > On Sunday, 25 Mar 2018 at 09:52, Julien Cubizolles wrote: >> Found the cause of the problem, my default configuration exports in >> async mode, so this variable should be set in >> org-export-async-init.el. >> >> Is there a way to have a variable set during export to avoid setting it >> for all exports? > > I've never used the async export so I am not sure but maybe check out > the #+bind: directive? I tried --8<---------------cut here---------------start------------->8--- #+BIND: org-latex-image-default-width ".3\\linewidth" --8<---------------cut here---------------end--------------->8--- with no success in async mode, but it works in synchronous mode. I guess I'll avoid async mode for now on, or use a set of different org-export-async-init.el files for different files. Nevertheless I think it would make sense to have a way to set some variables during async export. According to the Org Manual: --8<---------------cut here---------------start------------->8--- Emacs variables can become buffer-local during export by using the BIND keyword. Its syntax is ‘#+BIND: variable value’. This is particularly useful for in-buffer settings that cannot be changed using keywords. --8<---------------cut here---------------end--------------->8--- But the options set using #+ keywords are used during async export while those set using #+BIND are ignored. A "+BIND-ASYNC would come in handy. Julien.