Re: [PATCH] [WORG] Maintenance: on the frequency of bugfix releases

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

> What do you think about the attached patch?

I like the idea.  I've pushed a slightly different version:
https://git.sr.ht/~bzg/worg/commit/45d6c45759

  Security fixes trigger an immediate bugfix release. Other important
  fixes should be accumulated for more than one week and for less than
  two weeks before a bugfix release.

It's important to allow immediate release for security fixes only, and
to let the dust settle for at least a week for other fixes.  

Is it okay for you?

-- 
 Bastien Guerry



Re: Consider removing newlines from org-insert-link help message

2023-12-10 Thread Rudolf Adamkovič
Ihor Radchenko  writes:

> You can just use `org-format-prompt'.

TIL!  Updated.

Thank you!

P.S. I have also updated the commit message.

Rudy
>From aa947b42186fca813d3fcc702f7f5daa554980f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= 
Date: Sun, 10 Dec 2023 00:51:31 +0100
Subject: [PATCH] org-link: Improve UX of 'org-insert-link'

* lisp/ol.el (org-insert-link): Shorten the text in the *Org Links*
buffer to avoid unnecessary line breaks, reword it to better align
with the rest of Emacs, and propertize its key bindings to improve
readability.  Further, move the default link to the minibuffer, as
seen elsewhere in Emacs, and make the *Org Links* buffer read-only.
---
 lisp/ol.el | 40 +---
 1 file changed, 29 insertions(+), 11 deletions(-)

diff --git a/lisp/ol.el b/lisp/ol.el
index c38a30378..bd89415e8 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -1868,16 +1868,34 @@ non-interactively, don't allow to edit the default description."
   (org-link--fontify-links-to-this-file)
   (org-switch-to-buffer-other-window "*Org Links*")
   (with-current-buffer "*Org Links*"
-	(erase-buffer)
-	(insert "Insert a link.
-Use TAB to complete link prefixes, then RET for type-specific completion support\n")
-	(when org-stored-links
-	  (insert "\nStored links are available with / or M-p/n \
-\(most recent with RET):\n\n")
-	  (insert (mapconcat #'org-link--prettify
-			 (reverse org-stored-links)
-			 "\n")))
-	(goto-char (point-min)))
+(read-only-mode 1)
+(let ((inhibit-read-only t)
+  ;; FIXME Duplicate: Also in 'ox.el'.
+  (propertize-help-key
+   (lambda (key)
+ ;; Add `face' *and* `font-lock-face' to "work
+ ;; reliably in any buffer", per a comment in
+ ;; `help--key-description-fontified'.
+ (propertize key
+ 'font-lock-face 'help-key-binding
+ 'face 'help-key-binding
+  (erase-buffer)
+  (insert
+   (apply 'format
+  (cons "Type %s to complete link type, then %s to complete destination.\n"
+(mapcar propertize-help-key
+(list "TAB" "RET")
+	  (when org-stored-links
+(insert (apply 'format
+   (cons "\nStored links accessible with %s/%s or %s/%s are:\n\n"
+ (mapcar propertize-help-key
+ (list "" ""
+   "M-p" "M-n"
+   "RET")
+	(insert (mapconcat #'org-link--prettify
+			   (reverse org-stored-links)
+			   "\n"
+(goto-char (point-min)))
   (when (get-buffer-window "*Org Links*" 'visible)
 (let ((cw (selected-window)))
 	  (select-window (get-buffer-window "*Org Links*" 'visible))
@@ -1892,7 +1910,7 @@ Use TAB to complete link prefixes, then RET for type-specific completion support
 			 org-link--insert-history)))
 	(setq link
 		  (org-completing-read
-		   "Link: "
+   (org-format-prompt "Insert link" (caar org-stored-links))
 		   (append
 		(mapcar (lambda (x) (concat x ":")) all-prefixes)
 		(mapcar #'car org-stored-links)
-- 
2.39.3 (Apple Git-145)

-- 
"Mathematics takes us still further from what is human into the region
of absolute necessity, to which not only the actual world, but every
possible world, must conform."  --- Bertrand Russell, 1902

Rudolf Adamkovič  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia


Re: oeg-add-note and double backslash ?

2023-12-10 Thread David Masterson
Ihor Radchenko  writes:

> David Masterson  writes:
>
>>> The detailed reason why we use this particular markup is that
>>> otherwise some internal code assumptions inside Org mode may break when
>>> users run `fill-region' on the notes. This is an internal implementation
>>> detail which should not be explained in the manual.
>>
>> Hmm.  Fill-region will also compress the blanks in the generate note
>> header -- does that run up against the code assumptions?
>
> No. See `org-skip-over-state-notes'.

Hmm. The docstring on that should discuss what it's looking for to say
"this is the end of the state notes".  Does a plain note (org-add-note)
count as a state note?

>> I'm all for keeping internal implementation details out of the user's
>> manual, unless...
>>
>>> What we might explain better is what is a line break, although I am not
>>> very sure what to explain here - I may be too familiar with the concept
>>> from my LaTeX-foo.
>>
>> The manual should set expectations on what an Org file should look like
>> -- at least the key components.  It already defines Header, Paragraph
>> and Timestamp. What I think is missing here is the definition of a Note
>> along with some structure info about it (header line + 2 space indented
>> paragraphs[s]) to prepare the user.
>
> Unlike headings, paragraphs, and timestamps, notes are not a part of Org
> syntax. Their format is customizeable via `org-log-note-headings'.

