Re: New try at multi-lingual export to latex/pdf using pdflatex and babel

2024-02-09 Thread Pedro Andres Aranda Gutierrez
Hi Ihor,

yes, you are right. The whole thread went astray.
However, I think it might be interesting to keep this as an alternative to
the AUTO stuff...

Anyhow, I'm open to cancelling the patch

Best, /PA

On Sat, 10 Feb 2024 at 00:07, Ihor Radchenko  wrote:

> Pedro Andres Aranda Gutierrez  writes:
>
> > Subject: [PATCH] org-manual: Add multi-language babel example
> >
> > org-manual.org: Add multi-language babel example
> >
> > * doc/org-manual.org: Add an example for the LaTeX header commands
> > needed to export multi-language documents to pdflatex. In this case
> > we need to use and configure the babel package appropriately.
>
> AFAIU, Juan's questions about the patch have not been addressed, and the
> discussion branched into a slightly different topic (not changes to the
> manual).
>
> Should I cancel this 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


Is there something people use instead of org-ctags? (was: [PATCH] `org-ctags-create-tags` creates empty TAGS file)

2024-02-09 Thread Martin Marshall
I was curious how long this bug had been around and why no one
complained about it before.  So I looked through the Git log and found
that it was introduced on 1/18/2010.  That's just over two weeks after
the package was added to Emacs[1]!

Other than a 4 year old Reddit post[2], there've been no bug reports or
mailing list discussions about it in the fourteen years since the bug
was introduced.  This gives me the impression that very few people are
using the org-ctags package.

That's surprising, because it seems like it could be very useful.  It
allows for linking to "direct targets" from external files[3], which is
similar to the "come-from" links that Howm implements.  It's a very
low-effort, low-friction way to add links between different notes.

Is there some other way to create this sort of simple external link in
org-mode?  Is there some other package that provides a similar feature?

[1] Commit 53868111d000302b50706769526f15164600d739
[2] 
https://www.reddit.com/r/emacs/comments/fg71cw/orgctags_failed_to_create_tags/
[3] That look like <>.  See https://orgmode.org/manual/Internal-Links.html

-- 
Best regards,
Martin Marshall



[patch] Add two new header args to LaTeX block

2024-02-09 Thread Juan Manuel Macías
The attached patch adds two new header args to the LaTeX block:

- `:pdf-process' allows modifying the value of `org-latex-pdf-process'
  locally to the block. This can be useful for evaluating a given block
  with another LaTeX compiler, or even using some custom script.
  Example:

  #+begin_src latex :pdf-process '("lualatex -shell-escape -interaction 
nonstopmode -output-directory %o %f")
  \textbf{hello world}
  #+end_src

- `:full-to-pdf' makes the block like a standalone LaTeX document, which
  should contain everything needed to be compiled, from \documentclass{}
  to \end{document}. Example:

  #+begin_src latex :full-to-pdf yes
  \documentclass{article}  
  \begin{document}
  \textbf{hello world}
  \end{document}
  #+end_src

  I think both arguments can have many practical uses. For example, to
  compile separately and load multiple subdocuments, with different
  preambles:

   #+NAME: doc1
   #+begin_src org :exports none :results latex
,#+include: some-document.org
   #+end_src

  #+begin_src latex :noweb yes :results silent file :file file.pdf :full-to-pdf 
yes
\documentclass{article}
\usepackage[spanish]{babel}
\usepackage{fontspec}
\setmainfont{Vollkorn}
\begin{document}
<>
\end{document}
  #+end_src

  #+latex: \includepdf{file.pdf}
  
  Or even to evaluate ConTeXt code within a LaTeX block:

  #+begin_src latex :full-to-pdf yes :results raw file :file file.pdf 
:pdf-process '("cd %o && context %f")
  \starttext
  \startsection[title={Testing ConTeXt}]
  Lorem ipsum dolor.
  \stopsection
  \stoptext
  #+end_src


Best regards,

Juan Manuel 

-- 
Juan Manuel Macías -- Composición tipográfica, tratamiento de datos, diseño 
editorial y ortotipografía

>From fe1b40e2b22e2c668440bea13feda0ab7923bdd8 Mon Sep 17 00:00:00 2001
From: Juan Manuel Macias 
Date: Sat, 10 Feb 2024 02:01:08 +0100
Subject: [PATCH] lisp/ob-latex.el: Add two new header args to LaTeX block.

* (org-babel-execute:latex): `:pdf-process' allows modifying the value
of `org-latex-pdf-process' in a specific block.  The `:full-to-pdf'
argument requires that the LaTeX block contains all the code necessary
to be compiled, as if it were an autonomous LaTeX document: the
expected result will always be a PDF file.
---
 lisp/ob-latex.el | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/lisp/ob-latex.el b/lisp/ob-latex.el
