Re: Please document the caching and its user options

2024-06-18 Thread tomas
On Wed, Jun 19, 2024 at 12:06:42AM +0200, Rudolf Adamkovič wrote:
> Ihor Radchenko  writes:
> 
> > Can we instead store them in memory? Yes, but (1) it will make Emacs RAM
> > consumption grow constantly and more and more previews are generated;
> > (2) it will require significant changes in the Org mode codebase.
> 
> And, (3) all previews would be lost every time one shuts down their
> computer, say for the night, or even restarts Emacs, which would be
> terrible experience.

I was one of those clamouring for a "master switch". I'm aware of all
of that. I can live with that (not everyone will, that's why it should
be optional).

I arrived at the impression that the discussion was becoming unproductive,
that's why I gave up and went with the non-existing directory trick.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Please document the caching and its user options

2024-06-18 Thread Rudolf Adamkovič
Ihor Radchenko  writes:

> Can we instead store them in memory? Yes, but (1) it will make Emacs RAM
> consumption grow constantly and more and more previews are generated;
> (2) it will require significant changes in the Org mode codebase.

And, (3) all previews would be lost every time one shuts down their
computer, say for the night, or even restarts Emacs, which would be
terrible experience.

Rudy
-- 
"It is no paradox to say that in our most theoretical moods we may be
nearest to our most practical applications."
--- Alfred North Whitehead, 1861-1947

Rudolf Adamkovič  [he/him]
http://adamkovic.org



Re: [BUG] org-refile-get-location a symlinked file [9.7-pre (release_9.6.29-1443-gb4d17c)]

2024-06-18 Thread Al Haji-Ali

On 18/06/2024, Ihor Radchenko wrote:
> Hmm. Thanks, but the patch does not apply on my side.
> May you instead create a patch as a separate file, add the commit
> message, and attach that patch file in the email reply?

See attached.

Best regards,
-- Al

>From 0efafc38b404bace9ff87e38349a6c64fc7be903 Mon Sep 17 00:00:00 2001
From: Al Haji-Ali 
Date: Tue, 18 Jun 2024 19:27:56 +0100
Subject: [PATCH] Use file-truename for files of refile targets.

Ensures that comparing filenames works even when symlinks are used.
---
 lisp/org-refile.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-refile.el b/lisp/org-refile.el
