Re: [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

2022-11-01 Thread Ihor Radchenko
Max Nikulin  writes:

>> - (org-export-file-uri raw-path))
>> + (pcase (org-export-file-uri raw-path)
>> +   (`(and (pred #'file-name-absolute-p) ,path)
>> +path)
>
> I am in doubts if this branch may be executed at all. For absolute file 
> names `org-export-file-uri' adds "file:" prefix so I expect that 
> `file-name-absolute-p' is always false.

You are indeed right.
See the attached new version of the patch.

> This time I am not lucky enough to accidentally face a case with invalid 
> link URI. However I do not think that for the link
>
>   [[file:file-b.org]]
>
> "../file-b.org" is appropriate default description. I do not expect 
> "../" here.

I also noticed this, but I feel that it is reasonable. In odt,
"file-b.org" implies a resource inside the odt archive. "../file-b.org"
will highlight that it is an external file.

I'd prefer to leave the "../file" description for now and only do
something when/if we hear from the ox-odt users.

>From c72d90244eb1a0fafb42a8c7841be82ad882efc5 Mon Sep 17 00:00:00 2001
Message-Id: 
From: Ihor Radchenko 
Date: Mon, 31 Oct 2022 14:11:19 +0800
Subject: [PATCH v3] org-odt-link: Fix relative file links

* lisp/ox-odt.el (org-odt-link): Append an extra "../" to relative
links.  This is needed to conform with OpenOffice convention to treat
base path inside the odt archive.  The path containing the odt file is
thus "../".

Reported-by: Ihor Radchenko 
Link: https://orgmode.org/list/87ilkc30wd.fsf@localhost
---
 lisp/ox-odt.el | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 15a9cf2de..11b834d5d 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -2688,7 +2688,14 @@ (defun org-odt-link (link desc info)
 		((member type '("http" "https" "ftp" "mailto"))
 		 (concat type ":" raw-path))
 		((string= type "file")
-		 (org-export-file-uri raw-path))
+ (let ((path-uri (org-export-file-uri raw-path)))
+   (if (string-prefix-p "file://" path-uri)
+   path
+ ;; Otherwise, it is a relative path.
+ ;; OpenOffice treats base directory inside the odt
+ ;; archive.  The directory containing the odt file
+ ;; is "../".
+ (concat "../" path
 		(t raw-path)))
 	 ;; Convert & to  for correct XML representation
 	 (path (replace-regexp-in-string "&" "" path)))
-- 
2.35.1



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


Re: [O] Maxima code blocks does not work in windows revisited

2022-11-01 Thread Ihor Radchenko
Mati  writes:

> On 01.11.2022 09:04, Ihor Radchenko wrote:
>
>> Do you mean that you changed the code at line 82 inside
>> org-babel-execute:maxima to
>>
>>   (let* ((cmdline (or (cdr (assoc :cmdline params)) ""))
>>(in-file (org-babel-temp-file "maxima-" ".max"))
>>  (cmd (format "%s --very-quiet -r \"batchload(\\\"%s\\\")$\" %s"
>>   org-babel-maxima-command in-file cmdline)))
>>
>> ??
>>
>> (for reference, this email is a followup of
>> https://orgmode.org/list/ca+ikm3wqa33xp4c3pvv+f2a-gn0dbezsdx6vf2crd+37+u6...@mail.gmail.com)
>
> yes, of course only part of it

Ok. Does the attached patch work for you?

> I am testing maxima-mode now (not in org) and it works, but is broken on 
> windows. Looks like there are many more problems with syntax.

Org support for Maxima does not require maxima-mode to be installed,
except for optional fontification.

Note that we can only help with within Org scope. We cannot freely modify
Maxima code.

It will be more productive if you contact Maxima developers on the
issue. They do have a mailing list:
https://maxima.sourceforge.io/maximalist.html#discussion

>From 4c1faea44cbe97e53ffb4f78829b86e0da606417 Mon Sep 17 00:00:00 2001
Message-Id: <4c1faea44cbe97e53ffb4f78829b86e0da606417.1667364311.git.yanta...@posteo.net>
From: Ihor Radchenko 
Date: Wed, 2 Nov 2022 12:43:35 +0800
Subject: [PATCH] ob-maxima: Add extra quotes to Maxima cmd for Windows
 compatibility

* lisp/ob-maxima.el (org-babel-execute:maxima): Add extra quoting
apparently needed to make cmd line work on Windows.

Reported-by: Juan Alvaro Fuentes 
Link: https://orgmode.org/list/ca+ikm3wqa33xp4c3pvv+f2a-gn0dbezsdx6vf2crd+37+u6...@mail.gmail.com
---
 lisp/ob-maxima.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-maxima.el b/lisp/ob-maxima.el
index dba12d7b6..52423db18 100644
--- a/lisp/ob-maxima.el
+++ b/lisp/ob-maxima.el
@@ -84,7 +84,7 @@ (defun org-babel-execute:maxima (body params)
 		(cmd (format "%s --very-quiet -r %s$ %s"
 			 org-babel-maxima-command
  (shell-quote-argument
-  (format "batchload(%S)" in-file))
+  (format "\"batchload(\\\"%S\\\")\"" in-file))
  cmdline)))
 	   (with-temp-file in-file (insert (org-babel-maxima-expand body params)))
 	   (message cmd)
-- 
2.35.1


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


Re: Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)]

2022-11-01 Thread Ihor Radchenko
Tim Cross  writes:

>>> What probably needs clarifying is
>>>
>>> 1. mention the string option in the manual
>>
>> It is documented in the manual: 13.9.4 HTML preamble and postamble
>>
>
> You snipped out the relevant paragraph I copied from the manual. If you
> look at it, you will see that it does not mention string as an option
> for org-html-postamble.

I see. I tried to clarify similarities and differences between pre- and
postamble in the manual. See the attached.

> Furthermore, the previous paragraph, which talks
> about org-html-preamble, which does mention string, states that if the
> string matches the name of a function, it will be called 9and expected
> to return a string).

That's wrong on the manual part.  `org-html-preamble' can be set to a
function.  When it is set to string, the string is only treated as a
format string.  No function names.  See the attached patches.

> This is not mentioned at all in the doc string for
> org-html-postamble.

Fixed in the attached.

> Therefore, I still think there is inconsistency between what the doc
> string of the variable states and what the manual states. There is no
> mention of function matching against strings in the cod string of the
> variable. There is no mention of string as an option in the paragraph
> referring to org-html-postamble in the manual. 

I hope I clarified the actual situation in the attached patches. Also, I
fixed the actual code allowing org-html-preamble to be set to 'auto (the
same code is used to format preamble and postamble). It does not make
sense.

>>> 2. If spaces are not allowed in the string, clearly document
>>> that. Currently, the doc string just says that if set to a string, use
>>> that string as the postamble, which I think implies spaces are OK. 
>>
>> They are allowed. It is just #+OPTIONS keyword that does not allow
>> strings as values. I have no idea why.
>
> This is all an aside to the actual bug, so please don't miss that
> (unless it has been fixed) i.e. a org-html-postamble string with a space
> in it does not work.

I am confused here.

The original bug talked specifically about situation like
#+options: html-postamble:"test with spaces"

Are you saying that you cannot have spaces in org-html-postamble
variable? If yes, could you please provide a reproducer?

>From fecd0a1af6eba4099e31295fc3e00b003f538d45 Mon Sep 17 00:00:00 2001
Message-Id: 
From: Ihor Radchenko 
Date: Wed, 2 Nov 2022 12:21:01 +0800
Subject: [PATCH 1/3] ox-html: Do not allow `org-html-preamble' to be 'auto

* lisp/ox-html.el (org-html--build-pre/postamble): Avoid building
date/author/email info line when `org-html-preamble' is set to
'auto.  This is only meaningful in `org-html-postamble'.
---
 lisp/ox-html.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index cad06aebf..36fcd536c 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1993,7 +1993,7 @@ (defun org-html--build-pre/postamble (type info)
 	 (if (functionp section) (funcall section info)
 	   (cond
 		((stringp section) (format-spec section spec))
-		((eq section 'auto)
+		((and (eq section 'auto) (eq type 'postamble))
 		 (let ((date (cdr (assq ?d spec)))
 		   (author (cdr (assq ?a spec)))
 		   (email (cdr (assq ?e spec)))
-- 
2.35.1

>From 93cff0b3849c97300d979d3f95fcc5eb2a6b917c Mon Sep 17 00:00:00 2001
Message-Id: <93cff0b3849c97300d979d3f95fcc5eb2a6b917c.1667363392.git.yanta...@posteo.net>
In-Reply-To: 
References: 
From: Ihor Radchenko 
Date: Wed, 2 Nov 2022 12:22:36 +0800
Subject: [PATCH 2/3] org-manual: Clarify similarities and differences between
 HTML pre/postamble

* doc/org-manual.org (HTML preamble and postamble): Clarify that
`org-html-postamble' can take the same values with
`org-html-preamble'.  Highlight, that `org-html-postamble' can also be
set to `auto'.

Reported-by: Tim Cross 
Link: https://orgmode.org/list/86wn8gbvk0@gmail.com
---
 doc/org-manual.org | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index dc2fc57cd..f07466dff 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13027,17 +13027,17 @@ *** HTML preamble and postamble
 ~org-html-preamble-format~ for the format string.
 
 Set ~org-html-preamble~ to a string to override the default format
-string.  If the string is a function, the HTML exporter expects the
-function to return a string upon execution.  The HTML exporter inserts
-this string in the preamble.  The HTML exporter does not insert
-a preamble if ~org-html-preamble~ is set ~nil~.
-
-The default value for ~org-html-postamble~ is ~auto~, which makes the
-HTML exporter build a postamble from looking up author's name, email
-address, creator's name, and date.  Set ~org-html-postamble~ to ~t~ to
-insert the postamble in the format specified in the
-~org-html-postamble-format~ variable.  The HTML exporter does not
-insert a postamble if ~org-html-postamble~ is set to 

Re: bug#58774: 29.0.50; [WISH]: Let us make EWW browse WWW Org files correctly

2022-11-01 Thread Ihor Radchenko
"Dr. Arne Babenhauserheide"  writes:

> … and to the topic: this may be something that could be re-used in
> eww.

Yup. Or Emacs could even provide a unified interface to ask security
questions.

> Though I would prefer having a less-intrusive notification than a y-n
> question; maybe just a message in the echo area that with a specific
> command this uri could be marked as safe and then get interpreted as org
> right away.

We have modelled the dialogue after what Emacs does for file-local
variables. This kind of security questions should be very clearly
visible and, ideally, unified to make sure that users can easily
distinguish important queries.

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



[PATCH] Ignore flaky ob-python tests

2022-11-01 Thread Christian Köstlin
The new async feature of python seems to be implemented in a way
that can break with high CPU load. This patch still runs the 3 tests in
question, but does not fail the complete testsuite if any of those fail.

Kind regards,
Christian


0001-testing-lisp-test-ob-python.el-Ignore-flaky-tests.patch
Description: Binary data


Re: Can someone give an init.el wherein can start customize it?

2022-11-01 Thread Quiliro Ordóñez
El 2022-11-01 15:13, Renato Pontefice escribió:
> Ok,, I can start from clean init.el, but I saw that emacs works also
> without init.el.
> Do I have to create an emptying.el that I improve step by step?

As suggested, start with ~/.emacs .  I suggest to read the Emacs manual:
 C-h r .  I know it is very long and sometimes the words are not what is
usually.  But if some word is not clear, search the glossary.

Also, experiment more before asking.  You can develop more knowledge by
your own experimenting than by being spoonfed.  Document what happens
and re-read your writtings.

Emacs is a program which is not plug-and-play.  You must build your own
configuration to your taste, or else it will be like wearing someone
else's clothing (as I said befor).  So, it might be harder to learn
Emacs than other editors.  It will be something that requires reading a
lot.  But try speed reading the first time.  Then go through it with
more attention the next times.  Think of it as a constructive operation
of your tool.

I hope this helps you with your journey!



Re: [O] Maxima code blocks does not work in windows revisited

2022-11-01 Thread Mati

I am testing maxima-mode now (not in org) and it works, but is broken
on windows. Looks like there are many more problems with syntax.

I am interested to know what is broken in maxima-mode. Please
explain with examples.

Best,
Leo


There is problem with handling ghostscript. Ghostscript gui opens three 
times, one time with commands help, and error is displayed in 
minibuffer: "Your version Ghostscript does not appear to support the 
image type -sDEVICE=png16m. The command "gs -h" lists the available 
devices." when it does support it. maybe if I could use setup file it 
would work, but it gives error: Wrong type argument: stringp, nil. I 
also had to correct miktex path in this function, but without 
modification this error occurs too


Overall, configuration on windows is a pain. manually installing 
packages in miktex and ghostscript (not that bad, but I had to dig to 
find that's neccesary), wondering what code actually should be put in 
init.el, finding and moving files from maxima installation to site-lisp, 
adding installation pathes to path environment variable because 
setup-imaxima-imath.el is not working...


Plots produce output but it's not inline in emacs buffer, but gnuplot 
window.


My current path to miktex binary is: 
C:\Users\user\AppData\Local\Programs\MiKTeX\miktex\bin\x64


My init.el config for maxima:


(add-to-list 'load-path "~/.emacs.d/site-lisp/maxima/")

(load-file "~/.emacs.d/site-lisp/maxima/setup-imaxima-imath.el")

(use-package maxima
  :custom (maxima-display-maxima-buffer nil)
  :mode ("\\.ma[cx]" . imaxima)
  :interpreter ("maxima" . imaxima))

;;(autoload 'maxima-mode "maxima" "Maxima mode" t)
(autoload 'imaxima "imaxima" "Frontend for maxima with Image support" t)
;;(autoload 'maxima "maxima" "Maxima interaction" t)
(autoload 'imath-mode "imath" "Imath mode for math formula input" t)
;;(setq imaxima-use-maxima-mode-flag t)
;;(setq imaxima-gs-program "gswin64")
(setq imaxima-fnt-size "large")
(setq imaxima-pt-size 12)
;;(add-to-list 'auto-mode-alist '("\\.ma[cx]" . maxima-mode))

(org-babel-do-load-languages
 'org-babel-load-languages
 '((maxima . t))) ; this line activates maxima






Re: Can someone give an init.el wherein can start customize it?

2022-11-01 Thread Jude DaShiell
If you want some extra things done, yu could do it using .emacs rather
than init.el.



Jude 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)

.

On Tue, 1 Nov 2022, Renato Pontefice wrote:

> Ok,, I can start from clean init.el, but I saw that emacs works also without 
> init.el.
> Do I have to create an emptying.el that I improve step by step?
>
> Renato
>
> > Il giorno 1 nov 2022, alle ore 20:09, Quiliro Ord??ez  
> > ha scritto:
> >
> > El 2022-11-01 09:49, Renato Pontefice escribi?:
> >> Maybe I think my init.el is too dirty.
> >> Can someone give me an init.el that I can use as base to customize (if
> >> I want) something that can works without correct the old one
> >
> > I sugest not to learn that way.  I suggest you start with a clean
> > configuration file and add one line at a time.  Then, you will
> > understand each and every line you insert.  If you start with a giant
> > configuration, you will just replicate the configuration someone else
> > likes and you will take a long time to understand what is happening and
> > how to change what happens.  Anyway, it might work for you!
> >
>
>
>



Re: Can someone give an init.el wherein can start customize it?

2022-11-01 Thread Renato Pontefice
Ok,, I can start from clean init.el, but I saw that emacs works also without 
init.el.
Do I have to create an emptying.el that I improve step by step?

Renato

> Il giorno 1 nov 2022, alle ore 20:09, Quiliro Ordóñez  ha 
> scritto:
> 
> El 2022-11-01 09:49, Renato Pontefice escribió:
>> Maybe I think my init.el is too dirty.
>> Can someone give me an init.el that I can use as base to customize (if
>> I want) something that can works without correct the old one
> 
> I sugest not to learn that way.  I suggest you start with a clean
> configuration file and add one line at a time.  Then, you will
> understand each and every line you insert.  If you start with a giant
> configuration, you will just replicate the configuration someone else
> likes and you will take a long time to understand what is happening and
> how to change what happens.  Anyway, it might work for you!
> 




Re: I cannot see my agenda view

2022-11-01 Thread Renato Pontefice
This is what I’ve wrote to my init.el

(setq org-agenda-files
  '( "~/org/corciano.org"
 ))


With this I open my agenda buffer

(global-set-key (kbd "C-c a") #'org-agenda)

What’s wrong?

Can someone tell me what proof can I made?

Thank you


Renato

p.s.
I uninstall and reinstall emacs and put the old init.el on .emacs.d folder 
because there is not init.el
> Il giorno 1 nov 2022, alle ore 17:21, Fraga, Eric  ha 
> scritto:
> 
> On Tuesday,  1 Nov 2022 at 17:14, Renato Pontefice wrote:
>> I assigned just the root folder that contain the .org file.
>> Do I need to write the entire .org file?
> 
> Yes, as in '("~/org/mydiary.org") for org-agenda-files.
> 
> By the way, it's good practice to post followup messages to the list, not 
> just to an individual.  This way it helps others.
> 
> -- 
> : Eric S Fraga, with org release_9.5.5-1064-g5bc674 in Emacs 29.0.50




Re: Can someone give an init.el wherein can start customize it?

2022-11-01 Thread Quiliro Ordóñez
El 2022-11-01 09:49, Renato Pontefice escribió:
> Maybe I think my init.el is too dirty.
> Can someone give me an init.el that I can use as base to customize (if
> I want) something that can works without correct the old one

I sugest not to learn that way.  I suggest you start with a clean
configuration file and add one line at a time.  Then, you will
understand each and every line you insert.  If you start with a giant
configuration, you will just replicate the configuration someone else
likes and you will take a long time to understand what is happening and
how to change what happens.  Anyway, it might work for you!



Re: [O] Maxima code blocks does not work in windows revisited

2022-11-01 Thread Leo Butler
On Tue, Nov 01 2022, Mati  wrote:

> On 01.11.2022 09:04, Ihor Radchenko wrote:
>
>> Do you mean that you changed the code at line 82 inside
>> org-babel-execute:maxima to
>>
>>   (let* ((cmdline (or (cdr (assoc :cmdline params)) ""))
>>(in-file (org-babel-temp-file "maxima-" ".max"))
>>  (cmd (format "%s --very-quiet -r \"batchload(\\\"%s\\\")$\" %s"
>>   org-babel-maxima-command in-file cmdline)))
>>
>> ??
>>
>> (for reference, this email is a followup of
>> https://orgmode.org/list/ca+ikm3wqa33xp4c3pvv+f2a-gn0dbezsdx6vf2crd+37+u6...@mail.gmail.com)
>
> yes, of course only part of it

Please don't make people guess at what you have done. Ihor, in
particular, does a huge amount of work on Org. Making him and us guess
only makes that work harder.

> I am testing maxima-mode now (not in org) and it works, but is broken
> on windows. Looks like there are many more problems with syntax.

I am interested to know what is broken in maxima-mode. Please
explain with examples.

Best,
Leo


Re: org-export: How to handle links to the exported file?

2022-11-01 Thread Max Nikulin

On 01/11/2022 12:47, Ihor Radchenko wrote:

Max Nikulin writes:


In HTML top or #top works as a link to the beginning of
the document. I am curious if ODF has a similar feature. I mean ID at
the top of the same file that generates file.org link instead of
internal one for both HTML and ODF formats.


Currently, we have no convention.

In Org mode:
- [[file:/path/to/self]] links will do nothing, or follow org-file-apps.
- [[if:document-property-drawer-id]] links will move point to the top

What about export?
- Should we treat links as file links to the original Org file?
   (One can argue that it is a good default is one wants to write
   something like: "This document has been generated from
   file:/link/to/source.org"
- Should we treat them as "jump to top", similar to our id: link
   behaviour in Org?

I'd say that retaining the current behaviour will be the most reasonable.


From my point of view "id:" link to the top of the same file should be 
exported as a link to the beginning of the exported document.

- ox-odt creates a link to file.org
- ox-html to file.html#ID-...
I believe in both cases it should be just "#ID-..." or "#top" in the 
case of HTML.



I do not see much utility to linking to exported document itself, while
I do see a utility to link to the original file.


I forgot about "link to source" use case. I have no idea how to 
distinguish cases when a user links .org source files or exported files 
(currently works for HTML only). It is applicable to both same and other 
files. Ideally user should have choice for each link.






Still prob on Agenda

2022-11-01 Thread Renato Pontefice
Sorry for the boredom, but I still have prob with agenda.

In my file.org I have this:
With a false TODO as last line (with date 2022-11-04)

But on my agenda view C-c a a

I obtain that:

So nothing for 4 November…
On my init.el I have this specific line:

;;-- file utilizzati  per TODO list in Agenda
(setq org-agenda-files
  '( "~/org/corciano.org"
 ))

So what can be wrong?

Thank you

Renato

bug#53393: 29.0.50; org mode timestamp C-c C-c not updating day of week

2022-11-01 Thread bruce robertson
Fabulous! I keep editing these by hand. Thanks!

Emacs!!

On Tue, Nov 1, 2022 at 12:54 AM Ihor Radchenko  wrote:

> "Bruce E. Robertson"  writes:
>
> > emacs -Q test.org
> > cursor to "CLOCK:" line, C-c C-c
> > total time updates but day of week does not change
> > contents of test.org
> > --
> > * heading
> > :LOGBOOK:
> > CLOCK: [2022-01-17 Tue 10:29]--[2022-01-19 Tue 10:29] => 48:00
> > :END:
> > --
> > typing C-c C-c does update total log time for line and recently did
> > update the day of the week but no long does
>
> Fixed on main.
>
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5bc6741a5abd42e8305bb0fcfe78801813309640
>
> --
> 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 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

2022-11-01 Thread Max Nikulin

On 01/11/2022 12:40, Ihor Radchenko wrote:

See the attached new version of the patch.

diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 15a9cf2de..e4fb7eb84 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -2688,7 +2688,16 @@ (defun org-odt-link (link desc info)
((member type '("http" "https" "ftp" "mailto"))
 (concat type ":" raw-path))
((string= type "file")
-(org-export-file-uri raw-path))
+ (pcase (org-export-file-uri raw-path)
+   (`(and (pred #'file-name-absolute-p) ,path)
+path)


I am in doubts if this branch may be executed at all. For absolute file 
names `org-export-file-uri' adds "file:" prefix so I expect that 
`file-name-absolute-p' is always false.



+   (path
+(if (string-prefix-p "file://" path)
+path
+  ;; OpenOffice treats base directory inside the odt
+  ;; archive.  The directory containing the odt file
+  ;; is "../".
+  (concat "../" path)
(t raw-path)))
 ;; Convert & to  for correct XML representation
 (path (replace-regexp-in-string "&" "" path)))


This time I am not lucky enough to accidentally face a case with invalid 
link URI. However I do not think that for the link


 [[file:file-b.org]]

"../file-b.org" is appropriate default description. I do not expect 
"../" here.






export and cross links between files

2022-11-01 Thread Max Nikulin

On 01/11/2022 12:48, Ihor Radchenko wrote:

Max Nikulin writes:


It seems org-id.el should be extended to handle some features common to
all formats such as custom suffix instead of ".org"


Could you please elaborate?


Currently ox-html has an option to replace links to .org files with 
links to exported .html files. I suppose, this option should be 
generalized to other export backends. It is up to user to set 
appropriate target format to get cross links between exported files.


For ox-latex usually there is no point to link .tex files, target format 
is almost certainly .pdf. However PDF files may be created from ODF or 
HTML files, so a user should be able to specify arbitrary suffix, e.g. 
".pdf", as a replacement of ".org" file links during export.


Besides "file:" links such feature should work at least for "id:" links.

There is another subthread to discuss link to .org source vs. link to 
target format.







Re: [PATCH][oc-csl] Improve reference parsing

2022-11-01 Thread András Simonyi
Dear All,

On Thu, 27 Oct 2022 at 06:10, Ihor Radchenko  wrote:
> This will render e.g. strike-through empty.
> Note that citation references may contain the following Org markup objects:
> '(bold code entity italic
>   latex-fragment strike-through subscript
>   superscript underline verbatim)

thanks for pointing out the problem!! I've attached a new version of
the patch, in which the custom exporter backend has an (in many cases
trivial) translator for all currently allowed objects.

> And we may add more, as discussed in
> https://orgmode.org/list/87k04xhhw3.fsf@localhost

I don't think that it would make much sense to add a lot more, with
the possible exception of links, since citations are at most
sentence-sized textual units, not to mention the possible
complications arising for the existing export processors. (What type
of objects could the various LaTeX-based exporters support without
complex changes?)  Since CSL has only a few types of formatting
attributes (font-style, font-variant, font-weight, text-decoration and
vertical-align), if the set of allowed object is radically expanded
then it will probably be more reasonable to define a derived backed,
maybe based on the ascii exporter, but I feel that the current set
doesn't require this solution.

thanks & best wishes,
András

>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 
From 5dfbb8ef9291f906014800013cdb9a9d5569b728 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A1s=20Simonyi?= 
Date: Wed, 26 Oct 2022 12:15:42 +0200
Subject: [PATCH] oc-csl.el: Improve reference parsing

* lisp/oc-csl.el (org-cite-csl--export-backend): New constant to
provide a trivial export back-end for exporting reference affixes and
locators with the simple html-based markup expected by citeproc.
(org-cite-csl--parse-reference): Do not construct the reference
locator and include it in the result, since citeproc does not make use
of it.  Start the suffix immediately after the locator's ending,
skipping the ending comma if necessary.  Use
`org-cite-csl--export-backend' to export reference affixes and
locators.
---
 lisp/oc-csl.el | 57 +++---
 1 file changed, 40 insertions(+), 17 deletions(-)

diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el
index 1ccb74e92..1f40a9e8a 100644
--- a/lisp/oc-csl.el
+++ b/lisp/oc-csl.el
@@ -140,9 +140,10 @@
 (declare-function org-element-property "org-element" (property element))
 (declare-function org-element-put-property "org-element" (element property value))
 
-(declare-function org-export-data "org-export" (data info))
+(declare-function org-export-data-with-backend "org-export" (data backend info))
 (declare-function org-export-derived-backend-p "org-export" (backend  backends))
 (declare-function org-export-get-footnote-number "org-export" (footnote info  data body-first))
+(declare-function org-export-create-backend "org-export" ( transcoders))
 
 
 ;;; Customization
@@ -310,8 +311,30 @@ If nil then the Chicago author-date style is used as a fallback.")
   "Regexp matching a label in a citation reference suffix.
 Label is in match group 1.")
 
+(defconst org-cite-csl--export-backend
+  (org-export-create-backend 
+   :transcoders
+   '((bold . (lambda (_bold contents _info) (format "%s" contents)))
+ (code . org-cite-csl--element-value)
+ (entity . (lambda (entity _contents _info)
+ (format "\\%s" (org-element-property :name entity
+ (italic . (lambda (_italic contents _info) (format "%s" contents)))
+ (latex-fragment . org-cite-csl--element-value)
+ (plaintext . (lambda (contents _info) contents))
+ (strike-through . (lambda (_strike-through contents _info) contents))
+ (subscript . (lambda (_subscript contents _info) (format "%s" contents)))
+ (superscript . (lambda (_superscript contents _info) (format "%s" contents)))
+ (underline . (lambda (_underline contents _info)
+(format "%s" contents)))
+ (verbatim . org-cite-csl--element-value)))
+  "Custom backend for exporting citation affixes and locators.")
+
 
 ;;; Internal functions
+(defun org-cite-csl--element-value (element _contents _info)
+  "Return the`:value' property of ELEMENT."
+  (org-element-property :value element))
+
 (defun org-cite-csl--barf-without-citeproc ()
   "Raise an error if Citeproc library is not loaded."
   (unless (featurep 'citeproc)
@@ -476,11 +499,10 @@ property in INFO."
 INFO is the export state, as a property list.
 
 The result is a association list.  Keys are: `id', `prefix',`suffix',
-`location', `locator' and `label'."
-  (let (label location-start locator-start location locator prefix suffix)
+`locator' and `label'."
+  (let (label location-start locator-start locator prefix suffix)
 ;; Parse suffix.  Insert it in a temporary buffer to 

Re: Line breaks and brackets in LaTeX export

2022-11-01 Thread Juan Manuel Macías
Max Nikulin writes:

> LaTeX verse package require "\\!" as stanza separator to get proper line 
> count,
> so square bracket on the next line is not the only character that may change
> meaning of "\\". So "[*!>" (depending on context) should be handled.

Only when the separation between stanzas is made by means of a blank
line. With the current behavior of verse blocks in the export to LaTeX,
where the separation between stanzas is done by a \vspace, there is no
problem.

When, months ago, I contributed the LaTeX verse numbering patch, I took
this into account, and it didn't seem like the right time to change the
default behavior of the verse block.

I hope to be able to send a new patch soon in the few days (according to
what we discussed in past messages) where the separation by stanzas is
applied by means of a blank line (which is the right thing to do in
LaTeX). I'm rewriting my old code for verse numbering so that a \\! is
automatically added in the last line of each stanza when line numbering
is on.

Best regards,

Juan Manuel 



Docstrings and literate programming (good practices?)

2022-11-01 Thread Juan Manuel Macías
Hi all,

I find docstrings very useful. One can learn a great deal about Elisp
just from describe-function and describe-variable. But I don't find the
best way for docstrings to fit into the "precepts" of literate
programming. I try to explain myself: today I am reviewing my Emacs
init, written in Org. I like to document the code neatly, so that my
future self knows what my present self was trying to do. But I realize
that many of those global explanations before a function or a variable
can also be in a docstring. I can duplicate the text, but it seems to be
a bit redundant, right? So what is the best way to proceed when doing
literate programming with any language that supports docstrings?
Apologies in advance if the question is a bit silly, but I'm not a
professional programmer and don't have an academic background in it,
so I don't know if there is any good practice on these things :-)

On the other hand, the following procedure has occurred to me: put the
relevant information in an Org src block. When exporting to a human
readable format (PDF, HTML, etc.), the content is exported as part of
the text. When tangling, the block content is exported as a docstring.

First, I defined this function:

  (defun my-org-format-docstring (cont)
(with-temp-buffer
  (insert cont)
  (save-excursion
(goto-char (point-min))
(while (re-search-forward org-emph-re nil t)
  (replace-match (concat " " (match-string 4) " ") t nil)))
  (setq cont
(string-trim
 (replace-regexp-in-string
  "\\(\"\\)"
  "\\1"
  (org-export-string-as (buffer-string) 'ascii t)
(format "\"%s\"" cont))


And an example of use:

#+NAME: format-docstring
#+begin_src emacs-lisp :exports none :var x="" :tangle no
  (if (not org-export-current-backend)
  (my-org-format-docstring x)
x)
#+end_src

#+NAME: docstring1
#+begin_src org :post format-docstring(*this*) :results replace :exports 
results :tangle no
  Lorem ipsum dolor sit amet.

  Consectetuer adipiscing elit. "Donec hendrerit tempor tellus". Donec pretium 
posuere
  tellus. Proin quam nisl, tincidunt et, mattis eget, convallis nec, purus. Cum 
sociis
  natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. 
#+end_src

#+begin_src emacs-lisp :noweb strip-export :exports code
  (defun foo ()
   <>
(message "hello world"))
#+end_src

The only drawback is that with :noweb strip-export an empty line is
left.

Best regards,

Juan Manuel 



Re: [PATCH] [BUG] org.el: Fix first call of `org-paste-subtree'

2022-11-01 Thread Max Nikulin

On 01/11/2022 08:45, Ihor Radchenko wrote:

Since I have no objections to the original patch, applied now.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=57abbd4b928752f2770898b09bbac8126b9d0eb3

I also reviewed the usage of (current-kill 0) in the code and applied
two additional improvements:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=33cbb11d5a522c82dfd9730a0e028a9c3df11518
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5dc8ea0abee10a787160456f74672da6ff3c3b40


I hope, it does not break anything. I tried to trace possible call 
paths, but I have not managed to figure out was the original problem 
caused adding "(and kill-ring" to "(current-kill 0)".







Re: I cannot see my agenda view

2022-11-01 Thread Fraga, Eric
Where are your diary entries that you would expect to show up?  You need
to put the list of files with the diary entries in org-agenda-files
(which you've customised to be an empty list).
-- 
: Eric S Fraga, with org release_9.5.5-1064-g5bc674 in Emacs 29.0.50


Re: [correction]

2022-11-01 Thread Juan Manuel Macías
Uwe Brauer writes:

> One, hopefully, last thing in helm-mini, how can I select and visit a
> certain file? I looked around but C-j says view file (recent) but I
> cannot edit that file

The selected candidates in helm have one main action, which in
helm-locate and so on is usually to visit the buffer or file. The action
is associated with enter or C-m. But you can modify the helm-map to your
liking.

And, in addition to the main action, you have a menu of (very useful)
secondary actions, which you can access by pressing tab on the selected
candidate. Each helm source has its own secondary actions. And you can
also define more actions and add them.

Best regards,

Juan Manuel 



Can someone give an init.el wherein can start customize it?

2022-11-01 Thread Renato Pontefice
Maybe I think my init.el is too dirty.
Can someone give me an init.el that I can use as base to customize (if I want) 
something that can works without correct the old one 

Thank you

Renato


Re: Line breaks and brackets in LaTeX export

2022-11-01 Thread Max Nikulin

On 01/11/2022 08:51, Ihor Radchenko wrote:

Max Nikulin writes:


On 22/10/2022 12:15, Ihor Radchenko wrote:

as long as the next line does not match
"^[ \t]*\\["


Verse package defines \\! and \\>.

The only precaution that search pattern should ignore \\\[0pt]\] that is
a display equation "0pt]"


Can you please elaborate?


LaTeX verse package require "\\!" as stanza separator to get proper line 
count, so square bracket on the next line is not the only character that 
may change meaning of "\\". So "[*!>" (depending on context) should be 
handled.


Search pattern should not match odd number of backslashes. It is a 
common mistake to not care what character precedes the pattern. 
Accordingly to Org syntax \\ line break may appear at the end of line 
only, but a user may add for some reason @@latex:...@.


Another corner case when "\\[0pt]\n" should not be blindly replaced to 
"\\\n" (I do not escape "\"). Imagine that you are going to describe 
this optimizing filter


 >8 
Optimizing filter will replace
#+begin_example
First\\[0pt]
Second
#+end_example
with
#+begin_example
First\\
Second
#+end_example
 8< -


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.


I believe, it is better to introduce a list of filter functions that may
perform such optimizing.


I don't think so. Users can already define filters. What we discuss here
is a built-in filter. It should be separate from user customization and
only expose on/off options.


If a separate defcustom is used for each built-in filter then it will be 
inconvenient to review which filters are active from easy customization UI.


It might be better to use single defcustom of list type allowing to 
disable particular built-in filters and to add user filters and to 
define their order in respect to built-in ones. I am unsure concerning 
convenient enough UI.







I cannot see my agenda view

2022-11-01 Thread Renato Pontefice
I’ve made more change on my init.el, but  I’m unable to show my Agenda view.
If I send my init.el file does someone can help me to solve this prob?
I think that I’ve made some change that does not work correctly

This is my init.el what does can inhibit my working Agenda?


;; -ss*- mode: emacs-lisp -*-

;;--setta il formato della data diversamente --
;;(setq-default org-display-custom-times t)
(setq org-time-stamp-custom-formats '("<%a %d %m %Y>" . "<%a %d %m %Y %H:%M>"))

;;- comandi per gestire la grandezza della finestraprincipale di emacs -
(setq initial-frame-alist
  (append '((width . 200) (height . 400) (top 45) (left 45) ())
  initial-frame-alist))

;;---(add-to-list 'default-frame-alist '(height . 24))
(add-to-list 'default-frame-alist '(width . 80)) 

;; fà partire in AGENDA la settimana dal giorno 1---
(setq calendar-week-start-day 1)

;;---settaggi carattere e dimensione di default del carattere--
(set-face-attribute 'default nil :font "Andale Mono" :height 160 )

;; Disable the splash screen (to enable it agin, replace the t with 0)
(setq inhibit-splash-screen t)

;; Enable transient mark mode
(transient-mark-mode 1)

;; Org mode configuration
;; Enable Org mode
(require 'org)

;; Make Org mode work with files ending in .org
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
;; The above is the default in recent emacsen
(require 'org)
(setq org-log-done t)

;; set maximum indentation for description lists
(setq org-list-description-max-indent 5)

;; prevent demoting heading also shifting text inside sections
(setq org-adapt-indentation nil)

;; determina le sequenze di stato al TODO
(setq org-todo-keywords
  '((sequence "TODO" "IN-PROGRESS" "WAITING" "DONE")))

;;-- file utilizzati  per TODO list in Agenda
(setq org-agenda-files
  '( "/org/"
 ))

;; mappa alcuni tasti per ottenere le parentesi graffe e quadre
(global-set-key "\M-(" (lambda () (interactive) (insert "{")))
(global-set-key "\M-)" (lambda () (interactive) (insert "}")))
(global-set-key "\M-7" (lambda () (interactive) (insert "#")))
(global-set-key "\M-8" (lambda () (interactive) (insert "[")))
(global-set-key "\M-9" (lambda () (interactive) (insert "]")))

(global-set-key "\M-9" (lambda () (interactive) (insert "]")))

;;---Aggiunge il TIMESTAMP quando chiudo uno statemet TODO
(setq org-log-done 'time)

;;fa aggiungere una nota di testo quando si chiude un TODO
(setq org-log-done 'note)

;;--setta dei tasti comodi da utilizzare in emacs
(global-set-key (kbd "C-c l") #'org-store-link)
(global-set-key (kbd "C-c a") #'org-agenda)
(global-set-key (kbd "C-c c") #'org-capture)

;;--- azioni applicate ai TODO
(setq org-todo-keywords
  '((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED")))

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(nil nil t)
 '(org-agenda-files nil))

;;-apre emacs-org mode in modalità Agenda
;;(org-agenda-list)
;;(delete-other-windows)

(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
;; Local Variables:
;; mode: emacs-lisp
;; End:
_

Thank you

Renato




Re: ob-lilypond.el doesn't generate midi files

2022-11-01 Thread Ihor Radchenko
Jonathan Gregory  writes:

>> If so, we can merge the patch.
>
> This is done. The patch was merged in e4c0281d2.

Confirm.
I somehow missed it.

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



Re: ob-lilypond.el doesn't generate midi files

2022-11-01 Thread Jonathan Gregory

Hi Ihor,

On 01 Nov 2022, Ihor Radchenko wrote:


Jonathan Gregory  writes:

Yep, that's it. Modified ob-lilypond.el and recompiled it. 
Timidity works as helper, couldn't get vlc to work. Maybe the 
file ending should be modifiable via 
org-babel-lilypond-commands as well, or make ob-lilypond.el 
look for *.mid or *.midi. I'm pretty confident *.mid is the 
default setting for lilypond on win, and not my doing.


I attached a patch to use a different suffix on Windows. Thanks 
for your help.


Can someone with Windows check if this issue with lilypond using 
different extension is still present?


If so, we can merge the patch.


This is done. The patch was merged in e4c0281d2.

--
Jonathan



Re: [O] Maxima code blocks does not work in windows revisited

2022-11-01 Thread Mati

On 01.11.2022 09:04, Ihor Radchenko wrote:


Do you mean that you changed the code at line 82 inside
org-babel-execute:maxima to

  (let* ((cmdline (or (cdr (assoc :cmdline params)) ""))
  (in-file (org-babel-temp-file "maxima-" ".max"))
(cmd (format "%s --very-quiet -r \"batchload(\\\"%s\\\")$\" %s"
 org-babel-maxima-command in-file cmdline)))

??

(for reference, this email is a followup of
https://orgmode.org/list/ca+ikm3wqa33xp4c3pvv+f2a-gn0dbezsdx6vf2crd+37+u6...@mail.gmail.com)


yes, of course only part of it


I am testing maxima-mode now (not in org) and it works, but is broken on 
windows. Looks like there are many more problems with syntax.





Re: org-sbe recent changes?

2022-11-01 Thread Alan Schmitt
On 2022-11-01 02:16, Ihor Radchenko  writes:

> Fixed on main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=9987451252fa64af65d0a0a014f41812f4402c02

Thanks a lot!

Alan


signature.asc
Description: PGP signature


Re: One thing each 3 days but maximum 10

2022-11-01 Thread Ihor Radchenko
Jean Louis  writes:

> * Ihor Radchenko  [2022-10-31 09:27]:
>> Thanks for pointing this out!
>> Hours are, in fact, allowed.
>> Fixed the manual now.
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5098404b19962042cd29ad86e11ccb43ac566953
>
> That is great.
>
> How certain is that function, does it work reliably? How was it
> tested?
>
> I still do get:
>
> user-error: Invalid shift specification +1h
>
> Org mode version 9.4.3 (9.4.3-elpa @
> /home/data1/protected/.emacs.d/elpa/org-20201216/)

Hour repeaters are only parsed interactively on main.
Repeaters in timestamps should work in earlier Org versions as well.

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



Re: One thing each 3 days but maximum 10

2022-11-01 Thread Jean Louis
* Quiliro Ordóñez  [2022-10-31 13:03]:
> El 2022-10-30 23:57, Jean Louis escribió:
> > * Renato Pontefice  [2022-10-30 19:11]:
> >> I have to take a pill each 3 days, but for max 10 times.
> >> So I set a TODO pill >2022-10-28 +3d> and each 3 days my calendar tell me 
> >> that I have to take the pill. But is possible to say 1/10; 2/10; 3/10 etc?
> >> I nean to show how many pill I have already take?
> > 
> > Use PostgreSQL to give you schedule:
> > 
> > #+BEGIN_SRC sql :engine postgresql :results value raw 
> > SELECT '** TODO Take pill again
> >   SCHEDULED: <' || generate_series('2022-10-28', '2022-11-26', '3
> > day'::interval)::date || E'>\n'
> >   AS "* My treatement";
> > #+END_SRC

> Isn't it much easier to copy the first one and change the day, instead
> of going through the learning curve of database administration?  Of
> course that, if you have a bazooka, you can even write a love letter
> with it.  But would it be right tool?

Any useful tool external to any text file that may help you in work
and life, is the right tool. Use anything you find useful.

To correct you, this is not "database administration", it is using
PostgreSQL like programming language. If there would be ready Emacs
Lisp function, I would mention it, but I do not know any.

This belowe is pretty much intuitive:

SELECT generate_series('2022-10-28', '2022-11-26', '3 day'::interval);

SELECT generate_series('2022-10-28', '2022-11-26', '3 day'::interval);
generate_series 

 2022-10-28 00:00:00+03
 2022-10-31 00:00:00+03
 2022-11-03 00:00:00+03
 2022-11-06 00:00:00+03
 2022-11-09 00:00:00+03
 2022-11-12 00:00:00+03
 2022-11-15 00:00:00+03
 2022-11-18 00:00:00+03
 2022-11-21 00:00:00+03
 2022-11-24 00:00:00+03

And you can have it display it with date only:

SELECT generate_series('2022-10-28', '2022-11-26', '3 day'::interval)::date;

 generate_series 
-
 2022-10-28
 2022-10-31
 2022-11-03
 2022-11-06
 2022-11-09
 2022-11-12
 2022-11-15
 2022-11-18
 2022-11-21
 2022-11-24

And you may concatenate it how you wish:

SELECT 'This is my day: ' || generate_series('2022-10-28', '2022-11-26', '3 
day'::interval)::date;

 This is my day: 2022-10-28
 This is my day: 2022-10-31
 This is my day: 2022-11-03
 This is my day: 2022-11-06
 This is my day: 2022-11-09
 This is my day: 2022-11-12
 This is my day: 2022-11-15
 This is my day: 2022-11-18
 This is my day: 2022-11-21
 This is my day: 2022-11-24

And there are complex intervals, readable to human:

SELECT 'This is my day: ' || generate_series('2022-10-28', '2022-10-29', '1 
hour 2 minutes'::interval);

 This is my day: 2022-10-28 00:00:00+03
 This is my day: 2022-10-28 01:02:00+03
 This is my day: 2022-10-28 02:04:00+03
 This is my day: 2022-10-28 03:06:00+03
 This is my day: 2022-10-28 04:08:00+03
 This is my day: 2022-10-28 05:10:00+03
 This is my day: 2022-10-28 06:12:00+03
 This is my day: 2022-10-28 07:14:00+03
 This is my day: 2022-10-28 08:16:00+03
 This is my day: 2022-10-28 09:18:00+03
 This is my day: 2022-10-28 10:20:00+03
 This is my day: 2022-10-28 11:22:00+03
 This is my day: 2022-10-28 12:24:00+03
 This is my day: 2022-10-28 13:26:00+03
 This is my day: 2022-10-28 14:28:00+03
 This is my day: 2022-10-28 15:30:00+03
 This is my day: 2022-10-28 16:32:00+03
 This is my day: 2022-10-28 17:34:00+03
 This is my day: 2022-10-28 18:36:00+03
 This is my day: 2022-10-28 19:38:00+03
 This is my day: 2022-10-28 20:40:00+03
 This is my day: 2022-10-28 21:42:00+03
 This is my day: 2022-10-28 22:44:00+03
 This is my day: 2022-10-28 23:46:00+03

Now after learning about the flexibility and power of that function,
you may think of using intervals for anything you wish.

Within Org, you may embed it how you wish and want, including, you
may produce tables with that function. 

Org's function `org-clone-subtree-with-time-shift' I find really
handy, but I also find it hard coded, it is only for subtree. 

And I personally can rely on it as Org has too many bugs and is
constantly developed. We have just found that "hours" are missing,
which speaks of design planning quality level.

Why would one exclude seconds? Just because author of function does
not use seconds, that is why author excluded seconds, and minutes, and
hours in the original function. 

Do I want to use a function which possibly contains errors? There are
too many human errors when dealing with time, unspoken of programming
errors.

My choice is to use what I consider stable, and which is more
flexible. 

As Org may be dynamically modified by external tool, then I will use
any kind of tool.

My Org file are mostly on the file system, there are maybe 300 files,
and only 38 in the database. But then I use in the database too much
of Markdown, and way much more of the text type.

And any kind of the markup I want to use embeddable external
tools. This is because it is useful. 

Personally I do not want to remain hard coded to Org type only, as it
limits my work, my output, my PDF and 

Re: One thing each 3 days but maximum 10

2022-11-01 Thread Jean Louis
* Ihor Radchenko  [2022-10-31 09:27]:
> Thanks for pointing this out!
> Hours are, in fact, allowed.
> Fixed the manual now.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5098404b19962042cd29ad86e11ccb43ac566953

That is great.

How certain is that function, does it work reliably? How was it
tested?

I still do get:

user-error: Invalid shift specification +1h

Org mode version 9.4.3 (9.4.3-elpa @
/home/data1/protected/.emacs.d/elpa/org-20201216/)

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: [O] Maxima code blocks does not work in windows revisited

2022-11-01 Thread Ihor Radchenko
Mati  writes:

> Ok, I got it working somehow. For others reading this: I had to modify 
> ~/.emacs.d/straight/repos/org/lisp/ob-maxima.el in emacs(!) so straight 
> compiled it to work. you need to replace code at line 82. However, plots 
> still doesn't work (code block produced no output) :( pls help.

Do you mean that you changed the code at line 82 inside
org-babel-execute:maxima to

 (let* ((cmdline (or (cdr (assoc :cmdline params)) ""))
  (in-file (org-babel-temp-file "maxima-" ".max"))
(cmd (format "%s --very-quiet -r \"batchload(\\\"%s\\\")$\" %s"
 org-babel-maxima-command in-file cmdline)))

??

(for reference, this email is a followup of
https://orgmode.org/list/ca+ikm3wqa33xp4c3pvv+f2a-gn0dbezsdx6vf2crd+37+u6...@mail.gmail.com)

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



bug#53393: 29.0.50; org mode timestamp C-c C-c not updating day of week

2022-11-01 Thread Ihor Radchenko
"Bruce E. Robertson"  writes:

> emacs -Q test.org
> cursor to "CLOCK:" line, C-c C-c
> total time updates but day of week does not change
> contents of test.org
> --
> * heading
> :LOGBOOK:
> CLOCK: [2022-01-17 Tue 10:29]--[2022-01-19 Tue 10:29] => 48:00
> :END:
> --
> typing C-c C-c does update total log time for line and recently did
> update the day of the week but no long does

Fixed on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5bc6741a5abd42e8305bb0fcfe78801813309640

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





[O] Maxima code blocks does not work in windows revisited

2022-11-01 Thread Mati
Ok, I got it working somehow. For others reading this: I had to modify 
~/.emacs.d/straight/repos/org/lisp/ob-maxima.el in emacs(!) so straight 
compiled it to work. you need to replace code at line 82. However, plots 
still doesn't work (code block produced no output) :( pls help.





Re: Exporting images to different output formats

2022-11-01 Thread Michael Welle
Hello,

Ihor Radchenko  writes:

> Michael Welle  writes:
[...]
>> {{{img(./foo, foo, barfoo)}}}
>>
>> That kind of works (and breaks if I want commas in the caption)
>
> Re: commas. See 13.5 Macro Replacement
I found that shortly after posting. Works as expected.


>(1) Since commas separate the arguments, commas within arguments have
> to be escaped with the backslash character.  So only those backslash
> characters before a comma need escaping with another backslash
> character.
>
>> , but is
>> ugly as... and doesn't get better if I implement the other output formats.
>
> Agree. The proper way to implement this is special blocks + custom
> export filter that will take care about backend selection.
>
> Also, see https://list.orgmode.org/orgmode/87y1yr9gbl@gmail.com/
> referring to https://github.com/alhassy/org-special-block-extras/
Ah, that looks promising.

Thank you!

All the best
hmw



[O] Maxima code blocks does not work in windows revisited

2022-11-01 Thread ELECTRUM BIKES
I tried replacing it and doesn't work, still the same error, win10 emacs 
28.1





Re: LIterate programming with calc (help)

2022-11-01 Thread Ihor Radchenko
"Fraga, Eric"  writes:

>> I guess that the main problem is that calc is tightly integrated with
>> interactive commands. Maybe ob-calc could be extended to somehow
>> indicate the commands to be executed in addition to inputting stack
>> entries.
>>
>> Not sure if there is much interest in such feature though.
>
> Thinking out loud, what would be better, but I have no idea how feasible
> it would be, would be to have ob-calc make use of the embedded calc
> functionality and syntax, so that you could write something like this:
>
> #+begin_src calc
> a := 300 m
> b := 2 a =>
> #+end_src
>
> which would output the result of any line with => on it.

I am CCing Tom Gillespie, the maintainer of ob-calc. Maybe he has
something to say.

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



Re: [correction]

2022-11-01 Thread Uwe Brauer



> *Excellent* works very nicely. Thanks very much, the only change I did
>  was

>  (tag (propertize "   " 'face 'bold))

> It is better visible, and more fitting since you sent me the final
> version on Halloween 

> Now it remains to configure helm-locate, so that it takes a local
> database that I can run regularly without sudo..

> Thanks very much that was very helpful

One, hopefully, last thing in helm-mini, how can I select and visit a certain 
file? I looked around but C-j says view file (recent) but I cannot edit that 
file

-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/


smime.p7s
Description: S/MIME cryptographic signature


Re: [correction]

2022-11-01 Thread Uwe Brauer
>>> "JMM" == Juan Manuel Macías  writes:

> Uwe Brauer writes:
>> Don't worry, for the moment _@@  is fine for me

> I think with font-lock-add-keywords it should work. I have put another
> overlay on the tags, so that they are seen inside a box, separated by
> ":".

> (defun overlay-dired-filetags ( lim)
>   (when
>   (re-search-forward "\\(_ftag_\\)\\(.+\\)" lim t)
> (let
> ((ov (make-overlay (match-beginning 1) (match-end 1)))
>  (tag (propertize " ⚜ " 'face 'bold))
>  (ov-2 (make-overlay (match-beginning 2) (match-end 2)))
>  (tags (propertize (replace-regexp-in-string
> "_"
> ":"
> (match-string 2))
>'font-lock-face
>'(:foreground "red" :box t
>   (overlay-put ov 'overlay-tag t)
>   (overlay-put ov 'display tag)
>   (overlay-put ov-2 'overlay-tag-2 t)
>   (overlay-put ov-2 'display tags



*Excellent* works very nicely. Thanks very much, the only change I did
 was

 (tag (propertize "   " 'face 'bold))

It is better visible, and more fitting since you sent me the final
version on Halloween 

Now it remains to configure helm-locate, so that it takes a local
database that I can run regularly without sudo..

Thanks very much that was very helpful

Uwe  


-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/


smime.p7s
Description: S/MIME cryptographic signature


Re: Something don't work

2022-11-01 Thread Ihor Radchenko
Renato Pontefice  writes:

> I’m wondering: where do my init.el must reside to let emacs read it?
> Because on my Mac, I have on .emacs.d folder an nit.el here 
> Users//.emacs.d/

nit.el or init.el?
Try M-: (find-file user-init-file) 
It should go to the init file Emacs is using.

> With that entry:
> ;;-- file utilizzati  per TODO list in Agenda
> (setq org-agenda-files
>   '( "/Volumes/renato07/renato.org"
>))
>
> Is not that the file that emacs read?

You can execute check the value of org-agenda-file to make sure that it
is being set (it is likely not):

C-h v org-agenda-files 


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



Re: How to set folder where to find files to look for Agenda

2022-11-01 Thread Ihor Radchenko
Renato Pontefice  writes:

> With this expression on my init.el, I would set that Agenda view, looks for 
> this folder and sub folder that reside on a cloud to look for informarion 
> that need to be shown on Agenda view.
> 
> (setq org-agenda-files
>   '( "\Volumes\renato07"
>))
> ———
>
> But it seems it does not happens
>
> In the folder renato 07 I have many .org file that can be part of Agenda, but 
> if I press C-a a I see an empty agenda, like if the files are not considerate
>
> Do I need a final / (slash)?

You do not need a final slash.

Note that your directory path looks strange. What OS are you on?

Try M-: (find-file "\Volumes\renato07") 
If it does not work (Emacs does not open dired listing), the path should
be corrected. Try M-x dired and navigate to your desired directory. The
correct path should be displayed at the beginning of dired buffer.

> Thank you
>
> Renato

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



RE: org-assert-version considered harmful

2022-11-01 Thread Ihor Radchenko
"Cook, Malcolm"  writes:

> Then, when I occasionally wished to update org, I would
>
> `cd ~/.emacs.d/org-mode && git pull && make autoloads && make`
>
> Recently I started getting errors invalid-function "org-assert-version".
>
> Upon cursory reading of this thread I guessed that I could fix them by adding 
> a `make clean` to my update mantra.

It should not be necessary and it does not happen on my side (as you can
imagine, I re-compile very often).

Could you provide more details?

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