[BUG] org-agenda-clock-cancel does not update agenda buffer [9.6.15 (release_9.6.15 @ /nix/store/5hl68vr85cagmwaycqy652r2g2isjcyq-emacs-29.2/share/emacs/29.2/lisp/org/)]

2024-03-20 Thread z
After clocking into an entry (org-agenda-clock-in) from an agenda
buffer (such as org-agenda-list), the entry is highlighted with a face
(org-agenda-clocking).  When the entry is no longer clocked in, e.g.,
by clocking out or marking it DONE, the org-agenda-clocking face is
normally removed.

However, org-agenda-clock-cancel is the exception, as it doesn't
update the clocking entry's appearance.  Pressing r (org-agenda-redo)
fixes the appearance.  I suspect org-agenda-clock-cancel just needs to
call org-agenda-unmark-clocking-task.

Emacs  : GNU Emacs 29.2 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 
1.18.0, Xaw3d scroll bars)
Package: Org mode version 9.6.15 (release_9.6.15 @ 
/nix/store/5hl68vr85cagmwaycqy652r2g2isjcyq-emacs-29.2/share/emacs/29.2/lisp/org/)



Re: Error with org-persist

2024-03-20 Thread Al Oomens
(file-writable-p "c:/Users/aloom/My Drive/home/.emacs.d/org-persist") - returns 
"t"

From: Ihor Radchenko 
Sent: Wednesday, March 20, 2024 3:07 PM
To: Al Oomens 
Cc: emacs-orgmode@gnu.org 
Subject: Re: Error with org-persist

[ Adding Org mailing list back to CC. Please use "Reply All" to keep the
  conversation public ]

Al Oomens  writes:

> OK, very strange.
> .emacs.d/org-persist/ does not exist. It should be automatically created, 
> correct?

Yup.

> Evaluating (file-writable-p "c:/Users/aloom/My Drive/home/.emacs.d/") returns 
> "nil".
> However, I was able to visit a new file and save it to that directory:
> ...

