Re: [FR] Add a way to mark an item in a checklist as failed

2024-02-26 Thread Samuel Wales
my brain for some reason isn't figuring out using headings to simulate
checklists.  i'm not sure why i keep reaching for checklists or what
it is that i find useful about them that i can't yet figure out how to
do with headings.

sure, they're cleaner and simpler and have bullet styles,

but still. it ought to be possible to do similar with kw and such, not
sure how though.


On 2/26/24, Sławomir Grochowski  wrote:
> Rudi C  writes:
>
>> I also use the partial tick for partial completion of tasks, so I cannot
>> abuse it for marking failed tasks. :wry_smile:
>
> That's interesting. Can you show some examples?
>
> So 4 state checkbox?
> Search the net. e.g.
> https://ux.stackexchange.com/questions/144576/how-to-visually-represent-4-state-checkbox
>
> "Checkboxes have long-been established to have 3 states: checked,
> unchecked, and mixed (with the horizontal line). Changing this
> behavior is confusing and should be avoided."
>
> I also miss this failed state a bit. But indeed it's getting a little
> too complicated.
>
> What others think?
>
> --
> Sławomir Grochowski
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



Re: [BUG] [bug] clocking in suddenly does not work any more [9.7-pre (release_9.6.18-1197-ga250fc @ /home/grfz/src/org-mode/lisp/)]

2024-02-26 Thread Gregor Zattler
Dear org-mode users and developers,
* Gregor Zattler  [2024-02-26; 21:18 +01]:
> I used to clock in (and out) on a certain node several
> times a day.  Also today, but this suddenly does not
> work any more, it inserts only a
>
> CLOCK:
>
> (with preceeding blank) but no following time stamp and

wrong: with succeeding blank, sorry English is not my
first language.

> I get the message: "org-clock-sum-current-item: Wrong
> type argument: fixnump, nil"
>
> This still works with emacs -Q, so is somehow related
> to my configuration, but I get this error even with my
> whole emacs.d replaced by the backup from yesterday and
> ~/.cache/emacs/ ~/.cache/org-persist/ org-clock-save.el
> deleted.

I played a bit around.  If I delete the following part
of the LOGBOOK:

ClOCK: [2024-02-26 Mo 11:35]--[2024-02-26 Mo 11:40] =>  0:05
- Clocking out at [2024-02-26 Mo 11:40]

it works again.  The "l" in "ClOCK" is not
capitalized.  I wonder how I managed to change that
single letters capitalization.

For me the problem is solved, although I do not
understand, why emacs -Q does not stumble over this
while my configured Emacs does


Regards, Gregor

Canceled, I hope this works for woof!



Re: [BUG] Newlines after links are fontified with the org-link face after an incremental search

2024-02-26 Thread Rohit Patnaik
Confirmed fixed.

Thanks for the quick turnaround!

Rohit



Re: [FR] Add a way to mark an item in a checklist as failed

2024-02-26 Thread Sławomir Grochowski
Rudi C  writes:

> I also use the partial tick for partial completion of tasks, so I cannot
> abuse it for marking failed tasks. :wry_smile:

That's interesting. Can you show some examples?

So 4 state checkbox?
Search the net. e.g.
https://ux.stackexchange.com/questions/144576/how-to-visually-represent-4-state-checkbox

"Checkboxes have long-been established to have 3 states: checked,
unchecked, and mixed (with the horizontal line). Changing this
behavior is confusing and should be avoided." 

I also miss this failed state a bit. But indeed it's getting a little
too complicated.

What others think?

-- 
Sławomir Grochowski



Re: [FR] Add a way to mark an item in a checklist as failed

2024-02-26 Thread Rudi C
I also use the partial tick for partial completion of tasks, so I cannot
abuse it for marking failed tasks. :wry_smile:


On Mon, Feb 26, 2024 at 11:25 PM Sławomir Grochowski <
slawomir.grochow...@gmail.com> wrote:

