Re: Is this proper time format?

2023-06-06 Thread David Masterson
Samuel Wales  writes:

> On 6/6/23, David Masterson  wrote:
>>Ooh!  I hadn't gotten the impression
>> that that was allowed from the "Dates and Times" section of the manual.
>
> thre exists org-agenda-skip-additional-timestamps-same-entry

thanks -- I hadn't seen that before.

-- 
David Masterson



[BUG] Dead link in the org documentation

2023-06-06 Thread Dima Kogan
Hi. I'm looking here:

  https://orgmode.org/worg/exporters/beamer/

The "Using the new exporter" link returns a 404:

  https://orgmode.org/worg/exporters/beamer/ox-beamer.html

Thanks



Re: Org-mode customization in emacs

2023-06-06 Thread Samuel Wales
great.

so org headings instead of checklists work for you now?

i have lately come to the realization that checklists are not always
as suitable for me as they seem, and that what i need is [possibly
existing, possibly user] features, to be determined, for headings so
that i can use headings like checklists.

this is the opposite of frequent requests, and early version x<8
intentions, for heading-like features for checklists.

features, hmm, idk, donefornow kw, auto-numbering, export tagged items
to a checklist, idk.

the great thing is you get the full power of headings when you need
them.  [i keep wanting to say header for some reason.]


On 6/6/23, Fleur Chrysalis  wrote:
> I got it solved now, found the line to enable TODO headings in Org-brain to
> show properly. My initial problem was with the todo/doing/done headings not
> showing up in org-brain thanks to its implementation of org-mode on its
> mindmap, but now i have the line that allows me to see it, so i got around
> the issue.
>
>  Mensagem Original 
> Em 6 de jun. de 2023 13:36, Ihor Radchenko escreveu:
>
>> Fleur Chrysalis  writes: > Ah, understood, thank you for the reply. >
>> Rather unfortunate that there is no way to extend it or customize it
>> easily. Note that I do not fully understand the problem you are trying to
>> solve. It may be XY problem. Try to check other ways to achieve what you
>> want. Maybe post a feature request for org-brain? -- Ihor Radchenko //
>> yantar92, Org mode contributor, Learn more about Org mode at . Support Org
>> development at , or support my work at


-- 
The Kafka Pandemic

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



Re: Is this proper time format?

2023-06-06 Thread Samuel Wales
On 6/6/23, David Masterson  wrote:
>Ooh!  I hadn't gotten the impression
> that that was allowed from the "Dates and Times" section of the manual.

thre exists org-agenda-skip-additional-timestamps-same-entry



Re: Org-mode customization in emacs

2023-06-06 Thread Fleur Chrysalis
I got it solved now, found the line to enable TODO headings in Org-brain to 
show properly. My initial problem was with the todo/doing/done headings not 
showing up in org-brain thanks to its implementation of org-mode on its 
mindmap, but now i have the line that allows me to see it, so i got around the 
issue.

 Mensagem Original 
Em 6 de jun. de 2023 13:36, Ihor Radchenko escreveu:

> Fleur Chrysalis  writes: > Ah, understood, thank you for the reply. > Rather 
> unfortunate that there is no way to extend it or customize it easily. Note 
> that I do not fully understand the problem you are trying to solve. It may be 
> XY problem. Try to check other ways to achieve what you want. Maybe post a 
> feature request for org-brain? -- Ihor Radchenko // yantar92, Org mode 
> contributor, Learn more about Org mode at . Support Org development at , or 
> support my work at

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-06 Thread Christian Moe


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

> On 06.06.2023 11:57, Christian Moe wrote:
[...]
>> 1) Embedded SVG is not the only way to have active CSS etc. in SVG
>> images. Linking to an external SVG file with an OBJECT element instead
>> of IMG should work fine (tested in Firefox). You can test this by
>> exporting Gerard's mwe.org example and editing the mwe.html to replace
>> : img src="./doc8.svg"
>> with
>> : object type="image/svg+xml" data="./doc8.svg"
>
> Indeed, the flower works after the replacement but the caption
> disappears.
> I do not understand why, because the caption is still present in the
> HTML.

Oops, sorry, my example was incomplete. Closing the  tag with
 should help.

[...]
>> 2) You can actually embed an SVG island in Org HTML export simply by
>> using #+INCLUDE. To try this, add the following line to Gerard's
>> mwe.org:
>> : #+INCLUDE: "./doc8.svg" export html
>> The exported HTML should now show the black flower from Gerard's
>> minimal
>> non-working example plus a working flower.
>
> Indeed, the flower works, but the caption disappears because Org does
> not
> recognize the "#+INCLUDE ..." as a link, the caption does not show up
> in the
> HTML. Is there an easy solution for this issue.

Fair point! No, I don't think there is an easy, non-messy solution that
will make for generating proper figure captions using the Org #+CAPTION
keyword with this approach. The same goes for embedding the SVG in the
Org file itself in a =#+begin_export html= block.

That's obviously a major drawback. So for embedding an external SVG file
as an SVG island in HTML output with proper figure captioning, your
approach is superior to my #+INCLUDE hack.

That said, I still think the better solution to the issue you raised is
for Orgmode to go back to exporting SVG links as  not , not
to extract SVG file contents and embed them as SVG islands.

(Though I may be a breaking change for some users. In particular,
because OBJECT does not have an ALT attribute, but uses several other
ways to provide alternative text for accessibility, users would need to
change their =#+attr_html :alt= to using :aria-label or :title
attributes, unless the Org implementation for SVG links were to handle
this smartly.)

Yours,
Christian



Re: Is this proper time format?

2023-06-06 Thread David Masterson
Ihor Radchenko  writes:

> David Masterson  writes:
>
>> Hmm.  What about this:
>>
>>   <2023-06-05 Mon>--<2023-06-08 Thu 10:30-12:15>
>>
>> Is there a recommended specification for my meeting?  Or do I have to
>> break it into multiple tasks (one for each day)?
>
> AFAIK, closed date intervals with time are currently not supported by
> org-agenda. You can instead use diary sexp timestamps, a bunch of active
> timestamps in the body, or M-x org-clone-subtree-with-time-shift

"a bunch of active timestamps"?!?  Ooh!  I hadn't gotten the impression
that that was allowed from the "Dates and Times" section of the manual.
It always talked about "a timestamp" and it made sense to me that a task
would only have one timestamp.  Can a statement be added to the manual
to make this explicit?

By closed date interval, I assume you mean "--".  That is
mentioned in 8.1 of the manual. It's header is "Time/Date range", but it
only talks about dates (no times) including in the example.  If times
are allowed, then the paragraph could include a time example.  If not,
then the header should be changed and "timestamp" should be changed to
"datestamp". 

-- 
David Masterson



Re: org-mode for package documentation

2023-06-06 Thread David Masterson
Björn Bidar  writes:

> Philip Kaludercic  writes:
>
>> Christopher Dimech  writes:
>>
>>> Dear Compeers,
>>>
>>> Some months ago there had been a discussion about using org-mode
>>> to produce package documentation.  Which would allow the use of  
>>> Latex3 (e.g. use of colour, floating images).
>>
>> Where/when did this happen?  Could you provide a few pointers?
>
> I don't know exactly but when use-package was merged into Emacs there
> were discussions if keeping the documentation in org-mode format is
> fine.
>
> From what I understood it is possible.

Org-mode can export to Texinfo/Info.  All that's needed is proper
conventions for writing the document such that it's compatible with
Info).

-- 
David Masterson



Re: Org-Agenda view customization

2023-06-06 Thread Ihor Radchenko
Dieter Faulbaum  writes:

> I like to have my entries in my org-files in this way:
> * <2023-06-06>--<2023-06-10> 5 days long
>
> But then the agenda view entry doesn't look so nice:
> (1/5):  <2023-06-06>--<2023-06-10> 5 days long
> ...
> Is there a way to get rid of the part '<2023-06-06>--<2023-06-10>' 
> in the agenda view
> (with the date entry in the same line in the org-file)?

org-agenda-remove-timeranges-from-blocks

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



Re: Org-mode customization in emacs