index 20b5fbd02..7c463bc67 100644
--- a/lisp/org-refile.el
+++ b/lisp/org-refile.el
@@ -324,7 +324,7 @@ When `org-refile-use-cache' is nil, just return POS."
 	 (progn
 	   (when (bufferp f)
 		 (setq f (buffer-file-name (buffer-base-buffer f
-	   (setq f (and f (expand-file-name f)))
+	   (setq f (and f (file-truename f)))
 	   (when (eq org-refile-use-outline-path 'file)
 		 (push (list (and f (file-name-nondirectory f)) f nil nil) tgs))
 	   (when (eq org-refile-use-outline-path 'buffer-name)
@@ -666,7 +666,7 @@ this function appends the default value from
 		  #'completing-read))
 	 (extra (if org-refile-use-outline-path "/" ""))
 	 (cbnex (concat (buffer-name) extra))
-	 (filename (and cfn (expand-file-name cfn)))
+	 (filename (and cfn (file-truename cfn)))
 	 (tbl (mapcar
 	   (lambda (x)
 		 (if (and (not (member org-refile-use-outline-path
-- 
2.39.3 (Apple Git-145)



Re: [BUG] Warning on executing keyboard macro that inserts time-stamp [9.6.27 ( @ /home/punit/.emacs.d/elpa/org-9.6.27/)]

2024-06-18 Thread Punit Arya
Alright, I'll check it out when I upgrade to the latest version 9.7 from 
the ELPA repo.


*Punit Arya*

/Sent From Mozilla Thunderbird/


//
On 2024-06-18 18:09, Ihor Radchenko wrote:

Punit Arya  writes:


Sorry, I missed the "T" there in the command.  The whole command is:

printf "%(%F %T)T"

I'm working on setting up the Org mode dev environment.  Will try to
reproduce in that environment and update.

I tried with this command using the latest Org release.
I am unable to reproduce.



Re: Please document the caching and its user options

2024-06-18 Thread Eli Zaretskii
> From: Ihor Radchenko 
> Cc: Eli Zaretskii , emacs-orgmode@gnu.org
> Date: Tue, 18 Jun 2024 15:53:18 +
> 
> Daniel Clemente  writes:
> 
> > What's the setting then to disable org-persist? I.e. to disable
> > creating of files like ~/.cache/org-persist/gc-lock.eld
> > Many people seem to want to disable all creation of org-mode related files.
> 
> It is impossible. We need to store files like latex previews
> somewhere. This somewhere is org-persist-directory now.

Sorry, I don't understand: why do you need to store them as files?
Why not keep the previews in buffer(s)?



Re: Please document the caching and its user options

2024-06-18 Thread Ihor Radchenko
Eli Zaretskii  writes:

>> Can we instead store them in memory? Yes, but (1) it will make Emacs RAM
>> consumption grow constantly and more and more previews are generated;
>> (2) it will require significant changes in the Org mode codebase.
>
> I understand all that, but if the user wants it, and insist on not
> caching any data, let them have what they want.

It is not about letting or not letting them. I would have to implement
it. (I am ok with it, but I am not going to prioritize my time for
nice-to-haves; though I would not mind patches submitted by interested
users).

> ... My surprise was
> caused by your "it is impossible"; I now understand that you meant
> "not reasonable" or perhaps "users will not like that" instead.

I meant:

1. not reasonable in a sense that it has downsides compared to what we
   do now - save latex previews on disk
2. impossible in a sense that we do not have an existing toggle to store
   cached previews in memory. Such functionality would have to be added;
   and it is not necessarily trivial to add it.

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



Re: Please document the caching and its user options

2024-06-18 Thread Eli Zaretskii
> From: Ihor Radchenko 
> Cc: n142...@gmail.com, emacs-orgmode@gnu.org
> Date: Tue, 18 Jun 2024 16:25:10 +
> 
> Eli Zaretskii  writes:
> 
> >> It is impossible. We need to store files like latex previews
> >> somewhere. This somewhere is org-persist-directory now.
> >
> > Sorry, I don't understand: why do you need to store them as files?
> > Why not keep the previews in buffer(s)?
> 
> In Org mode, in order to create latex previews, we
> (1) run latex to generate the preview image
> (2) that image is stored in some directory
> (3) we display that image over the corresponding latex fragment in an
> overlay
> (4) we retain the image on disk, so that we do not need to run latex
> many times if the users toggles displaying the previews (this is
> very important, because running latex is costly)
> 
> Can we instead store them in memory? Yes, but (1) it will make Emacs RAM
> consumption grow constantly and more and more previews are generated;
> (2) it will require significant changes in the Org mode codebase.

I understand all that, but if the user wants it, and insist on not
caching any data, let them have what they want.  My surprise was
caused by your "it is impossible"; I now understand that you meant
"not reasonable" or perhaps "users will not like that" instead.



Re: Please document the caching and its user options

2024-06-18 Thread Ihor Radchenko
Eli Zaretskii  writes:

>> It is impossible. We need to store files like latex previews
>> somewhere. This somewhere is org-persist-directory now.
>
> Sorry, I don't understand: why do you need to store them as files?
> Why not keep the previews in buffer(s)?

In Org mode, in order to create latex previews, we
(1) run latex to generate the preview image
(2) that image is stored in some directory
(3) we display that image over the corresponding latex fragment in an
overlay
(4) we retain the image on disk, so that we do not need to run latex
many times if the users toggles displaying the previews (this is
very important, because running latex is costly)

Can we instead store them in memory? Yes, but (1) it will make Emacs RAM
consumption grow constantly and more and more previews are generated;
(2) it will require significant changes in the Org mode codebase.

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



Re: [PATCH] oc-csl: New custom option `org-cite-csl-sentence-case-bibtex-titles'

2024-06-18 Thread András Simonyi
Dear Ihor,
thanks for asking -- unfortunately, I've been absurdly busy in the
last few weeks but it's getting better now, so I'm going to respond
shortly with a new, hopefully final, version.
best wishes,
András