index acb83228b..118d81338 100644
--- a/lisp/ob-latex.el
+++ b/lisp/ob-latex.el
@@ -162,6 +162,9 @@ This function is called by `org-babel-execute-src-block'."
 	 (height (and fit (cdr (assq :pdfheight params
 	 (width (and fit (cdr (assq :pdfwidth params
 	 (headers (cdr (assq :headers params)))
+ (pdf-process (cdr (assq :pdf-process params)))
+	 (org-latex-pdf-process (if pdf-process pdf-process org-latex-pdf-process))
+	 (full-to-pdf (cdr (assq :full-to-pdf params)))
 	 (in-buffer (not (string= "no" (cdr (assq :buffer params)
 	 (org-latex-packages-alist
 	  (append (cdr (assq :packages params)) org-latex-packages-alist)))
@@ -187,6 +190,14 @@ This function is called by `org-babel-execute-src-block'."
  (list org-babel-latex-pdf-svg-process)
  extension err-msg log-buf)))
   (rename-file img-out out-file t
+ ((and (string= "pdf" extension) full-to-pdf)
+	  (with-temp-file tex-file
+	(insert body))
+	  (when (file-exists-p out-file) (delete-file out-file))
+	  (let ((tmp-pdf (org-babel-latex-tex-to-pdf tex-file)))
+	(let* ((log-buf (get-buffer-create "*Org Babel LaTeX Output*"))
+		   (err-msg "org babel latex failed"))
+	  (rename-file tmp-pdf out-file t
  ((string-suffix-p ".tikz" out-file)
 	  (when (file-exists-p out-file) (delete-file out-file))
 	  (with-temp-file out-file
-- 
2.43.0



[PATCH] `org-ctags-create-tags` creates empty TAGS file [9.6.15 (release_9.6.15 @ /home/martin/Projects/emacs/lisp/org/)]

2024-02-09 Thread Martin Marshall
Hi, the docstring of `org-ctags-create-tags` says it should "(Re)create
tags file in the directory of the active buffer," creating tags from the
internal links found in the org files.  However, it always creates an
empty TAGS file.

The cause appears to be a pair of escaped quotes used with
`shell-command` when it calls the "ctags" executable.

* Re-creating the issue

1. First, as explained in the commentary of "org-ctags.el", make sure
you have exuberant-ctags installed on your system.  On a debian-based
system, like so...

--8<---cut here---start->8---
sudo apt install exuberant-ctags
--8<---cut here---end--->8---

2. Start Emacs from the command-line with "emacs -Q".

3. In the "*scratch*" buffer, paste the expression shown below.

--8<---cut here---start->8---
(let* ((testdir (expand-file-name "test1234xyz" "~"))
   (orgfile (expand-file-name "test-file.org" testdir))
   (tagsfile (expand-file-name "TAGS" testdir)))
  (unless (file-exists-p testdir)
(make-directory testdir))
  (find-file orgfile)
  (insert "<>")
  (save-buffer)
  (require 'org-ctags)
  (org-ctags-create-tags testdir)
  (find-file tagsfile))
--8<---cut here---end--->8---

4. If you evaluate the above code.  It creates the "~/test1234xyz"
directory, an org file containing a link, and a new TAGS file.

It also opens the new TAGS file.  But as you can see, it's empty.

* Cause

The cause appears to be some escaped quotes around a shell command
argument.  The FILES argument passed to the "ctags" executable uses
globbing.  But since it's surrounded by double quotes, no globbing
occurs, and "ctags" doesn't actually scan any files.

If we change this:
"--regex-orgmode=\"%s\" -f \"%s\" -e -R \"%s\"")

To this:
"--regex-orgmode=\"%s\" -f \"%s\" -e -R %s")

It works as expected.

I've attached a patch against the current Emacs master branch.  I hope
that's sufficient, given the minimal nature of the change.


Emacs  : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, 
cairo version 1.16.0)
 of 2024-02-09
Package: Org mode version 9.6.15 (release_9.6.15 @ 
/home/martin/Projects/emacs/lisp/org/)
>From a6719edafd928a5ce27036be5d5bec00eaafa8ec Mon Sep 17 00:00:00 2001
From: Martin Marshall 
Date: Fri, 9 Feb 2024 17:40:03 -0500
Subject: [PATCH] org-ctags.el: Fix use of "ctags" executable

* lisp/org/org-ctags.el (org-ctags-create-tags): Allow file
globbing in `shell-command' invocation of "ctags".

TINYCHANGE

---
 lisp/org/org-ctags.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el
index 2417353ee5d..9e523e7dc67 100644
--- a/lisp/org/org-ctags.el
+++ b/lisp/org/org-ctags.el
@@ -486,7 +486,7 @@ org-ctags-create-tags
   (setq exitcode
 (shell-command
  (format (concat "%s --langdef=orgmode --langmap=orgmode:.org "
- "--regex-orgmode=\"%s\" -f \"%s\" -e -R \"%s\"")
+ "--regex-orgmode=\"%s\" -f \"%s\" -e -R %s")
  org-ctags-path-to-ctags
  org-ctags-tag-regexp
  (expand-file-name (concat dir-name "/TAGS"))
-- 
2.39.2

-- 
Best regards,
Martin Marshall


Re: New try at multi-lingual export to latex/pdf using pdflatex and babel

2024-02-09 Thread Ihor Radchenko
Pedro Andres Aranda Gutierrez  writes:

> Subject: [PATCH] org-manual: Add multi-language babel example
>
> org-manual.org: Add multi-language babel example
>
> * doc/org-manual.org: Add an example for the LaTeX header commands
> needed to export multi-language documents to pdflatex. In this case
> we need to use and configure the babel package appropriately.

AFAIU, Juan's questions about the patch have not been addressed, and the
discussion branched into a slightly different topic (not changes to the
manual).

Should I cancel this patch?

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



Re: [PATCH] ox-latex: Make more variables file local safe

2024-02-09 Thread Ihor Radchenko
gerard.vermeu...@posteo.net writes:

> I have a direct use for org-latex-toc-command being a file local
> safe variable and I looked a bit around for other variables not
> being file local safe for no good reason IMO (why those not,
> while similar variables yes).
>
> I have attached a patch which makes six variables file local safe.

Thanks! I agree about all but org-latex-toc-command.
Although, I am not sure if org-latex-toc-command is really safe to set
to arbitrary value.

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



Re: [BUG] org-num-skip-unnumbered is not respected if a org-mode file enables org-num-mode on startup [9.6.18 ( @ /home/drcxd/.emacs.d/elpa/org-9.6.18/)]

2024-02-09 Thread Ihor Radchenko
Chang Xiaoduan  writes:

>> This is known.
>> #+STARTUP options are handled before buffer-local variables take effect.
>> See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57003
>> Handled.
>>
>
> I have read the thread but I can not figure a solution. I tried to
> search "early local" you proposed in the org-mode manual or Emacs manual
> but find nothing related. So currently if I use STARTUP options to
> enable org-num-mode on visiting the file, there is no way to make
> org-num-mode apply file local variables such as `org-num-max-level'? Is
> that right?

Yes, you are right. The Emacs bug I linked to is not resolved.
In other words, your issue is not new, known, but not solved yet.

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



Re: error during appt/agenda initialization

2024-02-09 Thread Fraga, Eric
Hi Ihor,

On Friday,  9 Feb 2024 at 20:35, Ihor Radchenko wrote:
> Try the latest main.

Thank you but, unfortunately, initialization is still failing, although
the backtrace is subtly different:

--8<---cut here---start->8---
Debugger entered--Lisp error: (quit)
  #f(compiled-function (node) "Get `:end' property of NODE." #)((table-row (:standard-properties [4219 4219 4220 4300 4301 
0 nil table-row element t nil nil nil nil # nil nil (table 
(:standard-properties [3780 3807 3807 5380 5381 1 nil nil element t nil nil nil 
nil # nil nil (section ...)] :type org :tblfm nil :value nil 
:attr_latex (":align |rll|")))] :type standard)))
  org-element--parse-to(4291)
  org-element-at-point(4291)
  org-element-cache-map(#f(compiled-function (el) #) :next-re "\\]+[0-9]\\{1,2\\}:[0-9]\\{2\\}[0-9+:..." :fail-re "\\]+[0-9]\\{1,2\\}:[0-9]\\{2\\}[0-9+:..." :narrow t)
  org-agenda-get-deadlines(t)
  org-agenda-get-day-entries("/home/ucecesf/s/notes/diary.org" (2 9 2024) 
:deadline* :scheduled* :timestamp)
  apply(org-agenda-get-day-entries "/home/ucecesf/s/notes/diary.org" (2 9 2024) 
(:deadline* :scheduled* :timestamp))
  org-agenda-to-appt()
--8<---cut here---end--->8---

Thanks again,
eric

-- 
: Eric S Fraga, with org release_9.6.13-1003-g872c1b in Emacs 30.0.50


Re: [BUG] Invalid capture datetree capture templates (newly introduced) [9.7-pre (release_9.6.18-1145-g10d286 @ /home/jds6696/.emacs.d/straight/build/org/)]

2024-02-09 Thread Ihor Radchenko
Tommy Kelly  writes:

> C) entry (file+olp+datetree "test-datetree.org" "H1 "H2");;
> filename plus heading and sub-heading
>
> Then I'd expect A) to use a datetree rooted at the file top level; B)
> to use one underneath heading "* H1"; and C) to use one underneath **
> H2" (which itself is underneath "* H1").
> And in each case I'd expect it to create a new datetree at the
> specified location if one didn't already exist.
>
> HOWEVER, it looks like that can break if there is already one or more
> datetrees anywhere in the file AT A LEVEL BELOW THAT specified by the
> template.
> In that case, the position specified by the template is simply
> ignored. Instead, the captured item is filed at first occurring
> datetree of the above kind.
> To be clear, that's even if there is also a pre-existing datetree at
> the correct, template-specified location but further down the file.

Are you sure that what you describe is newly introduced?
I'd expect this exact behavior since forever, judging from how
`org-datetree--find-create' is implemented.
-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: error during appt/agenda initialization

2024-02-09 Thread Ihor Radchenko
"Fraga, Eric"  writes:

> I upgraded (on a different system) org-mode from git and I now find that
> my emacs start-up hangs.  If I C-g out of it, I get the following
> backtrace:
>...
>   org-element-cache-map
>...
> If I comment out the (org-agenda-to-appt) line in my configuration,
> Emacs starts up just fine.
>
> Any suggestions?  Other systems, with the same configuration (but older
> versions of org mode), start up just fine, as I have just verified by
> starting emacs on the desktop I'm using to compose this email.

Try the latest main.

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



Re: [BUG] Flyspell triggers "Warning (org-element-cache): org-element--cache" [9.6.18 ( @ /home/mwillcock/.emacs.d/elpa/org-9.6.18/)]

2024-02-09 Thread Morgan Willcock
Ihor Radchenko  writes:

> Morgan Willcock  writes:
>
>> I've managed to trigger this a couple of times over the last few days,
>> both times the backtrace began by calling flyspell functions.  I'm not
>> sure how to re-create the problem, but I thought it best to report it
>> just in case anyone else is seeing the same thing.
>>
>>   ⛔ Warning (org-element-cache): org-element--cache: Org parser error in 
>> filename.org::354737. Resetting.
>>The error was: (error "Invalid search bound (wrong side of point)")
>> ...
>> Package: Org mode version 9.6.18 ( @ 
>> /home/mwillcock/.emacs.d/elpa/org-9.6.18/)
>
> Thanks for reporting!
> Would you be able to upgrade to the development version of Org mode and
> test if the warning disappear?

I would be willing to for diagnostic purposes (presumably I would just
make sure the development version is earlier in the load-path?) but it
would be tricky to know for sure whether it had made a difference unless
I can get a better handle on what triggers it.

Are there already changes in the development version which you think
would be relevant to this problem?

-- 
Morgan Willcock



Re: [BUG] Invalid capture datetree capture templates (newly introduced) [9.7-pre (release_9.6.18-1145-g10d286 @ /home/jds6696/.emacs.d/straight/build/org/)]

2024-02-09 Thread Tommy Kelly
Justin Silverman  writes:
js > Org no longer allows the third argument in (file+olp+datetree ...

And Ihor Radchenko  replied:
ir > Duplicate of https://list.orgmode.org/878r3xfm90.fsf@localhost/T/#t
ir > Canceled.

The initial problem has certainly been fixed in that the headline(s)
arguments to file+olp+datetree (f+o+d) are now optional as the doc
implies should be the case.
But I don't think the new behavior is fully correct either, and the
problem affects not just the situation where no headline arguments are
given.
It seems to be connected with how the location of the datetree is
chosen in general.

My expectation (going by prior behaviors as well as current
documentation) is that the location is fully specified by the capture
template. For example, suppose you have the following:

A) entry (file+olp+datetree "test-datetree.org")   ;;
i.e. filename only
B) entry (file+olp+datetree "test-datetree.org" "H1")   ;;
filename plus heading
C) entry (file+olp+datetree "test-datetree.org" "H1 "H2");;
filename plus heading and sub-heading

Then I'd expect A) to use a datetree rooted at the file top level; B)
to use one underneath heading "* H1"; and C) to use one underneath **
H2" (which itself is underneath "* H1").
And in each case I'd expect it to create a new datetree at the
specified location if one didn't already exist.

HOWEVER, it looks like that can break if there is already one or more
datetrees anywhere in the file AT A LEVEL BELOW THAT specified by the
template.
In that case, the position specified by the template is simply
ignored. Instead, the captured item is filed at first occurring
datetree of the above kind.
To be clear, that's even if there is also a pre-existing datetree at
the correct, template-specified location but further down the file.

I tested the situation with all three of the above types available as
capture types, and starting with an empty target file (other than the
two headings "* H1" and "** H2").
I first captured to type A) and I got what I expected: a datetree with
the "2004" root entry being at the file top level. That was positioned
(textually, not hierarchically) beneath the two "H" headings I'd
prepared the file with in the first place.
Then I captured to type C), and also got what I expected; a second
datetree, now with the root being "*** 2004", under "** H2".

But from that point on, all captures, of any of the three types all
went to the one created by that type C) capture -- i.e. to "*** 2004",
under "** H2". under "* H1".
I don't think that's expected/correct behavior.

As to my version of Org: I'm doing all this in my own git copy,
refreshed ("pull"ed?) last night, but I'm still very new to that
approach so this may not be what is usually looked for (and I'd
appreciate the correction if needed), but 'org-version' reports:
- Org mode version 9.7-pre (release_N/A-N/A-ee395b @
/home/tommyk/my/git/org-mode/lisp/)

And if it matters, here's emacs-version:
- GNU Emacs 28.2 (build 2, aarch64-unknown-linux-gnu, X toolkit, cairo
version 1.16.0, Xaw3d scroll bars) of 2023-05-13, modified by Debian

--



Re: Question regarding org-capture-bookmark and org-bookmark-names-plist

2024-02-09 Thread Ihor Radchenko
Tim Wichmann  writes:

> But, when obsoleting `org-capture-bookmark', this problem is solved
> anyhow: Bookmark creation can be fully controlled using the plist
> variable (and only there).
>
> So, I vote for obsoleting `org-capture-bookmark'.

Done.
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=aa3724dbd

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



Re: [BUG] Footnotes in section titles

2024-02-09 Thread Ihor Radchenko
Ihor Radchenko  writes:

> Subject: [PATCH] org-latex-headline: Prevent footnotes in TOC/footers

Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=0d77cf842
Fixed.

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



Re: [BUG] conda doesn't work in ob-shell sessions

2024-02-09 Thread Ihor Radchenko
Matt  writes:

>   On Fri, 26 Jan 2024 01:42:59 +0100  Jack Kamm  wrote --- 
>
>  > Second version of the patch works on my test example now. The initial
>  > block hangs for a few seconds but then finishes. Subsequent blocks seem
>  > to work without any noticeable hanging.
>
> I was able to confirm this as well.

Thanks for checking!
Applied, onto main.
I also added ORG-NEWS entry about the new custom variable.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=27d6f8305

Fixed.

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



Re: [BUG] Face of Org block ending line (org-block-end-line) propagates to next line. [9.6.6 (release_9.6.6 @ /usr/share/emacs/29.1/lisp/org/)]

2024-02-09 Thread Ihor Radchenko
Kostas Papadakis  writes:

> Summary: The face org-block-end-line is propagating to the next line
> causing graphic anomalies when it's customized with anything like
> background, underline, overline etc.
>
> How to reproduce:
> Start a new Emacs instance with the command "emacs -Q".
> Issue find-file and create a new org file buffer and insert
> just the following two lines of text (i.e. an empty source block):
> #+begin_src
> #+end_src
>
> Place the cursor at the end of the 2nd line (which should also be the
> last character in the buffer), i.e like here:

Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2ade16bbc
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=793cdbea6

Also, see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59141

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



error during appt/agenda initialization

2024-02-09 Thread Fraga, Eric
Hello all,

I upgraded (on a different system) org-mode from git and I now find that
my emacs start-up hangs.  If I C-g out of it, I get the following
backtrace:

--8<---cut here---start->8---
Debugger entered--Lisp error: (quit)
  #f(compiled-function (node) "Get `:begin' property of NODE." #)((keyword (:standard-properties [272 272 nil nil 342 0 nil 
nil element t nil nil nil nil # nil nil (section 
(:standard-properties [104 104 104 2935 2935 0 nil section element t nil 104 
2935 nil # nil nil (headline ...)]))] :key "OPTIONS" :value 
"H:2 num:t toc:nil \\n:nil @:t ::t |:t ^:t -:t f:t *...")))
  org-element--cache-find(76 nil)
  org-element--parse-to(76)
  org-element-cache-map(#f(compiled-function (el) #) :next-re "\\]+[0-9]\\{1,2\\}:[0-9]\\{2\\}[0-9+:..." :fail-re "\\]+[0-9]\\{1,2\\}:[0-9]\\{2\\}[0-9+:..." :narrow t)
  org-agenda-get-deadlines(t)
  org-agenda-get-day-entries("/home/ucecesf/s/notes/diary.org" (2 9 2024) 
:deadline* :scheduled* :timestamp)
  apply(org-agenda-get-day-entries "/home/ucecesf/s/notes/diary.org" (2 9 2024) 
(:deadline* :scheduled* :timestamp))
  org-agenda-to-appt()
  load-with-code-conversion("/home/ucecesf/s/emacs/esf-org.el" 
"/home/ucecesf/s/emacs/esf-org.el" nil nil)
  load("esf-org")
--8<---cut here---end--->8---

If I comment out the (org-agenda-to-appt) line in my configuration,
Emacs starts up just fine.

Any suggestions?  Other systems, with the same configuration (but older
versions of org mode), start up just fine, as I have just verified by
starting emacs on the desktop I'm using to compose this email.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.13-1003-g872c1b in Emacs 30.0.50


[PATCH] ox-latex: Make more variables file local safe

2024-02-09 Thread gerard . vermeulen

Hi,

I have a direct use for org-latex-toc-command being a file local
safe variable and I looked a bit around for other variables not
being file local safe for no good reason IMO (why those not,
while similar variables yes).

I have attached a patch which makes six variables file local safe.

Regards -- Gerard


0001-ox-latex-Make-more-variables-file-local-safe.patch
Description: Binary data


Re: [PATCH] testing: Delete duplicate tests

2024-02-09 Thread Ihor Radchenko
Ilya Chernyshov  writes:

> Yeah, now it works as it should. Thanks. I've made some minor changes
> I've described in the attached patch.

Thanks!
I squashed all the patches modifying the new test library into a single
commit and changed the duplicate in test-org/file-contents to achieve
its intended goal as stated in the commentary.
Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=8d2fcfea9
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=e3f327d1e
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=8e2ed45bb

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



Re: [PATCH v2] org-id: allow using parent's existing id in links to headlines

2024-02-09 Thread Ihor Radchenko
"Rick Lupton"  writes:

> On Fri, 9 Feb 2024, at 12:09 PM, Ihor Radchenko wrote:
>> May you please update on your FSF copyright assignment status?
>
> I believe the agreement is all signed and completed. 

Bastien, may your please check FSF records?

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



Re: Link type for pdf-tools annotations

2024-02-09 Thread Juan Manuel Macías
Irfan S writes:

> FYI, there is also
> [[https://github.com/fuxialexander/org-pdftools][org-pdftools]] which
> provides similar (and additional) functionality, and is on MELPA.
> Thanks for sharing your code.

Thank you very much, I didn't know that.

Best regards,

Juan Manuel 

-- 
Juan Manuel Macías -- Composición tipográfica, tratamiento de datos, diseño 
editorial y ortotipografía




Re: [PATCH v2] org-id: allow using parent's existing id in links to headlines

2024-02-09 Thread Rick Lupton
On Fri, 9 Feb 2024, at 12:09 PM, Ihor Radchenko wrote:
> May you please update on your FSF copyright assignment status?

I believe the agreement is all signed and completed. 

Thanks
Rick



Re: [PATCH] testing: Delete duplicate tests

2024-02-09 Thread Ilya Chernyshov
Ihor Radchenko  writes:

> Note that your
> `test-org-tests/test-duplicates-detector-testing-find-duplicates' does
> not look right. I had to adjust the `equal' condition in order to make
> it pass. May you please check if the return value of
> `test-duplicates-detector--find-duplicates' is what you intended?

Yeah, now it works as it should. Thanks. I've made some minor changes
I've described in the attached patch.

>From 8bcd02bac32d3a4442814c2a42b097d642964372 Mon Sep 17 00:00:00 2001
From: Ilya Chernyshov 
Date: Fri, 9 Feb 2024 17:32:58 +0600
Subject: [PATCH] test-duplicates-detector.el: Simplify the docs, refactor,
 optimize the search

*
test-duplicates-detector.el (test-duplicates-detector-duplicate-forms):
Simplify the docstring.  Add that the list also may have information
about duplicate ert test definitions.

*
test-duplicates-detector.el (test-duplicates-detector--find-duplicates):
Don't go through a duplicate ert test definition.

*
test-duplicates-detector.el (test-duplicates-detector--search-forms-recursively):
Replace (car-safe sub-form) with (car sub-form) because we already
checked that sub-form is a cons.
---
 testing/lisp/test-duplicates-detector.el | 51 ++--
 1 file changed, 22 insertions(+), 29 deletions(-)

diff --git a/testing/lisp/test-duplicates-detector.el b/testing/lisp/test-duplicates-detector.el
index 25293f185..58da27c07 100644
--- a/testing/lisp/test-duplicates-detector.el
+++ b/testing/lisp/test-duplicates-detector.el
@@ -61,24 +61,19 @@ Immediate children inside these are not checked for duplicates.")
 (expand-file-name "lisp" org-test-dir) t "\\.el$")))
 
 (defvar test-duplicates-detector-duplicate-forms nil
-  "A nested list of the form:
+  "A list where each element is either:
 
-  (((file test-name [(form-1 . numerical-order)
- (form-2 . numerical-order) ...])
-(dup-form-1 . (numerical-order [numerical-order ...]))
-  [ (dup-form-2 . (numerical-order [numerical-order ...]))
-(dup-form-3 . (numerical-order [numerical-order ...]))
- ...])
-   
-   ((file test-name [(form-1 . numerical-order)
- (form-2 . numerical-order) ...])
+  ((file test-name [(form-1 . numerical-order)
+(form-2 . numerical-order) ...])
 (dup-form-1 . (numerical-order [numerical-order ...]))
   [ (dup-form-2 . (numerical-order [numerical-order ...]))
 (dup-form-3 . (numerical-order [numerical-order ...]))
  ...])
 
-   ...
-  )
+or
+
+  (test-1-symbol . duplicate-of-test-1-symbol)
+
 
 Where
 
@@ -88,31 +83,29 @@ Where
 is a path to duplicates.  For example, the path for the
 duplicates in the following test:
 
- test-ob-haskell-ghci.el
+ test-file.el
 
-  (ertdeftest ob-haskell/session-named-none-means-one-shot-sessions ()
-\"When no session, use a new session.
-  \"none\" is a special name that means `no session'.\"
+  (ertdeftest test-name ()
+\"Docstring.\"
 (let ((var-1 \"value\"))
  (when var-1
(should-not
-(equal 2 (test-ob-haskell-ghci \":session \"none\"\" \"x\" nil)))
-   (test-ob-haskell-ghci \":session none\" \"x=2\")
+(equal 2 (some-func \"string\" \"x\" nil)))
+   (some-func \"string\" \"x=2\")
(should-not
-(equal 2 (test-ob-haskell-ghci \":session \"none\"\" \"x\" nil)))
-   (test-ob-haskell-ghci \":session none\" \"x=2\"
+(equal 2 (some-func \"string\" \"x\" nil)))
+   (some-func \"string\" \"x=2\"
 
 would look like this:
 
-  (\"test-ob-haskell-ghci.el\"
-ob-haskell/session-named-none-means-one-shot-sessions
+  (\"/absolute/path/to/test-file.el\"
+test-name
 (let . 4) (when . 2))
 
 And the records about the duplicates would look like this:
 
-  ((test-ob-haskell-ghci \":session none\" \"x=2\") 5 3)
   ((should-not
-(equal 2 (test-ob-haskell-ghci \":session \"none\"\" \"x\" nil))) 4 2)")
+(equal 2 (some-func \"string\" \"x\" nil))) 4 2)")
 
 (defvar test-duplicates-detector-forms nil
   "Nested alist of found forms and paths to them (not filtered).")
@@ -168,9 +161,9 @@ Duplicate forms will be written to
   (cdddr x
 			 found-deftests)))
 (push (cons test-name (cadr f)) duplicate-tests)
-		  (push deftest found-deftests))
-		(test-duplicates-detector--search-forms-recursively
-		 deftest (list file (cadr deftest)
+		  (push deftest found-deftests)
+  (test-duplicates-detector--search-forms-recursively
+		   deftest (list file test-name)
 (setq test-duplicates-detector-duplicate-forms
   (seq-filter
 	   #'cdr
@@ -239,11 +232,11 @@ Write each form to `test-duplicates-detector-forms'"
  (alist-get form-path test-duplicates-detector-forms
 nil nil #'equal)
  nil nil #'equal-including-properties)))
-(unless (memq (car-safe sub-form)
+ 

Re: [PATCH v2] org-id: allow using parent's existing id in links to headlines

2024-02-09 Thread Ihor Radchenko
"Rick Lupton"  writes:

> On Thu, 8 Feb 2024, at 1:02 PM, Ihor Radchenko wrote:
>> I have some thoughts about rewording your changes to the manual and
>> ORG-NEWS. See the attached patch on top of yours.
>
> Thanks, makes sense -- wasn't sure whether to keep this as a separate patch 
> or not, I have squashed into the attached updated version.

Right. That was intended for squash. I sent it as a separate patch to
make it easier what exactly I proposed to change.

>> It would make sense to use #+caption as default description when available.
>
> Maybe... But I had a little look and it seems complicated, since caption is a 
> parsed property, it's not clear to me how to get a plain string in a simple 
> way. And there could be a long and a short caption, over multiple lines. If 
> the caption is long, it wouldn't make a good link description anyway.
>
> The current behaviour is the same as it was before, so maybe we can leave 
> this as a future enhancement if wanted?

No problem.

I have no further comments on this version of the patch. It is ready for
merging.

May you please update on your FSF copyright assignment status?

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



Re: [BUG] Flyspell triggers "Warning (org-element-cache): org-element--cache" [9.6.18 ( @ /home/mwillcock/.emacs.d/elpa/org-9.6.18/)]

2024-02-09 Thread Ihor Radchenko
Morgan Willcock  writes:

> I've managed to trigger this a couple of times over the last few days,
> both times the backtrace began by calling flyspell functions.  I'm not
> sure how to re-create the problem, but I thought it best to report it
> just in case anyone else is seeing the same thing.
>
>   ⛔ Warning (org-element-cache): org-element--cache: Org parser error in 
> filename.org::354737. Resetting.
>The error was: (error "Invalid search bound (wrong side of point)")
> ...
> Package: Org mode version 9.6.18 ( @ 
> /home/mwillcock/.emacs.d/elpa/org-9.6.18/)

Thanks for reporting!
Would you be able to upgrade to the development version of Org mode and
test if the warning disappear?

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



[BUG] org-contrib/org-static-mathjax is not operational [9.7-pre (release_9.6.18-1153-gee395b.dirty @ /home/yantar92/.emacs.d/straight/build/org/)]

2024-02-09 Thread Ihor Radchenko
Hello,

It looks like org-static-mathjax.el from org-contrib is not operational
for many years. When I look at byte-compiler warnings, I see a number of
references to variables that are long gone:

Compiling file /home/yantar92/Git/org-contrib/lisp/org-static-mathjax.el at Fri 
Feb  9 12:26:04 2024

In org-static-mathjax-hook-installer:
org-static-mathjax.el:100:50: Warning: reference to free variable ‘opt-plist’
org-static-mathjax.el:107:40: Warning: reference to free variable
‘org-export-html-mathjax-options’

In org-static-mathjax-process:
org-static-mathjax.el:190:15: Warning: reference to free variable
‘org-export-inbuffer-options-extra’

Even attempting to load the library will err:
Debugger entered--Lisp error: (void-variable org-export-inbuffer-options-extra)

Since we observe no bug reports about org-static-mathjax, it does not
look like anyone at all is using it.

Should we obsolete the library?

Emacs  : GNU Emacs 30.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, 
cairo version 1.18.0)
 of 2024-02-04
Package: Org mode version 9.7-pre (release_9.6.18-1153-gee395b.dirty @ 
/home/yantar92/.emacs.d/straight/build/org/)
-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[BUG] Flyspell triggers "Warning (org-element-cache): org-element--cache" [9.6.18 ( @ /home/mwillcock/.emacs.d/elpa/org-9.6.18/)]

2024-02-09 Thread Morgan Willcock
I've managed to trigger this a couple of times over the last few days,
both times the backtrace began by calling flyspell functions.  I'm not
sure how to re-create the problem, but I thought it best to report it
just in case anyone else is seeing the same thing.

  ⛔ Warning (org-element-cache): org-element--cache: Org parser error in 
filename.org::354737. Resetting.
   The error was: (error "Invalid search bound (wrong side of point)")
   Backtrace:
  "  backtrace-to-string(nil)
org-element-at-point()
org-back-to-heading(t)
org-back-to-heading-or-point-min(t)
org-get-property-block()
org--property-local-values(\"LOG_INTO_DRAWER\" t)
org-entry-get-with-inheritance(\"LOG_INTO_DRAWER\" t)
org-entry-get(nil \"LOG_INTO_DRAWER\" inherit t)
org-log-into-drawer()
org-mode-flyspell-verify()
flyspell-word()
flyspell-post-command-hook()
  "
   Please report this to Org mode mailing list (M-x org-submit-bug-report).

Emacs  : GNU Emacs 29.2 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 
1.16.0, Xaw3d scroll bars)
 of 2024-01-18
Package: Org mode version 9.6.18 ( @ /home/mwillcock/.emacs.d/elpa/org-9.6.18/)