2023-06-06 Thread Ihor Radchenko
Fleur Chrysalis  writes:

> Ah, understood, thank you for the reply.
> Rather unfortunate that there is no way to extend it or customize it easily.

Note that I do not fully understand the problem you are trying to solve.
It may be XY problem. Try to check other ways to achieve what you want.
Maybe post a feature request for org-brain?

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



Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-06 Thread gerard . vermeulen




On 06.06.2023 16:14, Max Nikulin wrote:

On 05/06/2023 20:23, gerard.vermeulen wrote:

# The next line overrules html-embed-svg:t
#+HTML_EMBED_SVG_EXCLUDES: ./doc8.svg
# The next line overrules html-embed-svg:nil
#+HTML_EMBED_SVG_INCLUDES: ./doc8.svg


I agree with Ihor's idea concerning #+attr_html (multiple inline
images in a paragraph may be an issue).


I think that inlining in the sense of ox-html is different from 
embedding
as done in the patch.  I may be wrong.  This is the first point to 
settle.


If I am right, I think that #+attr_html is not going to work.


However notice that some ox
options allows include/exclude lists:

 :exclude-tags ("skip")
 :with-drawers (not "skip")


I had been think about names like
:with-svgs-to-embed (...)
:sans-svgs-to-embed (...)
while preparing the patch. I decided to err towards verbosity.
You suggest that
:svgs-to-embed ("yes" "ok")
and
:svgs-to-embed (not "no" "skip")
are possible.
Is it also possible to do
#+EXCLUDE_TAGS: not "no" "skip"
or something similar in an Org file?


A can not add much to the discussions concerning various approaches to
include SVG images. I just faced that some SVG files breaks text
selection in Firefox: https://bugzilla.mozilla.org/1730723


I am using Firefox-113.0.2 and the bug is still there: sometimes
I can select all text from the beginning of the first "selecting"
downwards (depends on my touchpad sweep) but never from the
first "Start".



Re: Org-mode customization in emacs

2023-06-06 Thread Fleur Chrysalis
Ah, understood, thank you for the reply.
Rather unfortunate that there is no way to extend it or customize it easily.

 Mensagem Original 
Em 6 de jun. de 2023 10:38, Ihor Radchenko escreveu:

> Fleur Chrysalis  writes: > I've been searching all day for a way to work 
> Org-mode's plain list with the concept map of Org-brain. My problem is that 
> Org-brain displays headings as children of a mind-map parent file, example: 
> File RPG, title: DnD5e, Heading 1 will be shown in org-brain as something 
> like this... > ... > Text inside of it will be shown normally, however. It 
> also doesn't comply with TODO words (doesn't show them), So i've been 
> thinking of using just Checkboxes to mark this. I've come across xit-mode, 
> which contains Boxes for Doing [@], Abandoned [~] (which strikes the task) 
> and Unsure [?]. I would like to add those, even if through customization, 
> like you would with TODO Keywords, but i haven't found out how. Is there a 
> way to add those to the cycle list of checkboxes for org-mode? Checkboxes 
> only support a limited TODO-like functionality. Last time we discussed 
> extending the available checkbox states, we decided not to go in this 
> direction for Org mode. See 
> https://list.orgmode.org/2022-09-12t14-35...@devnull.karl-voit.at/ -- Ihor 
> Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . 
> Support Org development at , or support my work at

Re: [BUG] Org-9.6.x org templates hang on 'clipboard pasted as level 2 subtree'...

2023-06-06 Thread Carlo Tambuatco
Hey Ihor, I recently upgraded my emacs to emacs@29 via homebrew, and I know
this is an
old thread, but now that my new emacs version comes with org-9.6.6, I am
getting the same
issues as I detailed in this thread with my org capture templates. I tried
to do a reproduce
with emacs -q but the error does not reproduce in those conditions, so it
might be an issue
with org mode interacting with some of my other packages installed.

I will include a list of emacs packages I have installed, and my
org-init.el file. Maybe you
could see if anything jumps out at you that is causing this weird behavior.

On Mon, Apr 17, 2023 at 6:40 AM Carlo Tambuatco 
wrote:

> I've decided to delete the org-9.6 folder entirely and go with the
> built-in org-9.5.5 that comes with my emacs distribution, emacs-28.2 (9.0).
>
> Maybe for some reason newer versions of org are just incompatible with
> my version of emacs 28.2. Maybe the version of emacs you're using is
> newer or somehow more compatible with these bleeding edge development
> versions of org-mode, but I suppose when I upgrade my emacs the version
> of org that comes with it (9.6, I suppose) will just work out of the box.
>
> At any rate, I can't spend any more time and energy on this. I'll stick to
> what works. Thanks for the help.
>
> On Sun, Apr 16, 2023 at 8:09 AM Ihor Radchenko 
> wrote:
>
>> Carlo Tambuatco  writes:
>>
>> > I restarted emacs with org 9.6.3 and reloaded it uncompiled and
>> > did M-x toggle-debug-on-error to turn on backtrace on error.
>> >
>> > I have also attached a copy of what my org-capture-templates
>> > variable looks like.
>> >
>> > Comparing these backtraces to my org-capture-templates,
>> > you can see that only some of them fail (the ones corresponding to
>> > 'd', 'e', 'r', 'Rr', 'Rg', and 'Cc')
>> >
>> > They all worked up until Org 9.6. They still work under Org 9.5.5, so
>> > I don't know what changed.
>>
>> I tried your templates locally and I am not seeing any problem.
>>
>> May you try to reproduce starting from emacs -Q?
>> Or, alternatively, try to use the following version of Org capture, use
>> C-g to exit, and report the (hopefully) more detailed backtrace.
>>
>> (defun org-capture ( goto keys)
>>   "Capture something.
>> \\
>> This will let you select a template from `org-capture-templates', and
>> then file the newly captured information.  The text is immediately
>> inserted at the target location, and an indirect buffer is shown where
>> you can edit it.  Pressing `\\[org-capture-finalize]' brings you back to
>> the \
>> previous
>> state of Emacs, so that you can continue your work.
>>
>> When called interactively with a `\\[universal-argument]' prefix argument
>> \
>> GOTO, don't
>> capture anything, just go to the file/headline where the selected
>> template stores its notes.
>>
>> With a `\\[universal-argument] \\[universal-argument]' prefix argument,
>> go to \
>> the last note stored.
>>
>> When called with a `C-0' (zero) prefix, insert a template at point.
>>
>> When called with a `C-1' (one) prefix, force prompting for a date when
>> a datetree entry is made.
>>
>> ELisp programs can set KEYS to a string associated with a template
>> in `org-capture-templates'.  In this case, interactive selection
>> will be bypassed.
>>
>> If `org-capture-use-agenda-date' is non-nil, capturing from the
>> agenda will use the date at point as the default date.  Then, a
>> `C-1' prefix will tell the capture process to use the HH:MM time
>> of the day at point (if any) or the current HH:MM time."
>>   (interactive "P")
>>   (when (and org-capture-use-agenda-date
>>  (eq major-mode 'org-agenda-mode))
>> (setq org-overriding-default-time
>>   (org-get-cursor-date (equal goto 1
>>   (cond
>>((equal goto '(4))  (org-capture-goto-target keys))
>>((equal goto '(16)) (org-capture-goto-last-stored))
>>(t
>> (let* ((orig-buf (current-buffer))
>>(annotation (if (and (boundp
>> 'org-capture-link-is-already-stored)
>> org-capture-link-is-already-stored)
>>(plist-get org-store-link-plist :annotation)
>>  (ignore-errors (org-store-link nil
>>(entry (or org-capture-entry (org-capture-select-template
>> keys)))
>>initial)
>>   (setq initial (or org-capture-initial
>> (and (org-region-active-p)
>>  (buffer-substring (point) (mark)
>>   (when (stringp initial)
>> (remove-text-properties 0 (length initial) '(read-only t)
>> initial))
>>   (when (stringp annotation)
>> (remove-text-properties 0 (length annotation)
>> '(read-only t) annotation))
>>   (cond
>>((equal entry "C")
>> (customize-variable 'org-capture-templates))
>>((equal entry "q")
>> (user-error "Abort"))
>>(t
>> (org-capture-set-plist entry)
>> 

Re: mailto link issue in 9.5.5 and 9.6.6

2023-06-06 Thread Scott Randby

On 6/6/23 02:05, Ihor Radchenko wrote:

Scott Randby  writes:


(4) I executed (customize-set-variable 'browse-url-mailto-function nil) and then executed 
(browse-url "mailto:sran...@gmail.com;). The result gave the same error 
messages.


This sounds like Emacs bug, and I can reproduce. Please report it to
Emacs devs. (M-x report-emacs-bug)



I agree, I've looked through the code of browse-url.el in 28.2 and 27.2 (where 
it works) but I can't find the problem because my understanding of Elisp is 
primitive. I've never reported an Emacs bug before, but I will try.



Re: mailto link issue in 9.5.5 and 9.6.6

2023-06-06 Thread Scott Randby

On 6/6/23 10:30, Max Nikulin wrote:


Try to set `browse-url-mailto-function' to `browse-url-default-browser'.



I tried that yesterday and it didn't work.



Org-Agenda view customization

2023-06-06 Thread Dieter Faulbaum



I like to have my entries in my org-files in this way:
* <2023-06-06>--<2023-06-10> 5 days long

But then the agenda view entry doesn't look so nice:
(1/5):  <2023-06-06>--<2023-06-10> 5 days long

If the entry in the org-file looks like this:
* 5 days long
 <2023-06-06>--<2023-06-10>

the agenda view entry looks nicer:
(1/5):  5 days long

Is there a way to get rid of the part '<2023-06-06>--<2023-06-10>' 
in the agenda view

(with the date entry in the same line in the org-file)?



Re: mailto link issue in 9.5.5 and 9.6.6

2023-06-06 Thread Max Nikulin

On 06/06/2023 02:21, Scott Randby wrote:


Debugger entered--Lisp error: (void-function nil)
   nil("mailto:sran...@gmail.com; (nil))
   browse-url--mailto("mailto:sran...@gmail.com; nil)
   apply(browse-url--mailto "mailto:sran...@gmail.com; nil)
   browse-url("mailto:sran...@gmail.com;)


Try to set `browse-url-mailto-function' to `browse-url-default-browser'.

It seems https://orgmode.org/worg/org-faq.html#mailto-links requires an 
update for Emacs-28 (besides a typo with "~" instead of "-").




Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-06 Thread Max Nikulin

On 05/06/2023 20:23, gerard.vermeulen wrote:

# The next line overrules html-embed-svg:t
#+HTML_EMBED_SVG_EXCLUDES: ./doc8.svg
# The next line overrules html-embed-svg:nil
#+HTML_EMBED_SVG_INCLUDES: ./doc8.svg


I agree with Ihor's idea concerning #+attr_html (multiple inline images 
in a paragraph may be an issue). However notice that some ox options 
allows include/exclude lists:


 :exclude-tags ("skip")
 :with-drawers (not "skip")

A can not add much to the discussions concerning various approaches to 
include SVG images. I just faced that some SVG files breaks text 
selection in Firefox: https://bugzilla.mozilla.org/1730723




Re: [BUG] Org parser error [9.6.1 (9.6.1-??-fe92a3c @

2023-06-06 Thread Ihor Radchenko


Thanks for the report! It appears that you have encountered Org warning.
If so, may you also provide the warning text?

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



Re: [BUG] org-element-cache [9.6.1 (9.6.1-??-fe92a3c @ /home/coreya/.emacs.d/.local/straight/build-28.2/org/)]

2023-06-06 Thread Ihor Radchenko


Thanks for the report, but may you please provide more details?

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



Re: Org-mode customization in emacs

2023-06-06 Thread Ihor Radchenko
Fleur Chrysalis  writes:

> I've been searching all day for a way to work Org-mode's plain list with the 
> concept map of Org-brain. My problem is that Org-brain displays headings as 
> children of a mind-map parent file, example: File RPG, title: DnD5e, Heading 
> 1 will be shown in org-brain as something like this...
> ...
> Text inside of it will be shown normally, however. It also doesn't comply 
> with TODO words (doesn't show them), So i've been thinking of using just 
> Checkboxes to mark this. I've come across xit-mode, which contains Boxes for 
> Doing [@], Abandoned [~] (which strikes the task) and Unsure [?]. I would 
> like to add those, even if through customization, like you would with TODO 
> Keywords, but i haven't found out how. Is there a way to add those to the 
> cycle list of checkboxes for org-mode?

Checkboxes only support a limited TODO-like functionality. Last time we
discussed extending the available checkbox states, we decided not to go
in this direction for Org mode.

See https://list.orgmode.org/2022-09-12t14-35...@devnull.karl-voit.at/

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



Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-06 Thread gerard . vermeulen




On 06.06.2023 11:57, Christian Moe wrote:

Hi,

I think there's a better approach. Tl;dr:

- A better way to have active CSS in SVG images is to link to the
  external SVG file with the  rather than  tag, as we used
  to.

- Without patching Org, you can embed an external SVG file as an SVG
  island in Org HTML export simply by using #+INCLUDE.

Details:

1) Embedded SVG is not the only way to have active CSS etc. in SVG
images. Linking to an external SVG file with an OBJECT element instead
of IMG should work fine (tested in Firefox). You can test this by
exporting Gerard's mwe.org example and editing the mwe.html to replace

: img src="./doc8.svg"

with

: object type="image/svg+xml" data="./doc8.svg"


Indeed, the flower works after the replacement but the caption 
disappears.
I do not understand why, because the caption is still present in the 
HTML.




Org used to use OBJECT for SVG years ago, but switched to IMG at some
point. I'm not quite sure when or why that happened (forgive me for not
doing an exhaustive search of the archive or delving into the git
record). But I think perhaps the reason was this thread,

  
https://lists.gnu.org/archive/html/emacs-orgmode/2016-07/msg00380.html


where the issue was easy scaling, and that Jarmo Hurri's patch 
switching

to IMG came to be applied at some point, even though Jarmo and I agreed
that adding a common CLASS="svgfig" attribute to OBJECT would solve his
issue, see this thread:

  
https://lists.gnu.org/archive/html/emacs-orgmode/2016-07/msg00410.html


I continue to think that OBJECT with an .svgfig class as default (or a
setting to give the user a choice between IMG and OBJECT) is the best
solution.

2) You can actually embed an SVG island in Org HTML export simply by
using #+INCLUDE. To try this, add the following line to Gerard's 
mwe.org:


: #+INCLUDE: "./doc8.svg" export html

The exported HTML should now show the black flower from Gerard's 
minimal

non-working example plus a working flower.


Indeed, the flower works, but the caption disappears because Org does 
not
recognize the "#+INCLUDE ..." as a link, the caption does not show up in 
the

HTML. Is there an easy solution for this issue.



(Some SVG files may start with an XML declaration; if the XML
declaration is on a separate first line, you can just skip it by adding
=:lines "2-"= to the #+INCLUDE instruction.)

Yours,
Christian


Thanks -- Gerard


Ihor Radchenko writes:


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

I have been trying to export SVG images having links to CSS from Org 
to

HTML
and I have found that the this CSS is not active in Firefox (only
browser I tried).

I have found that the CCS is only active under two conditions:
1. The HTML page should manage the CSS that the SVG image links to.
2. The SVG image should be embedded in the HTML page.


CCing Timothy, the maintainer.

Also, does the above mean that Firefox does not support custom CSS 
user

stylesheets? What am I missing?


I wrote an ox-html derived export backend to embed SVG images:
https://forge.chapril.org/gav451/emacs.d/src/branch/main/site-lisp/ox-my-html/ox-my-html.el
and merged the SVG embedding functionality into ox-html.el leading to
the
attached patch.


Thanks! I will provide high-level comments from general ox.el
perspective.


+(:html-embed-svg-excludes "HTML_EMBED_SVG_EXCLUDES" nil
+  org-html-embed-svg-excludes split)
+(:html-embed-svg-includes "HTML_EMBED_SVG_INCLUDES" nil
+  org-html-embed-svg-includes split)


This is awkward. To do per-image export adjustments, we usually use
export attributes (#+ATTR_HTML: ...). And why "split"?

+(:with-html-svg-embedding nil "html-embed-svg" 
org-html-embed-svg)


We have :html-inline-images. Maybe better :html-embed-svg ?


+(defcustom org-html-embed-svg nil
...
+  :version "30.0"


We do not use :version tag. Please use :package-version.
See Elisp manual section "15.1 Common Item Keywords".

Also, maybe instead of t/nil boolean values here, we may allow the 
value

to be a list of regular expressions or a string representing regular
expression. This will allow what you are trying to do with
HTML_EMBED_SVG_INCLUDES. The list elements might also be (not "..."),
replicating HTML_EMBED_SVG_EXLCUDES.

Even more generally, we may turn this into HTML_EMBED_IMAGES and embed
all the images (possibly filtered by regexp). This will be slightly
beyond the scope of this patch though.


+(defun org-html--embed-svg-p (link path info)
+  "Check whether LINK and INFO specify to embed the SVG file named 
PATH.
+LINK must have no contents and link to an SVG file.  INFO may 
contain

+lists of SVG files to include in and/or to exclude from embedding."
+  (and (not (org-element-contents link))


Please use `org-export-inline-image-p'.


+(defun org-html-svg-contents (path)
+  "Return the SVG contents of the file named PATH."
+  (with-temp-buffer
+(insert-file-contents path)
+;; Delete text preceding 

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-06 Thread gerard . vermeulen




On 06.06.2023 09:49, Ihor Radchenko wrote:

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

I have been trying to export SVG images having links to CSS from Org 
to

HTML
and I have found that the this CSS is not active in Firefox (only
browser I tried).

I have found that the CCS is only active under two conditions:
1. The HTML page should manage the CSS that the SVG image links to.
2. The SVG image should be embedded in the HTML page.


CCing Timothy, the maintainer.

Also, does the above mean that Firefox does not support custom CSS user
stylesheets? What am I missing?


No, it means that custom CSS inside a linked SVG image is shielded from
the page that has the link to the SVG image.

To me it looks a natural defense against linking to different SVG images
linking to conflicting custom CSS.

If the HTML page linking to those images should manage the conflicting
custom CSS, the creator of the page is responsible for resolving the 
conflicts.



I wrote an ox-html derived export backend to embed SVG images:
https://forge.chapril.org/gav451/emacs.d/src/branch/main/site-lisp/ox-my-html/ox-my-html.el
and merged the SVG embedding functionality into ox-html.el leading to
the
attached patch.


Thanks! I will provide high-level comments from general ox.el
perspective.


+(:html-embed-svg-excludes "HTML_EMBED_SVG_EXCLUDES" nil
+  org-html-embed-svg-excludes split)
+(:html-embed-svg-includes "HTML_EMBED_SVG_INCLUDES" nil
+  org-html-embed-svg-includes split)


This is awkward. To do per-image export adjustments, we usually use
export attributes (#+ATTR_HTML: ...). And why "split"?


I do not think that #+ATTR_HTML allows to embed (= copy) the contents
of an SVG file directly into the HTML page.  As far as I understand, it 
adds

only attributes to HTML elements.

The "split" is because of similarity with :select_tags and :exclude_tags 
in ox.

It allows several files to be included in or excluded from embedding.

I agree that an attribute like #+EMBED_SVG is less awkward.



+(:with-html-svg-embedding nil "html-embed-svg" 
org-html-embed-svg)


We have :html-inline-images. Maybe better :html-embed-svg ?


I agree (the patch started as an derived backend with ox-beamer as an
example where those kind of variables are prefixed with :with; this is
a left-over).



+(defcustom org-html-embed-svg nil
...
+  :version "30.0"


We do not use :version tag. Please use :package-version.
See Elisp manual section "15.1 Common Item Keywords".


My fault.


Also, maybe instead of t/nil boolean values here, we may allow the 
value

to be a list of regular expressions or a string representing regular
expression. This will allow what you are trying to do with
HTML_EMBED_SVG_INCLUDES. The list elements might also be (not "..."),
replicating HTML_EMBED_SVG_EXLCUDES.

Even more generally, we may turn this into HTML_EMBED_IMAGES and embed
all the images (possibly filtered by regexp). This will be slightly
beyond the scope of this patch though.


+(defun org-html--embed-svg-p (link path info)
+  "Check whether LINK and INFO specify to embed the SVG file named 
PATH.

+LINK must have no contents and link to an SVG file.  INFO may contain
+lists of SVG files to include in and/or to exclude from embedding."
+  (and (not (org-element-contents link))


Please use `org-export-inline-image-p'.


I think that the terminology "inline-image" in ox-html is confusing.
In ox-html the result of the "inline-image"  code is an HTML tag like



It does not mean that image data is copied inline as with embedding.



+(defun org-html-svg-contents (path)
+  "Return the SVG contents of the file named PATH."
+  (with-temp-buffer
+(insert-file-contents path)
+;; Delete text preceding something starting as an SVG root 
element.

+;; The intent is to remove XML declarations (and XML comments).
+;; This breaks in case of a preceding XML comment with inside

+;; or a preceding XML element with an SVG element inside.
+;; See https://emacs.stackexchange.com/a/57433 for the original 
code.


But the original code is different, no?


Yes, I pretend that my code is an improvement:
1. The with-syntax-table is superfluous.
2. The error message gives a reason and the filename causing it.




[BUG] Org parser error [9.6.1 (9.6.1-??-fe92a3c @

2023-06-06 Thread Gabriele LENZINI
*** E-Mail body has been placed on clipboard, please paste it here! ***



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.




Emacs  : GNU Emacs 28.2 (build 2, x86_64-w64-mingw32)
 of 2022-09-13
Package: Org mode version 9.6.1 (9.6.1-??-fe92a3c @ 
c:/Users/Gabriele.Lenzini/.emacs.d/.local/straight/build-28.2/org/)

current state:
==
(setq
 org-link-elisp-confirm-function nil
 org-directory "C:\\Users\\Gabriele.Lenzini\\IRiSC Dropbox\\Gabriele Lenzini 
(gabriele.lenzini)\\00-Admin\\4-LogBook\\org"
 org-after-refile-insert-hook '(save-buffer)
 org-indirect-buffer-display 'current-window
 org-crypt-key nil
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-load-hook '(+org-init-org-directory-h +org-init-appearance-h 
+org-init-agenda-h +org-init-attachments-h +org-init-babel-h
 +org-init-babel-lazy-loader-h +org-init-capture-defaults-h 
+org-init-capture-frame-h +org-init-custom-links-h
 +org-init-export-h +org-init-habit-h +org-init-hacks-h 
+org-init-keybinds-h +org-init-popup-rules-h
 +org-init-smartparens-h)
 org-startup-folded nil
 org-babel-after-execute-hook '(+org-redisplay-inline-images-in-babel-result-h)
 org-link-abbrev-alist '(("doomdir" . "c:/Users/Gabriele.Lenzini/.doom.d/%s")
 ("emacsdir" . "c:/Users/Gabriele.Lenzini/.emacs.d/%s")
 ("doom-repo" . 
"https://github.com/doomemacs/doomemacs/%s;)
 ("wolfram" . "https://wolframalpha.com/input/?i=%s;)
 ("wikipedia" . "https://en.wikipedia.org/wiki/%s;) 
("duckduckgo" . "https://duckduckgo.com/?q=%s;)
 ("gmap" . "https://maps.google.com/maps?q=%s;) 
("gimages" . "https://google.com/images?q=%s;)
 ("google" . "https://google.com/search?q=;) ("youtube" 
. "https://youtube.com/watch?v=%s;)
 ("github" . "https://github.com/%s;))
 org-agenda-files '("C:\\Users\\Gabriele.Lenzini\\IRiSC Dropbox\\Gabriele 
Lenzini (gabriele.lenzini)\\00-Admin\\4-LogBook\\org")
 org-capture-templates '(("t" "Personal todo" entry (file+headline 
+org-capture-todo-file "Inbox") "* [ ] %?\n%i\n%a" :prepend
  t)
 ("n" "Personal notes" entry (file+headline 
+org-capture-notes-file "Inbox") "* %u %?\n%i\n%a" :prepend
  t)
 ("j" "Journal" entry (file+olp+datetree 
+org-capture-journal-file) "* %U %?\n%i\n%a" :prepend t)
 ("p" "Templates for projects")
 ("pt" "Project-local todo" entry (file+headline 
+org-capture-project-todo-file "Inbox")
  "* TODO %?\n%i\n%a" :prepend t)
 ("pn" "Project-local notes" entry (file+headline 
+org-capture-project-notes-file "Inbox")
  "* %U %?\n%i\n%a" :prepend t)
 ("pc" "Project-local changelog" entry (file+headline 
+org-capture-project-changelog-file "Unreleased")
  "* %U %?\n%i\n%a" :prepend t)
 ("o" "Centralized templates for projects")
 ("ot" "Project todo" entry 
#'+org-capture-central-project-todo-file "* TODO %?\n %i\n %a" :heading
  "Tasks" :prepend nil)
 ("on" "Project notes" entry 
#'+org-capture-central-project-notes-file "* %U %?\n %i\n %a" :heading
  "Notes" :prepend t)
 ("oc" "Project changelog" entry 
#'+org-capture-central-project-changelog-file "* %U %?\n %i\n %a"
  :heading "Changelog" :prepend t)
 )
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-refile-targets '((nil :maxlevel . 3) (org-agenda-files :maxlevel . 3))
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-cycle-tab-first-hook '(+org-yas-expand-maybe-h +org-indent-maybe-h 
org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand 
+org-clear-babel-results-h +org-cycle-only-current-subtree-h)
 org-default-notes-file "c:/Users/Gabriele.Lenzini/IRiSC Dropbox/Gabriele 
Lenzini (gabriele.lenzini)/00-Admin/4-LogBook/org/notes.org"
 org-roam-find-file-hook '(org-roam-buffer--setup-redisplay-h 
org-roam--register-completion-functions-h
   org-roam--replace-roam-links-on-save-h 
org-roam-db-autosync--setup-update-on-save-h)
 org-refile-use-outline-path 'file
 org-publish-timestamp-directory 
"c:/Users/Gabriele.Lenzini/.emacs.d/.local/cache/org/timestamps/"
 org-archive-hook 

Re: org-mode for package documentation

2023-06-06 Thread Björn Bidar
Philip Kaludercic  writes:

> Christopher Dimech  writes:
>
>> Dear Compeers,
>>
>> Some months ago there had been a discussion about using org-mode
>> to produce package documentation.  Which would allow the use of  
>> Latex3 (e.g. use of colour, floating images).
>
> Where/when did this happen?  Could you provide a few pointers?

I don't know exactly but when use-package was merged into Emacs there
were discussions if keeping the documentation in org-mode format is
fine.

>From what I understood it is possible.



[BUG] org-agenda-custom-commands with org-agenda-category-filter-preset not working [9.6.4 (release_9.6.4-9-g8eb209 @ /usr/local/share/emacs/29.0.90/lisp/org/)]

2023-06-06 Thread General discussions about Org-mode.


In every work related org-file, I set the category like this: 

#+CATEGORY: work

I then use org-agenda-custom-commands like those below to show work related 
content or not work related content. This works in Org version 9.5.5/Emacs 
28.2, but in Org version 9.6.4/Emacs 29.0.90, both custom-commands shows the 
content of every file, category "work" or not.

I posted this on Reddit, and according to a user it can be reproduced in the 
stable version, while it works fine in the development version.
My org-agenda-custom-commands settings looks like this: 
'(org-agenda-custom-commands   '(("p" "private"  ((agenda "" nil)   
(alltodo "" ((org-agenda-category-filter-preset   
'("-work")  nil) ("w" "Work"  ((agenda "" nil)   (alltodo 
""  ((org-agenda-category-filter-preset   
'("+work")  nil nil)))



Org-mode customization in emacs

2023-06-06 Thread Fleur Chrysalis
Hi,
I've been searching all day for a way to work Org-mode's plain list with the 
concept map of Org-brain. My problem is that Org-brain displays headings as 
children of a mind-map parent file, example: File RPG, title: DnD5e, Heading 1 
will be shown in org-brain as something like this...

DnD5e
|
|
v
Heading 1

Text inside of it will be shown normally, however. It also doesn't comply with 
TODO words (doesn't show them), So i've been thinking of using just Checkboxes 
to mark this. I've come across xit-mode, which contains Boxes for Doing [@], 
Abandoned [~] (which strikes the task) and Unsure [?]. I would like to add 
those, even if through customization, like you would with TODO Keywords, but i 
haven't found out how. Is there a way to add those to the cycle list of 
checkboxes for org-mode?

[PATCH] org-id: implement arbitrary cross-file references

2023-06-06 Thread Sergei Kosyrev
Good day list!

This extends org-id in a way that allows table formulae to reference
table content in other files.

Patch is attached, and can be alternatively observed via github:

https://github.com/deepfire/org-mode/pull/1/files

This is my first contribution, so caveat emptor!

Thank you!

-- 
best regards,
Serge KosyrevFrom f712fa57a90c68d3d9066b10f49822ea0337b923 Mon Sep 17 00:00:00 2001
From: Kosyrev Serge 
Date: Thu, 25 May 2023 19:30:01 +0800
Subject: [PATCH] org-id: implement arbitrary cross-file references

* Table formulae can now refer to data from tables in other files.

TINYCHANGE
---
 etc/ORG-NEWS  | 10 +
 lisp/org-id.el| 57 ++-
 lisp/org-table.el |  2 +-
 3 files changed, 58 insertions(+), 11 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 6b40198b5..311067628 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -221,6 +221,16 @@ Running shell blocks with the ~:session~ header freezes Emacs until
 execution completes.  The new ~:async~ header allows users to continue
 editing with Emacs while a ~:session~ block executes.
 
+*** ~remote~ ~org-table~ can now refer to variables in other files
+
+Table formulae can now refer to data from tables in other files.
+
+Example:
+
+#+BEGIN_src org
+#+TBLFM: $2='(identity remote(file:./org-wile-with-tables.org,@@#$Value))
+#+END_src
+
 ** Miscellaneous
 *** =org-crypt.el= now applies initial visibility settings to decrypted entries
 
diff --git a/lisp/org-id.el b/lisp/org-id.el
index aa9610f16..2fcecbb50 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -337,6 +337,40 @@ Move the cursor to that entry in that buffer."
 (move-marker m nil)
 (org-fold-show-context)))
 
+(defun org-id-parse-remote-table-ref (refstr)
+  (let ((match (string-match "^file:\\([^:]+\\)\\(\\|:.+\\)$" refstr)))
+(unless (null match)
+  (let* ((m1 (match-string 1 refstr))
+ (m2 (match-string 2 refstr))
+ (filename (cl-remove-if (lambda (c) (member c '(40 41)))
+  (org-table-formula-substitute-names m1)))
+ (table-name (org-table-formula-substitute-names m2)))
+(list filename table-name)
+
+(defun org-id-find-remote (file table-id markerp)
+  (if (file-exists-p file)
+  (let ((buffer (let ((query-about-changed-file nil))
+  (find-file-noselect file
+(unwind-protect
+	(with-current-buffer buffer
+  (goto-char (point-min))
+	  (let ((pos (progn
+   (unless (string= table-id "")
+ (let* ((ident (cl-subseq table-id 1))
+(id-match (search-forward (concat "#+NAME: " ident) nil t)))
+   (unless id-match
+ (error "org-id-find-remote: file \"%s\" has no table with NAME \"%s\"." file ident))
+   (forward-line)))
+   (re-search-forward "^|-")
+   (move-beginning-of-line nil
+(cond
+	 ((null pos) nil)
+	 (markerp (move-marker (make-marker) pos buffer))
+	 (t (cons file pos)
+	  ;; Remove opened buffer in the process.
+	  (unless markerp (kill-buffer buffer
+(error "org-id-find-remote:  reference to missing file %s" file)))
+
 ;;;###autoload
 (defun org-id-find (id  markerp)
   "Return the location of the entry with the id ID.
@@ -346,16 +380,19 @@ With optional argument MARKERP, return the position as a new marker."
   (cond
((symbolp id) (setq id (symbol-name id)))
((numberp id) (setq id (number-to-string id
-  (let ((file (org-id-find-id-file id))
-	org-agenda-new-buffers where)
-(when file
-  (setq where (org-id-find-id-in-file id file markerp)))
-(unless where
-  (org-id-update-id-locations nil t)
-  (setq file (org-id-find-id-file id))
-  (when file
-	(setq where (org-id-find-id-in-file id file markerp
-where))
+  (let ((remote-match (org-id-parse-remote-table-ref id)))
+(if remote-match
+(org-id-find-remote (car remote-match) (cadr remote-match) markerp)
+  (let ((file (org-id-find-id-file id))
+	org-agenda-new-buffers where)
+(when file
+  (setq where (org-id-find-id-in-file id file markerp)))
+(unless where
+  (org-id-update-id-locations nil t)
+  (setq file (org-id-find-id-file id))
+  (when file
+	(setq where (org-id-find-id-in-file id file markerp
+where
 
 ;;; Internal functions
 
diff --git a/lisp/org-table.el b/lisp/org-table.el
index ac685c41e..e894d563a 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -6281,7 +6281,7 @@ list of the fields in the rectangle."
 (let ((case-fold-search t) (id-loc nil)
 	  ;; Protect a bunch of variables from being overwritten by
 	  ;; the context of the remote table.
-	  org-table-column-names 

[BUG] org-element-cache [9.6.1 (9.6.1-??-fe92a3c @ /home/coreya/.emacs.d/.local/straight/build-28.2/org/)]

2023-06-06 Thread c . aronoff


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.
---
-



Emacs  : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.36, cairo version 1.17.6)
 of 2023-01-02
Package: Org mode version 9.6.1 (9.6.1-??-fe92a3c @
/home/coreya/.emacs.d/.local/straight/build-28.2/org/)

current state:
==
(setq
 org-edna-use-inheritance t
 org-link-elisp-confirm-function nil
 org-directory "~/Documents/org"
 org-after-refile-insert-hook '(save-buffer)
 org-indirect-buffer-display 'current-window
 org-roam-db-gc-threshold 2305843009213693951
 org-crypt-key nil
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-roam-mode-hook '(+org-roam-detach-magit-section-mode-map-h turn-
on-visual-line-mode)
 org-load-hook '(+org-init-org-directory-h +org-init-appearance-h +org-
init-agenda-h +org-init-attachments-h
 +org-init-babel-h +org-init-babel-lazy-loader-h +org-
init-capture-defaults-h
 +org-init-capture-frame-h +org-init-custom-links-h
+org-init-export-h +org-init-habit-h
 +org-init-hacks-h +org-init-keybinds-h +org-init-
popup-rules-h +org-init-smartparens-h
 +org-init-roam-h)
 org-startup-folded nil
 org-babel-after-execute-hook '(+org-redisplay-inline-images-in-babel-
result-h)
 org-link-abbrev-alist '(("doomdir" . "/home/coreya/.doom.d/%s")
("emacsdir" . "/home/coreya/.emacs.d/%s")
 ("doom-repo" .
"https://github.com/doomemacs/doomemacs/%s;)
 ("wolfram" .
"https://wolframalpha.com/input/?i=%s;)
 ("wikipedia" .
"https://en.wikipedia.org/wiki/%s;)
 ("duckduckgo" .
"https://duckduckgo.com/?q=%s;)
 ("gmap" . "https://maps.google.com/maps?q=%s;)
 ("gimages" . "https://google.com/images?q=%s;)
("google" . "https://google.com/search?q=;)
 ("youtube" . "https://youtube.com/watch?v=%s;)
("github" . "https://github.com/%s;))
 org-agenda-files '("~/Documents/org")
 org-capture-templates '(("t" "Personal todo" entry (file+headline
+org-capture-todo-file "Inbox")
  "* [ ] %?\n%i\n%a" :prepend t)
 ("n" "Personal notes" entry (file+headline
+org-capture-notes-file "Inbox")
  "* %u %?\n%i\n%a" :prepend t)
 ("j" "Journal" entry (file+olp+datetree +org-
capture-journal-file) "* %U %?\n%i\n%a"
  :prepend t)
 ("p" "Templates for projects")
 ("pt" "Project-local todo" entry
(file+headline +org-capture-project-todo-file "Inbox")
  "* TODO %?\n%i\n%a" :prepend t)
 ("pn" "Project-local notes" entry
(file+headline +org-capture-project-notes-file "Inbox")
  "* %U %?\n%i\n%a" :prepend t)
 ("pc" "Project-local changelog" entry
  (file+headline +org-capture-project-
changelog-file "Unreleased") "* %U %?\n%i\n%a"
  :prepend t)
 ("o" "Centralized templates for projects")
 ("ot" "Project todo" entry #'+org-capture-
central-project-todo-file "* TODO %?\n %i\n %a"
  :heading "Tasks" :prepend nil)
 ("on" "Project notes" entry #'+org-capture-
central-project-notes-file "* %U %?\n %i\n %a"
  :heading "Notes" :prepend t)
 ("oc" "Project changelog" entry #'+org-
capture-central-project-changelog-file
  "* %U %?\n %i\n %a" :heading "Changelog"
:prepend t)
 )
 org-roam-node-display-template #("${doom-hierarchy:*} ${doom-type:12}
${doom-tags:42}" 20 35 (face font-lock-keyword-face) 36 51 (face org-
tag))
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-refile-targets '((nil :maxlevel . 3) (org-agenda-files :maxlevel .
3))
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-cycle-tab-first-hook '(+org-yas-expand-maybe-h +org-indent-maybe-h
org-babel-hide-result-toggle-maybe
    org-babel-header-arg-expand +org-clear-
babel-results-h
    +org-cycle-only-current-subtree-h)
 org-default-notes-file "/home/coreya/Documents/org/notes.org"
 org-roam-find-file-hook '(doom--setq-org-id-link-to-org-use-id-for-
org-roam-find-file-h
   org-roam-buffer--setup-redisplay-h org-roam-
-register-completion-functions-h
   org-roam--replace-roam-links-on-save-h org-

[BUG] org-insert-todo-heading-respect-content and org-insert-todo-heading have different behaviors [9.6.1 ( @ /home/username/.chemacs/spacemacs/elpa/28.2/develop/org-9.6.1/)]

2023-06-06 Thread Xuan Wang
--text follows this line--

Problem: Now org-insert-todo-heading-respect-content does not respect the
TODO
state of current heading.

How to reproduce:
Example: define a todo sequence as followed:
"#+TODO: WAIT(w@/!) TODO(t) | DONE(d) CANCELED(c@)"

With the cursor at a heading with todo state as "TODO",
org-insert-todo-heading
will insert a heading with todo state "TODO", the same as the current
heading,
as stated as in the doc. "Insert a new heading with the same level and TODO
state as current heading."

However, org-insert-todo-heading-respect-content will insert a heading with
todo
state "WAIT", not "TODO".

Expected behavior: org-insert-todo-heading-respect-content shall act like
org-insert-todo-heading, insert "TODO" for the new heading if the current
heading is "TODO".

Reason: org-insert-todo-heading-respect-content's doc says "Insert TODO
heading
with ‘org-insert-heading-respect-content’ set to t.", so it shall be
expected
that the result should be the same as calling org-insert-todo-heading.

Another reason to justify this: like above, I defined the TODO sequence to
be
WAIT-TODO-DONE-CANCELED, so that I can easily switch between WAIT and TODO
using
S-left and S-right and a single S-right can change TODO to DONE. It is
desirable
that to manually write one TODO heading, then create all following TODO
headings
with org-insert-todo-heading-respect-content. However, with the current
version
of org-mode, org-insert-todo-heading-respect-content will insert WAIT
instead of
TODO.

Old version of org-mode doesn't have the problem. git-blame shows the
changes
was made in the following commit:

b4e41b98792f85a1c6d4c73141de49c78b0e5bf7
Author: Ihor Radchenko 
AuthorDate: Sat Aug 20 14:22:53 2022 +0800
Commit: Ihor Radchenko 
CommitDate: Sat Aug 20 14:24:47 2022 +0800

I removed a few variables from the variables lists below for privacy.



Emacs  : GNU Emacs 28.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.24.20, cairo version 1.16.0)
 of 2023-04-26
Package: Org mode version 9.6.1 ( @
/home/username/.chemacs/spacemacs/elpa/28.2/develop/org-9.6.1/)

current state:
==
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-ref-cite-onclick-function #[257 "\300 \207"
[org-ref-citation-hydra/body] 2 "\n\n(fn _)"]
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-ref-insert-cite-function 'org-ref-insert-cite-link
 org-download-file-format-function 'org-download-file-format-default
 org-log-done 'time
 org-fontify-done-headline nil
 org-babel-after-execute-hook '(spacemacs/ob-fix-inline-images)
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-format-latex-options '(:foreground default :background default :scale
1.5 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0
:matchers
("begin" "$1" "$" "$$" "\\(" "\\["))
 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-default-notes-file "/home/username/org/notes.org"
 org-export-async-init-file
"/home/username/.chemacs/spacemacs/layers/+emacs/org/local/org-async-init.el"
 org-download-method 'attach
 org-ref-bibtex-assoc-pdf-with-entry-move-function 'rename-file
 org-publish-timestamp-directory
"~/.chemacs/spacemacs/.cache/.org-timestamps/"
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-odt-format-inlinetask-function
'org-odt-format-inlinetask-default-function
 org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS
WIDTH)"]
 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-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-modules '(org-habit ol-doi ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus
ol-info ol-irc ol-mhe ol-rmail ol-eww)
 org-image-actual-width nil
 org-mode-hook '(org-ref-org-menu org-indent-mode auto-fill-mode
org-ai-mode org-tempo-setup
 #[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
 #[0 "\301\211 \207" [imenu-create-index-function
org-imenu-get-tree] 2] flyspell-mode spacemacs/org-setup-evil-surround
spacemacs/load-yasnippet toc-org-enable
 org-superstar-mode (lambda nil (require 'org-ref))
org-download-enable dotspacemacs//prettify-spacemacs-docs
spacemacs//org-babel-do-load-languages
 spacemacs//evil-org-mode org-eldoc-load
spacemacs//init-company-org-mode company-mode)
 org-babel-load-languages '((shell . t) (js . t) (python . t) (emacs-lisp .
t))
 org-ref-insert-link-function 

[BUG] From org-jira-get-issues: org-fold-core-region error: missing SPEC [9.6.6 (release_9.6.6 @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-06-06 Thread 420actionunits
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.


I get the following stack trace when calling `org-jira-get-issues'. It
might be a similar problem as
https://list.orgmode.org/orgmode/CABUh-776V-_+_JAZwcKQm9ATcs0WUV9SmGwjooGFbt=ctwq...@mail.gmail.com/

Using the latest emacs.

Debugger entered--Lisp error: (error "Calling ‘org-fold-core-region’ with 
missing SPEC")
  signal(error ("Calling ‘org-fold-core-region’ with missing SPEC"))
  error("Calling `org-fold-core-region' with missing SPEC")
  org-fold-region(1312 1318 t outline)
  org-insert-property-drawer()
  org-get-property-block(1222 force)
  org-entry-put(1286 "assignee" "Carlos Konstanski")
  org-jira-entry-put(1286 "assignee" "Carlos Konstanski")
  org-jira--render-issue(#)
  mapc(org-jira--render-issue (# ...))
  org-jira--render-issues-from-issue-list((# ...))
  org-jira-get-issues((# 
...))
  #f(compiled-function ( rest) "Callback for async, DATA is the response 
from the request call.\n\nWill send a list of org-jira-sdk-issue objects to the 
list printer." #)(:data (... ... ... ... ...) 
:symbol-status success :error-thrown nil :response #s(request-response 
:status-code 200 :history nil :data ... :error-thrown nil :symbol-status 
success :url "https://ololab...; :done-p nil :settings ... :-buffer # :-raw-header "HTTP/2 200 \nda..." :-timer nil :-backend curl))
  apply(#f(compiled-function ( rest) "Callback for async, DATA is the 
response from the request call.\n\nWill send a list of org-jira-sdk-issue 
objects to the list printer." #) (:data ... 
:symbol-status success :error-thrown nil :response ...))
  request--callback(# :sync nil :headers (... ...) :parser 
jiralib--json-read :complete #f(compiled-function ( rest) "Callback for 
async, DATA is the response from the request call.\n\nWill send a list of 
org-jira-sdk-issue objects to the list printer." #) :error (lambda ... "\n\n(fn  DAT..." ...) :type "POST" 
:data ...)
  apply(request--callback # (:sync nil :headers 
(("Authorization" . "Basic Y2FybG9zLmtvbnN0YW5z...") ("Content-Type" . 
"application/json")) :parser jiralib--json-read :complete #f(compiled-function 
( rest) "Callback for async, DATA is the response from the request 
call.\n\nWill send a list of org-jira-sdk-issue objects to the list printer." 
#) :error (lambda ( --cl-rest--) "\n\n(fn 
 DATA " (apply ... ... ... --cl-rest--)) :type "POST" :data 
"{\"jql\":\"assignee = current..." :url "https://ololabs.atlassian; 
:response #s(request-response :status-code 200 :history nil :data (... ... ... 
... ...) :error-thrown nil :symbol-status success :url 
"https://ololabs.atlassian; :done-p nil :settings #3 :-buffer # :-raw-header "HTTP/2 200 \ndate: Sat, 27 ..." :-timer nil :-backend 
curl) :encoding utf-8))
  request--curl-callback("https://ololabs.atlassian.net/rest/api/2/search; 
#> "finished\n")
  apply(request--curl-callback 
("https://ololabs.atlassian.net/rest/api/2/search; #> 
"finished\n"))
  #f(compiled-function ( args2) #)(#> "finished\n")


Emacs  : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo 
version 1.17.8, Xaw3d scroll bars)
 of 2023-05-27
Package: Org mode version 9.6.6 (release_9.6.6 @ 
/usr/share/emacs/30.0.50/lisp/org/)

current state:
==
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 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-archive-hook '(org-attach-archive-delete-maybe)
 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-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-mode-hook '(#[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
 #[0 "\301\211\207" [imenu-create-index-function 
org-imenu-get-tree] 2])
 org-confirm-shell-link-function 'yes-or-no-p
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-speed-command-hook '(org-speed-command-activate 

Bug: using :wrap src interferes with :cache yes with :var [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)]

2023-06-06 Thread Emin Martinian
I think there is a bug with the `:cache' header and how results of
evaluation are wrapped: Using `:cache yes' and wrapping the results
prevents later blocks using the cached results.

To reproduce, start with an example like the one at the bottom of the
documentation in
. Then add
something like `:wrap src R' (or `:results value drawer') to the header
of the block named `random' and the second block produces `nil' instead
of the desired result.

I verified the bug using `emacs -nw -q' with version 9.3 but would be
happy to send more information if the above is not enough to reproduce.

Thanks.


Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-06 Thread Christian Moe


Hi,

I think there's a better approach. Tl;dr:

- A better way to have active CSS in SVG images is to link to the
  external SVG file with the  rather than  tag, as we used
  to.

- Without patching Org, you can embed an external SVG file as an SVG
  island in Org HTML export simply by using #+INCLUDE.

Details:

1) Embedded SVG is not the only way to have active CSS etc. in SVG
images. Linking to an external SVG file with an OBJECT element instead
of IMG should work fine (tested in Firefox). You can test this by
exporting Gerard's mwe.org example and editing the mwe.html to replace

: img src="./doc8.svg"

with

: object type="image/svg+xml" data="./doc8.svg"

Org used to use OBJECT for SVG years ago, but switched to IMG at some
point. I'm not quite sure when or why that happened (forgive me for not
doing an exhaustive search of the archive or delving into the git
record). But I think perhaps the reason was this thread,

  https://lists.gnu.org/archive/html/emacs-orgmode/2016-07/msg00380.html

where the issue was easy scaling, and that Jarmo Hurri's patch switching
to IMG came to be applied at some point, even though Jarmo and I agreed
that adding a common CLASS="svgfig" attribute to OBJECT would solve his
issue, see this thread:

  https://lists.gnu.org/archive/html/emacs-orgmode/2016-07/msg00410.html

I continue to think that OBJECT with an .svgfig class as default (or a
setting to give the user a choice between IMG and OBJECT) is the best
solution.

2) You can actually embed an SVG island in Org HTML export simply by
using #+INCLUDE. To try this, add the following line to Gerard's mwe.org:

: #+INCLUDE: "./doc8.svg" export html

The exported HTML should now show the black flower from Gerard's minimal
non-working example plus a working flower.

(Some SVG files may start with an XML declaration; if the XML
declaration is on a separate first line, you can just skip it by adding
=:lines "2-"= to the #+INCLUDE instruction.)

Yours,
Christian

Ihor Radchenko writes:

> gerard.vermeu...@posteo.net writes:
>
>> I have been trying to export SVG images having links to CSS from Org to
>> HTML
>> and I have found that the this CSS is not active in Firefox (only
>> browser I tried).
>>
>> I have found that the CCS is only active under two conditions:
>> 1. The HTML page should manage the CSS that the SVG image links to.
>> 2. The SVG image should be embedded in the HTML page.
>
> CCing Timothy, the maintainer.
>
> Also, does the above mean that Firefox does not support custom CSS user
> stylesheets? What am I missing?
>
>> I wrote an ox-html derived export backend to embed SVG images:
>> https://forge.chapril.org/gav451/emacs.d/src/branch/main/site-lisp/ox-my-html/ox-my-html.el
>> and merged the SVG embedding functionality into ox-html.el leading to
>> the
>> attached patch.
>
> Thanks! I will provide high-level comments from general ox.el
> perspective.
>
>> +(:html-embed-svg-excludes "HTML_EMBED_SVG_EXCLUDES" nil
>> +  org-html-embed-svg-excludes split)
>> +(:html-embed-svg-includes "HTML_EMBED_SVG_INCLUDES" nil
>> +  org-html-embed-svg-includes split)
>
> This is awkward. To do per-image export adjustments, we usually use
> export attributes (#+ATTR_HTML: ...). And why "split"?
>
>> +(:with-html-svg-embedding nil "html-embed-svg" org-html-embed-svg)
>
> We have :html-inline-images. Maybe better :html-embed-svg ?
>
>> +(defcustom org-html-embed-svg nil
>> ...
>> +  :version "30.0"
>
> We do not use :version tag. Please use :package-version.
> See Elisp manual section "15.1 Common Item Keywords".
>
> Also, maybe instead of t/nil boolean values here, we may allow the value
> to be a list of regular expressions or a string representing regular
> expression. This will allow what you are trying to do with
> HTML_EMBED_SVG_INCLUDES. The list elements might also be (not "..."),
> replicating HTML_EMBED_SVG_EXLCUDES.
>
> Even more generally, we may turn this into HTML_EMBED_IMAGES and embed
> all the images (possibly filtered by regexp). This will be slightly
> beyond the scope of this patch though.
>
>> +(defun org-html--embed-svg-p (link path info)
>> +  "Check whether LINK and INFO specify to embed the SVG file named PATH.
>> +LINK must have no contents and link to an SVG file.  INFO may contain
>> +lists of SVG files to include in and/or to exclude from embedding."
>> +  (and (not (org-element-contents link))
>
> Please use `org-export-inline-image-p'.
>
>> +(defun org-html-svg-contents (path)
>> +  "Return the SVG contents of the file named PATH."
>> +  (with-temp-buffer
>> +(insert-file-contents path)
>> +;; Delete text preceding something starting as an SVG root element.
>> +;; The intent is to remove XML declarations (and XML comments).
>> +;; This breaks in case of a preceding XML comment with > +;; or a preceding XML element with an SVG element inside.
>> +;; See https://emacs.stackexchange.com/a/57433 for the 

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-06 Thread Ihor Radchenko
gerard.vermeu...@posteo.net writes:

> I have been trying to export SVG images having links to CSS from Org to 
> HTML
> and I have found that the this CSS is not active in Firefox (only 
> browser I tried).
>
> I have found that the CCS is only active under two conditions:
> 1. The HTML page should manage the CSS that the SVG image links to.
> 2. The SVG image should be embedded in the HTML page.

CCing Timothy, the maintainer.

Also, does the above mean that Firefox does not support custom CSS user
stylesheets? What am I missing?

> I wrote an ox-html derived export backend to embed SVG images:
> https://forge.chapril.org/gav451/emacs.d/src/branch/main/site-lisp/ox-my-html/ox-my-html.el
> and merged the SVG embedding functionality into ox-html.el leading to 
> the
> attached patch.

Thanks! I will provide high-level comments from general ox.el
perspective.

> +(:html-embed-svg-excludes "HTML_EMBED_SVG_EXCLUDES" nil
> +  org-html-embed-svg-excludes split)
> +(:html-embed-svg-includes "HTML_EMBED_SVG_INCLUDES" nil
> +  org-html-embed-svg-includes split)

This is awkward. To do per-image export adjustments, we usually use
export attributes (#+ATTR_HTML: ...). And why "split"?

> +(:with-html-svg-embedding nil "html-embed-svg" org-html-embed-svg)

We have :html-inline-images. Maybe better :html-embed-svg ?

> +(defcustom org-html-embed-svg nil
> ...
> +  :version "30.0"

We do not use :version tag. Please use :package-version.
See Elisp manual section "15.1 Common Item Keywords".

Also, maybe instead of t/nil boolean values here, we may allow the value
to be a list of regular expressions or a string representing regular
expression. This will allow what you are trying to do with
HTML_EMBED_SVG_INCLUDES. The list elements might also be (not "..."),
replicating HTML_EMBED_SVG_EXLCUDES.

Even more generally, we may turn this into HTML_EMBED_IMAGES and embed
all the images (possibly filtered by regexp). This will be slightly
beyond the scope of this patch though.

> +(defun org-html--embed-svg-p (link path info)
> +  "Check whether LINK and INFO specify to embed the SVG file named PATH.
> +LINK must have no contents and link to an SVG file.  INFO may contain
> +lists of SVG files to include in and/or to exclude from embedding."
> +  (and (not (org-element-contents link))

Please use `org-export-inline-image-p'.

> +(defun org-html-svg-contents (path)
> +  "Return the SVG contents of the file named PATH."
> +  (with-temp-buffer
> +(insert-file-contents path)
> +;; Delete text preceding something starting as an SVG root element.
> +;; The intent is to remove XML declarations (and XML comments).
> +;; This breaks in case of a preceding XML comment with  +;; or a preceding XML element with an SVG element inside.
> +;; See https://emacs.stackexchange.com/a/57433 for the original code.

But the original code is different, no?

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



Re: Is this proper time format?

2023-06-06 Thread Ihor Radchenko
David Masterson  writes:

> Hmm.  What about this:
>
>   <2023-06-05 Mon>--<2023-06-08 Thu 10:30-12:15>
>
> Is there a recommended specification for my meeting?  Or do I have to
> break it into multiple tasks (one for each day)?

AFAIK, closed date intervals with time are currently not supported by
org-agenda. You can instead use diary sexp timestamps, a bunch of active
timestamps in the body, or M-x org-clone-subtree-with-time-shift

> Anyone know how well BeOrg, Orgzly, and Organice handle this?

No idea.

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



Re: mailto link issue in 9.5.5 and 9.6.6

2023-06-06 Thread Ihor Radchenko
Scott Randby  writes:

> (4) I executed (customize-set-variable 'browse-url-mailto-function nil) and 
> then executed (browse-url "mailto:sran...@gmail.com;). The result gave the 
> same error messages.

This sounds like Emacs bug, and I can reproduce. Please report it to
Emacs devs. (M-x report-emacs-bug)

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