emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ox-latex.el: add LaTeX attributes to quote block


From: Nicolas Goaziou
Subject: Re: [PATCH] ox-latex.el: add LaTeX attributes to quote block
Date: Tue, 25 May 2021 11:21:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hello,

Juan Manuel Macías <maciaschain@posteo.net> 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.
>  
> @@ -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 
> :environment))
> +          (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 :environment)
              (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,
-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]