Re: strange error exporting to ascii

2023-12-21 Thread William Denton
On Thursday, December 21st, 2023 at 10:44, Fraga, Eric  
wrote:

> So, long story short, I try to export the original document to ascii and
> I get an error related to citations. Having seen some updates to
> exporting citations on the list over the past few weeks, I figured I
> should upgrade org to the latest version. Now exporting to LaTeX still
> works just fine but exporting to ascii still does not work (with the
> same error: see backtrace-ascii.txt attached) and exporting to ODT now
> no longer works (see backtrace-odt.txt).

I've been doing a lot of exporting to various formats lately, testing out basic 
and CSL citations, and ran into a few bugs but not what you're showing.  And 
nothing about ODT was touched, IIRC. Could you try narrowing down to citations 
only, and commenting out one by one until it works?  


Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada




strange error exporting to ascii

2023-12-21 Thread Fraga, Eric
Hello,

I am working on a paper which includes citations.  Exporting to LaTeX
and to ODT worked just fine.  For my sins, I now have to incorporate
changes made to the ODT version back into the org and I thought the best
way was to compare text versions (I did try using pandoc on the ODT
version to get an org version but too many differences).

So, long story short, I try to export the original document to ascii and
I get an error related to citations.  Having seen some updates to
exporting citations on the list over the past few weeks, I figured I
should upgrade org to the latest version.  Now exporting to LaTeX still
works just fine but exporting to ascii still does not work (with the
same error: see backtrace-ascii.txt attached) *and* exporting to ODT now
no longer works (see backtrace-odt.txt).

