From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QPIpG7PBrGAwawAAgWs5BA (envelope-from ) for ; Tue, 25 May 2021 11:21:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2PZHFrPBrGBiTwAA1q6Kng (envelope-from ) for ; Tue, 25 May 2021 09:21:55 +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 B8A08EBB4 for ; Tue, 25 May 2021 11:21:54 +0200 (CEST) Received: from localhost ([::1]:33396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llTG5-0008SN-8o for larch@yhetil.org; Tue, 25 May 2021 05:21:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llTFg-0008SD-PH for emacs-orgmode@gnu.org; Tue, 25 May 2021 05:21:28 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:36085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llTFe-00012M-6K for emacs-orgmode@gnu.org; Tue, 25 May 2021 05:21:28 -0400 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id AD26E20007; Tue, 25 May 2021 09:21:22 +0000 (UTC) From: Nicolas Goaziou To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Subject: Re: [PATCH] ox-latex.el: add LaTeX attributes to quote block References: <87h7is49cm.fsf@posteo.net> Mail-Followup-To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= , orgmode Date: Tue, 25 May 2021 11:21:21 +0200 In-Reply-To: <87h7is49cm.fsf@posteo.net> ("Juan Manuel =?utf-8?Q?Mac=C3=AD?= =?utf-8?Q?as=22's?= message of "Mon, 24 May 2021 12:14:33 +0000") Message-ID: <875yz76uem.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=217.70.183.200; envelope-from=mail@nicolasgoaziou.fr; helo=relay7-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, 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: , Cc: orgmode 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=1621934515; 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; bh=Q2wPq/Az40VqMhOoDM3wy7t85tJCqOOidwABxIkmZlQ=; b=oN+pYJ7f7LZ+LS0rGM1amAEjKIXefG9tWeuSUxK7ocTxXd+qiJcgBje4mebJOH5Ub4rBg+ fba3+PNOjnzeTHEH0vrb6OzYmsMhngCtGaTv5OtiXgoUHwwpapeYky5e5WQvLaZCIyfMXd TFgfHpmjmz/8kQJP1/htfCj0fKwdeu1lDrykIhbOg+ufHmYtQd37BPNmJSYqsQaF2ZgkaA wlFzo7xggOPkvNmUws1lXXgRLEbC2aWaezh81tM69xbxsolkrsLmAbUOgBFmX3VG9LxGHr VomRKSflBf3nRSPbtgL9nfNxv0GTbEFi1C5lVesUfVArqd3tEhSzv6C40XWKhQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621934515; a=rsa-sha256; cv=none; b=SotW/cKA+/sXikm7CHgkmC/sZbqVjiLoRP/mSmspZoq2RFL4EmOpwogupjp1u8FYJL5K0S 6AtiQXx3waGdC2dXNLLZYoTa0TO/qXSCDfteRx8VFV9tG7j8SDW4kECIUn+xFWAz2URY6o 1ykG4Uas/6wt6MnoIONPQHXzW83A/Hx7k/ouOIPeQzl1wkHAc75O0oR3WTN+p+97EAwP2X xNLRtH7pU305rIIJifUm+H8H+m1YVRTUbeLDf2I8hGK2b6GIP+XJvznG1QOFBoM2pKglIp 2HpH6Po7Qbv9wHDu2fF+57ADmMtO+OP+ELoQZz3WSsSMfpYLCTEP28omyx42QA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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-Spam-Score: -2.43 Authentication-Results: aspmx1.migadu.com; dkim=none; 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: B8A08EBB4 X-Spam-Score: -2.43 X-Migadu-Scanner: scn1.migadu.com X-TUID: N5pKy2Uag2v1 Hello, Juan Manuel Mac=C3=ADas writes: > Subject: [PATCH] ox-latex.el: add LaTeX attributes to quote block Thank you. Some comments follow. > +(defcustom org-latex-default-quote-environment "quote" > + "Default environment used to `quote' environment." --> Default environment used for "quote" blocks. > + :group 'org-export-latex > + :version "24.4" > + :package-version '(Org . "8.0") You can remove the :version keyword. And :package-version is wrong. > + :type 'string) You also need to add :safe t > (defcustom org-latex-default-table-mode 'table > "Default mode for tables. >=20=20 > @@ -2895,9 +2903,17 @@ channel." > "Transcode a QUOTE-BLOCK element from Org to LaTeX. > CONTENTS holds the contents of the block. INFO is a plist > holding contextual information." > + (let* ((env (org-export-read-attribute :attr_latex quote-block :enviro= nment)) > + (opt (org-export-read-attribute :attr_latex quote-block :options)) > + (current-env (if env env org-latex-default-quote-environment)) > + (current-opt (if opt opt ""))) We don't use global variables directly as above, but use (plist-get info :latex-default-quote-environment) instead. This could be written as (let ((environment (or (org-export-read-attribute :attr_latex quote-block :environme= nt) (plist-get info :latex-default-quote-environment))) (options (or (org-export-read-attribute :attr_latex quote-block :options) ""))) ...) Could you send an updated patch? Regards, --=20 Nicolas Goaziou