Re: Error during PDF export but the PDF file is exported

2022-10-21 Thread Pascal Quesseveur
>"IR" == Ihor Radchenko  writes:

  IR> Pascal, could you please try the latest main and see if the
  IR> problem is fixed?

Unfortunately I can't try at the moment. I have followed the link

https://list.orgmode.org/thu03t$16vt$1...@ciao.gmane.io

and FWIU it should work fine as it takes the file modification time
instead of current-time in org-compile-file as I did in my first
attempt.


-- 
Pascal Quesseveur
pques...@gmail.com



Re: Org-mode syntax as a tool-independent MIME type

2022-10-21 Thread Ihor Radchenko
Karl Voit  writes:

> I tried to collect projects on
> https://gitlab.com/publicvoit/orgdown/-/blob/master/doc/Tool-Support.org

Would you be interested to contribute to https://orgmode.org/tools.html?

>> Perhaps TEC is right and we will end up having the minimal syntax
>> being the one we currently use for Org-mode: we'll see.
>>
>> But we need volunteers: one to work on worg/dev/org-synxtax.org (I'm
>> assuming TEC can lead the work here) and one to set up a discussion
>> with people implementing Org in various places (you ?).
>
> What kind of discussion is on your mind? At the moment, I tend to
> think that the Org-mode community should provide directions by
> developing a formal definition of the syntax and maybe later-on
> define viable sub-sets (the OD levels?) so that tool developers
> don't have to implement the whole large thing.
>
> At this stage, I don't know what discussions you're trying to start
> here. Can you elaborate?

You can start from reading https://orgmode.org/worg/dev/org-syntax.html
and providing suggestions to improve it. That document will eventually
become the syntax reference.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Org-mode syntax as a tool-independent MIME type (was: Shower thought: submit an IETF RFC to register Org as a MIME type)

2022-10-21 Thread Ihor Radchenko
Karl Voit  writes:

> For reasons explained in my Orgdown-related articles[1] I would
> propose to use this chance to introduce a different term for the
> Org-mode lightweight markup language in contrast to the Org-mode
> Elisp implementation in order to push the syntax in a tool-agnostic
> way. We should not think only of GNU Emacs because there is a
> rising number of tools that do support text files in Org-mode
> syntax[2] which is also a huge advantage for users of GNU Emacs:
> collaboration, public awareness of the syntax, more tool support,
> ...

I do not like the idea of using Orgdown term for MIME type.
MIME type already imply syntax, not the implementation. I think that it
will be better to keep "Org" term for MIME type and avoid too much
confusion.

The Emacs-independent description of the syntax is being worked on in
https://orgmode.org/worg/dev/org-syntax.html.

> I proposed the term Orgdown for the Org-mode syntax and also
> proposed various levels in order to provide sub-sets of Org-mode
> syntax[3] that are realistic to implement with finite effort. Using
> those OD-levels to come up with a formal definition (EBNF?) might
> play perfectly well with different parameters of the MIME type[4].

I do understand and accept your idea about simplified syntax
description. As we are going to need the syntax white-paper for MIME
type registration anyway, we may as well define your syntax levels in
that document. I envision a section in
https://orgmode.org/worg/dev/org-syntax.html that will define subsets
syntax elements can be supported.

The first step now if finalizing
https://orgmode.org/worg/dev/org-syntax.html. It would help if other Org
users read through the document and try to spot what is missing,
unclear, or inaccurate.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)]

2022-10-21 Thread Ihor Radchenko
Ihor Radchenko  writes:

> Subject: [PATCH] ox-odt: Allow id: links to files
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> * lisp/ox-odt.el (org-odt-link): Transcode id: links to file property
> drawers.
>
> Reported-by: Moritz Schäfer 
> Link: 
> https://orgmode.org/list/CA+FVMQDBUwCQHFOWieELaB3=4mh2yba66+npcuqwvvv_1hv...@mail.gmail.com

Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4e5c7373115cfeb88fb4392252d682fad8d178a8

We can further improve things, like with escaping the file name, but the
patch should at least fix the immediate export problem.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [PATCH] ob-java: Define the list of all supported header arguments

2022-10-21 Thread Rudolf Adamkovič
Ihor Radchenko  writes:

> Thanks!
> Applied onto main.

Fantastic!

> Fixed.

Thanks.  Please see the attached patch with updated tests.

Rudy

>From 5405d0419295bb1a0314cb2b3ce07713fc77e792 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= 
Date: Fri, 21 Oct 2022 14:48:56 +0200
Subject: [PATCH] test-ob-java: Test Java source block header arguments at all
 levels
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* testing/lisp/test-ob-java.el (ob-java/lint-header-arguments):
Renamed to ob-java/lint-header-args-block.

* testing/lisp/test-ob-java.el (ob-java/lint-header-args-heading):
Test source block header arguments at the heading level.

* testing/lisp/test-ob-java.el (ob-java/lint-header-args-buffer):
Test source block header arguments at the buffer level.

Reported-by: Rudolf Adamkovič 
Link: https://orgmode.org/list/m2y1ta9rqe@me.com
---
 testing/lisp/test-ob-java.el | 31 ++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/testing/lisp/test-ob-java.el b/testing/lisp/test-ob-java.el
index a62d66557..1cc7fbeb2 100644
--- a/testing/lisp/test-ob-java.el
+++ b/testing/lisp/test-ob-java.el
@@ -27,7 +27,36 @@
 
 ;;; No Java required
 
