emacs-orgmode
[Top][All Lists]
Advanced

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

Re: PATCH: include controlling language= in my previous patch


From: Ihor Radchenko
Subject: Re: PATCH: include controlling language= in my previous patch
Date: Wed, 14 Dec 2022 09:29:22 +0000

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> Next try... I'm learning a lot :-)

Then, next set of comments.

(Note that I can hand-fix the patches at this point for you. Let me know
if you want to keep going)

> From dabdc3026e32ec674e22698de6257d724f60c4af Mon Sep 17 00:00:00 2001
> From: "Pedro A. Aranda Gutierrez" <paaguti@gmail.com>
> Date: Wed, 14 Dec 2022 07:32:31 +0100
> Subject: [PATCH 3/3] etc/ORG-NEWS: add org-latex-listings-src-omit-language

                                    ^Add `...'

Also, it would make sense to merge this commit with the one introducing
the variable.  There is really not much reason to have two separate
commits here.

> * etc/ORG-NEWS: Add information for `org-latex-listings-src-omit-language'

Add "." at the end of the sentence ;)
Also, your Changelog entry does not include the parent heading.
I recommend following
https://orgmode.org/worg/org-contribute.html#org421ccec to produce
changelog automatically without much thinking.

> +*** New =org-latex-listings-src-omit-language= variable for LaTeX export

~org-latex...~

also, it is new _customization_, more precisely

> +The ~org-latex-listings-src-omit-language~ customization variable
> +allows you to omit the =language= parameter in the exported
> +=lstlisting= environment. This is necessary when the =listings=

By convention, we keep double space "  " between sentences.

> +backend delegates listing generation to another package like
> +=fancyvrb= using the following setup in the document header:
> +
> +#+BEGIN_src org
> +,#+LATEX_HEADER: \RequirePackage{fancyvrb}
> +,#+LATEX_HEADER: 
> \DefineVerbatimEnvironment{verbatim}{Verbatim}{...whatever...}
> +,#+LATEX_HEADER: 
> \DefineVerbatimEnvironment{lstlisting}{Verbatim}{...whatever...}
> +#+END_src

Is there any kind of blog/article demonstrating the usefulness. Not
strictly necessary, but may be helpful for others.

> Subject: [PATCH 1/3] lisp/ox-latex.el: don't emit empyt label=, caption=

_D_on't; empyt -> empty

> * lisp/ox-latex.el: (org-latex-src-block--listings):
>   Don't emit label= if label is empty.
>   DOn't emit caption= or captionpos= is caption is empty.

* lisp/ox-latex.el: (org-latex-src-block--listings): ->
* lisp/ox-latex.el (org-latex-src-block--listings):

DOn't -> Don't
is -> if

> Subject: [PATCH 2/3] lisp/ox-latex.el: Add
>  org-latex-listings-src-omit-language

`org-latex-listings-src-omit-language'

> * lisp/ox-latex.el: Add org-latex-listings-src-omit-language variable

`org-latex-listings-src-omit-language'

> +(defcustom org-latex-listings-src-omit-language nil
> +  "Set this option to t to omit the
> +\"language=\"
> +in the parameters to \\begin{lstlisting} when exporting a src block.

By convention, the first line of the docstring should be no wider than
67 chars and briefly describe the purpose of the variable. See
D.6 Tips for Documentation Strings section of Elisp manual:

   • The first line of the documentation string should consist of one or
     two complete sentences that stand on their own as a summary.  ‘M-x
     apropos’ displays just the first line, and if that line’s contents
     don’t stand on their own, the result looks bad.  In particular,
     start the first line with a capital letter and end it with a
     period.

     For a function, the first line should briefly answer the question,
     “What does this function do?” For a variable, the first line should
     briefly answer the question, “What does this value mean?”

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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