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: Juan Manuel Macías
Subject: Re: [PATCH] ox-latex.el: add LaTeX attributes to quote block
Date: Tue, 25 May 2021 12:42:37 +0000

Hi Nicolas,

Thank you for your indications. Attached the updated patch.

Do you need me to prepare another patch to document the modifications
and add them to org-NEWS?

Best regards,

Juan Manuel 

Nicolas Goaziou writes:

> 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,

Attachment: 0001-ox-latex.el-add-LaTeX-attributes-to-quote-block_updated.patch
Description: Text Data


reply via email to

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