Oh! That's an interesting point.  That variable is not mentioned in the
Manual (AFAICS), but perhaps it should be -- particularly around the
talk of "rescheduling" (and "delschedule" which I don't see in the
manual). Mentioned only in the sense of, if you want to change the note
header, look here.

> However, it is probably worth describing the notes in 5.3 Progress
> Logging section of the manual.

I'd agree.  In particular, what depends on the format of the note
(header) -- like Agenda.  To warn people what they can or cannot touch.

-- 
David Masterson



[BUG] Hard-coded and inconsistent todo states in org-agenda.el [9.7-pre (release_9.6.12-934-g4d72f3 @ /home/rst/Devel/org-mode/lisp/)]

2023-12-10 Thread Raffael Stocker


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Hi,

org-agenda.el contains the following hard-coded states in ‘org-agenda-to-appt’:

(when (and ok tod (not (string-match "\\`DONE\\|CANCELLED" evt)))...)

I find this confusing as the Org mode manual usually uses “CANCELED”,
with one ‘L’ instead of two.  I believe this should be corrected.  Of
course, ideally the function would take the terminal states from
‘org-todo-keywords’ instead.

Regards,

Raffael

Emacs  : GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, 
cairo version 1.17.8)
Package: Org mode version 9.7-pre (release_9.6.12-934-g4d72f3 @ 
/home/rst/Devel/org-mode/lisp/)



TODO item: is there a way to alert me about it?

2023-12-10 Thread Renato Pontefice
Hi,
I’m wondering if I can have an alert for a TODO that I’ve to execute (i.e.) 
some minutes later.

Is there a way?

Thank you

Renato


[PATCH] lisp/org-capture.el: use link ID's for %K

2023-12-10 Thread Kenny Ballou
* org-capture.el (org-capture-fill-template): fill %K values using org
ID's if `org-id-link-to-org-use-id' is non-nil.
* doc/ORG-NEWS: (Template variable expansion %K) Document new behavior.

Reported-by: Nathaniel W Griswold 
Signed-off-by: Kenny Ballou 
Link: 
https://list.orgmode.org/EF459D47-FCA4-4A18-AFC7-3E62159F186C@manicmind.earth/

TINYCHANGE
---
 etc/ORG-NEWS|  8 
 lisp/org-capture.el | 14 +-
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 59c45b2aa..924ce43cc 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -539,6 +539,14 @@ Currently implemented options are:
   tasks this technically violates the iCalendar spec, but some
   iCalendar programs support this usage.
 
