From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8JVqMvi9lWPNgAEAbAwnHQ (envelope-from ) for ; Sun, 11 Dec 2022 12:24:40 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MFV6Mvi9lWPXiwAA9RJhRA (envelope-from ) for ; Sun, 11 Dec 2022 12:24:40 +0100 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 3704C21AD5 for ; Sun, 11 Dec 2022 12:24:40 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4KR6-0000tT-MC; Sun, 11 Dec 2022 06:24:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4KR4-0000qs-S4 for emacs-orgmode@gnu.org; Sun, 11 Dec 2022 06:23:58 -0500 Received: from mail-oa1-x36.google.com ([2001:4860:4864:20::36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4KR2-0002SI-K5 for emacs-orgmode@gnu.org; Sun, 11 Dec 2022 06:23:58 -0500 Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-144bd860fdbso5361328fac.0 for ; Sun, 11 Dec 2022 03:23:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=bzCCJssa2Ze9XhKhCDjQxKfQzlqyfxcqvRFMd59UKoA=; b=cL6TC208+J2DwQzCP6ZuSo6MhXTbHEb6T6yp24PwclXfTlM/mhv+vj33PHHNv/Vuy9 tHwJGDiZBWyMRbBmGZuXFkLgt4bj2x8zHgD0LA5cU9rV+gNtmiBNsuunRXH7OnCoZqMw IQbkSvyAVabBoZEKJ6s/LBGWEdgalfhrNIXmKFvxEDag8SOj4ueggthpAE66hLcYM5mO ZsEf+kRk2/XU9rUFfX5tNLCJneumyYvedW48yjM9x/xO/J4A1TbM9l1y7rTcVyumCcTb E59ARzkSMsiVFxf5fKR5C6jy4O3e2vnbrilqfpaQqDbZTGRxmCjeFLfP6G4FEjc8V0gn sMbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bzCCJssa2Ze9XhKhCDjQxKfQzlqyfxcqvRFMd59UKoA=; b=5QUSip12bcspU4xL0AI8aEqLizV40V1uq96mdrveJg1R43lS6N+L+lsRgZpVZXVdVo drRDY24DcuDKW1p7FDOeluM4iIN0ceDgNxZ3Tp4mCTwb240BfGIv630JF9J2ZZ4GWlYw dICFXZuFq+MV1wNFghi699pVbwrTHT9cQwSaKLccz3qjWu0bV1DHedTkYiCQcYJ5F3Fb 8jsoEt1+x/Ux23jdSKeIPPrco1w5COJhofZJp8i2vJpXOB/20FWujH7+hjqIHCirBPHG nZM21k/OgV/SouFgW3L/CATiluaLN7oP3GID2bnv2dnm0GAaDMk1biFvDiytuIwVIkYb al9w== X-Gm-Message-State: ANoB5plrXhPCHmRZCDLGhRB8iuW5kFC4/N5m6P38Yv6hnRhjdfbH6FmQ GKxqYxDEoTk30rgLQBiK0EqT+PsqldjrFDkgGgs= X-Google-Smtp-Source: AA0mqf5G/8tDWrVbR6BIPJ0dEICeyPRAKxo+cwdnqvQFTeeydV3AEBF5Ne2qzookjgZRAzLo0gQplLftQ8zY1j8I2xA= X-Received: by 2002:a05:6870:4c0c:b0:143:ac7c:b290 with SMTP id pk12-20020a0568704c0c00b00143ac7cb290mr28344267oab.216.1670757834823; Sun, 11 Dec 2022 03:23:54 -0800 (PST) MIME-Version: 1.0 References: <87cz8qdzmy.fsf@localhost> In-Reply-To: <87cz8qdzmy.fsf@localhost> From: Pedro Andres Aranda Gutierrez Date: Sun, 11 Dec 2022 12:23:28 +0100 Message-ID: Subject: Re: PATCH: include controlling language= in my previous patch To: Ihor Radchenko Cc: Org Mode List Content-Type: multipart/mixed; boundary="00000000000040754805ef8b9ff7" Received-SPF: pass client-ip=2001:4860:4864:20::36; envelope-from=paaguti@gmail.com; helo=mail-oa1-x36.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670757880; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=C5v6H2VVzZG9miG5cZFP6fHaeheQHq5beRAAP8o+r58=; b=lcPliF50aslM3RV71xmQ8WZmoUd+hQ3PCYGFybAKlec/9o8tQJ8V7Fg3d8Y/M2XxhIeu/q 34GV6QH5/MFdPscOUojpcWo/CxoT+BLLXEOT14ivYnJP30jVG7LuWWEthWeJCK6fJFtih1 qodkbYenN6qHN5EkQzIx97vnLE4FbcJqfV0B3KFJQytslYHMRmBvLLRzYfSleof5xqOfiC WI7HI3/WteXrv1VtY/66rbS7wuASyJS9Gcoqd+lZJOyYyKf0shNlh6yh2efjNtMv2HkGA8 98uHy/cacMoDeUq+1zNuKx24qED+h/dcTV2q0bTtyDSAVuF08Nxqf6ethZrOjg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=cL6TC208; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670757880; a=rsa-sha256; cv=none; b=G0HD2IZmi7TYluT3Dot6e2SQoNhJdP81ULocdcYOqhVymgZXF0Qw0TPhYWtZ1y2Jl0i8AZ hoNFiHW2f2B5yXNWVsFZU2YostIDv7rmMEYJc7EVQFtJLNiyJH4Oo5Ik6p2fb4TZd7wLdP 16JwQi92//nnOBscwhHXpGda+7Iv7hg8A4wp1qdkHqq9XZACjpB5/UwJuOVoXVJHm63sLb 1a48Wo9P+e7X2XXTHTe3zzRnRG8oxlp4qTgPgkWDS3XnwA+SSVFTQPgc5FoCsKfVOk90b8 7ItWSXhiY0DWTt8smKOz2wEd8WuVrZIw3pgnyZYqbOAnzoK17eySoomD8Z0HpQ== X-Migadu-Spam-Score: 7.35 X-Spam-Score: 7.35 X-Migadu-Queue-Id: 3704C21AD5 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=cL6TC208; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-TUID: mP7Gk2KPUQUo --00000000000040754805ef8b9ff7 Content-Type: multipart/alternative; boundary="00000000000040754705ef8b9ff5" --00000000000040754705ef8b9ff5 Content-Type: text/plain; charset="UTF-8" Hi Ihor, 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. With the MWE ``` #+CAPTION: caption of block 1 #+BEGIN_SRC asm vmpovapd %%zmm0, %zmm1 #+END_SRC #+LABEL: lst:second #+BEGIN_SRC asm vmpovapd %%zmm0, %zmm1 #+END_SRC # Local Variables: # org-latex-listings: 'listings # End: ``` I get the following: ``` \begin{lstlisting}[language=asm,label= ,caption={caption of block 1},captionpos=b,numbers=none] vmpovapd %%zmm0, %zmm1 \end{lstlisting} \begin{lstlisting}[language=asm,label=lst:org2f3fc09,caption= ,captionpos=b,numbers=none] vmpovapd %%zmm0, %zmm1 \end{lstlisting} ``` 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 have extended my research to a SRC block without language and that results in a \begin{verbatim}--\end{verbatim} I'm attaching the patch generated with git diff -p. Mea culpa, I should have RTFM before sending anything :-) Best, /PA On Sun, 11 Dec 2022 at 11:05, Ihor Radchenko wrote: > Note: This email thread is a followup for > https://orgmode.org/list/CAO48Bk_6bqKgp1MgnZaARYku2+St6R1D4Bziq5NzMWNEWqfitw@mail.gmail.com > > Pedro Andres Aranda Gutierrez writes: > > > I have a second version of my previous patch, inlcuing and extra variable > > to control whether you want to include the language= or not. It is made > in > > a backwards-compatible way. Default is to include it and you have to > > > > (setq org-latex-listings-src-omit-language t) > > > > to omit language= > > Makes sense from a first glance. > > > + (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 > > This is not true. We do need that empty caption/label. > See > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=eaaa5c2e4 > and > https://orgmode.org/list/534BEAFB.4080607@gmx.de > > Also, if you can, please create a proper patch instead of diff. See > https://orgmode.org/worg/org-contribute.html#first-patch > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at > -- Fragen sind nicht da um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet --00000000000040754705ef8b9ff5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ihor,
<= br>
thanks for the patience. I have a comment on the message you = refer to... If comes from 2014.=C2=A0

So I have re= sorted to my fresh Emacs29, opened it with emacs -Q for a clean environment= .

With the MWE
```
#+CAPT= ION: caption of block 1
#+BEGIN_SRC asm
vmpovapd %%zmm0= , %zmm1
#+END_SRC


#+LABEL= : lst:second
#+BEGIN_SRC asm
vmpovapd %%zmm0, %zmm1
#+END_SRC

# Local Variables:
# org-latex-listings: 'listings
# End:
```
I get the following:
```
\begin{lstlisting}[language=3Dasm,label=3D ,caption=3D{caption of bl= ock 1},captionpos=3Db,numbers=3Dnone]
vmpovapd %%zmm0, %zmm1
\end{lstlisting}


\begin{lstli= sting}[language=3Dasm,label=3Dlst:org2f3fc09,caption=3D ,captionpos=3Db,num= bers=3Dnone]
vmpovapd %%zmm0, %zmm1
\end{lstlisting}

```

In my most humble opini= on, I looks like the global \lstset{} isn't used and that the caption/l= abel is set locally. And this makes me believe that label=3D or caption=3D = are not very useful.

I have extended my research t= o a SRC block without language and that results in a \begin{verbatim}--\end= {verbatim}

I'm attaching the patch generated w= ith git diff -p.=C2=A0
Mea culpa, I should have RTFM before sendi= ng anything :-)

Best, /PA


=
On Sun, 11 Dec 2022 at 11:05, Ihor Ra= dchenko <yantar92@posteo.net&= gt; wrote:
Note:= This email thread is a followup for https://orgmode.org/list/CAO48Bk_6bqKgp1MgnZaAR= Yku2+St6R1D4Bziq5NzMWNEWqfitw@mail.gmail.com

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

> I have a second version of my previous patch, inlcuing and extra varia= ble
> to control whether you want to include the language=3D or not. It is m= ade in
> a backwards-compatible way. Default is to include it and you have to >
> (setq org-latex-listings-src-omit-language t)
>
> to omit language=3D

Makes sense from a first glance.

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

This is not true. We do need that empty caption/label.
See
https://git.savannah.gnu= .org/cgit/emacs/org-mode.git/commit/?id=3Deaaa5c2e4
and
https://orgmode.org/list/534BEAFB.4080607@gmx.de=

Also, if you can, please create a proper patch instead of diff. See
https://orgmode.org/worg/org-contribute.html= #first-patch

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


--
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um = gestellt zu werden
Georg Kreisler

Headach= es with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.u= niter.operation we should run a leader-deposed hook here, but we can't = yet

--00000000000040754705ef8b9ff5-- --00000000000040754805ef8b9ff7 Content-Type: text/x-patch; charset="US-ASCII"; name="org-nolabels-lang.diff" Content-Disposition: attachment; filename="org-nolabels-lang.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lbja1v7o0 ZGlmZiAtLWdpdCBhL2xpc3Avb3gtbGF0ZXguZWwgYi9saXNwL294LWxhdGV4LmVsCmluZGV4IDVi MjlhMjg0Yy4uYTMxOWZhODMwIDEwMDY0NAotLS0gYS9saXNwL294LWxhdGV4LmVsCisrKyBiL2xp c3Avb3gtbGF0ZXguZWwKQEAgLTEwMjEsNiArMTAyMSwxNiBAQCBpbiB0aGlzIGxpc3QgLSBidXQg aXQgZG9lcyBub3QgaHVydCBpZiBpdCBpcyBwcmVzZW50LiIKIAkgICAoc3ltYm9sIDp0YWcgIk1h am9yIG1vZGUgICAgICAgIikKIAkgICAoc3RyaW5nIDp0YWcgIkxpc3RpbmdzIGxhbmd1YWdlIikp KSkKIAorKGRlZmN1c3RvbSBvcmctbGF0ZXgtbGlzdGluZ3Mtc3JjLW9taXQtbGFuZ3VhZ2Ugbmls CisgICJTZXQgdGhpcyBvcHRpb24gdG8gdCB0byBvbWl0IHRoZQorXCJsYW5ndWFnZT1cIgoraW4g dGhlIHBhcmFtZXRlcnMgdG8gXFxiZWdpbntsc3RsaXN0aW5nfSB3aGVuIGV4cG9ydGluZyBhIHNy YyBibG9jayIKKyAgOmdyb3VwICdvcmctZ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3VhZ2UKKyAgICAg ICAgICAgYCgoImxhbmd1YWdlIiAsbHN0LWxhbmcpKSkKKyAgICAgICAgICh3aGVuIGxhYmVsICAg ICAgICAgICAgICAgICAgICA7IGxhYmVsPSB3L28gbGFiZWwgbWFrZXMgbGl0dGxlIHNlbnNlCisg ICAgICAgICAgICAgYCgoImxhYmVsIiAsKG9yZy1sYXRleC0tbGFiZWwgc3JjLWJsb2NrIGluZm8p KSkpCisgICAgICAgICAod2hlbiBjYXB0aW9uLXN0ciAgICAgICAgICAgICAgOyBjYXB0aW9uPSB3 L28gY2FwdGlvbiBtYWtlcyBsaXR0bGUgc2Vuc2UKKyAgICAgICAgICAgYCgoImNhcHRpb24iICxj YXB0aW9uLXN0cikpCisgICAgICAgICAgIGAoKCJjYXB0aW9ucG9zIiAsKGlmIGNhcHRpb24tYWJv dmUtcCAidCIgImIiKSkpKSA7IGFzIGRvZXMgY2FwdGlvbnBvcyB3L28gY2FwdGlvbgogICAgICAg ICAgKGNvbmQgKChhc3NvYyAibnVtYmVycyIgbHN0LW9wdCkgbmlsKQogICAgICAgICAgICAgICAg KChub3QgbnVtLXN0YXJ0KSAnKCgibnVtYmVycyIgIm5vbmUiKSkpCiAgICAgICAgICAgICAgICAo dCBgKCgiZmlyc3RudW1iZXIiICwobnVtYmVyLXRvLXN0cmluZyAoMSsgbnVtLXN0YXJ0KSkpCg== --00000000000040754805ef8b9ff7--