Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Ihor Radchenko
Robert Pluim  writes:

> Ihor> Oops. It was not caught by tests. Fixed on main now. You can pull 
> the
> Ihor> latest main. The error should disappear.
>
> Working fine now, thanks. Doc patch attached (I have copyright
> assignment on file for Emacs).

Thanks!
Applied onto main via a8b32247d.
I amended the commit message adding quotes around function names (`symbol').

Best,
Ihor



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Robert Pluim
> On Fri, 10 Jun 2022 23:03:38 +0800, Ihor Radchenko  
> said:

Ihor> Robert Pluim  writes:
>> Ok. I will, or rather I would, but Iʼm obviously doing something wrong
>> when building org:
>> 
>> Debugger entered--Lisp error: (wrong-type-argument listp "Packages that 
conflict with Org mode")
>> org-element-secondary-p(#("Conflicts" 0 9 (:parent (headline (:raw-value 
"Packages that conflict with Org mode" :begin 739020 :end 744524 :pre-blank 0 
:contents-begin 739061 :contents-end 744523 :robust-begin 739148 :robust-end 
744521 :level 3 :priority nil :tags nil :todo-keyword nil :todo-type nil 
:post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil 
:post-affiliated 739020 :DESCRIPTION "Packages that lead to conflicts." 
:ALT_TITLE "Conflicts" :title "Packages that conflict with Org mode" :parent 
(headline (:raw-value "Interaction with Other Packages" :begin 735540 :end 
744524 :pre-blank 0 :contents-begin 735575 :contents-end 744523 :robust-begin 
735658

Ihor> Oops. It was not caught by tests. Fixed on main now. You can pull the
Ihor> latest main. The error should disappear.

Working fine now, thanks. Doc patch attached (I have copyright
assignment on file for Emacs).

Thanks

Robert
-- 


>From 5437667a97dcd03a2993bfde93b0253590fae74a Mon Sep 17 00:00:00 2001
From: Robert Pluim 
Date: Fri, 10 Jun 2022 17:53:12 +0200
Subject: [PATCH] doc/org-manual.org: Reference org-cyclic and org-block

* doc/org-manual.org (Footnotes): Add org-cyclic and org-block to note
about org diary functions.  Add function indices for org-{date,
anniversary, cyclic, block}.
---
 doc/org-manual.org | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 32a45f884..d560562c5 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -22046,6 +22046,10 @@ * Footnotes
 However, any date inserted or modified by Org adds that day name, for
 reading convenience.
 
+#+findex: org-date
+#+findex: org-anniversary
+#+findex: org-cyclic
+#+findex: org-block
 [fn:60] When working with the standard diary expression functions, you
 need to be very careful with the order of the arguments.  That order
 depends evilly on the variable ~calendar-date-style~.  For example, to
@@ -22053,10 +22057,11 @@ * Footnotes
 =(diary-date 12 1 2005)= or =(diary-date 1 12 2005)= or =(diary-date
 2005 12 1)=, depending on the settings.  This has been the source of
 much confusion.  Org mode users can resort to special versions of
-these functions like ~org-date~ or ~org-anniversary~.  These work just
-like the corresponding ~diary-~ functions, but with stable ISO order
-of arguments (year, month, day) wherever applicable, independent of
-the value of ~calendar-date-style~.
+these functions, namely ~org-date~, ~org-anniversary~, ~org-cyclic, and
+~org-block~.  These work just like the corresponding ~diary-~
+functions, but with stable ISO order of arguments (year, month, day)
+wherever applicable, independent of the value of
+~calendar-date-style~.
 
 [fn:61] See the variable ~org-read-date-prefer-future~.  You may set
 that variable to the symbol ~time~ to even make a time before now
-- 
2.35.1.607.gf01e51a7cf



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Ihor Radchenko
Robert Pluim  writes:

> Ok. I will, or rather I would, but Iʼm obviously doing something wrong
> when building org:
>
>   Debugger entered--Lisp error: (wrong-type-argument listp "Packages that 
> conflict with Org mode")
> org-element-secondary-p(#("Conflicts" 0 9 (:parent (headline (:raw-value 
> "Packages that conflict with Org mode" :begin 739020 :end 744524 :pre-blank 0 
> :contents-begin 739061 :contents-end 744523 :robust-begin 739148 :robust-end 
> 744521 :level 3 :priority nil :tags nil :todo-keyword nil :todo-type nil 
> :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil 
> :post-affiliated 739020 :DESCRIPTION "Packages that lead to conflicts." 
> :ALT_TITLE "Conflicts" :title "Packages that conflict with Org mode" :parent 
> (headline (:raw-value "Interaction with Other Packages" :begin 735540 :end 
> 744524 :pre-blank 0 :contents-begin 735575 :contents-end 744523 :robust-begin 
> 735658

Oops. It was not caught by tests. Fixed on main now. You can pull the
latest main. The error should disappear.

Best,
Ihor



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Robert Pluim
> On Fri, 10 Jun 2022 20:59:22 +0800, Ihor Radchenko  
> said:

Ihor> Robert Pluim  writes:
>> I can send a patch against the org-mode repository main branch, or fix
>> it directly in the emacs repo. What's the preferred workflow for this
>> kind of change?

Ihor> Just submit a patch here. Against the Org mode repository.
Ihor> Org mode development happens in Org mode repository and in this 
mailing
Ihor> list, not in Emacs repo.

Ok. I will, or rather I would, but Iʼm obviously doing something wrong
when building org:

  rltb:~/repos/org-mode (main)> cat local.mk
  EMACS   := /home/rpluim/repos/emacs-28/src/emacs
  rltb:~/repos/org-mode (main)> git pull
  Already up to date.
  rltb:~/repos/org-mode (main)> git status
  On branch main
  Your branch is up to date with 'origin/main'.

  nothing to commit, working tree clean
  rltb:~/repos/org-mode (main)> make doc
  make -C doc info
  make[1]: Entering directory '/home/rpluim/repos/org-mode/doc'
  /home/rpluim/repos/emacs-28/src/emacs  -Q -batch --eval '(setq 
vc-handled-backends nil org-startup-folded nil org-element-cache-persistent 
nil)'  \
--eval '(add-to-list `load-path "../lisp")' \
--eval '(load "../mk/org-fixup.el")'\
--eval '(org-make-manual)'
  Loading /home/rpluim/repos/org-mode/mk/org-fixup.el (source)...
  Debugger entered--Lisp error: (wrong-type-argument listp "Packages that 
conflict with Org mode")
org-element-secondary-p(#("Conflicts" 0 9 (:parent (headline (:raw-value 
"Packages that conflict with Org mode" :begin 739020 :end 744524 :pre-blank 0 
:contents-begin 739061 :contents-end 744523 :robust-begin 739148 :robust-end 
744521 :level 3 :priority nil :tags nil :todo-keyword nil :todo-type nil 
:post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil 
:post-affiliated 739020 :DESCRIPTION "Packages that lead to conflicts." 
:ALT_TITLE "Conflicts" :title "Packages that conflict with Org mode" :parent 
(headline (:raw-value "Interaction with Other Packages" :begin 735540 :end 
744524 :pre-blank 0 :contents-begin 735575 :contents-end 744523 :robust-begin 
735658
  :robust-end 744521 :level 2 :priority nil :tags nil :todo-keyword nil 
:todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp 
nil :post-affiliated 735540 :DESCRIPTION "With other Emacs packages." 
:ALT_TITLE "Interaction" :title "Interaction with Other Packages" :parent ... 
...) (section ... ... ...) (headline ... ...) #4) ...) (section (:begin 739061 
:end 744524 :contents-begin 739061 :contents-end 744523 :robust-begin 739061
  :robust-end 744521 :post-blank 1 :post-affiliated 739061 :mode section 
:granularity nil :parent #4) (keyword (:key "CINDEX" :value "shift-selection" 
:begin 739150 :end 739176 :post-blank 0 :post-affiliated 739150 :mode nil 
:granularity nil :parent #7)) (keyword (:key "VINDEX" :value 
"org-support-shift-select" :begin 739176 :end 739211 :post-blank 0 
:post-affiliated 739176 :mode nil :granularity nil :parent #7)) (paragraph 
(:begin 739211 :end 739889 :contents-begin 739211 :contents-end 739888 
:post-blank 1 :post-affiliated 739211 :mode nil :granularity nil :parent #7) 
#("In Emacs, shift-selection combines motions o..." 0 155 ...) (export-snippet 
...) #("S-" 0 10 ...) (export-snippet ...) #("commands to change 
timestamps,\nTODO keywords..." 0 93 ...) (export-snippet ...) #("S-" 0 
10 ...) (export-snippet ...) #("commands outside of specific contexts do 
not..." 0 82 ...) (code ...) #

Ihor> See https://orgmode.org/worg/org-contribute.html

Ihor> Also, if you think that any of the extra diary functions from Org can 
be
Ihor> useful for Emacs, you can propose to include them directly into
Ihor> diary-lib.el via M-x submit-emacs-patch (Emacs >=28) or
Ihor> M-x report-emacs-bug. The latter is also for patches, unlike the 
command
Ihor> name suggests.

Iʼll put that on my list (Iʼm guessing you'd want compatibility shims
in org-mode if I did that).

Robert
-- 



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Ihor Radchenko
Robert Pluim  writes:

> I can send a patch against the org-mode repository main branch, or fix
> it directly in the emacs repo. What's the preferred workflow for this
> kind of change?

Just submit a patch here. Against the Org mode repository.
Org mode development happens in Org mode repository and in this mailing
list, not in Emacs repo.

See https://orgmode.org/worg/org-contribute.html

Also, if you think that any of the extra diary functions from Org can be
useful for Emacs, you can propose to include them directly into
diary-lib.el via M-x submit-emacs-patch (Emacs >=28) or
M-x report-emacs-bug. The latter is also for patches, unlike the command
name suggests.

Best,
Ihor



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Robert Pluim
> On Fri, 10 Jun 2022 12:27:23 +0100, Angel de Vicente 
>  said:

>> If you use `org-cyclic' and `org-block' you donʼt need to worry about
>> that anymore.

Angel> I tried (briefly :-)) to look for some place where org-cyclic and
Angel> org-block are documented, but failed. But I tried, and they do work
Angel> nicely. So they always assume 'iso' style regardless of the value of
Angel> 'calendar-date-style'? 

Yes. They donʼt appear in the info documentation anywhere that I can
see. Thereʼs a footnote in (info "(org) Weekly/daily agenda") about
`org-anniversary' and `org-date' though.

I can send a patch against the org-mode repository main branch, or fix
it directly in the emacs repo. What's the preferred workflow for this
kind of change?

Robert
-- 



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Angel de Vicente
Hello,

Robert Pluim  writes:

>> On Tue, 31 May 2022 15:36:01 +0100, Angel de Vicente 
>>  said:
> Angel> ,
> Angel> | *** Badminton 20:45-22:15
> Angel> | <%%(and (diary-cyclic 7 2022 05 30) (diary-block 2022 05 30 
> 2022 06 30))>
> Angel> `
>
> Angel> (the s-exp entry above assumes 'calendar-date-style' is set to 
> 'iso')
>
> If you use `org-cyclic' and `org-block' you donʼt need to worry about
> that anymore.

I tried (briefly :-)) to look for some place where org-cyclic and
org-block are documented, but failed. But I tried, and they do work
nicely. So they always assume 'iso' style regardless of the value of
'calendar-date-style'? 