+*** Capture template expansion now supports ID links
+:PROPERTIES:
+:ID:   6f1f4f77-2b16-4a4d-8c84-fb7ba5ddf1e5
+:END:
+
+The capture template expansion element `%K' now creates links using
+the `ID' property of the currently clocked task if
+`org-id-link-to-use-org-id' is non-nil.
 ** New features
 *** =ob-plantuml.el=: Support tikz file format output
 
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index e482f667f..08fe34979 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1675,11 +1675,15 @@ Expansion occurs in a temporary Org mode buffer."
  (org-no-properties org-clock-heading)
""))
 (v-K (if (marker-buffer org-clock-marker)
- (org-link-make-string
-  (format "%s::*%s"
-  (buffer-file-name (marker-buffer org-clock-marker))
-  v-k)
-  v-k)
+  (if org-id-link-to-org-use-id
+  (org-link-make-string
+   (format "id:%s" (org-id-get org-clock-marker))
+   v-k)
+   (org-link-make-string
+(format "%s::*%s"
+(buffer-file-name (marker-buffer org-clock-marker))
+v-k)
+v-k))
""))
 (v-f (or (org-capture-get :original-file-nondirectory) ""))
 (v-F (or (org-capture-get :original-file) ""))

base-commit: 3b719399036f44cbaabf399b3254d6ab3ba462d9
-- 
2.41.0




Re: [PATCH] lisp/org-capture.el: use link ID's for %K

2023-12-10 Thread Kenny Ballou

On 2023-12-08 19:01 GMT, Ihor Radchenko wrote:
> Kenny Ballou  writes:
>
>> I'm currently struggling through modifying it to work with
>> `org-store-link'.  Something, save-excursion -> org-clock-goto ->
>> org-store-link -> org-insert-link is what I'm trying for now, but that's
>> not quite working.  I'll come back to this in a few hours.
>
> The last step is unnecessary. You may just examine `org-stored-links'
> (documented in the docstring of `org-store-link') or
> `org-store-link-plist' (undocumented, but containing more info and also
> used by `org-capture-fill-template').

I ended up using `org-store-link-plist'.  For some reason that I don't
understand, the `save-excursion' -> `org-store-link' was not updating
`org-stored-links'.  Similarly, I had to use `save-window-excursion' or
the `org-clock-goto' would really break things.

If there's a better approach for getting the link, I'm all ears.

>From e618508cdfbf899b93d5081aeec3eda18d5bd306 Mon Sep 17 00:00:00 2001
From: Kenny Ballou 
Date: Thu, 7 Dec 2023 10:29:46 -0700
Subject: [PATCH] lisp/org-capture.el: use link ID's for %K

* org-capture.el (org-capture-fill-template): fill %K values using org
ID's if `org-id-link-to-org-use-id' is non-nil.
* doc/ORG-NEWS: (Template variable expansion %K) Document new behavior.

Reported-by: Nathaniel W Griswold 
Signed-off-by: Kenny Ballou 
Link: https://list.orgmode.org/EF459D47-FCA4-4A18-AFC7-3E62159F186C@manicmind.earth/

TINYCHANGE
---
 etc/ORG-NEWS|  8 
 lisp/org-capture.el | 16 +++-
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 59c45b2aa..924ce43cc 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -539,6 +539,14 @@ Currently implemented options are:
   tasks this technically violates the iCalendar spec, but some
   iCalendar programs support this usage.
 