What about (file-writable-p "c:/Users/aloom/My 
Drive/home/.emacs.d/org-persist") ?

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


Re: Error with org-persist

2024-03-20 Thread Ihor Radchenko
[ Adding Org mailing list back to CC. Please use "Reply All" to keep the
  conversation public ]

Al Oomens  writes:

> OK, very strange.
> .emacs.d/org-persist/ does not exist. It should be automatically created, 
> correct?

Yup.

> Evaluating (file-writable-p "c:/Users/aloom/My Drive/home/.emacs.d/") returns 
> "nil".
> However, I was able to visit a new file and save it to that directory:
> ...

What about (file-writable-p "c:/Users/aloom/My 
Drive/home/.emacs.d/org-persist") ?

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



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

2024-03-20 Thread Ihor Radchenko
Sławomir Grochowski  writes:

>>  Except that we should not allow removing checkboxes and instead
>>  force empty checkbox with single prefix argument.
>
> And why do you want to avoid this?
> When using 'org-column' I sometimes remove an empty checkbox.
> So I see use in it, and most importantly, it would provide same
> compatible interface for 'org-checkbox' and 'org-columns-checkbox'

I guess that it might be ok. I am just worried about empty properties
that will be produced if one removes checkbox value.

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



Re: Error with org-persist

2024-03-20 Thread Ihor Radchenko
Al Oomens  writes:

> Greetings, I have never posted to this list before.

Welcome!

> ... recently started getting this
> error when I first open a .org file:
>
> 'Missing write access rights to org-persist-directory: "c:/Users/aloom/My 
> Drive/home/.emacs.d/org-persist/"'.
>
> I am using emacs v29.2 on Windows 11. Org-mode is 9.6.21
>
> This started happening fairly recently, perhaps when I upgraded Emacs? Also 
> note, that I have my $HOME in a Goggle Drive synced folder. Perhaps that has 
> something to do with this? Or perhaps the space in the PATH to my HOME 
> directory? Although, as I stated, I did not have this error until fairly 
> recently.

The message you are seeing is displayed when Emacs has no write access
to your .emacs.d.
Check your FS write access settings along the path you see in the
message.

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



Error with org-persist

2024-03-20 Thread Al Oomens
Greetings, I have never posted to this list before. I searched the email 
archive, and didn't see anything related. I have been using Emacs and org-more 
for several years and recently started getting this error when I first open a 
.org file:

'Missing write access rights to org-persist-directory: "c:/Users/aloom/My 
Drive/home/.emacs.d/org-persist/"'.

I am using emacs v29.2 on Windows 11. Org-mode is 9.6.21

This started happening fairly recently, perhaps when I upgraded Emacs? Also 
note, that I have my $HOME in a Goggle Drive synced folder. Perhaps that has 
something to do with this? Or perhaps the space in the PATH to my HOME 
directory? Although, as I stated, I did not have this error until fairly 
recently.

Let me know if you need any further information.
Thanks!


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

2024-03-20 Thread Sławomir Grochowski
Ihor Radchenko  writes:
> I think that we can do the following:
>
> (1) modify org-columns-next-allowed-value (S-/) to use the
> three states.
>
> (2) modify org-columns-toggle-or-columns-quit and org-columns--toggle to
> follow what C-c C-c does:
>
> (5.6 Checkboxes section of the manual)
> 
> ‘C-c C-c’ (‘org-toggle-checkbox’)
>  Toggle checkbox status or--with prefix argument--checkbox presence
>  at point.  With a single prefix argument, add an empty checkbox or
>  remove the current one(3).  With a double prefix argument, set it
>  to ‘[-]’, which is considered to be an intermediate state.
>

Thank you for advice. 
I'm surprised I didn't think of it myself.
It's a good idea to ensure consistency between 'org-checkbox' and 
'org-columns-checkbox'.

>  Except that we should not allow removing checkboxes and instead
>  force empty checkbox with single prefix argument.

And why do you want to avoid this?
When using 'org-column' I sometimes remove an empty checkbox.
So I see use in it, and most importantly, it would provide same
compatible interface for 'org-checkbox' and 'org-columns-checkbox'


In my previously message I didn't reply to all.
So now I'm fixing it CCing emacs-orgmode@gnu.org now.   

Regards,
-- 
Slawomir Grochowski



Re: [DISCUSSION] "quick-help" popup for org-columns (column view)

2024-03-20 Thread Ihor Radchenko
Sławomir Grochowski  writes:

> Inspired by "Re: Adding a "quick-help" menu"
> https://lists.gnu.org/archive/html/emacs-devel/2022-10/msg01138.html
>
> I've created a "quick-help" for functionality in org-mode - column view
> (https://orgmode.org/worg/org-tutorials/org-column-view-tutorial.html)
>
> This is a popup with keybindings available in the 'column view'.
> In attachment: screenshot and animated gif to see this in motion.
>
> Function 'help-quick' could be easily modified to take some parameters.
> This would allow to create a "help-quick" popups for other packages.
> I think it's pretty helpful in column view. 
>
> Please let me know what you think.

I see no downside supporting `help-quick' command in Org mode's column
view. Generally, better integration with Emacs built-in functionality is
welcome.

We may even bind `help-quick' to something easier than  C-q in
`org-columns-map'. For example, it can be "?".

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



Re: [DISCUSSION] What should we do with undocumented x^(superscript inside /round/ braces) syntax?

2024-03-20 Thread Ihor Radchenko
Ihor Radchenko  writes:

> "Fraga, Eric"  writes:
>
>> On Saturday, 17 Feb 2024 at 14:06, Ihor Radchenko wrote:
>>> Inconsistent with LaTeX syntax, Org mode not only allows
>>> x^{superscript}, but also x^(superscript) with round braces used for
>>> grouping.
>>
>> Inconsistent with LaTeX is not a sufficient reason for removing this, in
>> my opinion.  Org has /dwim/ elements which make it easier to write some
>> expressions than in LaTeX.  Another example is ~x^-1~ which works as I
>> want but would make no sense in LaTeX (where only the "-" would be
>> superscripted, not the 1).
>
> Good point.
> Although, do note that unlike x^word, x^(some text) is not documented.
> Moreover, options like ^:{} create an impression that only curly braces
> are accepted.

Upon further examination, I found that ^:{} does accept _only_ curly
braces:

#+options: ^:{}
x^word
x^{word}
x^(word)

yields (in latex export):

x\^{}word
x\textsuperscript{word}
x\^{}(word)

So, round braces can be seen as another variant of DWIM behavior.

I conclude that there is no reason to change the existing syntax.

I will need to update `org-use-sub-superscripts' docstring and
https://orgmode.org/worg/org-syntax.html#Subscript_and_Superscript to
document this special case.

Maybe also update the manual section 12.3 Subscripts and Superscripts.

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



Re: Presenting Hyperorg version 0.1.0: The Org to HTML Converter

2024-03-20 Thread Ihor Radchenko
c.bu...@posteo.jp writes:

> I am excited to introduce Hyperorg 0.1.0 [1], designed to efficiently 
> convert files
> from Emacs Org-mode and Org-roam into clean HTML files. Ideal for 
> Zettelkasten
> enthusiasts and personal wiki creators, Hyperorg simplifies the 
> conversion process,
> ensuring your nodes correctly interlinked and accurately transformed 
> into HTML format.

Thanks for sharing!
I am wondering why you used pure python rather than built-in export
backend extension support.

> Key Features:
> - Converts Emacs Org-mode and Org-roam files to pure HTML5 and CSS.

May you outline the benefits compared to built-in ox-html (with
org-html-html5-fancy enabled), ox-publish, and possibly with other Org
mode blog generators (see "Publishing" section in
https://orgmode.org/tools.html)?

> - Tailored for Zettelkasten and personal wiki use cases.

May you elaborate what exactly is specially tailored?

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



Re: heading structure ramblie

2024-03-20 Thread Ihor Radchenko
Samuel Wales  writes:

> i sometimes need to know when a folded heading has children,
> and also possibly go to them.  maybe it swallowed a heading
> without my intention.  creating new headings with c-c *
> seems to create children, when i want a sibling.  (so maybe i need a
> command like c-c * that creates a sibling.  but i also want to show and
> navigate heading structure.)

Children are created when you use C-c * on a list.
When used on non-list, with C-u C-u prefix argument, siblings will be
created.

> i'd also like to know without linting the whole file if
> anything is awry locally, such as twice or more indented
> (***) or half-indented (), when org-odd-levels-only
> t.
>
> ...
> this could be solved by showing a view similar to canonical
> visibility, but only headings perhaps as an org-cycle state.
>
> i THINK this is supposed to be possible with c-u:

What about `org-shifttab'?

> or perhaps simpler, is there a command that will go to the
> next heading even if it is invisible, and unfold?  there
> seems to be no org-next-heading, but there is one for
> visible headings.

Try C-c C-r (org-reveal). With one or two prefix arguments depending on
your needs.

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



Re: Org-attach risks

2024-03-20 Thread Ihor Radchenko
Kepa  writes:

> It would be enough to have the option to not having those prompt.
>
> If I could set it to don't offer to copy files, and the option to don't 
> offer to delete old folder, it would be enough.

Would you be interested to submit a patch?
See https://orgmode.org/worg/org-contribute.html

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



Re: [BUG] Partially broken Org mode when remote setupfile is unavailable

2024-03-20 Thread Ihor Radchenko


Confirmed.

Max Nikulin  writes:

> I have tried the following .org file
>
> --- 8< ---
> #+setupfile: /dav:localhost#8000:/setup-dav-123.org
>
> * Heading
>
> [[https://orgmode.org/][Link]]
> --- >8 ---
>
> Having no webdav server running. Expected error:
>> Package ‘tramp-gvfs’ not supported
>> File mode specification error: (user-error Package `tramp-gvfs' not 
>> supported)
>
> Unexpected errors:
> - When point is on any non-empty line, RET is broken
>> save-excursion: Wrong type argument: stringp, nil
> - The link is not fontified (it is parsed properly however and even may 
> be opened).

This is because `file-remote-p' throws an error. I believe that it is
Emacs bug.
See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68976

> In the case of unavailable http: setupfile, RET is not broken,
> but the link is not fontified.
>
> --- 8< ---
> #+setupfile: http://localhost:8000/setup-http-987.org
>
> * Heading
>
> [[https://orgmode.org/][Link]]
> --- >8 ---
>
> I expect that inaccessible setupfiles are just ignored and Org should 
> work as without "#+setupfile:" lines.

This is because of another bug in Emacs.
See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=5

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



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

2024-03-20 Thread Ihor Radchenko
Max Nikulin  writes:

> The committed change is anyway incomplete.
> ...

May you submit a patch?

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



Re: Possible bug in org-agenda not showing habits properly

2024-03-20 Thread Rens Oliemans
Ihor Radchenko  writes:

> You should set `org-modules' _before_ loading Org. Or you can load
> org-habit in more traditional way, via (require 'org-habit) or
> (use-package org-habit).

Thanks, this works! I misunderstood the way the different use-package blocks 
got executed.



Re: [PATCH] Allow external libraries (org-roam) to supply org-id locations

2024-03-20 Thread Ihor Radchenko
"Rick Lupton"  writes:

> The point is that I was thinking org-roam should advise/modify/hook the 
> specific function `org-id-find' [to find ids in its database] but NOT the 
> more general `(org-link-get-parameter "id" :follow)' [because `org-id-open' 
> has a lot of extra logic for search-strings, backwards compatibility, where 
> to open the new location, which it would not be reasonable to duplicate].
>
> Is there a way to do this using the approach you are suggesting?

No. Then, your patch makes sense.

> +(ert-deftest test-org-link/org-id-find ()
> +  "Test `org-id-find' specifications."
> +  (should
> +   (equal '("id.org" . 12)
> +  (org-test-with-temp-text ""
> +(add-hook 'org-id-find-functions (lambda (id _markerp) (cons 
> (concat id ".org") 12)) nil t)
> +(org-id-find "id")

... although this test does not look right. You are modifying the hook
by side effect, retaining the value for all other tests.

Please remove the hook after calling ~org-id-find~ via ~unwind-protect~.

Also, before we merge your patch, may I know if you discussed this
change with org-roam developers? If they do not want to use the proposed
hook, there is no reason to add it to Org mode.

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



Re: Worg build status?

2024-03-20 Thread Bastien Guerry
Ihor Radchenko  writes:

> This is still a problem. Likely on Sourcehut side.
> For now, only Bastien can trigger the builds.

FWIW I've just asked the question here:
https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3C87frwldwqw.fsf%40bzg.fr%3E

-- 
 Bastien Guerry



Re: Pending contents in org documents (Re: Asynchronous blocks for everything (was Re: ...))

2024-03-20 Thread Ihor Radchenko
Bruno Barbier  writes:

> I rewrote the API, rename many things, moved the code around and
> sorted everything into heading/subheading sections.  This is hopefully
> less confusing and a lot simpler; and the documentation hopefully
> explains better how to use it.

Thanks! It does look more clear.

> The updated section "Commentary", in org-pending, describes the 3 steps
> that are needed to mark and use a pending region: a PENREG (I've renamed
> "PINFO" to "PENREG", for PENding REGion, more specific).

I feel that org-pending-penreg (org-pending-) is
redundant. Maybe better use org-pending-region?

> WDYT of this version ?

Comments on org-pending-pendreg struct:

1. It is not clear why you need a separate ~virtual~ field. When
   ~region~ is nil it already implies that the pending region is
   virtual.

2. ~id~ field is semi-internal and assumed to be a number.
   Maybe we can do something more similar to Emacs process API:
   
   (make-process  ARGS)
   ...
   :name NAME -- NAME is name for process.  It is modified if necessary
   to make it unique.

   We can replace id with human-readable name that can also be supplied
   when creating a pending region

3. ~source~ field must match the ~region~ marker buffer. Then, why do we
   need this field at all? May as well just use (marker-buffer (car region))

On the design of ~org-pending~ and ~org-pending-task-connect~:

1. I feel confused about the overall design of the interaction between
   pending region and the associated task.

   Functions like ~org-pending-task-send-update~ imply that pending
   region is rather decoupled from from associated task and the task
   should arrange manually for sending updates to the pending region
   object.

   On the other hand, there is ~task-connection~ that is used to kill
   associated task/process or to "await" for it. This time, pending
   region is strongly coupled with the task, killing it upon deleting
   the pending region.

   I think that we need more (optional) coupling between pending region
   and the associated task. We should be able to get more information
   about the task from pending region side - get logs, current status,
   exit status, etc.

   More specifically, I think that we need (1) allow to pass task as an
   argument for ~org-pending~. (2) In ~org-pending-task-connect~, we
   should allow the task to be a process or timer object. Then, we can
   automatically arrange retrieving process/timer status from the task:
   
   Use process sentinel (maybe, modifying existing via ~add-function~)
   to arrange process status changes to be automatically submitted to
   the pending region;

   Get log updates via process filter

   Kill process via ~kill-process~

   Similar for timers.

   If the argument to ~org-pending-task-connect~ is a lambda, we can use
   the current approach you implemented on the branch.

2. ~org-pending-task-send-update~ name is confusing - it reads as if we
   send an update _to_ the task. Maybe better ~org-pending-region-update~?
   Then, we might even drop ~-sentinel~ field in org-pending-penreg
   object and instead implement that hard-coded ~update~ lambda from
   ~org-pending~ as a part of ~org-pending-region-update~.

3. I feel that different handling of "owner" and indirect buffers is not
   right.

   From the user perspective, it does not matter whether we run an src
   block from one or another indirect buffers - it makes sense to see
   the status in all the indirect org-mode buffers. Maybe we can hook
   into org-mode's fontification and display pending overlays in all the
   indirect buffers.

   Further, it is very confusing that running src block twice from the
   same buffer is not the same as running the same src block from one
   buffer and then from another indirect buffer. The current
   implementation of ~remove-previous-overlays~ makes such distinction
   for reasons I do not understand.

4. I have questions about ~handle-result~ argument in ~org-pending~.

   It is only called on success, but I can easily see that we need to
   handle things specially on failure as well. For example, insert
   stderr or perform other actions like displaying some buffer.

   Or we may even hook some special action to clicking on status
   overlay. For example, clicking on "failure" status overlay may raise
   stderr log.

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