Thanks,
-- 
Ángel de Vicente 

Research Software Engineer (Supercomputing and BigData)




Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Robert Pluim
> On Tue, 31 May 2022 15:36:01 +0100, Angel de Vicente 
>  said:
Angel> ,
Angel> | *** Badminton 20:45-22:15
Angel> | <%%(and (diary-cyclic 7 2022 05 30) (diary-block 2022 05 30 
2022 06 30))>
Angel> `

Angel> (the s-exp entry above assumes 'calendar-date-style' is set to 'iso')

If you use `org-cyclic' and `org-block' you donʼt need to worry about
that anymore.

Robert
-- 



Re: Timestamp with repeater interval AND END DATE?

2022-05-31 Thread Angel de Vicente
Hello,

Eric S Fraga  writes:

> On Tuesday, 31 May 2022 at 14:46, Angel de Vicente wrote:
>> Did I miss something in the manual?
>
> No, you did not miss anything.  What you want cannot be done with a
> single time stamp.  Instead, there are two alternatives:
>
> 1. use a diary s-exp (see info manual) which does allow this or
> 2. use org-clone-subtree-with-time-shift: create a single entry and then
>copy it as many times as desired.

in case it can be useful to somebody else, I ended up with an entry like
this, that does the job:

,
| *** Badminton 20:45-22:15
| <%%(and (diary-cyclic 7 2022 05 30) (diary-block 2022 05 30 2022 06 30))>
`

(the s-exp entry above assumes 'calendar-date-style' is set to 'iso')

Cheers,
-- 
Ángel de Vicente

Research Software Engineer (Supercomputing and BigData)
Instituto de Astrofísica de Canarias (https://www.iac.es/en)




Re: Timestamp with repeater interval AND END DATE?

2022-05-31 Thread Eric S Fraga
On Tuesday, 31 May 2022 at 14:46, Angel de Vicente wrote:
> Did I miss something in the manual?

No, you did not miss anything.  What you want cannot be done with a
single time stamp.  Instead, there are two alternatives:

1. use a diary s-exp (see info manual) which does allow this or
2. use org-clone-subtree-with-time-shift: create a single entry and then
   copy it as many times as desired.

HTH,
eric

-- 
: Eric S Fraga, with org release_9.5.3-511-g8e69ad in Emacs 29.0.50