emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: PATCH: include controlling language= in my previous patch
Date: Mon, 12 Dec 2022 10:11:34 +0000	[thread overview]
Message-ID: <877cyxhqy1.fsf@localhost> (raw)
In-Reply-To: <CAO48Bk9+48_AX4WBWp5f9rJqbNRY09R_VvmqYtkEfnQPKub9Ag@mail.gmail.com>

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

> thanks for the patience. I have a comment on the message you refer to... If
> comes from 2014.
>
> So I have resorted to my fresh Emacs29, opened it with emacs -Q for a clean
> environment.
> ...
> In my most humble opinion, I looks like the global \lstset{} isn't used and
> that the caption/label is set locally. And this makes me believe that
> label= or caption= are not very useful.

I guess it is after https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=6ef33b6dd

If the cited issue is no longer need to be accounted for, your version
should be fine.

> I'm attaching the patch generated with git diff -p.
> Mea culpa, I should have RTFM before sending anything :-)

For the final version of the patch, you may better follow
https://orgmode.org/worg/org-contribute.html#orgbc683f3 to create a
.patch file. The .patch file will include your authorship. Do not forget
the changelog entry.

> +(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"
> +  :group 'org-export-latex
> +  :version "30.0"
> +  :package-version '(Org . "9.7")
> +  :type 'boolean
> +  )

Please do not leave handing ")" on separate lines. It is against common
Elisp style conventions. See D.1 Emacs Lisp Coding Conventions section
of Elisp manual:

   • Don’t make a habit of putting close-parentheses on lines by
     themselves; Lisp programmers find this disconcerting.

> +         (when label                    ; label= w/o label makes little sense
> +             `(("label" ,(org-latex--label src-block info))))
> +         (when caption-str              ; caption= w/o caption makes little sense
> +           `(("caption" ,caption-str))
> +           `(("captionpos" ,(if caption-above-p "t" "b")))) ; as does captionpos w/o caption

These comments are not really needed. Actually, it is that `if' that
deserved explanation. Not putting empty caption/label is intuitive.

-- 
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	other threads:[~2022-12-12 10:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-11  8:06 PATCH: include controlling language= in my previous patch Pedro Andres Aranda Gutierrez
2022-12-11 10:05 ` Ihor Radchenko
2022-12-11 11:23   ` Pedro Andres Aranda Gutierrez
2022-12-12 10:11     ` Ihor Radchenko [this message]
2022-12-12 12:57       ` Pedro Andres Aranda Gutierrez
2022-12-13  9:24         ` Ihor Radchenko
2022-12-13 11:08           ` Pedro Andres Aranda Gutierrez
2022-12-13 11:51             ` Ihor Radchenko
2022-12-14  6:37               ` Pedro Andres Aranda Gutierrez
2022-12-14  9:29                 ` Ihor Radchenko
2022-12-18 13:17                   ` Ihor Radchenko
2022-12-18  9:31           ` Bastien Guerry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877cyxhqy1.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=paaguti@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).