> Hi Rudy,
>
> Rudi C  writes:
>
> > The use case is that I use checklists to remember and track doing some
> > important stuff at the start of the day; all the items are at first in a
> > neutral/todo state. Some of them get done (`[X]`), but some of them fail
> > during the day. For example, I have an item `- [ ] No sugar` which tracks
> > whether I have consumed artificial sugar during the day. I like to be
> able
> > to mark this as failed.
>
> It's nice to hear that someone is having the same need for a failed state
> in the checkbox.
>
> Currently, the case looks like this:
>
> A checkbox can be in one of the three states:
> 1. not checked =[ ]=
> 2. partially checked =[-]=
> 3. checked =[X]=
>
> So I use this partially checked =[-]= state to mark it as failed.
> But this 'partially checked' is for checkboxes that are in parent-child
> relation.
> For example:
>
> If some but not all child checkboxes are checked, the parent checkbox is
> partially checked.
> #+begin_example
> - [-] call people
>   - [X] Peter
>   - [ ] Sarah
> #+end_example
>
> And this 'partially checked' is set automatically.
>
> But you can set it manually for checkbox that is not in parent-child
> relation. Just insert '-' manually or press 'C-c C-c (org-toggle-checkbox)'
> with a double prefix argument 'C-u C-u'.
>
> Statics cookie works as expected.
>
> #+begin_example
> - call people [1/2]
>   - [X] Peter
>   - [-] Sarah
> #+end_example
>
> > I know this can be simulated using headings, but checklists are visually
> > nicer and have cookies `[/]` etc.
>
> You can also use statistics cookie '[/]' in checkbox items list.
>
> For example:
> #+begin_example
> - [ ] call people [1/2]
>   - [X] Peter
>   - [ ] Sarah
> #+end_example
>
> --
> Sławomir Grochowski
>


[BUG] [bug] clocking in suddenly does not work any more [9.7-pre (release_9.6.18-1197-ga250fc @ /home/grfz/src/org-mode/lisp/)]

2024-02-26 Thread Gregor Zattler
Dear org-mode users and developers,

I used to clock in (and out) on a certain node several
times a day.  Also today, but this suddenly does not
work any more, it inserts only a

CLOCK:

(with preceeding blank) but no following time stamp and
I get the message: "org-clock-sum-current-item: Wrong
type argument: fixnump, nil"

This still works with emacs -Q, so is somehow related
to my configuration, but I get this error even with my
whole emacs.d replaced by the backup from yesterday and
~/.cache/emacs/ ~/.cache/org-persist/ org-clock-save.el
deleted.

Any ideas how to debug this?

Thanks, Gregor

Emacs  : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, cairo version 1.16.0)
 of 2024-02-13
Package: Org mode version 9.7-pre (release_9.6.18-1197-ga250fc @ 
/home/grfz/src/org-mode/lisp/)

current state:
==
(setq
 org-list-use-circular-motion t
 org-link-email-description-format "%c: %.80s"
 org-log-note-headings '((done . "CLOSING NOTE %t") (state . "State %-12s from 
%-12S %t") (note . "Note taken on %t") (reschedule . "Rescheduled from %S on 
%t")
 (delschedule . "Not scheduled, was %S on %t") 
(redeadline . "New deadline from %S on %t") (deldeadline . "Removed deadline, 
was %S on %t")
 (refile . "Refiled on %t") (clock-out . "Clocking out 
at %t "))
 org-link-elisp-confirm-function 'yes-or-no-p
 org-agenda-diary-file "~/org/diary.org"
 org-directory "~/org/"
 org-crypt-key "0x"
 org-bibtex-headline-format-function 'org-bibtex-headline-format-default
 org-agenda-custom-commands '(("p" "export daily/weekly /tmp/my-org-agenda.pdf" 
agenda ""
   ((ps-paper-type 'a4) (ps-number-of-columns '1) 
(ps-landscape-mode nil) (org-agenda-with-colors nil) (ps-font-size '(7 . 8.5)) 
(org-agenda-start-on-weekday 1)
(ps-selected-pages '((1 . 2))) 
(org-agenda-ndays 155))
   ("/tmp/my-org-agenda.pdf"))
  ("1" "Q1" tags "+important+urgent") ("2" "Q2" 
tags "+important-urgent") ("3" "Q3" tags "-important+urgent") ("4" "Q4" tags 
"-important-urgent"))
 org-log-into-drawer t
 org-startup-folded nil
 org-agenda-files '("/home//.xx/x/x.xxx" 
"~/xxx/x.xxx" "~/xxx/.xxx" "~///xxx/xxx.xxx")
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-refile-targets '(("~/org/diary.org" :maxlevel . 3) 
("~///xxx/xxx.org" :maxlevel . 5) ("~/org/.org" 
:maxlevel . 5) (org-agenda-files :maxlevel . 9))
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-tag-alist '((:startgroup) ("@xxx" . 105) ("@xxx" . 109) ("@xxx" . 114) 
(:endgroup) (:startgrouptag) ("@comp") (:grouptags) (:startgroup) ("@len" . 
108) ("@no" . 1) ("@shi" . 115)
 ("@del") ("@pit") (:endgrouptag) (:endgroup) ("@fon" . 102) 
("urgent" . 117) ("important" . 73) ("lizenz" . 76) ("techtipp" . 116) ("soc" . 
115))
 org-agenda-exporter-settings '((ps-print-color-p 'black-white))
 org-refile-use-outline-path 'file
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-log-reschedule 'note
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines 
org-cycle-optimize-window-after-visibility-change 
org-cycle-display-inline-images)
 org-agenda-text-search-extra-files '(agenda-archives)
 org-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-agenda-sticky t
 org-read-date-prefer-future 'time
 org-yank-image-file-name-function 'org-yank-image-autogen-filename
 org-link-from-user-regexp "@xxx\\.xx\\||xx...@xxx.xxx\\|x...@.xx|...@xxx.xx\\|x....@xxx.xx\\|xx@xxx\\.xxx"
 org-attach-use-inheritance nil
 org-odd-levels-only t
 org-mode-hook '(gz-maybe-org-add-file # org-clock-load
 (closure (t) nil (define-key org-mode-map "o" 
'org-ctags-find-tag-interactive)) imenu-add-menubar-index turn-on-wcheck-mode 
turn-on-abbrev-mode rainbow-delimiters-mode
 #[0 "\301\211\207" [imenu-create-index-function 
org-imenu-get-tree] 2] #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-fold-show-all append local] 5]
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-babel-show-result-all append local] 5] 
org-babel-result-hide-spec org-babel-hide-all-hashes
 org-eldoc-load)
 org-babel-load-languages '((emacs-lisp . t) (shell . t) (plantuml . t))
 org-footnote-auto-label 'random
 org-archive-subtree-add-inherited-tags t
 org-crypt-tag-matcher "org_crypt"
 org-agenda-span 44
 org-confirm-shell-link-function 'yes-or-no-p
 org-reveal-start-hook '(org-decrypt-entry)
 org-agenda-clock-consistency-checks '(:max-duration "10:00" :min-duration 0 