+*** Capture template expansion now supports ID links
+:PROPERTIES:
+:ID:   6f1f4f77-2b16-4a4d-8c84-fb7ba5ddf1e5
+:END:
+
+The capture template expansion element `%K' now creates links using
+the `ID' property of the currently clocked task if
+`org-id-link-to-use-org-id' is non-nil.
 ** New features
 *** =ob-plantuml.el=: Support tikz file format output
 
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index e482f667f..5bb65de53 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1675,11 +1675,17 @@ Expansion occurs in a temporary Org mode buffer."
 		  (org-no-properties org-clock-heading)
 		""))
 	 (v-K (if (marker-buffer org-clock-marker)
-		  (org-link-make-string
-		   (format "%s::*%s"
-			   (buffer-file-name (marker-buffer org-clock-marker))
-			   v-k)
-		   v-k)
+  (if (and (org-clock-is-active) org-id-link-to-org-use-id)
+  (save-window-excursion
+(org-clock-goto)
+(org-store-link nil)
+(let ((link (plist-get org-store-link-plist :link)))
+  (org-link-make-string link v-k)))
+		(org-link-make-string
+		 (format "%s::*%s"
+			 (buffer-file-name (marker-buffer org-clock-marker))
+			 v-k)
+		 v-k))
 		""))
 	 (v-f (or (org-capture-get :original-file-nondirectory) ""))
 	 (v-F (or (org-capture-get :original-file) ""))

base-commit: 282c0fb6d1d2e6289a5b535a7ee9888f845b760b
-- 
2.41.0


-- 
-Kenny


Re: [PATCH] lisp/org-capture.el: use link ID's for %K

2023-12-10 Thread Kenny Ballou


On 2023-12-08 13:56 GMT, Ihor Radchenko wrote:
> Kenny Ballou  writes:
>> +  (if org-id-link-to-org-use-id
>> +  (org-link-make-string
>> +   (format "id:%s" (org-id-get org-clock-marker))
>> +   v-k)
>
> `org-id-link-to-org-use-id' may have a number of non-nil values with
> slightly different behaviour: t, create-if-interactive,
> create-if-interactive-and-no-custom-id, use-existing, nil.
>
> Your patch will only work as expected for t and nil values, but not for
> others. You may consider leveraging `org-store-link' to account for all
> the possibilities.

This worked for the value of `use-existing', which is how I tested it.
But I see your point, the behavior should be more flexible to the other
values of `org-id-link-to-org-use-id'.

I'm currently struggling through modifying it to work with
`org-store-link'.  Something, save-excursion -> org-clock-goto ->
org-store-link -> org-insert-link is what I'm trying for now, but that's
not quite working.  I'll come back to this in a few hours.

If you have any other specific suggestions I'm missing, please let me
know.  Otherwise, look for a new patch, hopefully soon!

--
-Kenny



Re: [BUG] [PATCH] Add yank-media and DND handler [9.6.7 (9.6.7-g6eb773 @ /home/viz/lib/emacs/straight/build/org/)]

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

> Ihor Radchenko  writes:
>
>> Before I proceed with installing it; Bastien, may you please confirm
>> Visuwesh's copyright assignment status?
>
> Confirmed and added to Worg. Thanks Visuwesh for contributing!

Thanks for checking!
Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=b77f991c0
Fixed.

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



Re: oeg-add-note and double backslash ?

2023-12-10 Thread Ihor Radchenko
David Masterson  writes:

>> The detailed reason why we use this particular markup is that
>> otherwise some internal code assumptions inside Org mode may break when
>> users run `fill-region' on the notes. This is an internal implementation
>> detail which should not be explained in the manual.
>
> Hmm.  Fill-region will also compress the blanks in the generate note
> header -- does that run up against the code assumptions?

No. See `org-skip-over-state-notes'.

> I'm all for keeping internal implementation details out of the user's
> manual, unless...
>
>> What we might explain better is what is a line break, although I am not
>> very sure what to explain here - I may be too familiar with the concept
>> from my LaTeX-foo.
>
> The manual should set expectations on what an Org file should look like
> -- at least the key components.  It already defines Header, Paragraph
> and Timestamp. What I think is missing here is the definition of a Note
> along with some structure info about it (header line + 2 space indented
> paragraphs[s]) to prepare the user.