-(ert-deftest ob-java/lint-header-arguments ()
+(ert-deftest ob-java/lint-header-args-buffer ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the buffer level.
+  (org-test-with-temp-text "
+#+property: header-args:java+ :dir /tmp
+#+property: header-args:java+ :classname com.example.Example
+#+property: header-args:java+ :imports com.example.OtherExample
+#+property: header-args:java+ :cmpflag -classpath .:/tmp/example/
+#+property: header-args:java+ :cmdline -classpath .:/tmp/example/
+#+property: header-args:java+ :cmdarg -verbose"
+(should-not (org-lint '(wrong-header-argument)
+
+(ert-deftest ob-java/lint-header-args-heading ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the heading level.
+  (org-test-with-temp-text "
+* Test
+:PROPERTIES:
+:header-args:java+: :dir /tmp
+:header-args:java+: :classname com.example.Example
+:header-args:java+: :imports com.example.OtherExample
+:header-args:java+: :cmpflag -classpath .:/tmp/example/
+:header-args:java+: :cmdline -classpath .:/tmp/example/
+:header-args:java+: :cmdarg -verbose
+:END:"
+(should-not (org-lint '(wrong-header-argument)
+
+(ert-deftest ob-java/lint-header-args-block ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the block level.
   (org-test-with-temp-text "
 #+header: :dir /tmp
 #+header: :classname com.example.Example
-- 
2.38.0

-- 
"Thinking is a momentary dismissal of irrelevancies."
-- Richard Buckminster Fuller, 1969

Rudolf Adamkovič  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia


Re: [PATCH] ob-java: Define the list of all supported header arguments

2022-10-21 Thread Rudolf Adamkovič
Rudolf Adamkovič  writes:

> Please see the attached patch with updated tests.

Oops, I had a typo (a wrong tense) in the commit message.

Please see the patch attached to this message that has it fixed.

Rudy

>From 37bd1716a652751e6941781464d47c283be3b4b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= 
Date: Fri, 21 Oct 2022 14:48:56 +0200
Subject: [PATCH] test-ob-java: Test Java source block header arguments at all
 levels
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* testing/lisp/test-ob-java.el (ob-java/lint-header-arguments):
Rename to ob-java/lint-header-args-block.

* testing/lisp/test-ob-java.el (ob-java/lint-header-args-heading):
Test source block header arguments at the heading level.

* testing/lisp/test-ob-java.el (ob-java/lint-header-args-buffer):
Test source block header arguments at the buffer level.

Reported-by: Rudolf Adamkovič 
Link: https://orgmode.org/list/m2y1ta9rqe@me.com
---
 testing/lisp/test-ob-java.el | 31 ++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/testing/lisp/test-ob-java.el b/testing/lisp/test-ob-java.el
index a62d66557..1cc7fbeb2 100644
--- a/testing/lisp/test-ob-java.el
+++ b/testing/lisp/test-ob-java.el
@@ -27,7 +27,36 @@
 
 ;;; No Java required
 
-(ert-deftest ob-java/lint-header-arguments ()
+(ert-deftest ob-java/lint-header-args-buffer ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the buffer level.
+  (org-test-with-temp-text "
+#+property: header-args:java+ :dir /tmp
+#+property: header-args:java+ :classname com.example.Example
+#+property: header-args:java+ :imports com.example.OtherExample
+#+property: header-args:java+ :cmpflag -classpath .:/tmp/example/
+#+property: header-args:java+ :cmdline -classpath .:/tmp/example/
+#+property: header-args:java+ :cmdarg -verbose"
+(should-not (org-lint '(wrong-header-argument)
+
+(ert-deftest ob-java/lint-header-args-heading ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the heading level.
+  (org-test-with-temp-text "
+* Test
+:PROPERTIES:
+:header-args:java+: :dir /tmp
+:header-args:java+: :classname com.example.Example
+:header-args:java+: :imports com.example.OtherExample
+:header-args:java+: :cmpflag -classpath .:/tmp/example/
+:header-args:java+: :cmdline -classpath .:/tmp/example/
+:header-args:java+: :cmdarg -verbose
+:END:"
+(should-not (org-lint '(wrong-header-argument)
+
+(ert-deftest ob-java/lint-header-args-block ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the block level.
   (org-test-with-temp-text "
 #+header: :dir /tmp
 #+header: :classname com.example.Example
-- 
2.38.0

-- 
"Genius is 1% inspiration and 99% perspiration."
-- Thomas Alva Edison, 1932

Rudolf Adamkovič  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia


Re: Org 9.6-pre and Bash sessions

2022-10-21 Thread Rudolf Adamkovič
Ihor Radchenko  writes:

> See the attached tentative patch.
> I'd appreciate some testing. Hopefully, I did not break anything.

I did some testing and found no issues.

Great work!

Below, I include some suggestions regarding the patch.

> * lisp/ob-comint.el (org-babel-comint-with-output): Cleanup empty
> output.  Such output is spitted unnecessarily for multi-line scripts.

- 'cleanup' (noun) -> 'clean up' (verb)
- 'spitted' -> ??? (did you mean 'split', perhaps?)

> * testing/lisp/test-ob-shell.el (test-ob-shell/session): Add test.

- 'test' -> 'a test'

> +  (let ((res (org-babel-execute:sh "if true; then\necho \"yes\"\nfi" 
> '((:session . "yes")

This line has 93 columns, which makes it needlessly hard to read.

Consider,

(let ((result (org-babel-execute:sh
 "if true \n then \n echo yes \n fi"
 '((:session . "yes")
(should result)
(should (string= "yes" result)))

I replaced the remaining semicolons with newlines, given the test
focuses on "multi-line scripts".  Further, I removed the needless
(escaped) quotes around "yes".  Lastly, I renamed 'res' to 'result',
improving readability and consistency, given the file already uses
'result' in another 'let'.

Rudy
-- 
"Programming reliably -- must be an activity of an undeniably
mathematical nature […] You see, mathematics is about thinking, and
doing mathematics is always trying to think as well as possible."
-- Edsger W. Dijkstra, 1981

Rudolf Adamkovič  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia



Re: [PATCH] ob-java: Define the list of all supported header arguments

2022-10-21 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> Rudolf Adamkovič  writes:
>
>> Please see the attached patch with updated tests.
>
> Oops, I had a typo (a wrong tense) in the commit message.
>
> Please see the patch attached to this message that has it fixed.

Thanks!
Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=bed47b437d8cde7a98bafdb07996e248b40f70e6

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[PATCH] Re: Bug: Incorrect indentation in Org Babel list output with multiline text [9.4.4 (release_9.4.4 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2022-10-21 Thread Rudolf Adamkovič
Ihor Radchenko  writes:

> Applied onto main.

I wrote a regression test, so that we do not need to fix this problem
again next time.  Please see the attached patch.

>From 9cb3c86abcc1fe983b5e6d2ff7a80c1d714fb126 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= 
Date: Fri, 21 Oct 2022 16:26:33 +0200
Subject: [PATCH] test-ob: Test indentation of multiline text in list output

* testing/lisp/test-ob.el (test-ob/org-babel-results-indented-list):
Add a regression test for the recent change to ob-core list formatting
in e7005787993f521f76e99f00e8a04d87703c493f.
---
 testing/lisp/test-ob.el | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index 4ac278faf..4beaecf7b 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -1175,6 +1175,29 @@ trying to find the :END: marker."
 (org-babel-execute-src-block)
 (org-babel-execute-src-block)))
 
+(ert-deftest test-ob/org-babel-results-indented-list ()
+  "Test that :results value list indents multi-line items correctly."
+  (should
+   (string= "- Foo1
+  Bar1
+- Foo2
+
+  Bar2
+"
+(org-test-with-temp-text
+"#+begin_src emacs-lisp :results value list
+'(\"Foo1
+Bar1\"
+  \"Foo2
+
+Bar2\")
+#+end_src"
+  (org-babel-execute-src-block)
+  (org-forward-element)
+  (org-narrow-to-element)
+  (delete-trailing-whitespace)
+  (buffer-string)
+
 (ert-deftest test-ob/file-desc-header-argument ()
   "Test that the :file-desc header argument is used."
   (org-test-with-temp-text "#+begin_src emacs-lisp :results file :file-desc bar
-- 
2.38.0


Rudy
-- 
"Be especially critical of any statement following the word
'obviously.'"
-- Anna Pell Wheeler, 1883-1966

Rudolf Adamkovič  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia


Re: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)]

2022-10-21 Thread Max Nikulin

On 21/10/2022 10:16, Ihor Radchenko wrote:

Max Nikulin writes:


I am apologizing if my comments make no sense. I remember a thread on
improper handling on id links in ox-html, so I am a bit surprised that a
link to the whole file (if I got the goal of the patch correctly, of
course) is the only problem with ODT.


It is likely not the only problem. But this thread is about one
particular problem that should also be fixed regardless of others.
If you find other problems, please report them.


I am sorry. I confused this thread with some other bug report. I agree 
that the original post describes namely file links. When Moritz provided 
an example in response to your request for more details I decided that 
more similar problems are coming. Perhaps particular use case does not 
include links to specific headings in files and I was wrong. On the 
other hand if ox-odt code works with id links better than ox-html then 
the former may be a source of inspiration how to fix the latter.



Here, we at least fix the export error. So that people can at least get
some exported .odt file.


I have tried main HEAD (your fix should be applied) and I did not get an 
error, but the result is quite strange. Consider a single file with an 
internal link:


:PROPERTIES:
:ID:   3c885843-13ad-4dd8-a57f-de8271403b85
:END:
#+TITLE: Note A

* H 1
Some text

* H 2
[[id:3c885843-13ad-4dd8-a57f-de8271403b85][Link to Note A]]

Link in the exported document:

Link to Note 
A


I would expect a target withing the same .odt file.

Properties as displayed in LibreOffice UI are even more peculiar:
Document path
file:///tmp/d/test-odt.odt/test-odt.org
Target in document is empty.

My expectation for path is file:///tmp/d/test-odt.odt or at least 
file:///tmp/d/test-odt.org, but certainly not their combination. I am 
unsure if you consider this observation as relevant to this thread.







Re: [BUG] Mention #+PRINT_BIBLIOGRAPHY in the Org manual

2022-10-21 Thread Rudolf Adamkovič
Ihor Radchenko  writes:

> Feel free to submit a patch for org-cite-make-insert-processor.

Could the patch make '[cite: @key]' the new default when inserting
citations, or should it introduce a new customization point?

Rudy
-- 
"Strange as it may sound, the power of mathematics rests on its evasion
of all unnecessary thought and on its wonderful saving of mental
operations."
-- Ernst Mach, 1838-1916

Rudolf Adamkovič  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia



Re: org-persist-write slow when pp-use-max-width is t

2022-10-21 Thread Michael Eliachevitch




pp-max-width has been introduced in Emacs 29.
The fact that pp becomes too slow is likely something to be fixed before
the next Emacs release.


Good catch and I agree. I compile emacs from the master branch and probably 
discovered in the emacs-news which I check between upgrades and I probably 
customized it subsequently, even though I forgot about the customization later.


While we can work around this issue on Org side, I'd prefer to ask Emacs
developers first and see if they can come up with a fix.

I suggest you to file a bug report to Emacs.
You may provide the contents of your org-persist-index-file inside
org-persist-directory. AFAIU, it is what is taking a lot of time to
print.


I submitted a bug report where I attached the index file and a minimal example 
file which benchmarks running pp on it, with which I could reproduce my issue 
from emacs -Q:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58687

Let's see what the emacs devs have to say about it.
--
Michael Eliachevitch
Public PGP Key: 
https://keyoxide.org/hkp/546908c782383ad0e7d894ec1b8f95c8125dce31



Re: Line breaks and brackets in LaTeX export

2022-10-21 Thread Max Nikulin

On 21/10/2022 10:41, Ihor Radchenko wrote:

Max Nikulin writes:


On 20/10/2022 12:07, Ihor Radchenko wrote:

When transcoding children (e.g. table rows), the sibling rows can always
be accessed using org-export-get-previous-element and
org-export-get-next-element.


Decision if escaping is necessary should be based on export result, not
on the source element.


I am not sure. The export result may originate from constructs like

#+MACRO: pagebreak @@latex:\\@@

Some paragraph {{{pagebreak}}}
src_elisp[:results raw]{(format "@@latex:[%dpt]@@" (or my-spacing-value 0))}

The point is: it can be done on purpose for some reason.


I agree that it can be done for purpose and I am not happy that due to 
table syntax it is not easy to emit custom code between rows.


Since you declined an idea to mark default line breaks with some unique 
comment to use it in search pattern in a filter, I may suggest to change 
custom code to either remove newline before brackets or to add a comment 
after \\


Some paragraph
src_elisp[:results raw]{(format "@@latex:[%dpt]@@" (or 
my-spacing-value 0))}


or #+MACRO: pagebreak @@latex:\\%@@

With any variant such line break will be ignored by "optimizing" filter.

Concerning element vs. exported text, consider a derived backend that 
ignores italics markers if a paragraph has some attribute. Usually

 Paragraph \\
 \emph{[something]}
does not cause any problem, however if italics is ignored it is an error
 Paragraph\\
 [something]
That is why namely exported code of adjacent leaf node should be 
examined. Ideally there should be a possibility to add some attributes 
or properties to distinguish raw export snippet. Unfortunately it 
requires complete redesign of org-export.






Re: Line breaks and brackets in LaTeX export

2022-10-21 Thread Max Nikulin

On 21/10/2022 10:34, Ihor Radchenko wrote:

Juan Manuel Macías writes:

I see the tabularray issue simply as an example that \empty is not as
reliable as we thought. There might be other LaTeX packages throwing
errors on \\\empty.


My impression is that tabularray has an ambitious goal to replace all 
current table packages. I have no idea if other packages will adopt 
similar approach with regexp-based parsing instead of usual expanding of 
TeX commands.


I do not like necessity to add \NewTableCommand\empty{} to documents 
somehow (only if tabularray is loaded). I do not have an idea better 
than \\[0pt] and an optimizing filter to remove [0pt] in almost all cases.






Re: Do not show a TODO item in the global TODO list until certain date?

2022-10-21 Thread Ihor Radchenko
Angel de Vicente  writes:

> [I was about to tell you that it was still not working, because I was
> still trying with the following TODO item:
>
> ,
> | ** TODO test   
> :personal:
> | 
> |:PROPERTIES:
> |:SHOWFROMDATE: 2022-10-16
> |:END:
> `
>
> and then I realized that the empty line before :PROPERTIES: was breaking
> it. With no empty line it works fine (I should've used
> org-command-set-SHOWFROMDATE-property from the beginning, which sets the
> PROPERTIES in the right format).

Note M-x org-lint. It tries to check for Org syntax issues like this.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[BUG] hyperbole action key on path name results in org-element-cache warning [9.6-pre (release_9.5.5-997-ge58bd0 @ /home/grfz/src/org-mode/lisp/)]

2022-10-21 Thread Gregor Zattler


Dear org-mode and hyperbole developers, hitting hyperbole's
action-key with point in "~/src/org-mode/contrilb/lisp" in a
*Pp Eval Output* buffer holding my complete load-path
resulted in this org-element--cache warning:

 ■  Warning (org-element-cache): org-element--cache: Org parser error in *Pp 
Eval Output*::5288. Resetting.
 The error was: (error "rx ‘**’ range error")
 Backtrace:
"  backtrace-to-string(nil)
  org-element-at-point()
  org-element-context()
  hsys-org-link-at-p()
  ibtypes::org-link-outside-org-mode()
  ibut:at-p()
  hbut:at-p()
  eval((hbut:at-p))
  hkey-execute(nil)
  action-key-internal()
  action-key()
  funcall-interactively(action-key)
  call-interactively(action-key nil nil)
  command-execute(action-key)
"
 Please report this to Org mode mailing list (M-x org-submit-bug-report).

I wanted to know if this directory exists (it doesn't) and
thought it was easiest to use action-key in order to visit
it.


I assume hyperbole wrongly assumed that this was an org-mode
buffer and did something wrong with org-element, but I'm
only guessing, since this is way above my elisp foo.

I hope this somehow helps.

Emacs  : GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, cairo version 1.16.0)
 of 2022-10-19
Package: Org mode version 9.6-pre (release_9.5.5-997-ge58bd0 @ 
/home/grfz/src/org-mode/lisp/)

and hyperbole 8.0.0.

Ciao,
-- 
Gregor



Re: Line breaks and brackets in LaTeX export

2022-10-21 Thread Juan Manuel Macías
Max Nikulin writes:

> My impression is that tabularray has an ambitious goal to replace all
> current table packages. I have no idea if other packages will adopt
> similar approach with regexp-based parsing instead of usual expanding
> of TeX commands.

Yes, that's the impression I have too. Tabularray certainly solves a lot
of traditional LaTeX table problems (unfortunately not the one we're
dealing with). Time will tell if it also creates other new problems. In
any case, it brings a lot of flexibility to a part of LaTeX, tables,
that has always suffered from a certain constriction. We'll see what
happens. LaTeX is becoming very complex and now several layers coexist,
since the jump to LaTeX 3 is going to be gradual. On the other hand, I
don't know if the latex core developers have a cleaner \\ command in
their roadmap, without those absurd current problems (and that LaTeX has
been carrying for almost 40 years).

> I do not like necessity to add \NewTableCommand\empty{} to documents
> somehow (only if tabularray is loaded). I do not have an idea better
> than \\[0pt] and an optimizing filter to remove [0pt] in almost all
> cases.

I totally agree.

Best regards,

Juan Manuel 




Re: Do not show a TODO item in the global TODO list until certain date?

2022-10-21 Thread Angel de Vicente
Hello, 

Ihor Radchenko  writes:

> Try the following adjusted version:
>
> (defun org-agenda-skip-before-SHOWFROMDATE-property ()
>   "Skip agenda item if :SHOWFROMDATE: property is set and the day is before 
> it"
>   (when-let* ((showfromdate (if (bound-and-true-p org-ql--current-element)
> (org-element-property :SHOWFROMDATE 
> (org-element-lineage org-ql--current-element '(headline) t))
>   (org-entry-get (point) "SHOWFROMDATE")))
>   (showfromdate (unless (seq-empty-p showfromdate) (ts-parse-org 
> showfromdate)))
> (currenttime (ts-now)))
> (when (ts< currenttime showfromdate)
>   (or (outline-next-heading) (point-max)

Fantastic. It does work now beautifully.

[I was about to tell you that it was still not working, because I was
still trying with the following TODO item:

,
| ** TODO test   :personal:
| 
|:PROPERTIES:
|:SHOWFROMDATE: 2022-10-16
|:END:
`

and then I realized that the empty line before :PROPERTIES: was breaking
it. With no empty line it works fine (I should've used
org-command-set-SHOWFROMDATE-property from the beginning, which sets the
PROPERTIES in the right format).

,
| ** TODO test   :personal:
|:PROPERTIES:
|:SHOWFROMDATE: 2022-10-16
|:END:
`

Many thanks for your help. My TODO list is going to become a lot cleaner
from now!

Cheers,
-- 
Ángel de Vicente
 Research Software Engineer (Supercomputing and BigData)
 Tel.: +34 922-605-747
 Web.: http://research.iac.es/proyecto/polmag/
-
AVISO LEGAL: Este mensaje puede contener información confidencial y/o 
privilegiada. Si usted no es el destinatario final del mismo o lo ha recibido 
por error, por favor notifíquelo al remitente inmediatamente. Cualquier uso no 
autorizadas del contenido de este mensaje está estrictamente prohibida. Más 
información en: https://www.iac.es/es/responsabilidad-legal
DISCLAIMER: This message may contain confidential and / or privileged 
information. If you are not the final recipient or have received it in error, 
please notify the sender immediately. Any unauthorized use of the content of 
this message is strictly prohibited. More information:  
https://www.iac.es/en/disclaimer



Re: [PATCH 2-v4] New: auto display inline images under subtree when `org-cycle'.

2022-10-21 Thread Christopher M. Miles

Whether can this patch be merged at first, put the test in future to
finish? In recent days, I still have not figured out this image overlays
test.

"Christopher M. Miles"  writes:

> [[PGP Signed Part:Undecided]]
>
> Ihor Radchenko  writes:
>
>> "Christopher M. Miles"  writes:
>>
 I think that the best we can do in this situation is mocking
 `create-image' in batch mode to return non-nil using `cl-letf'.
>>>
>>> I checked the `create-image' in image.el source code, don't know how to
>>> mocking this. I have no experience and idea about this. I also searched
>>> org testing. Have not found similar situations.
>>>
>>> If you have idea how to write this test, I suggest pass this word to
>>> you. What do you think?
>>
>> I imagine something like
>>
>> ;; Mock `create-image' to work noninteractively.
>> (cl-letf (((symbol-function 'create-image)
>> (lambda (&rest _)
>>   `(image :type "dummy" :data "dummy"
>>   )
>
> After wrapped your cl-letf redefining function binding. Still failed on test.
>
> Here is the new test code:
>
> #+begin_src emacs-lisp
> (ert-deftest test-org-fold/org-fold-display-inline-images ()
>   "Test inline images displaying when cycling."
>   ;; Mock `create-image' to work noninteractively.
>   (cl-letf (((symbol-function 'create-image)
>(lambda (&rest _) `(image :type "dummy" :data "dummy"
> (let* ((org-cycle-inline-images-display t)
>(images-dir (expand-file-name "examples/images/" org-test-dir))
>(org-logo-image (expand-file-name "Org mode logo mono-color.png" 
> images-dir)))
>   ;; `org-cycle' -(state)-> `'children' display child inline images.
>   (org-test-with-temp-text
>(format "* Heading 1
> [[file:%s]]
> " org-logo-image)
>(org-overview)
>;; (org-cycle)
>;; (org-cycle-internal-local)
>;; (org-cycle-display-inline-images 'children)
>(org-fold-show-children)
>(run-hook-with-args 'org-cycle-hook 'children)
>(org-next-link)
>(should org-inline-image-overlays)
>(should (overlays-at (point)))
>(org-toggle-inline-images)
>(should-not (overlays-at (point
>   
>   ;; `org-cycle' -(state)-> `'subtree' display subtrees inline images.
>   (org-test-with-temp-text
>(format "* Heading 1
> [[file:%s]]
> ** Subheading 1
> [[file:%s]]
> ** Subheading 2
> [[file:%s]]" org-logo-image org-logo-image org-logo-image)
>(org-overview)
>;; (org-cycle)
>;; (org-cycle)
>;; (org-cycle-internal-global)
>(org-fold-show-subtree)
>(run-hook-with-args 'org-cycle-hook 'subtree)
>(org-next-link)
>(org-next-link)
>;; (should org-inline-image-overlays)
>(should (overlays-at (point)))
>(org-toggle-inline-images)
>(should-not (overlays-at (point
>   
>   ;; `org-cycle' -(state)-> `'folded' remove inline image overlays.
>   (org-test-with-temp-text
>(format "* Heading 1
> [[file:%s]]
> ** Subheading 1
> [[file:%s]]
> ** Subheading 2
> [[file:%s]]" org-logo-image org-logo-image org-logo-image)
>(org-overview)
>(org-show-subtree)
>(org-fold-subtree t)
>(run-hook-with-args 'org-cycle-hook 'folded)
>(should (null org-inline-image-overlays))
>(should (null (overlays-in (point-min) (point-max
>(org-show-subtree)
>(should-not org-inline-image-overlays)
>(should-not (overlays-in (point-min) (point-max)))
> #+end_src
>
>
> And failed after command:
>
> #+begin_src shell
> make BTEST_RE="test-org-fold/org-fold-display-inline-images" test-dirty 
> #+end_src
>
>
> Here is the output:
>
> #+begin_example
> ~/Code/Emacs/org-mode:main*:1 λ make 
> BTEST_RE="test-org-fold/org-fold-display-inline-images" test-dirty  
> install -m 755 -d 
> /var/folders/ym/f3v5_yk1279g5ls70x3hzblhgn/T//tmp-orgtest
> TMPDIR=/var/folders/ym/f3v5_yk1279g5ls70x3hzblhgn/T//tmp-orgtest emacs  
> -Q -batch --eval '(setq vc-handled-backends nil org-startup-folded nil 
> org-element-cache-persistent nil)'  --eval '(add-to-list '"'"'load-path 
> (concat default-directory "lisp"))' --eval '(add-to-list '"'"'load-path 
> (concat default-directory "testing"))'  -l org-batch-test-init --eval '(setq 
> org-batch-test t org-babel-load-languages (quote ( (awk . t)  (C . t)  
> (fortran . t)  (maxima . t)  (lilypond . t)  (octave . t)  (perl . t)  
> (python . t)  (emacs-lisp . t)  (shell . t)  (org . t))) org-test-select-re 
> "test-org-fold/org-fold-display-inline-images" )' -l org-loaddefs.el -l cl -l 
> testing/org-test.el -l ert -l org -l ox -l ol  --eval 
> '(org-test-run-batch-tests org-test-select-re)'
> Package cl is deprecated
> Source file `/Users/stardiviner/Code/Emacs/org-mode/lisp/org.el' newer than 
> byte-compiled file; using older file
> Source file `/Users/stardiviner/Code/Emacs/org-mode/lisp/org-compat.el' newer 
> than byte-compiled file; using ol

Re: [PATCH] Re: Bug: Incorrect indentation in Org Babel list output with multiline text [9.4.4 (release_9.4.4 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2022-10-21 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> I wrote a regression test, so that we do not need to fix this problem
> again next time.  Please see the attached patch.

Thanks!
Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=524e0e0b7b5eb4c02f3da5eaf59eb1df82d1c1cc

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[BUG] ox-odt file: links are not pointing to the real files (was: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2

2022-10-21 Thread Ihor Radchenko
Max Nikulin  writes:

> I am sorry. I confused this thread with some other bug report. I agree 
> that the original post describes namely file links. When Moritz provided 
> an example in response to your request for more details I decided that 
> more similar problems are coming. Perhaps particular use case does not 
> include links to specific headings in files and I was wrong. On the 
> other hand if ox-odt code works with id links better than ox-html then 
> the former may be a source of inspiration how to fix the latter.

I am not sure which bug you are referring to.

>> Here, we at least fix the export error. So that people can at least get
>> some exported .odt file.
>
> I have tried main HEAD (your fix should be applied) and I did not get an 
> error, but the result is quite strange. Consider a single file with an 
> internal link:
>
> :PROPERTIES:
> :ID:   3c885843-13ad-4dd8-a57f-de8271403b85
> :END:
> #+TITLE: Note A
>
> * H 1
> Some text
>
> * H 2
> [[id:3c885843-13ad-4dd8-a57f-de8271403b85][Link to Note A]]
>
> Link in the exported document:
>
> Link to Note 
> A
>
> I would expect a target withing the same .odt file.
>
> Properties as displayed in LibreOffice UI are even more peculiar:
> Document path
> file:///tmp/d/test-odt.odt/test-odt.org
> Target in document is empty.
>
> My expectation for path is file:///tmp/d/test-odt.odt or at least 
> file:///tmp/d/test-odt.org, but certainly not their combination. I am 
> unsure if you consider this observation as relevant to this thread.

I improved the code a bit, directly reusing file: link transcoder:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2f5e7103e59f06631e985d3dd39af21b5b7464ea

However, it does not change your observed behaviour.

I also tried the following Org file, and it looks like something is wrong
about file: link export in ox-odt. Even file: links have the erroneous
document path.

Probably, href=file.org is treated as a link to resource packed inside
.odt file.
I tried to look through
https://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators, but I
cannot see any obvious correct way to link to external files from odt.
May someone more familiar with ODT schema take a look?


:PROPERTIES:
:ID:   3c885843-13ad-4dd8-a57f-de8271403b85
:END:
#+TITLE: Note A

* H 1
Some text

* H 2
[[id:3c885843-13ad-4dd8-a57f-de8271403b85][Link to Note A]]
[[file:test.org]]


-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Org 9.6-pre and Bash sessions

2022-10-21 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> Ihor Radchenko  writes:
>
>> See the attached tentative patch.
>> I'd appreciate some testing. Hopefully, I did not break anything.
>
> I did some testing and found no issues.
>
> Great work!
>
> Below, I include some suggestions regarding the patch.

Thanks!
Applied onto main incorporating your suggestions.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=801c93638ab4b6616567035c6438ad229bc14c1d

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Haskell code blocks

2022-10-21 Thread Jarmo Hurri


Greetings Thomas.

"Thomas S. Dye"  writes:

> I'm struggling to write a minimal ob-doc-haskell.org for Worg.
>
> The obligatory Hello World! example yields bad results.
>
> #+name: haskell-hello-world
> #+begin_src haskell 
>
> main :: IO () 
> main = putStrLn  "Hello, World!"
> main
> #+end_src
>
> #+RESULTS: haskell-hello-world
> : Prelude> Hello, World!

The good ole obligatory part is fulfilled by including ":session none":

 #+name: haskell-hello-world
 #+begin_src haskell :session none
   main :: IO () 
   main = putStrLn  "Hello, World!"
   main
 #+end_src

 #+RESULTS: haskell-hello-world
 : Hello, World!

All the best,

Jarmo




Re: bug#58678: 28.2; :session in org-babel for python unexpected output

2022-10-21 Thread Ihor Radchenko
[Redirecting from Emacs bugs]
[See the quote below for the original report]

> #+RESULTS:
> : >>> __PYTHON_EL_eval("try:\nwith 
> open('/var/folders/dk/3btmprj123b_31jsp30thzrmgq/T/babel-9tY6uv/python-92ZLVe')
>  as 
> __org_babel_python_tmpfile:\nexec(compile(__org_babel_python_tmpfile.read(), 
> __org_babel_python_tmpfile.name, 'exec'))\nexcept:\nraise\nfinally:\nprint('
> ```

I am unable to reproduce with the latest main on Linux.
Sergey, could you please try to reproduce with the latest Org version
from Git? See https://orgmode.org/manual/Feedback.html#Feedback

Best,
Ihor

Sergey via "Bug reports for GNU Emacs, the Swiss army knife of text
editors"  writes:

> Running the following org file in 'emacs -Q' leads to an unexpected
> output as demonstrated below:
> ```
> #+begin_src elisp
> (setq org-babel-python-command "python3")
> (setq python-shell-interpreter "/usr/bin/python3")
> (org-babel-do-load-languages
> 'org-babel-load-languages
> '(
> (python . t)))
> #+end_src
>
> #+begin_src python :results output
> print(2)
> #+end_src
>
> #+RESULTS:
> : 2
>
> #+begin_src python :results output :session *python-test*
> print(2)
> #+end_src
>
> #+RESULTS:
> : >>> __PYTHON_EL_eval("try:\nwith 
> open('/var/folders/dk/3btmprj123b_31jsp30thzrmgq/T/babel-9tY6uv/python-92ZLVe')
>  as 
> __org_babel_python_tmpfile:\nexec(compile(__org_babel_python_tmpfile.read(), 
> __org_babel_python_tmpfile.name, 'exec'))\nexcept:\nraise\nfinally:\nprint('
> ```
>
> In GNU Emacs 28.2 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60 
> Version 12.6 (Build 21G115))
> of 2022-10-12 built on MAC-140754
> Windowing system distributor 'Apple', version 10.3.2113
> System Description:macOS 12.6
>
> Configured using:
> 'configure --disable-dependency-tracking --disable-silent-rules
> --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp
> --infodir=/opt/homebrew/Cellar/emacs-plus@28/28.2/share/info/emacs
> --prefix=/opt/homebrew/Cellar/emacs-plus@28/28.2 --with-xml2
> --with-gnutls --without-dbus --without-imagemagick --with-modules
> --with-rsvg --with-ns --disable-ns-self-contained 'CFLAGS=-Os -w -pipe
> -mmacosx-version-min=12
> -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk
> -DFD_SETSIZE=1 -DDARWIN_UNLIMITED_SELECT'
> 'CPPFLAGS=-I/opt/homebrew/opt/icu4c/include
> -I/opt/homebrew/opt/openssl@1.1/include
> -I/opt/homebrew/opt/readline/include -isystem/opt/homebrew/include
> -F/opt/homebrew/Frameworks
> -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk'
> 'LDFLAGS=-L/opt/homebrew/opt/icu4c/lib
> -L/opt/homebrew/opt/openssl@1.1/lib -L/opt/homebrew/opt/readline/lib
> -L/opt/homebrew/lib -F/opt/homebrew/Frameworks
> -Wl,-headerpad_max_install_names
> -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk''
>
> Configured features:
> ACL GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS
> PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB
>
> Important settings:
> value of $LANG: en_US.UTF-8
> locale-coding-system: utf-8-unix
>
> Major mode: Info
>
> Minor modes in effect:
> shell-dirtrack-mode: t
> tooltip-mode: t
> global-eldoc-mode: t
> show-paren-mode: t
> electric-indent-mode: t
> mouse-wheel-mode: t
> tool-bar-mode: t
> menu-bar-mode: t
> file-name-shadow-mode: t
> global-font-lock-mode: t
> font-lock-mode: t
> blink-cursor-mode: t
> auto-composition-mode: t
> auto-encryption-mode: t
> auto-compression-mode: t
> buffer-read-only: t
> line-number-mode: t
> indent-tabs-mode: t
> transient-mark-mode: t
>
> Load-path shadows:
> None found.
>
> Features:
> (shadow sort mail-extr emacsbug sendmail info warnings compile ob-python
> python tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x
> tramp-compat shell ls-lisp vc-git diff-mode vc-dispatcher org-element
> avl-tree generator ol-eww eww xdg url-queue thingatpt mm-url ol-rmail
> ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt cl-extra
> help-mode speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view
> mml-smime smime dig gnus-sum shr kinsoku svg dom browse-url url
> url-proxy url-privacy url-expand url-methods url-history url-cookie
> url-domsuf url-util url-parse url-vars mailcap gnus-group gnus-undo
> gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7
> netrc nnoo parse-time gnus-spec gnus-int gnus-range message rmc puny
> rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode
> mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
> gnus-win gnus nnheader gnus-util rmail rmail-loaddefs auth-source cl-seq
> eieio eieio-core cl-macs eieio-loaddefs password-cache rfc2047 rfc2045
> ietf-drums text-property-search mail-utils mm-util mail-prsvr wid-edit
> ol-docview doc-view jka-compr image-mode exif dired dired-loaddefs
> ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref
> ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
> org-pcomplete pcomplete comint ansi-color ring org-list org-faces
> org-enti

Re: [BUG] Mention #+PRINT_BIBLIOGRAPHY in the Org manual

2022-10-21 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> Ihor Radchenko  writes:
>
>> Feel free to submit a patch for org-cite-make-insert-processor.
>
> Could the patch make '[cite: @key]' the new default when inserting
> citations, or should it introduce a new customization point?

I think it can be the new default.
However, please send the patch in a separate thread, so that people can
see it and oppose if they have objections.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Line breaks and brackets in LaTeX export

2022-10-21 Thread Ihor Radchenko
Max Nikulin  writes:

> Concerning element vs. exported text, consider a derived backend that 
> ignores italics markers if a paragraph has some attribute. Usually
>   Paragraph \\
>   \emph{[something]}
> does not cause any problem, however if italics is ignored it is an error
>   Paragraph\\
>   [something]
> That is why namely exported code of adjacent leaf node should be 
> examined. Ideally there should be a possibility to add some attributes 
> or properties to distinguish raw export snippet.

This is a valid example.

> Unfortunately it requires complete redesign of org-export.

Thinking about it more, we may actually do post-processing of the
exported text. Unless I miss something, constructs like "\\[0pt]\n" can
_always_ be replaced with "\\\n" as long as the next line does not match
"^[ \t]*\\[". Even when such construct is deliberately placed by the
user. There will be no difference in the generated pdf.

Or, to be completely safe, we can introduce a defcustom that will
control such clean-up (clean up by default).

I propose the following:
1. Merge my patch with \\[0pt] safe page breaks
2. Modify org-latex-template to replace unnecessary occurrences of
   "\\[0pt]" in CONTENTS when org-latex-compact-latex (you may propose
   other defcustom names) is non-nil.

WDYT?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[PATCH] Re: oc-basic "Wrong value for ENTRY-OR-KEY" error on emacs master (29.x) [Was: Bibliographies on export with ox-context and ox-epub]

2022-10-21 Thread Ihor Radchenko
Ihor Radchenko  writes:

> Note that apart from the problem on Emacs side, there appears to be a
> problem with org-cite-basic-export-bibliography.
>
> org-cite-basic-export-bibliography uses org-cite-basic--print-entry,
> which fails to print keys, which are not in .bib files. As a result,
> #+print_bibliography: appears to fail all the time when the document
> contains invalid cite keys.
>
> I consider this as a bug. At least org-cite-basic-export-bibliography
> could provide a more useful error message. Or maybe even skip the
> invalid keys. Or, similar to LaTeX, print ???. I am not sure which way
> will be more canonical according to general oc.el design.

I am suggesting to merge the attached patch.
It will simply skip keys that are not in the bibliography when printing
it.

WDYT?

>From 943b070b7e0f2b6d0bed261f831589fb918c214f Mon Sep 17 00:00:00 2001
Message-Id: <943b070b7e0f2b6d0bed261f831589fb918c214f.1666420664.git.yanta...@posteo.net>
From: Ihor Radchenko 
Date: Sat, 22 Oct 2022 14:32:17 +0800
Subject: [PATCH] org-cite-basic-export-bibliography: Skip missing bibliography
 keys

* lisp/oc-basic.el (org-cite-basic-export-bibliography): Ignore
citation keys that are not present in bibliography.  Previously, an
error was thrown.
---
 lisp/oc-basic.el | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el
index f1b7c8263..3ef7a37e3 100644
--- a/lisp/oc-basic.el
+++ b/lisp/oc-basic.el
@@ -713,15 +713,17 @@ (defun org-cite-basic-export-bibliography (keys _files style _props backend info
 style, as a string.  BACKEND is the export back-end, as a symbol.  INFO is the
 export state, as a property list."
   (mapconcat
-   (lambda (k)
- (let ((entry (org-cite-basic--get-entry k info)))
-   (org-export-data
-(org-cite-make-paragraph
- (and (org-export-derived-backend-p backend 'latex)
-  (org-export-raw-string "\\noindent\n"))
- (org-cite-basic--print-entry entry style info))
-info)))
-   (org-cite-basic--sort-keys keys info)
+   (lambda (entry)
+ (org-export-data
+  (org-cite-make-paragraph
+   (and (org-export-derived-backend-p backend 'latex)
+(org-export-raw-string "\\noindent\n"))
+   (org-cite-basic--print-entry entry style info))
+  info))
+   (delq nil
+ (mapcar
+  (lambda (k) (org-cite-basic--get-entry k info))
+  (org-cite-basic--sort-keys keys info)))
"\n"))
 
 
-- 
2.35.1


-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at