On Mon, 17 Jun 2024 at 13:37, Ihor Radchenko  wrote:
>
> Ihor Radchenko  writes:
>
> >> I'm a bit unsure about naming the option:
> >> Perhaps `org-cite-csl-sentence-case-bibtex-titles-without-langid'
> >> would be more precise but I found it absurdly long and technical, as
> >> most users are probably unaware of the existence of langid fields.
> >
> > Maybe org-cite-csl-sentence-case-english-titles?
> >
> > Also, it would be nice to point out the CSL and Bibtex have different
> > conventions for the title field.
>
> Andras, it has been a month since the last message in this thread.
> May I know about the status of the patch?
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 



Re: Please document the caching and its user options

2024-06-18 Thread Ihor Radchenko
Daniel Clemente  writes:

>> Nope. "org-persist" directory is not only used by org-element. If some
>> other parts of Org need to cache something, they can also store cache
>> there.
>>
> What's the setting then to disable org-persist? I.e. to disable
> creating of files like ~/.cache/org-persist/gc-lock.eld
> Many people seem to want to disable all creation of org-mode related files.

It is impossible. We need to store files like latex previews
somewhere. This somewhere is org-persist-directory now.

That said, gc-lock.eld should not be created when nothing else is
actually stored in the cache. It will be fixed.

>> May you suggest an alternative docstring?
>>
>
> I don't know org-persist or org-element-cache-persistent so this needs
> your input. I can start with a template, and you can fine-tune it,
> expand it or rewrite it:...

Thanks!
I am attaching tentative patch that improve the documentation. I hope
that it clarifies things for you.

>From 8a64e83303566bad608c386fbdafe34aa9065a2b Mon Sep 17 00:00:00 2001
Message-ID: <8a64e83303566bad608c386fbdafe34aa9065a2b.1718725818.git.yanta...@posteo.net>
From: Ihor Radchenko 
Date: Tue, 18 Jun 2024 17:49:43 +0200
Subject: [PATCH] org-element-cache: Improve docstrings

* lisp/org-element.el (org-element-use-cache):
(org-element-cache-persistent): Add more details to the docstrings.

Reported-by: Daniel Clemente 
Link: https://orgmode.org/list/CAJKAhPBUAS2bDT5k+xB2E-vu+d==yonafkjdku2hc4qmb_x...@mail.gmail.com
---
 lisp/org-element.el | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 191bb5698..631cdf20c 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -5744,10 +5744,19 @@ ;;; Cache
 
 ;;;###autoload
 (defvar org-element-use-cache t
-  "Non-nil when Org parser should cache its results.")
+  "Non-nil when Org parser should cache its results.
+The results are cached in memory and may also be cached between Emacs
+sessions if `org-element-cache-persistent' is set to non-nil.")
 
 (defvar org-element-cache-persistent t
-  "Non-nil when cache should persist between Emacs sessions.")
+  "Non-nil when Org element cache should persist between Emacs sessions.
+Cache files are written to disk at `org-persist-directory'.
+The cache will be updated when Emacs is closed or when an Org buffer
+is closed.
+
+Persisting the cache to disk can speed up opening Org files
+\\(especially large Org files).  It is not recommended if the Org files
+include sensitive data, unless the data is encrypted via `org-crypt'.")
 
 (defconst org-element-cache-version "2.3"
   "Version number for Org AST structure.
-- 
2.45.1


> My own experience, very subjective and it may be an edge case, is that
> enabling org-element-cache-persistent didn't make loading my org files
> faster; on the contrary, it made some things slower (including closing
> Emacs).

What happens if you set `org-persist--report-time' to t in your config
and examine *Messages* buffer after opening/closing some Org files?
Look for "org-persist:..." messages.

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


Re: [PATCH] [BUG] Support attr_html in source code and fixed-width blocks

2024-06-18 Thread Ihor Radchenko
Suhail Singh  writes:

> Unlike example blocks, source code and fixed-width blocks don't support
> the attr_html keyword.  Contrast these outputs:
> ...
> The attached patches are a straight-forward copy-paste of relevant code
> from org-html-example-block.  It may be better to refactor this logic
> and ensure that it is applied on all relevant AST nodes (others are
> probably affected as well).

Sounds reasonable.
Timothy, may you have a look?
I am not sure if we want to add all the attributes to every transcoded
element. At least in some cases, we do discard them
(`org-html--textarea-block').

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



Re: Build issues

2024-06-18 Thread Ihor Radchenko
Rustom Mody  writes:

> $ make up1
>
> Some selected lines of output
>
> 1. I guess harmless
> Loading /extra/pdsw/org-mode/mk/org-fixup.el (source)...
> WARNING: No org-loaddefs.el file could be found from where org.el is loaded.
> ...
> 2. absent ob-vala
> Cannot open load file: No such file or directory, ob-vala

This is because make up1 did not clean up the state .elc files.
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=c37a17ac2

> 3. make helpall
> documents make vanilla
> But not make repro
> [a docbug]

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

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



Re: [BUG] orgalist send bug

2024-06-18 Thread Ihor Radchenko
Rustom Mody  writes:

>> 1. make repro
>> 2. download orgalist source code separately
>
>
> All I can find is https://elpa.gnu.org/packages/orgalist.html
> That has a link
> https://elpa.gnu.org/packages/orgalist-1.14.tar
> which is broken
> ...
> When I changed the 14 in the link to 15 I could download a tar file
> It seems to contain the same file that elpa gets
>
> I load it by hand
> Get the same error:
>
>
> Debugger entered--Lisp error: (error "Not at a list item")

I just tried to repeat your steps using even cleaner setup (using
https://github.com/alphapapa/with-emacs.sh)

1. I created a file orgalist.txt with
% BEGIN RECEIVE ORGLST to-buy
% END RECEIVE ORGLST to-buy
\begin{comment}

#+ORGLST: SEND to-buy org-list-to-latex
- a new house
- a new computer
  + a new keyboard
  + a new mouse
- a new life
\end{comment}
2. with-emacs.sh -i org -i orgalist
3. Open the file
4. M-x orgalist-mode
5. Move point to "a new house" line
6. M-x orgalist-send-list
7. Everything works

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



Re: [BUG] org-plot: Unable to use text xtics with type:2d (+ more) [9.7-pre (N/A @ /home/viz/lib/emacs/straight/build/org/)]

2024-06-18 Thread Ihor Radchenko
Visuwesh  writes:

>> So, your code is ok here.
>
> Thanks, so please find attached.

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

Fixed.

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



Re: [BUG] org-refile-get-location a symlinked file [9.7-pre (release_9.6.29-1443-gb4d17c)]

2024-06-18 Thread Ihor Radchenko
Al Haji-Ali  writes:

> It's not really a long patch, just involves calling `file-truename` instead 
> of `expand-file-name` in a couple of places.
>
> diff --git a/lisp/org-refile.el b/lisp/org-refile.el
> index 20b5fbd02..7c463bc67 100644

Hmm. Thanks, but the patch does not apply on my side.
May you instead create a patch as a separate file, add the commit
message, and attach that patch file in the email reply?

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



Re: [BUG] Columnview makes attributes wander [9.7.4 (9.7.4-1387e3 @ /home/rst/.emacs.d/elpa/org-9.7.4/)]

2024-06-18 Thread Ihor Radchenko
Raffael Stocker  writes:

> Ihor Radchenko  writes:
>
>> May you please convert the diff into a proper patch, so that I can
>> install it under your name?
>
> I gave it a try, please see the attachment.

Thanks!
Applied, onto bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=157a0559e

You are also now listed as Org mode contributor:
https://git.sr.ht/~bzg/worg/commit/b747280a

Fixed.

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



Re: ob-shell: possibly missing initiate-session functions?

2024-06-18 Thread Ihor Radchenko
Suhail Singh  writes:

> Ihor Radchenko  writes:
>
>> Fixed, on main.
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5b366a731
> ...
> Am I mistaken, or does something still need to be done about
> org-babel-shell-initiate-session ?

True.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5e9ac146f

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



Re: [BUG] Warning on executing keyboard macro that inserts time-stamp [9.6.27 ( @ /home/punit/.emacs.d/elpa/org-9.6.27/)]

2024-06-18 Thread Ihor Radchenko
Punit Arya  writes:

> Sorry, I missed the "T" there in the command.  The whole command is:
>
> printf "%(%F %T)T"
>
> I'm working on setting up the Org mode dev environment.  Will try to 
> reproduce in that environment and update.

I tried with this command using the latest Org release.
I am unable to reproduce.

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



Re: [PATCH] function and symbol for headline and olp for org-capture-templates

2024-06-18 Thread Ihor Radchenko
Nafiz Islam  writes:

>  >Why (t nil)? It would be more sensible to throw an error.
>
> I believe that was already addressed.

> + (or final-headline + (error "Invalid headline: %S" headline

Right, I was only looking at pcase, which did not appear to be changed.

Applied, onto main, after some minor copyedits.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5265153fc

Thanks for your contribution!

You are now added to Org contributor list:
https://git.sr.ht/~bzg/worg/commit/a46b598e

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



Re: [PATCH] function and symbol for headline and olp for org-capture-templates

2024-06-18 Thread Nafiz Islam

I've attached the patch with all of the concerns addressed, hopefully.


>Why (t nil)? It would be more sensible to throw an error.

I believe that was already addressed.

+ (or final-headline + (error "Invalid headline: %S" headline
From 4cf99be212757ad910b8bbf680171434c0e6b06c Mon Sep 17 00:00:00 2001
From: Nafiz Islam 
Date: Tue, 21 May 2024 16:24:26 -0400
Subject: [PATCH] org-capture-templates: Allow headline/olp target to
 be function or symbol

* doc/org-manual.org: Add target spec format for function and symbol
for headline and olp.
* etc/ORG-NEWS: Announce the updated options for
`org-capture-templates'
* lisp/org-capture.el (org-capture-templates): Update customization
type for `file+headline', `file+olp' and `file+olp+datetree' targets,
and update docstring.
(org-capture-expand-headline): Define a new function that computes
headline string from target spec.
(org-capture-expand-olp): Define a new function that computes olp list
from target spec.
(org-capture-set-target-location): Use `org-capture-expand-headline'
to expand headline, and use `org-capture-expand-olp' to expand outline
path.
* testing/lisp/test-org-capture.el (test-org-capture/entry): Add tests
for at most three different kinds of target for `file+headline',
`file+olp', and `file+olp+datetree'.
(test-org-capture/org-capture-expand-olp): Add tests for
`org-capture-expand-olp'.
---
 doc/org-manual.org   |  12 +++
 etc/ORG-NEWS |   6 ++
 lisp/org-capture.el  |  67 +++---
 testing/lisp/test-org-capture.el | 148 ++-
 4 files changed, 219 insertions(+), 14 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 3973764f9..96c90eaab 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -8052,10 +8052,18 @@ Now lets look at the elements of a template definition.  Each entry in
 
   - =(file+headline "filename" "node headline")= ::
 
+  - =(file+headline "filename" function-returning-string)= ::
+
+  - =(file+headline "filename" symbol-containing-string)= ::
+
 Fast configuration if the target heading is unique in the file.
 
   - =(file+olp "filename" "Level 1 heading" "Level 2" ...)= ::
 
+  - =(file+olp "filename" function-returning-list-of-strings)= ::
+
+  - =(file+olp "filename" symbol-containing-list-of-strings)= ::
+
 For non-unique headings, the full path is safer.
 
   - =(file+regexp "filename" "regexp to find location")= ::
@@ -8064,6 +8072,10 @@ Now lets look at the elements of a template definition.  Each entry in
 
   - =(file+olp+datetree "filename" [ "Level 1 heading" ...])= ::
 
+  - =(file+olp+datetree "filename" function-returning-list-of-strings)= ::
+
+  - =(file+olp+datetree "filename" symbol-containing-list-of-strings)= ::
+
 This target[fn:30] creates a heading in a date tree[fn:31] for
 today's date.  If the optional outline path is given, the tree
 will be built under the node it is pointing to, instead of at top
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index e2cacb401..c7ce9f6b3 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -43,6 +43,12 @@ or newer.
 # adding new customizations, or changing the interpretation of the
 # existing customizations.
 
+*** Allow headline/olp target in ~org-capture-templates~ to be a function/variable
+
+The variable ~org-capture-templates~ accepts a target specification as
+function and symbol for headline (~file+headline~) and olp (~file+olp~
+and ~file+olp+datetree~).
+
 *** New =%\*N= placeholder in ~org-capture-templates~
 
 The new placeholder is like =%\N=, gives access not only to the
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 98a43b096..c75b25c40 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -201,15 +201,21 @@ target   Specification of where the captured item should be placed.
  File as child of this entry, or in the body of the entry
 
  (file+headline \"path/to/file\" \"node headline\")
+ (file+headline \"path/to/file\" function-returning-string)
+ (file+headline \"path/to/file\" symbol-containing-string)
  Fast configuration if the target heading is unique in the file
 
  (file+olp \"path/to/file\" \"Level 1 heading\" \"Level 2\" ...)
+ (file+olp \"path/to/file\" function-returning-list-of-strings)
+ (file+olp \"path/to/file\" symbol-containing-list-of-strings)
  For non-unique headings, the full outline path is safer
 
  (file+regexp  \"path/to/file\" \"regexp to find location\")
  File to the entry matching regexp
 
  (file+olp+datetree \"path/to/file\" \"Level 1 heading\" ...)
+ (file+olp+datetree \"path/to/file\" function-returning-list-of-strings)
+ (file+olp+datetree \"path/to/file\" symbol-containing-list-of-strings)
  Will create a heading in a date tree for today's date.
  If no heading is g

Re: [BUG] orgalist send bug

2024-06-18 Thread Rustom Mody
Playing around a little more only more confusing

Earlier I thought:
- Normal emacs startup gives warning on send
- make repro startup makes it an error

But now I find that even the make repro
also gives warnings or errors unpredictably.

[Normal startup was never giving errors; only warnings and until 1.14
it was deleting the source, now not deleting]



Re: [FR] 'org-columns-next-allowed-value' for 'summary-checkbox'es functions should have 'intermediate state' '[-]'

2024-06-18 Thread Ihor Radchenko
Ihor Radchenko  writes:

> Sławomir Grochowski  writes:
>
>> Thank you for asking.
>> Yes, I would be interested.
>> I will prepare a patch.
>
> May I know if you had a chance to work on this?

Closed.
The discussion continued in another thread:
https://list.orgmode.org/orgmode/87frvyps27.fsf@localhost/

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



Re: [BUG] org-publish: org-element--cache: Got empty parent while parsing [9.6.18 ( @ /home/arne/.emacs.d/elpa/org-9.6.18/)]

2024-06-18 Thread Ihor Radchenko
"Dr. Arne Babenhauserheide"  writes:

> - Requirements: mercurial, make, Emacs (naturally :))
>
> hg clone https://hg.sr.ht/~arnebab/draketo
> cd draketo
> autoreconf -i
> ./configure
> make

I tried to reproduce using this recipe, but I am unable to:

[yantar92:/tmp/draketo] default ☿ 
> autoreconf -i
configure.ac:7: installing './config.guess'
configure.ac:7: installing './config.sub'
configure.ac:14: installing './install-sh'
configure.ac:14: installing './missing'
Makefile.am:10: warning: wildcard *.org assets/* [b-z]*/*.org */.htaccess: 
non-POSIX variable name
Makefile.am:10: (probably a GNU make extension)
Makefile.am:13: warning: wildcard .org-timestamps/*: non-POSIX variable name
Makefile.am:13: (probably a GNU make extension)
Makefile.am:13: warning: wildcard */*-tmp.png: non-POSIX variable name
Makefile.am:13: (probably a GNU make extension)
Makefile.am:13: warning: CLEANFILES multiply defined in condition TRUE ...
Makefile.am:3: ... 'CLEANFILES' previously defined here
Makefile.am:14: warning: wildcard site/* site/*/* site/*/*/*: non-POSIX 
variable name
Makefile.am:14: (probably a GNU make extension)
Makefile.am:14: warning: wildcard .cache/*: non-POSIX variable name
Makefile.am:14: (probably a GNU make extension)
Makefile.am:14: warning: wildcard .cache/fontconfig/*: non-POSIX variable name
Makefile.am:14: (probably a GNU make extension)
Makefile.am:14: warning: wildcard politik/*.png: non-POSIX variable name
Makefile.am:14: (probably a GNU make extension)
Makefile.am:14: warning: wildcard 
.cache/guile/ccache/*/gnu/store/*-emacs-geiser-*/share/geiser/guile/geiser/*: 
non-POSIX variable name
Makefile.am:14: (probably a GNU make extension)
Makefile.am:23: warning: realpath @abs_top_builddir@: non-POSIX variable name
Makefile.am:23: (probably a GNU make extension)
Makefile.am:26: warning: wildcard assets/*png: non-POSIX variable name
Makefile.am:26: (probably a GNU make extension)
Makefile.am:31: warning: foreach filename,$(minified_assets: non-POSIX variable 
name
Makefile.am:31: (probably a GNU make extension)
Makefile.am:31: warning: foreach filename,$(wildcard site/*.html site/*/*.html: 
non-POSIX variable name
Makefile.am:31: (probably a GNU make extension)
Makefile.am:31: warning: subst site/,,$(filename: non-POSIX variable name
Makefile.am:31: (probably a GNU make extension)
Makefile.am:31: warning: subst .html,,$(subst site/,,$(filename: non-POSIX 
variable name
Makefile.am:31: (probably a GNU make extension)
Makefile.am:46: warning: realpath @abs_top_builddir@: non-POSIX variable name
Makefile.am:46: (probably a GNU make extension)
Makefile.am: installing './INSTALL'
configure.ac:577: error: required file 
'wissen/Mike_Perry-comic-roll-a-die-2014-climate-deutsch-1-2-3.png' not found
configure.ac:1029: error: required file 
'kreatives/best-thing-today--2022-2023--18-klein.png' not found
configure.ac:1029: error: required file 
'kreatives/best-thing-today--2022-2023--18.png' not found
configure.ac:1175: error: required file 'software/package-guix.org' not found
configure.ac:1195: error: required file 
'anderes/2023-11-11-taijiquan-form-teil-1-vertikal.png' not found
configure.ac:1195: error: required file 
'anderes/2023-11-11-taijiquan-form-teil-1-vertikal.svg' not found
autoreconf-2.72: error: automake failed with exit status: 1
[yantar92:/tmp/draketo] default* 6s 1 ☿ 
> ./configure 
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: error: cannot find input file: 'Makefile.in'

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



Build issues

2024-06-18 Thread Rustom Mody
Its possible that the other bug I reported on orgalist and mixed org
is related to some build issues

So heres a report
$ make up1

Some selected lines of output

1. I guess harmless
Loading /extra/pdsw/org-mode/mk/org-fixup.el (source)...
WARNING: No org-loaddefs.el file could be found from where org.el is loaded.
You need to run "make" or "make autoloads" from Org lisp directory
Neither repeatedly running mae up1 or running make autoloads makes the
warning go away

2. absent ob-vala
Cannot open load file: No such file or directory, ob-vala
make[1]: *** [mk/targets.mk:102: test-dirty] Error 255
make[1]: Leaving directory '/extra/pdsw/org-mode'
make: *** [mk/targets.mk:112: up1] Error 2

3. make helpall
documents make vanilla
But not make repro
[a docbug]



Re: [BUG] Export does not read .dir-locals.el [9.7.3 (release_9.7.3 @ /usr/local/share/emacs/30.0.50/lisp/org/)]

2024-06-18 Thread Protesilaos Stavrou
> From: Ihor Radchenko 
> Date: Fri, 14 Jun 2024 14:27:12 +
>
> Protesilaos Stavrou  writes:
>
>> I have noticed that the export mechanism does not read the local
>> variables of a file when those come from a .dir-locals.el.
>
> It is expected - export happens in a separate buffer that only inherits
> Org mode settings, but nothing else.
>
> Not a bug.
> Canceled.

I think it runs counter to the idea of directory-local variables. Though
#+bind is fine.

>> ...
>> Perhaps there is some user option to let the export mechanism read those
>> local variables?
>
> You can make use of #+bind functionality.

Thank you!

-- 
Protesilaos Stavrou
https://protesilaos.com



Re: [BUG] orgalist send bug

2024-06-18 Thread Rustom Mody
On Tue, Jun 18, 2024 at 2:51 PM Nicolas Goaziou  wrote:
>
> Hello,
>
> Rustom Mody  writes:
>
> > I can confirm that with orgalist 1.15 the delete behavior has been
> > corrected -- Thanks!
> > The warning:
> > ⛔ Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org
> > buffer # (text-mode)
>
> I think I fixed it in release freshly submitted release 1.16.

The elpa broken link and 1.14 1.15 mixup is gone

But the problem remains

If I start emacs normally then this warning

⛔ Warning (org-element): ‘org-element-at-point’ cannot be used in
non-Org buffer # (text-mode)

The following error on
make repro
package-initialize
package-install orgalist
Open file
M-x orgalist-mode
M-x orgalist-send-list

Debugger entered--Lisp error: (wrong-number-of-arguments org-persist-load 5)
  (org-persist-load (list '(elisp org-element--cache) (list 'version
org-element-cache-version)) (current-buffer) 'match-hash :read-related
t)
  (progn (org-persist-load (list '(elisp org-element--cache) (list
'version org-element-cache-version)) (current-buffer) 'match-hash
:read-related t))
  (if (and org-element-cache-persistent org-element-use-cache) (progn
(org-persist-load (list '(elisp org-element--cache) (list 'version
org-element-cache-version)) (current-buffer) 'match-hash :read-related
t)))
  (let ((delay-mode-hooks t)) (outline-mode) (setq major-mode
'org-mode) (setq mode-name "Org") (progn (if (get 'outline-mode
'mode-class) (put 'org-mode 'mode-class (get 'outline-mode
'mode-class))) (if (keymap-parent org-mode-map) nil (set-keymap-parent
org-mode-map (current-local-map))) (let ((parent (char-table-parent
org-mode-syntax-table))) (if (and parent (not (eq parent
(standard-syntax-table nil (set-char-table-parent
org-mode-syntax-table (syntax-table (if (or (abbrev-table-get
org-mode-abbrev-table :parents) (eq org-mode-abbrev-table
local-abbrev-table)) nil (abbrev-table-put org-mode-abbrev-table
:parents (list local-abbrev-table (use-local-map org-mode-map)
(set-syntax-table org-mode-syntax-table) (setq local-abbrev-table
org-mode-abbrev-table) (set (make-local-variable 'org-mode-loading) t)
(set (make-local-variable 'tab-width) 8) (org-load-modules-maybe) (if
org-agenda-file-menu-enabled (progn (org-install-agenda-files-menu)))
(set (make-local-variable 'outline-regexp) org-outline-regexp) (set
(make-local-variable 'outline-level) 'org-outline-level)
(org-element-cache-reset) (if (and org-element-cache-persistent
org-element-use-cache) (progn (org-persist-load (list '(elisp
org-element--cache) (list 'version org-element-cache-version))
(current-buffer) 'match-hash :read-related t)))
(org-set-regexps-and-options) (add-to-invisibility-spec '(org-link))
(org-fold-initialize (or (and (stringp org-ellipsis) (not (equal ""
org-ellipsis)) org-ellipsis) "...")) (make-local-variable
'org-link-descriptive) (if (eq org-fold-core-style 'overlays) (progn
(add-to-invisibility-spec '(org-hide-block . t (if (and (stringp
org-ellipsis) (not (equal "" org-ellipsis))) (progn (if
org-display-table nil (setq org-display-table (make-display-table)))
(set-display-table-slot org-display-table 4 (vconcat (mapcar #'(lambda
... ...) org-ellipsis))) (setq buffer-display-table
org-display-table))) (org-set-font-lock-defaults) (if (and
org-tag-faces (not org-tags-special-faces-re)) (progn
(org-set-tag-faces 'org-tag-faces org-tag-faces))) (set
(make-local-variable 'calc-embedded-open-mode) "# ") (set-syntax-table
(make-syntax-table org-mode-syntax-table)) (set (make-local-variable
'font-lock-unfontify-region-function) 'org-unfontify-region) (set
(make-local-variable 'org-table-may-need-update) t) (add-hook
'before-change-functions 'org-before-change-function nil 'local)
(add-hook 'kill-buffer-hook 'org-check-running-clock nil 'local)
(org-fold--advice-edit-commands) (org-macro-initialize-templates)
(org-update-radio-target-regexp) (set (make-local-variable
'indent-line-function) 'org-indent-line) (set (make-local-variable
'indent-region-function) 'org-indent-region) (org-setup-filling)
(org-setup-comments-handling) (set (make-local-variable
'beginning-of-defun-function) 'org-backward-element) (set
(make-local-variable 'end-of-defun-function) #'(lambda nil (if (not
(org-at-heading-p)) (org-forward-element) (org-forward-element)
(forward-char -1 (set (make-local-variable 'next-error-function)
'org-occur-next-match) (set (make-local-variable
'add-log-current-defun-function) #'org-add-log-current-headline) (if
org-enforce-todo-dependencies (add-hook 'org-blocker-hook
'org-block-todo-from-children-or-siblings-or-parent) (remove-hook
'org-blocker-hook
'org-block-todo-from-children-or-siblings-or-parent)) (if
org-enforce-todo-checkbox-dependencies (add-hook 'org-blocker-hook
'org-block-todo-from-checkboxes) (remove-hook 'org-blocker-hook
'org-block-todo-from-checkboxes)) (set (make-local-variable
'align-mode-rules-list) '((org-in-buffer-settings (regexp . "^[
\11]*#\\+[A-Z_]+:\\(\\s-*\\)\\S-+") (modes quote (org-mode) (set

Re: [BUG] orgalist send bug

2024-06-18 Thread General discussions about Org-mode.
Hello,

Rustom Mody  writes:

> I can confirm that with orgalist 1.15 the delete behavior has been
> corrected -- Thanks!
> The warning:
> ⛔ Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org
> buffer # (text-mode)

I think I fixed it in release freshly submitted release 1.16.

Thanks.

Regards,
-- 
Nicolas Goaziou





Re: [BUG] orgalist send bug

2024-06-18 Thread Rustom Mody
On Tue, Jun 18, 2024 at 1:09 PM Ihor Radchenko  wrote:
>
> Rustom Mody  writes:
>
> >> 1. make repro
> >> 2. (push "/path/to/orgalist/folder/on/elpa/dir" load-path)
> >>
> >>
> > Doing that alone does not find orgalist-mode
> > If I add:
> > 3. load-file "/path/to/orgalist/folder/on/elpa/dir/orgalist-autoloads.el"
> >
> > then orgalist minor mode starts
> >
> > But on M-x orgalist-send-list I get
> >
> > Debugger entered--Lisp error: (error "Not at a list item")
> >   error("Not at a list item")
>
> Hmm. Let's try to isolate things even further.
>
> May you
>
> 1. make repro
> 2. download orgalist source code separately


All I can find is https://elpa.gnu.org/packages/orgalist.html
That has a link
https://elpa.gnu.org/packages/orgalist-1.14.tar
which is broken

Also it has versions 1.14 and 1.15 confused

Latest  orgalist-1.14.tar

But below the badge
GNU ELPA orgalist 1.15

When I changed the 14 in the link to 15 I could download a tar file
It seems to contain the same file that elpa gets

I load it by hand
Get the same error:


Debugger entered--Lisp error: (error "Not at a list item")
  error("Not at a list item")
  (if (orgalist--at-item-p) nil (error "Not at a list item"))
  (catch 'exit (if (orgalist--at-item-p) nil (error "Not at a list
item")) (save-excursion (let ((case-fold-search t))
(re-search-backward "^[ \11]*#\\+ORGLST:" nil t) (if (looking-at "[
\11]*#\\+ORGLST:[ \11]+SEND[ \11]+\\(\\S-+\\)[ \11]+\\([^ \11\n]...")
nil (if maybe (throw 'exit nil) (error "Don't know how to transform
this list") (let* ((name (regexp-quote (match-string 1)))
(transform (intern (match-string 2))) (bottom-point (save-excursion
(re-search-forward "\\(end{comment}\\|@end ignore\\|-->\\)" nil t)
(match-beginning 0))) (top-point (progn (re-search-backward
"#\\+ORGLST" nil t) (re-search-forward (org-item-beginning-re)
bottom-point t) (match-beginning 0))) (plain-list (save-excursion
(goto-char top-point) (funcall 'org-list-to-lisp (if (fboundp
transform) nil (error "No such transformation function %s" transform))
(let ((txt (funcall transform plain-list))) (save-excursion (goto-char
(point-min)) (let ((receiver-count 0) (begin-re (format "BEGIN
+RECEIVE +ORGLST +%s\\([ \11]\\|$\\)" name)) (end-re (format "END
+RECEIVE +ORGLST +%s\\([ \11]\\|$\\)" name))) (while
(re-search-forward begin-re nil t) (setq receiver-count (1+
receiver-count)) (let (...) (if ... nil ...) (beginning-of-line)
(delete-region beg ...) (insert txt "\n"))) (cond ((> receiver-count
1) (message "List converted and installed at receiver locations")) ((=
receiver-count 1) (message "List converted and installed at receiver
location")) (t (user-error "No valid receiver location found"
  orgalist-send-list()
  funcall-interactively(orgalist-send-list)
  command-execute(orgalist-send-list record)
  execute-extended-command(nil "orgalist-send-list" "orgalist-se")
  funcall-interactively(execute-extended-command nil
"orgalist-send-list" "orgalist-se")
  command-execute(execute-extended-command)



Re: [BUG] orgalist send bug

2024-06-18 Thread Ihor Radchenko
Rustom Mody  writes:

>> 1. make repro
>> 2. (push "/path/to/orgalist/folder/on/elpa/dir" load-path)
>>
>>
> Doing that alone does not find orgalist-mode
> If I add:
> 3. load-file "/path/to/orgalist/folder/on/elpa/dir/orgalist-autoloads.el"
>
> then orgalist minor mode starts
>
> But on M-x orgalist-send-list I get
>
> Debugger entered--Lisp error: (error "Not at a list item")
>   error("Not at a list item")

Hmm. Let's try to isolate things even further.

May you

1. make repro
2. download orgalist source code separately
3. Add it to load-path
4. (require 'orgalist)
5. Try to reproduce

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



Re: [PATCH] lisp/org-clock.el (org-clock-sum): Rewrite regex using rx

2024-06-18 Thread Ihor Radchenko
Morgan Smith  writes:

> Ihor Radchenko  writes:
>
>> So, in the message I linked, Nicolas (the major Org mode contributor)
>> was not right. I hence need to fix the parser and update Org syntax
>> page. This includes fixing `org-element-clock-line-re' to account for
>> CLOCK: => 1:00 syntax.
>
> Cool.  I guess ping this thread when that's done so I can give you
> another version of the patch.  Or if you'd like help with that stuff let
> me know.  I'm here to help.

Ping ;)

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