Unlike headings, paragraphs, and timestamps, notes are not a part of Org
syntax. Their format is customizeable via `org-log-note-headings'.

However, it is probably worth describing the notes in 5.3 Progress
Logging section of the manual.

> ... In this, I probably come from a
> more Reference Manual viewpoint (ie. "this is what all the pieces could
> look like -- now lets discuss why you want each piece"). You could say
> that the '\\' is needed to keep "other things" from combining the header
> and paragraph of the note.  You could leave the details of "other
> things" to variable or function docstrings as well as internal code.

I am not sure if I understand what you mean here.

> p.s. would requiring a blank line after the Note header eliminate the
> need for '\\' ?

Yes.

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



Re: [BUG] [PATCH] Add yank-media and DND handler [9.6.7 (9.6.7-g6eb773 @ /home/viz/lib/emacs/straight/build/org/)]

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

> Before I proceed with installing it; Bastien, may you please confirm
> Visuwesh's copyright assignment status?

Confirmed and added to Worg. Thanks Visuwesh for contributing!

-- 
 Bastien Guerry



Re: Consider removing newlines from org-insert-link help message

2023-12-10 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> From 7bc8e913af0972f0d6119e45d4ecaf80835f2277 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= 
> Date: Sun, 10 Dec 2023 00:51:31 +0100
> Subject: [PATCH] org-link: Prettify 'org-insert-link'
>
> * lisp/ol.el (org-insert-link): Update the UI with text that is (1)
> shorter, to avoid line breaks, (2) more standard, to match other Emacs
> commands, and (3) more readable, with propertized key bindings.  Also,
> show the default link in the minibuffer, as seen elsewhere in Emacs.

Thanks for the update!

> +   (concat "Insert link"
> +   (if-let ((default (caar org-stored-links)))
> +   (format " [default %s]" default)
> + "")
> +   ": ")

You can just use `org-format-prompt'.

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



Re: [BUG] [PATCH] Add yank-media and DND handler [9.6.7 (9.6.7-g6eb773 @ /home/viz/lib/emacs/straight/build/org/)]

2023-12-10 Thread Ihor Radchenko
Visuwesh  writes:

>> Visuwesh, do you want to update your patch accordingly?
>
> I have now adjusted the patch to insert a space between links when the
> Emacs version in <30, and when more than one file is dropped.

Thanks!
I have no comments on the patch.

Before I proceed with installing it; Bastien, may you please confirm
Visuwesh's copyright assignment status?

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



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

2023-12-10 Thread Ihor Radchenko
"Rick Lupton"  writes:

> Here's an updated patch, which adds (optional) search strings to ID links, 
> and the option to inherit ID targets from parent headline / the top level 
> file properties.  I've also updated ORG-NEWS and the manual, and added tests.
>
> I think I've fixed all the issues with my first patch about which headline 
> gets used for the description when inheriting IDs, what happens if there is 
> no ID, etc.

Thanks!

> +*** ~org-id-store-link~ now adds search strings for precise link targets
> +
> +Previously, search strings are supported for =file:= links but not for
> +=id:= links.  This change adds support for search strings to =id:=
> +links.

"This change..." part sounds like a commit message, not a NEWS item.
You may probably remove this paragraph.

