3 ms·
I am quite familiar with the available options for repeated entries. But Something as usual as 2nd Thursday of every month requires me to write a diary-float se
by sachdevap 7y ago
I am quite familiar with the available options for repeated entries. But Something as usual as 2nd Thursday of every month requires me to write a diary-float sexp, which is not intuitive to edit. If it is difficult to use for a programmer like me, I can only imagine how complicated it is for other people. Moreover, diary-float sexp expressions are most definitely not helping the argument of usability outside emacs.
- jolmg 7y ago> But Something as usual as 2nd Thursday of every month requires me to write a diary-float sexp, which is not intuitive to edit. I agree that it could be better, but I'd be surprised if it was something that was typically expressible in other programs. So the fact that it's doable at all seems great, and does indicate that it's flexible. Since you said it lacked flexibility, I was wondering if you had an example of something that was not expressible in Emacs org-mode but that was expressible elsewhere. > Moreover, diary-float sexp expressions are most definitely not helping the argument of usability outside emacs. Well, it's not elisp, is it? It's just sexps. It may as well be JSON, but more concise.
- sachdevap 7y agoActually, Google Calendar does provide the choice of repeating every 2nd Thursday of every month. But it has its own limitation. For example, Google calendar does not let me do every 2nd and 4th Thursday of the month. Just to clarify, I am not criticizing org-mode for not implementing in comparison to others. The lack of flexibility I suggest is the date format itself, which does not even allow specifying 2nd Thursday of the month for example. diary-float allows it, but is not intuitive. I intend to write an interactive scheduling tool for org-mode when I can spare the time. Like regex-builder, but for dates.
- jolmg 7y agoI was wondering just a while ago if it those diary syntaxes were really limited to sexps and wouldn't also evaluate arbitrary elisp and I saw this[1]: &%%(let ((dayname (calendar-day-of-week date)) (day (cadr date))) (or (and (= day 21) (memq dayname '(1 2 3 4 5))) (and (memq day '(19 20)) (= dayname 5))) ) Pay check deposited I don't know if this is doable from org-mode but it seems to me like this could be a viable, more readable alternative to diary-float. For your example of 2nd Thursday from every month, instead of: %%(dairy-float t 4 2) you could have: &%%(let ((day-of-week (calendar-day-name date)) (day (cadr date))) (and (= day-of-week "Thursday") (> day 7) (<= day 14))) That's seems more readable to someone that hasn't read what the parameters of dairy-float mean. For your second example of every 2nd and 4th Thursday: &%%(let ((day-of-week (calendar-day-name date)) (day (cadr date))) (and (= day-of-week "Thursday") (or (and (> day 7) (<= day 14)) (and (> day 21) (<= day 28))))) It being a programming language might make it unintuitive to use by a non-programmer, but I don't think you can get anymore flexible than this. Also, org-mode's attractiveness being that everything is in plain text, I'm not sure there is a syntax that would be more readable than properly written code. [1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Sexp-Diary-Entries.html#Sexp-Diary-Entries https://www.gnu.org/software/emacs/manual/html_node/emacs/Se...