Any suggestions?  I have not tried emacs -Q because that is non-trivial
due to my configuration but will do so if nothing obvious jumps out to
anybody.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.8-771-gdf0539 in Emacs 30.0.50
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  file-name-extension(nil)
  (equal (file-name-extension file) "bib")
  (if (equal (file-name-extension file) "bib") (file-name-sans-extension file) 
file)
  (setq file (if (equal (file-name-extension file) "bib") 
(file-name-sans-extension file) file))
  (let ((arguments (org-bibtex-get-arguments keyword)) (file 
(org-bibtex-get-file keyword)) temp-file out-file) (setq file (if (equal 
(file-name-extension file) "bib") (file-name-sans-extension file) file)) (setq 
out-file (file-name-sans-extension (file-name-nondirectory file))) (if 
(plist-get arguments :limit) (progn (let ((citations (org-element-map tree '... 
#'...))) (let ((temp-file (setq temp-file ...)) (temp-buffer 
(generate-new-buffer " *temp file*" t))) (unwind-protect (prog1 
(save-current-buffer ... ...) (save-current-buffer ... ...)) (and (buffer-name 
temp-buffer) (kill-buffer temp-buffer (setq arguments (plist-put arguments 
:options (append (plist-get arguments :options) (list "-citefile" 
temp-file))) (if (eq 0 (apply 'call-process (append '("bibtex2html" nil nil 
nil) '("-a" "-nodoc" "-noheader" "-nofooter") (let ((style ...)) (and style 
(list "--style" style))) (plist-get arguments :options) (list (concat file 
".bib") nil (error "Executing bibtex2html failed")) (and temp-file 
(delete-file temp-file)) (let ((temp-buffer (generate-new-buffer " *temp*" t))) 
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn 
(insert-file-contents (concat out-file ".html")) (goto-char (point-min)) (while 
(re-search-forward "a name=\"\\([-_a-zA-Z0-9:]+\\)\">\\([^<]+\\)" nil t) (setq 
org-bibtex-html-entries-alist (cons ... org-bibtex-html-entries-alist (and 
(buffer-name temp-buffer) (kill-buffer temp-buffer) (let ((temp-buffer 
(generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer 
temp-buffer) (unwind-protect (progn (cond ((org-export-derived-backend-p 
backend ...) (insert ...) (insert-file-contents ...) (goto-char ...) (insert 
"\n")) ((org-export-derived-backend-p backend ...) (if ... nil ...) 
(insert ...) (insert-file-contents ...) (goto-char ...) (while ... ...) 
(goto-char ...) (while ... ...) (goto-char ...) (while ... ...))) (setq 
org-bibtex-html-keywords-alist (cons (cons keyword ...) 
org-bibtex-html-keywords-alist))) (and (buffer-name temp-buffer) (kill-buffer 
temp-buffer))
  (progn (let ((arguments (org-bibtex-get-arguments keyword)) (file 
(org-bibtex-get-file keyword)) temp-file out-file) (setq file (if (equal 
(file-name-extension file) "bib") (file-name-sans-extension file) file)) (setq 
out-file (file-name-sans-extension (file-name-nondirectory file))) (if 
(plist-get arguments :limit) (progn (let ((citations (org-element-map tree ... 
...))) (let ((temp-file ...) (temp-buffer ...)) (unwind-protect (prog1 ... ...) 
(and ... ...))) (setq arguments (plist-put arguments :options (append ... 
...)) (if (eq 0 (apply 'call-process (append '("bibtex2html" nil nil nil) 
'("-a" "-nodoc" "-noheader" "-nofooter") (let (...) (and style ...)) (plist-get 
arguments :options) (list (concat file ".bib") nil (error "Executing 
bibtex2html failed")) (and temp-file (delete-file temp-file)) (let 
((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer 
(set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents (concat 
out-file ".html")) (goto-char (point-min)) (while (re-search-forward "a 
name=\"\\([-_a-zA-Z0-9:]+\\)\">\\([^<]+\\)" nil t) (setq 
org-bibtex-html-entries-alist ...))) (and (buffer-name temp-buffer) 
(kill-buffer temp-buffer) (let ((temp-buffer (generate-new-buffer " *temp*" 
t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (cond 
(... ... ... ... ...) (... ... ... ... ... ... ... ... ... ...)) (setq 
org-bibtex-html-keywords-alist (cons ... org-bibtex-html-keywords-alist))) (and 
(buffer-name temp-buffer) (kill-buffer 

Re: [BUG] orgmode.org is not up-to-date with the latest orgweb master

2023-12-21 Thread Bastien Guerry
Ihor Radchenko  writes:

> I have recently merged Chinese translation for orgmode.org:
> https://git.sr.ht/~bzg/orgweb/commit/73e825a91bb6dd432d88b1b960e42c1f6a4a6f12
>
> However, https://orgmode.org/ does not reflect the changes.
>
> Bastien, may you please check the publish scripts?

I've launched it, the translation is online now.

-- 
 Bastien Guerry



[BUG] orgmode.org is not up-to-date with the latest orgweb master

2023-12-21 Thread Ihor Radchenko
Hi,

I have recently merged Chinese translation for orgmode.org:
https://git.sr.ht/~bzg/orgweb/commit/73e825a91bb6dd432d88b1b960e42c1f6a4a6f12

However, https://orgmode.org/ does not reflect the changes.

Bastien, may you please check the publish scripts?

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



Re: org-ditaa woes

2023-12-21 Thread Ihor Radchenko
Leo Butler  writes:

>> Writing a patch is also welcome.
>
> Here is a patch to the documentation. It documents currently
> undocumented *features* of ob-ditaa.
>
> I have *removed* mention of work-arounds to execute scripts. I have also
> taken the liberty of re-writing the two source blocks to use org src
> blocks.

Thanks!
Applied, onto master.
https://git.sr.ht/~bzg/worg/commit/3e1c006b

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



Re: Links & images with different attributes in the same paragraph

2023-12-21 Thread Ihor Radchenko
Max Nikulin  writes:

>> No, not zero-width space. Literally, {{...}}. The idea is to define
>> delimiters as "[{]+" the matching number of "}". This way, we do not
>> need to worry about escaping "}" inside and can get nested markup for
>> free. It is more or less how Org parser works for special block:
>> the opening delimiter is #+begin_whatever is matched against
>> #+end_.
>
> I am afraid, there is an issue if wrapped content is surrounded by 
> braces. An ambiguity arises for
>
>  @wrap{{{content}}}
>
> it may be @wrap{{{ content }}}, @wrap{{ {content} }},
> or @wrap{ {{content}} }. It seems, some escape character is unavoidable.

For such tricky cases, yes. Either escape character or another suggested
approach with "empty" joiner entity like \--

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



Re: track birthdays without having them constantly being in the agenda view

2023-12-21 Thread Luca Ferrari
> 1. Turn it into TODO and mark DONE once handled (when deadline has a
>repeater, marking birthday DONE will re-schedule it and flip the todo
>keyword back to TODO)
>

Good to know!

> 2. Just use timestamp like <2022-12-14 mer +1y> without DEADLINE. This
>will make the birthday appear on the day of birthday in your agenda.

This is surely the approach I'd like to go.

Thanks,
Luca



Re: [PATCH] Justify/align image previews in org-mode

2023-12-21 Thread Ihor Radchenko
Karthik Chikmagalur  writes:

> Patch v2 attached.
>
> Karthik
> From 7176f43282749c06daf2756360633cc47d79b63c Mon Sep 17 00:00:00 2001
> From: Karthik Chikmagalur 
> Date: Mon, 18 Dec 2023 12:56:33 -0800
> Subject: [PATCH] org: Add image alignment

Thanks!
Applied, onto main, after resolving merge conflicts and changing the
linter trust level to 'high.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=6011e7a48

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



Re: [BUG] cannot export org-file: Warning (org-element-cache): org-element--cache: Got empty parent while parsing [9.6.12 (N/A @ /gnu/store/h6351wyaf8gahx46y71vd1200wr5l9gv-emacs-org-9.6.12/share/emac

2023-12-21 Thread Ihor Radchenko
"Dr. Arne Babenhauserheide"  writes:

>> I am confused. Does it mean that you can reproduce the error manually,
>> not from Makefile?
>
> I can abort the publishing process in the Emacs started from the
> Makefile (graphical Emacs, not in batch mode) and then export again from
> the org-file, and then I see this error.

What if you find the temporary Org buffer where the error is thrown,
copy it to a new Org buffer in emacs -Q, and try M-: (org-collect-keywords 
'("BIND")) ?

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



Re: track birthdays without having them constantly being in the agenda view

2023-12-21 Thread Ihor Radchenko
Luca Ferrari  writes:

> I would like to switch to org-agenda to track birthdays, but if I
> place a deadline with a +1y specifier, like:
> DEADLINE: <2022-12-14 mer +1y>
> the birthday pops in the agenda view even after it has passed. I'm
> sure there is a simple trick to make it disappear once it has expired,
> but I cannot figure how to do it.
> Any suggestion?

DEADLINE is designed for tasks. Until DONE, entries with DEADLINE appear
in agenda as overdue. Is it what you generally want to see for tasks.

You can

1. Turn it into TODO and mark DONE once handled (when deadline has a
   repeater, marking birthday DONE will re-schedule it and flip the todo
   keyword back to TODO)

2. Just use timestamp like <2022-12-14 mer +1y> without DEADLINE. This
   will make the birthday appear on the day of birthday in your agenda.

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



track birthdays without having them constantly being in the agenda view

2023-12-21 Thread Luca Ferrari
Hi all,
I would like to switch to org-agenda to track birthdays, but if I
place a deadline with a +1y specifier, like:
DEADLINE: <2022-12-14 mer +1y>
the birthday pops in the agenda view even after it has passed. I'm
sure there is a simple trick to make it disappear once it has expired,
but I cannot figure how to do it.
Any suggestion?

Thanks,
Luca