:max-gap "43:05" :gap-ok-around ("4:00" "12:00") :default-face ((:background 
"DarkRed") 

Re: [FR] Add a way to mark an item in a checklist as failed

2024-02-26 Thread Sławomir Grochowski
Hi Rudy,

Rudi C  writes:

> The use case is that I use checklists to remember and track doing some
> important stuff at the start of the day; all the items are at first in a
> neutral/todo state. Some of them get done (`[X]`), but some of them fail
> during the day. For example, I have an item `- [ ] No sugar` which tracks
> whether I have consumed artificial sugar during the day. I like to be able
> to mark this as failed.

It's nice to hear that someone is having the same need for a failed state in 
the checkbox.

Currently, the case looks like this:

A checkbox can be in one of the three states:
1. not checked =[ ]=
2. partially checked =[-]=
3. checked =[X]=

So I use this partially checked =[-]= state to mark it as failed.
But this 'partially checked' is for checkboxes that are in parent-child
relation.
For example:

If some but not all child checkboxes are checked, the parent checkbox is 
partially checked.
#+begin_example
- [-] call people
  - [X] Peter
  - [ ] Sarah
#+end_example

And this 'partially checked' is set automatically. 

But you can set it manually for checkbox that is not in parent-child
relation. Just insert '-' manually or press 'C-c C-c (org-toggle-checkbox)'
with a double prefix argument 'C-u C-u'.

Statics cookie works as expected. 

#+begin_example
- call people [1/2]
  - [X] Peter
  - [-] Sarah
#+end_example

> I know this can be simulated using headings, but checklists are visually
> nicer and have cookies `[/]` etc.

You can also use statistics cookie '[/]' in checkbox items list. 

For example:
#+begin_example
- [ ] call people [1/2]
  - [X] Peter
  - [ ] Sarah
#+end_example

-- 
Sławomir Grochowski



Re: Feature request: exclude sub-trees by backend

2024-02-26 Thread Ihor Radchenko
[ Adding Org mailing list back to CC. ]

Edgar Lux  writes:

> ...
>> I think that it would be ok to add such feature if multiple users are
>> interested.
>
> Similar (and may be the ignore-heading from ox-extra should also become 
> standard, because I found it a lot):
>
> https://emacs.stackexchange.com/a/75510
> https://emacs.stackexchange.com/a/75573
> https://emacs.stackexchange.com/a/60016

The suggestions to use backend-specific export tag in the links are used
as ugly workarounds. I am not sure if they justify adding a new feature
for Org mode. (Why would we add something with a purpose of being used
as a workaround instead of fixing the original problem, after all?)

As for ignore-heading, please search list archives - adding this feature
has been discussed many times and the author of Org export system
repeatedly opposed it. This is why:
https://list.orgmode.org/87mwdfzmox@nicolasgoaziou.fr/

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



Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command

2024-02-26 Thread Max Nikulin

On 26/02/2024 17:48, Ihor Radchenko wrote:

Max Nikulin writes:

Something weird may be executed in the case of sufficiently complex
equations.



It should be more reliable to pass fragment to command stdin. It can be
done if %i is missed in `org-latex-to-html-convert-command'.


I agree that it will be more reliable to shell-escape argument.
However, I am concerned that escaping may break certain uses like

somecommand << EOF
%i
EOF

In the above scenario, escaping will break things.


It is unsafe to use such command. Variable expansion, etc. is performed 
inside here document blocks. Try


cat << EOF
\[f(i), \text{where $i \ne 10$}\]
EOF

That is why I proposed to use stdin in the case of missed %i.

`org-latex-to-html-convert-command' should be set to something like
"latexmlc --profile=math --preload=siunitx.sty - 2>/dev/null"
this case.


That's why I prefer to add a new replacement, not change the meaning of
%i. We might even remove %i from the docstring, keeping support in the
code for backwards-compatibility.


What you calls backward compatibility is actually a means to get strange 
results in the case of complex math. It is better to force users to 
update configuration (I hope, it actually will not be necessary) and to 
ensure safe command without pitfalls related to missed parts of equations.



(with-temp-file "/tmp/test2.html"
(let ((org-latex-to-html-convert-command
  "latexmlc literal:%I --profile=math --preload=siunitx.sty 
2>/dev/null"))
 (insert (org-format-latex-as-html "$f' = df/dx$"

test2.html is rendered *incorrectly* as in the attached screenshot.


Looks like missed  inside 


In contrast, manually providing output file as

latexmlc literal:\$f\'\ =\ df/dx\$ --profile=math --preload=siunitx.sty 
--output /tmp/test3.html

yields correct rendering.


Perhaps this time the browser just guessed file encoding. Anyway 
rendering is incorrect. Gecko puts derivative into the correct place. I 
have no idea if it is a fault of latexml generating incorrect MathML or 
a browser which is likely a KHTML descendant.


It seems, latexml is terribly broken in Debian. With 
--preload=siunitx.sty it hangs during processing of expl3-code.tex, 
without this option it removes all files in /tmp.


I am still strongly against code that may cause execution of equations 
as shell commands and may silently lose parts of equations.




[FR] Add a way to mark an item in a checklist as failed

2024-02-26 Thread Rudi C
I think currently there is no way to mark an item in a checklist as failed?
I would like to have such an ability ... Something like:

- [F] task x

or:

- [0] task x

The use case is that I use checklists to remember and track doing some
important stuff at the start of the day; all the items are at first in a
neutral/todo state. Some of them get done (`[X]`), but some of them fail
during the day. For example, I have an item `- [ ] No sugar` which tracks
whether I have consumed artificial sugar during the day. I like to be able
to mark this as failed.

I know this can be simulated using headings, but checklists are visually
nicer and have cookies `[/]` etc.

PS: Please use reply to all, as I am not subscribed to the list.


Re: [PATCH] org-agenda: Make sure skipping warning/delay days never increases their number

2024-02-26 Thread Tim Ruffing
On Wed, 2024-02-14 at 14:20 +, Ihor Radchenko wrote:
> > 
> We can do this - I do not see any code in the wild using the optional
> arguments. However, we should do it carefully - (1) Move the function
> to
> org-compat and mark obsolete, recommending a new function instead;
> (2)
> Create a new function with a new name (say,
> org-timestamp-get-warning-days) and without ZERO-OR-DELAY argument
> and
> use it across Org mode.
> 

Hm, now that I think about it again, I'm not sure that defining a new
function is worth the hassle. There's nothing wrong with the current 
function or the optional argument, in the sense that callers can simply
choose not to use the optional argument.

If anything, I think it would rather add a comment that it's
obsolete/there for historical reasons and should not be used. Let me
know if you think that's desirable.

> > -     (suppress-prewarning
> > +     (max-wdays
> 
> May you also rename this variable to be more clear. Something like,
> max-warning-days? These short variable names make the code very
> difficult to read.
> 
> > -     (wdays (or suppress-prewarning (org-get-wdays
> > s
> > +     (wdays (min max-wdays (org-get-wdays s
> 
> warning-days
> 
> > -     (suppress-delay
> > +     (max-ddays
> 
> max-deadline-warning-days
> 

Done.

Tim
From 145b2526882264985d497ee094006b7144aa860b Mon Sep 17 00:00:00 2001
From: Tim Ruffing 
Date: Tue, 13 Feb 2024 10:57:29 +0100
Subject: [PATCH] org-agenda: Make sure skipping warning/delay days never
 increases their number

* lisp/org-agenda.el (org-agenda-get-deadlines, org-agenda-get-scheduled):
Use minimum of warning/delay days specified in timestamp cookie and the
limit specified by `org-agenda-skip-deadline-prewarning-if-scheduled' or
`org-agenda-skip-scheduled-delay-if-deadline`, respectively.
* testing/lisp/test-org-agenda.el (test-org-agenda/skip-deadline-prewarning-if-scheduled):
New test
---
 lisp/org-agenda.el  | 25 +---
 testing/lisp/test-org-agenda.el | 41 +
 2 files changed, 52 insertions(+), 14 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 23ccea9df..83e1d1264 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6399,14 +6399,14 @@ specification like [h]h:mm."
 		   (org-agenda--timestamp-to-absolute
 		s base 'future (current-buffer) pos)
 	  (diff (- deadline current))
-	  (suppress-prewarning
+	  (max-warning-days
 		   (let ((scheduled
 		  (and org-agenda-skip-deadline-prewarning-if-scheduled
(org-element-property
 :raw-value
 (org-element-property :scheduled el)
 		 (cond
-		  ((not scheduled) nil)
+		  ((not scheduled) most-positive-fixnum)
 		  ;; The current item has a scheduled date, so
 		  ;; evaluate its prewarning lead time.
 		  ((integerp org-agenda-skip-deadline-prewarning-if-scheduled)
@@ -6420,15 +6420,15 @@ specification like [h]h:mm."
 			org-deadline-warning-days))
 		  ;; Set pre-warning to deadline.
 		  (t 0
-	  (wdays (or suppress-prewarning (org-get-wdays s
+	  (warning-days (min max-warning-days (org-get-wdays s
 	 (cond
 	  ;; Only display deadlines at their base date, at future
 	  ;; repeat occurrences or in today agenda.
 	  ((= current deadline) nil)
 	  ((= current repeat) nil)
 	  ((not today?) (throw :skip nil))
-	  ;; Upcoming deadline: display within warning period WDAYS.
-	  ((> deadline current) (when (> diff wdays) (throw :skip nil)))
+	  ;; Upcoming deadline: display within warning period WARNING-DAYS.
+	  ((> deadline current) (when (> diff warning-days) (throw :skip nil)))
 	  ;; Overdue deadline: warn about it for
 	  ;; `org-deadline-past-days' duration.
 	  (t (when (< org-deadline-past-days (- diff)) (throw :skip nil
@@ -6481,7 +6481,7 @@ specification like [h]h:mm."
   'effort-minutes effort-minutes)
 level category tags time))
 		  (face (org-agenda-deadline-face
-			 (- 1 (/ (float diff) (max wdays 1)
+			 (- 1 (/ (float diff) (max warning-days 1)
 		  (upcoming? (and today? (> deadline today)))
 		  (warntime (org-entry-get (point) "APPT_WARNTIME" 'selective)))
 	 (org-add-props item props
@@ -6610,13 +6610,13 @@ scheduled items with an hour specification like [h]h:mm."
 	  (futureschedp (> schedule today))
 	  (habitp (and (fboundp 'org-is-habit-p)
(string= "habit" (org-element-property :STYLE el
-	  (suppress-delay
+	  (max-delay-days
 		   (let ((deadline (and org-agenda-skip-scheduled-delay-if-deadline
 (org-element-property
  

Re: A question about local/experimental branches

2024-02-26 Thread Bastien Guerry
Ihor Radchenko  writes:

> AFAIU, Juan does not have write access to savannah.
> Should we give it? Of course, if he is willing to use savannah. Any
> other public repo is also fine.

Juan, let me know if you need access:
https://orgmode.org/worg/org-contribute.html#devs

Thanks!

-- 
 Bastien Guerry



Re: [DISCUSSION] Add "Recent News" to orgmode.org

2024-02-26 Thread Bastien Guerry
Ihor Radchenko  writes:

> Wouldn't a cron job work? Similar to how we schedule CI for Org mode
> tests.

Yes, you're right!

-- 
 Bastien Guerry



Re: [ANN] Please share useful blog posts on this list with the [BLOG] subject prefix

2024-02-26 Thread Bastien Guerry
Ihor Radchenko  writes:

> As long as the fraction of non-English posts is small, I do not think
> that it matters too much. (Of course, having a translation would be
> helpful, but we cannot demand such thing.)

I suggest we stick to the policy of using english as the language for
the list: sharing posts written in other languages is okay as long as
we share the summary in english in the emails. That's also better for
search the list's archive IMHO.

-- 
 Bastien Guerry



Re: [ANN] Please share useful blog posts on this list with the [BLOG] subject prefix

2024-02-26 Thread Bastien Guerry
Hi Juan,

Juan Manuel Macías  writes:

> Great! Just one question: can articles be shared in languages other than
> English? In that case, would it be necessary to add some more
> prefixes, such as "Spanish", "French", "Italian", "Greek", etc.?

Yes, you can use "[BLOG] [Spanish] ..." so that people adapt their
filters, but the second prefix won't have any effect on Woof.

But because the language for discussing on this list is english, I
believe the summary should be in english - then people can use i18n
tools to get to the contents.

How does this sound?

-- 
 Bastien Guerry



Re: [BUG] Newlines after links are fontified with the org-link face after an incremental search

2024-02-26 Thread Ihor Radchenko
"Rohit Patnaik"  writes:

> It seems like this fix regressed as a result of commit
> 5d186b499dde97f59a91dc11f4c4a15113d29f4d. After I updated to the latest 
> version
> of org-mode again, I noticed that the fontification of newlines was back. 
> When I
> created a branch that reverted 5d186b499dde97f59a91dc11f4c4a15113d29f4d, the
> fontification behaving as it should.

Thanks for the heads up!
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=9f6894c10

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



Re: Org agenda view does not display correctly

2024-02-26 Thread Ihor Radchenko
Naresh Gurbuxani  writes:

> Until recently, my org agenda view displayed correctly.  Now M-x 
> org-agenda a display begins with question marks.  Is there a simple way 
> to diagnose and fix this problem?  I am using org mode version 9.6.6 
> (default) in emacs version 29.1 on mac.

Try (setq org-element-use-cache nil)

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



Org agenda view does not display correctly

2024-02-26 Thread Naresh Gurbuxani
Until recently, my org agenda view displayed correctly.  Now M-x 
org-agenda a display begins with question marks.  Is there a simple way 
to diagnose and fix this problem?  I am using org mode version 9.6.6 
(default) in emacs version 29.1 on mac.


Thanks,

Naresh

My org agenda display:

Week-agenda (W09):

Monday 26 February 2024 W09
  ???:    Schededuled: TODO xxx    
:ABC:

Tuesday    27 February 2024
  ???:    Scheduled:  TODO yyy     :ABC:
Wednesday  28 February 2024
Thursday   29 February 2024
Friday  1 March 2024
Saturday    2 March 2024
  ???:    Scheduled:  TODO zzz     :FGH::
  ???:    Scheduled:  TODO www     :PQR::
Sunday  3 March 2024




Re: org-mode: example blocks are no longer syntax highlighted in emacs

2024-02-26 Thread Max Nikulin

On 25/02/2024 17:04, Ihor Radchenko wrote:

Rudi C writes:


After upgrading to emacs 29.2 and org 9.7, my example blocks are no longer
syntax highlighted in emacs.


Yet, there is no reason to remote it.
I recovered example block fontification on main.


At least some people are against the feature:

https://list.orgmode.org/orgmode/CA+G3_PPYmiiwHYKkgiJDZQ=o7DvaG=0g3aqnphsbkemzsoy...@mail.gmail.com/T/#u
Tom Gillespie. Re: [DISCUSSION] Refactoring fontification system. Tue, 7 
Jun 2022 21:23:21 -0700.


I do not mind to have syntax highlighting support for #+begin_example 
blocks, but it should be coherent with ox exporters. My idea to unify 
#+begin_src and #+begin_example exporters was not meet warmly.


To notify users that fontification will be lost during export, the 
feature may be turned into an opt-in one by adding a defcustom user 
option disabled by default and having docstring clearly describing that 
language will be ignored during export and users need to suppress 
`org-lint' warnings.




Re: A question about local/experimental branches

2024-02-26 Thread Ihor Radchenko
Bastien Guerry  writes:

> Ihor Radchenko  writes:
>
>> I am not sure if experimental branches can go directly to our savannah,
>> like what Emacs does.
>> Bastien, WDYT?
>
> We did that in the past with Org repo, I see no reason for not doing
> it again with the current Git repo on Savannah: feel free to push
> experimental branches.

AFAIU, Juan does not have write access to savannah.
Should we give it? Of course, if he is willing to use savannah. Any
other public repo is also fine.

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



Re: [ANN] Please share useful blog posts on this list with the [BLOG] subject prefix

2024-02-26 Thread Ihor Radchenko
Juan Manuel Macías  writes:

> Great! Just one question: can articles be shared in languages other than
> English? In that case, would it be necessary to add some more
> prefixes, such as "Spanish", "French", "Italian", "Greek", etc.?
>
> (If I shared something in Spanish, I could translate the article in the
> body of the message).

In Sacha Chua's news non-English blog posts are just shared as is:
2023年のorg-mode活用と今後の抱負 - takeokunn's blog (@kaneu...@mstdn.jp)
(from https://sachachua.com/blog/2024/01/2024-01-29-emacs-news/)

As long as the fraction of non-English posts is small, I do not think
that it matters too much. (Of course, having a translation would be
helpful, but we cannot demand such thing.)

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



Re: [DISCUSSION] Add "Recent News" to orgmode.org

2024-02-26 Thread Ihor Radchenko
Bastien Guerry  writes:

> Ihor Radchenko  writes:
>
>> And we may trivially add the recent BLOG posts using something like
>>
>> #+INCLUDE: "https://tracker.orgmode.org/index.org; :lines 1-10
>
> Yes, but the non-trivial thing is to schedule the CI regularily so
> that index.html is updating regularily.  I believe integrating a RSS
> feed with some free JS code could work.  Patch welcome!

Wouldn't a cron job work? Similar to how we schedule CI for Org mode tests.

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



Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command

2024-02-26 Thread Ihor Radchenko
Max Nikulin  writes:

> (let ((org-latex-to-html-convert-command
> "printf '%%s' '%i'"))
>(org-format-latex-as-html "$f' = df/dx$"))
> "/bin/bash: -c: line 1: unexpected EOF while looking for matching `''
> "
>
> Something weird may be executed in the case of sufficiently complex 
> equations.

> It should be more reliable to pass fragment to command stdin. It can be 
> done if %i is missed in `org-latex-to-html-convert-command'.

I agree that it will be more reliable to shell-escape argument.
However, I am concerned that escaping may break certain uses like

somecommand << EOF
%i
EOF

In the above scenario, escaping will break things.

That's why I prefer to add a new replacement, not change the meaning of
%i. We might even remove %i from the docstring, keeping support in the
code for backwards-compatibility.

Also, I just looked closer into the example with latexml we provide in
the docstring and played around with it.

I noticed that

with

(defun org-format-latex-as-html (latex-fragment)
  "Convert LATEX-FRAGMENT to HTML.
This uses  `org-latex-to-html-convert-command', which see."
  (let ((cmd (format-spec org-latex-to-html-convert-command
  `((?i . ,latex-fragment)
(?I . ,(shell-quote-argument latex-fragment))
(message "Running %s" cmd)
(shell-command-to-string cmd)))

(with-temp-file "/tmp/test2.html"
(let ((org-latex-to-html-convert-command
  "latexmlc literal:%I --profile=math --preload=siunitx.sty 
2>/dev/null"))
 (insert (org-format-latex-as-html "$f' = df/dx$"

test2.html is rendered *incorrectly* as in the attached screenshot.

In contrast, manually providing output file as

latexmlc literal:\$f\'\ =\ df/dx\$ --profile=math --preload=siunitx.sty 
--output /tmp/test3.html

yields correct rendering.


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


Re: [ANN] Please share useful blog posts on this list with the [BLOG] subject prefix

2024-02-26 Thread Juan Manuel Macías
Bastien writes:

> Adding [BLOG] or [TIP] in the subject prefix allows for such messages
> to be referenced on https://tracker.orgmode.org/news (along with [ANN]
> messages). 
>
> It will then be possible to include these posts in the orgmode.org
> homepage, using e.g. https://tracker.orgmode.org/news.rss.
>
> This is experimental, let's see if this helps spread the word about
> useful blogs.

Great! Just one question: can articles be shared in languages other than
English? In that case, would it be necessary to add some more
prefixes, such as "Spanish", "French", "Italian", "Greek", etc.?

(If I shared something in Spanish, I could translate the article in the
body of the message).

Best regards,

Juan Manuel 

-- 
Juan Manuel Macías -- Composición tipográfica, tratamiento de datos, diseño 
editorial y ortotipografía




Re: [DISCUSSION] Add "Recent News" to orgmode.org

2024-02-26 Thread Bastien Guerry
Ihor Radchenko  writes:

> And we may trivially add the recent BLOG posts using something like
>
> #+INCLUDE: "https://tracker.orgmode.org/index.org; :lines 1-10

Yes, but the non-trivial thing is to schedule the CI regularily so
that index.html is updating regularily.  I believe integrating a RSS
feed with some free JS code could work.  Patch welcome!

-- 
 Bastien Guerry



[BLOG] Org Capturing Introduction

2024-02-26 Thread Bastien Guerry
The org-capture function is quite useful for some workflows, however,
the standard documentation for it quickly jumps into template writing
without really explaining its use case. The following essay attempts
to be a gentle introduction to org-capture. I will assume you are
familiar with both Org and Emacs, but don’t know anything about
org-capture.

https://howardism.org/Technical/Emacs/capturing-intro.html

-- 
 Bastien Guerry



Re: [PATCH] org-babel-demarcate-block: split using element API

2024-02-26 Thread gerard . vermeulen

On 25.02.2024 13:21, Ihor Radchenko wrote:

gerard.vermeu...@posteo.net writes:


I added the caveat:
This patch is incompatible with `org-babel-edit-prep:' functions
that signal `user-error's.
to the commit message and cleaned it up a bit.


You may wrap `org-indent-block' into `condition-case' to catch
user-errors.


Sorry, I did attach an old version of no-user-errors-in-edit-prep.org.
Corrected.

Regards -- Gerard


no-user-errors-in-edit-prep.org
Description: Binary data


[ANN] Please share useful blog posts on this list with the [BLOG] subject prefix

2024-02-26 Thread Bastien
Adding [BLOG] or [TIP] in the subject prefix allows for such messages
to be referenced on https://tracker.orgmode.org/news (along with [ANN]
messages). 

It will then be possible to include these posts in the orgmode.org
homepage, using e.g. https://tracker.orgmode.org/news.rss.

This is experimental, let's see if this helps spread the word about
useful blogs.

Thanks!

-- 
 Bastien



Re: [PATCH] doc/org-manual.org (Checkboxes): move section 'Checkboxes' from 'TODO Items' to 'Plain Lists'

2024-02-26 Thread Ihor Radchenko
Ihor Radchenko  writes:

> I do not have a strong opinion here though. If more people chime in here
> and support re-arrangement, I will not oppose.

No comments arrived within one month. Does not look like people care
much about this. So, let's preserve the existing structure of the
manual.

Canceled.

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



Re: [PATCH] org-babel-demarcate-block: split using element API

2024-02-26 Thread gerard . vermeulen



On 25.02.2024 13:21, Ihor Radchenko wrote:

gerard.vermeu...@posteo.net writes:


I added the caveat:
This patch is incompatible with `org-babel-edit-prep:' functions
that signal `user-error's.
to the commit message and cleaned it up a bit.


You may wrap `org-indent-block' into `condition-case' to catch
user-errors.


The caveat is not a real constraint, since Org has limited support for
source block editing in an Org mode buffer when an
`org-babel-edit-prep:' function signals an user-error.

I show that in the attached no-user-errors-in-edit-prep.org.

I also attach condition-case.diff that I use to try to argue that
condition-case never gets into its error-handler (I am running the
code with the condition-case now), because I never see the signal of
~(user-error "Error in `org-babel-edit-prep:'?")~ (I needed to
read the condition-case documentation, because this is the first time
I am trying to use it).

#+begin_src emacs-lisp -n :results silent
;; Fails with org-babel-demarcate-block in patch.
(defun edit-prep-user-error (_info)
  (user-error "Signaling user-errors is harmfull"))

(defun org-babel-edit-prep:python (info)
  (edit-prep-user-error info))

(message "Harm-FULL edit-prep:python")
#+end_src

#+begin_src emacs-lisp -n :results silent
;; Works with org-babel-demarcate-block in patch.
(defun edit-prep-message (_info)
  (message "Displaying messages is harmless"))

(defun org-babel-edit-prep:python (info)
  (edit-prep-message info))

(message "Harm-LESS edit-prep:python")
#+end_src

~org-babel-demarcate-blocks~ works with "Harm-LESS edit-prep:python"
but fails with "Harm-FULL edit-prep:python" and it leaves the Org mode
buffer in a state similar to shown in no-user-errors-in-edit-prep.org
(I have to pass through org-edit-src-code to be able to edit the block
in the Org mode buffer).

But I only can do that after interrupting (C-g C-g) an infinite stream
of warnings "Warning (org-element): ‘org-element-at-point’ cannot be
used in non-Org buffer #
(python-mode)" which should come from the `org-element-at-point' call
indicated by ;; <= HERE? in condition-case.diff.

Test block below:

#+begin_src python -i -n :results silent
11
22
#+end_src

Regards -- Gerard


no-user-errors-in-edit-prep.org
Description: Binary data


condition-case.diff
Description: Binary data


Re: A question about local/experimental branches

2024-02-26 Thread Bastien Guerry
Ihor Radchenko  writes:

> I am not sure if experimental branches can go directly to our savannah,
> like what Emacs does.
> Bastien, WDYT?

We did that in the past with Org repo, I see no reason for not doing
it again with the current Git repo on Savannah: feel free to push
experimental branches.

-- 
 Bastien Guerry