>  
> +(defun org-link--try-link-store-functions (interactive?)
> +  "Try storing external links, prompting if more than one is possible.
> +
> +Each function returned by `org-store-link-functions` is called in
> +turn. If multiple functions return non-nil, prompt for which link
> +should be stored.

We use `...' Elisp quoting, not markdown.
Also, please keep two spaces between sentences - you do it
inconsistently across the patch.

> +Return t if a function has successfully stored a link, which will
> +be stored in `org-link-store-props`.

I'd better say "Return t when the link is stored in `org-store-link-plist'."

> +(defcustom org-id-link-consider-parent-id nil
> +  "Non-nil means storing a link to an Org file will consider parent entry 
> IDs.
> +
> +Use this with `org-id-link-use-context` set to `t` to allow
> +linking to uniquely-named sub-entries within a parent entry with
> +an ID, without requiring every sub-entry to have its own ID."

1. `...' quoting
2. The docstring is slightly confusing. Having an example would be helpful.

> +(defcustom org-id-link-use-context t
> +  "Non-nil means org-id links from `org-id-store-link' contain context.
> +\\
> +A search string is added to the id with \"::\" as separator and
> +used to find the context when the link is activated by the
> +command `org-open-at-point'.  When this option is t, the entire
> +active region is be placed in the search string of the file link.
> +If set to a positive integer N, only the first N lines of context
> +are stored.

It does not look like integer value is respected in the patch.

> +Using a prefix argument to the commands `org-store-link' \
> +\(`\\[universal-argument] \\[org-store-link]') or
> +`org-id-store-link` negates this setting for the duration of the
> +command."

You should also update the docstring of `org-store-link' accordingly.

>  ;;;###autoload
> -(defun org-id-get-create ( force)
> +(defun org-id-get-create ( force inherit)
>...
>  ;;;###autoload
> -(defun org-id-get ( epom create prefix)
> +(defun org-id-get ( epom create prefix inherit)

Please document this new optional arguments in the NEWS.

> -  (let ((id (org-entry-get epom "ID")))
> +  (let ((id (org-entry-get epom "ID" inherit)))

This makes your description of INHERIT argument slightly inaccurate - for
`org-entry-get', INHERIT can also be a special symbol 'selective.

> -(defun org-id-store-link ()
> +(defun org-id-store-link (interactive?)

Please make this new argument optional and document the argument in the
docstring and NEWS. Non-optional new argument is a breaking change that
may break third-party code.

>"Store a link to the current entry, using its ID.
>  
> +See also `org-id-link-to-org-use-id`,
> +`org-id-link-use-context`,
> +`org-id-link-consider-parent-id`.
> +
>  If before first heading store first title-keyword as description
>  or filename if no title."
> -  (interactive)
> -  (when (and (buffer-file-name (buffer-base-buffer)) (derived-mode-p 
> 'org-mode))
> -(let* ((link (concat "id:" (org-id-get-create)))
> +  (interactive "p")
> +  (when (and (buffer-file-name (buffer-base-buffer))
> + (derived-mode-p 'org-mode)
> + (or (eq org-id-link-to-org-use-id t)

I do not like this change - `org-id-store-link' is not only used by
`org-store-link'. Suddenly honoring `org-id-link-to-org-use-id' will be
a breaking change. Instead, I suggest you to write a wrapper function,
like `org-id-store-link-maybe' and use it as :store id link property.
That function will call `org-id-store-link' as necessary according to
user customization.

> +  ;; Prefix to `org-store-link` negates preference from 
> `org-id-link-use-context`.
> +  (when (org-xor current-prefix-arg org-id-link-use-context)

This is not reliable. `org-id-store-link' may be called from a completely
different command, not `org-store-link'. Then, the effect of prefix
argument will be unexpected. You should instead process prefix argument
right in `org-store-link' by let-binding `org-id-link-use-context'
around the call to `org-id-store-link'.

> +(pcase (org-link-precise-link-target id-location)

Why not passing the RELATIVE-TO argument?

>  (defun org-id-open (id 

Re: [PATCH] [WORG] Maintenance: on the frequency of bugfix releases

2023-12-10 Thread Matt


  On Sun, 10 Dec 2023 13:24:30 +0100  Ihor Radchenko  wrote --- 
 
 > Doing the releases too frequently will increase a chance of such bugs
 > crawling into ELPA releases. So, there should be at least a minimal
 > waiting period to get a chance to handle such problems.
 
Thank you for explaining.   I had missed that ELPA gets a combination of major, 
minor, and bugfix releases.



Re: [PATCH] [WORG] Maintenance: on the frequency of bugfix releases

2023-12-10 Thread Ihor Radchenko
Matt  writes:

> Not part of the patch, but part of the context: "you shoud *NOT*" -> "you 
> should *NOT*" (missing the 'l')  Already fixed and pushed 
> (https://git.sr.ht/~bzg/worg/commit/a11b256086d567d0894d337b548ec13049a8731b)

Thanks!

> Regarding the patch, it seems reasonable.  
>
> Potentially stupid question, asked without knowing precisely what's involved 
> with a bugfix release (it seems like a matter of tagging and 
> pushing?)...what's the problem with making a new release for every fix?  
> Frequency of fixes?  Time required to make the release?  Storage?

While most of the commits on bugfix are safe to include into release
(see https://orgmode.org/worg/org-maintenance.html#branches),
sometimes we do introduce new bugs on bugfix. As a recent example, see
the fixup! commit on
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/log/?h=bugfix where
I had to fix an accidental breakage on older Emacs versions that I
introduced in the previous fix.

Doing the releases too frequently will increase a chance of such bugs
crawling into ELPA releases. So, there should be at least a minimal
waiting period to get a chance to handle such problems.

Sometimes, we also need to fix critical bugs - these may be tricky and
require some more testing before exposing to wide public.

That's why there should be some not-too-long and not-too-short interval
between bugfix releases.

-- 
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-capture.el: use link ID's for %K

2023-12-10 Thread Ihor Radchenko
Kenny Ballou  writes:

>> The last step is unnecessary. You may just examine `org-stored-links'
>> (documented in the docstring of `org-store-link') or
>> `org-store-link-plist' (undocumented, but containing more info and also
>> used by `org-capture-fill-template').
>
> I ended up using `org-store-link-plist'.  For some reason that I don't
> understand, the `save-excursion' -> `org-store-link' was not updating
> `org-stored-links'.

I can see it from the code now. Basically, instead of updating
`org-stored-links', `org-store-link' returns the link when called
non-interactively (with nil INTERACTIVE? argument).
Now documented on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5e809903d

> ... Similarly, I had to use `save-window-excursion' or
> the `org-clock-goto' would really break things.

You should not use `org-clock-goto' - it is intended for interactive use
and does a lot of unnecessary work.
You may instead do (org-with-point-at org-clock-marker ...)

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



Re: [PATCH] [WORG] Maintenance: on the frequency of bugfix releases

2023-12-10 Thread Matt


  On Sun, 10 Dec 2023 12:27:01 +0100  Ihor Radchenko  wrote --- 

 > What do you think about the attached patch?

Not part of the patch, but part of the context: "you shoud *NOT*" -> "you 
should *NOT*" (missing the 'l')  Already fixed and pushed 
(https://git.sr.ht/~bzg/worg/commit/a11b256086d567d0894d337b548ec13049a8731b)

Regarding the patch, it seems reasonable.  

Potentially stupid question, asked without knowing precisely what's involved 
with a bugfix release (it seems like a matter of tagging and pushing?)...what's 
the problem with making a new release for every fix?  Frequency of fixes?  Time 
required to make the release?  Storage?



[PATCH] [WORG] Maintenance: on the frequency of bugfix releases

2023-12-10 Thread Ihor Radchenko

Even though we do not follow release schedule, I think that it is worth
adding a note about bugfix releases - there is really no reason to delay
them most of the time, as soon as we have new commits on bugfix.

What do you think about the attached patch?

>From e27e05c48a8f36e3c322f0b5a4881d63361a Mon Sep 17 00:00:00 2001
Message-ID: 
From: Ihor Radchenko 
Date: Sun, 10 Dec 2023 12:25:07 +0100
Subject: [PATCH] org-maintenance.org: Add a note about frequent bugfix
 releases

* org-maintenance.org (For bugfix releases): Clarify that bugfix
releases can be done any time there are new fixes on bugfix branch.
---
 org-maintenance.org | 5 +
 1 file changed, 5 insertions(+)

diff --git a/org-maintenance.org b/org-maintenance.org
index bc488f1f..23e6c377 100644
--- a/org-maintenance.org
+++ b/org-maintenance.org
@@ -270,6 +270,11 @@ *** For bugfix releases
 When doing a bugfix release (and only then), you shoud *NOT* merge the
 =main= branch into the =bugfix= branch.
 
+Do not hesitate to make new bugfix releases when there are new commits
+in the bugfix branch.  This way, more users on GNU ELPA can benefit
+from the recent bug fixes.  Considering a new bugfix release every two
+weeks or so might be a good idea.
+
 *** For minor and major releases
 :PROPERTIES:
 :CUSTOM_ID: minor-major-releases
-- 
2.42.0


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