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

2023-11-04 Thread Rick Lupton
I realised there is another question here about how search strings are used in 
org-id links.

Consider this example file:


* Heading
:PROPERTIES:
:ID:   06E767E6-6145-45EB-B736-D350449126EC
:END:

#+name: named-thing
#+begin_example
Hi!
#+end_example


By default (`org-id-link-to-org-use-id` is nil), with point on `#+name: 
named-thing`, calling `org-store-link` will give a link like 
`[[file:test.org::named-thing][named-thing]]` which leads directly to the named 
example block. Different uses can also lead to search strings which link to 
headings, selected text in the region, or the current line's text.

When `org-id-link-to-org-use-id` is non-nil, none of this happens -- calling 
`org-store-link` anywhere within the subtree will result in a link 
`[[id:06E767E6-6145-45EB-B736-D350449126EC][Heading]]` with no additional 
search string.

My previous patch changes the behaviour when `org-id-link-to-org-use-id` has a 
new value (`inherit`) in two ways:

(a) org-ids from parent headings are considered when choosing the ID to link 
to, and 
(b) search strings are added to the link

But these are actually two independent things. So my question is: should search 
strings be added to all org-id links?

This would make org-id links more powerful/precise (because you can link to 
more precise locations within the subtree), and simplifies the code in 
`org-store-link` in my patch (because point [b] above would apply to all org-id 
links, not just the new 'inherit ones), but it could change the behaviour when 
calling `org-store-link` with an active region or when point is on a named 
element.

Depending on the answer, I can update the patch accordingly.

Thanks,
Rick



Re: Gantt Chart with org-mode

2023-11-04 Thread Jens Neuhalfen
Maybe a bit more than just gant: https://taskjuggler.org/ and 
https://orgmode.org/worg/exporters/taskjuggler/ox-taskjuggler.html

> On 4. Nov 2023, at 13:33, Heime  wrote:
> 
> 
> Can one construct a Gantt Chart with org-mode ?
> 


Re: Gantt Chart with org-mode

2023-11-04 Thread Ken Mankoff
Or PlantUML and ob-plantuml.

https://plantuml.com/gantt-diagram

  -k.

Please excuse brevity. Sent from tiny pocket computer with non-haptic
feedback keyboard.

On Sat, Nov 4, 2023, 06:55 Heime  wrote:

>
> Can one construct a Gantt Chart with org-mode ?
>
>


Re: [BUG] Can't export bold html correctly after change org-emphasis-regexp-components [9.6.6 (release_9.6.6 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2023-11-04 Thread Haojun Bao
On Sat, Nov 4, 2023 at 8:40 PM Ihor Radchenko  wrote:
>
> Haojun Bao  writes:
>
> > 1. update org-emphasis-regexp-components, as I'm a Chinese, I added
> > some of the chinese Punctuation Marks, like the following:
> > ...
> > 2. do M-x org-reload
> > 3. Write a file with the following content, note that both hello is
> > displayed as bold:
> >
> > *hello*:world
> >
> > *hello* world
> >
> > 4. C-c C-e to export it as html, only the second hello is in bold, the
> > first hello is surrounded by the org bold marker '*'.
>
> Org markup syntax is not customizeable. You may consider using escape
> character instead. See https://orgmode.org/manual/Escape-Character.html
>
> `org-emphasis-regexp-components' only affects the fontification, not
> actual underlying markup.
>
> We are well aware about this problem for Chinese users. The proper
> solution will involve alternative markup like @bold{...} or (maybe)
> **creole inline markup**. But changing Org syntax is not something we
> can take lightly.
> See https://list.orgmode.org/orgmode/87a6b8pbhg@posteo.net/
>
> Not a bug.
> Canceled.

Thank you very much! I will switch to use the zero-width-space happily.

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



Re: [BUG] Can't export bold html correctly after change org-emphasis-regexp-components [9.6.6 (release_9.6.6 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2023-11-04 Thread Ihor Radchenko
Haojun Bao  writes:

> 1. update org-emphasis-regexp-components, as I'm a Chinese, I added
> some of the chinese Punctuation Marks, like the following:
> ...
> 2. do M-x org-reload
> 3. Write a file with the following content, note that both hello is
> displayed as bold:
>
> *hello*:world
>
> *hello* world
>
> 4. C-c C-e to export it as html, only the second hello is in bold, the
> first hello is surrounded by the org bold marker '*'.

Org markup syntax is not customizeable. You may consider using escape
character instead. See https://orgmode.org/manual/Escape-Character.html

`org-emphasis-regexp-components' only affects the fontification, not
actual underlying markup.

We are well aware about this problem for Chinese users. The proper
solution will involve alternative markup like @bold{...} or (maybe)
**creole inline markup**. But changing Org syntax is not something we
can take lightly.
See https://list.orgmode.org/orgmode/87a6b8pbhg@posteo.net/

Not a bug.
Canceled.

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



Re: [BUG] Invalid search bound (wrong side of point) [9.7 (9.7-??-d6f3aed @ /Users/masukomi/.config/emacs/.local/straight/build-29.1/org/)]

2023-11-04 Thread Ihor Radchenko
"Kay Rhodes"  writes:

> *What I was doing:*
> I was exporting org file to markdown using the ox-hugo . 
>
> *What happened:*
> It generated the markdown file in the file system.
> It went  and told me to submit this error.
>
> *What I expected to happen:**
> *
> Generate the markdown file in the filesystem.
> No  or message to submit an error.
>
> Package: Org mode version 9.7 (9.7-??-d6f3aed @ 
> /Users/masukomi/.config/emacs/.local/straight/build-29.1/org/)

Does it still happen if you update to the latest main?

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



Re: Gantt Chart with org-mode

2023-11-04 Thread Ihor Radchenko
Heime  writes:

> Can one construct a Gantt Chart with org-mode ?

https://github.com/SeungukShin/org-gantt

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



Gantt Chart with org-mode

2023-11-04 Thread Heime


Can one construct a Gantt Chart with org-mode ?



Using list with items showing the depth level

2023-11-04 Thread Heime


I am focused on making a style file in latex so that I can have a list where
each item displays the depth level.

I am getting the error 

\textbf  #1->\ifmmode \nfss@text {\bfseries #1
  }\else \hmode@bgroup 
\text@com...

with the following code

\makeatletter
\newcount\depthitemizelevel
\depthitemizelevel=0

\def\@depthitemize@label{%
\textbf{Level \the\depthitemizelevel:}%
\the\depthitemizelevel\arabic{\@enumctr}%
\space
}

\newenvironment{depthitemize}{%
\advance\depthitemizelevel by 1%
\expandafter\edef\csname 
depthitemize@label\romannumeral\depthitemizelevel\endcsname{\@depthitemize@label}%
\list{\csname 
depthitemize@label\romannumeral\depthitemizelevel\endcsname}{%
\usecounter{enum\romannumeral\depthitemizelevel}%
\def\makelabel##1{\hss\llap{##1}}%
}%
}{%
\endlist
\advance\depthitemizelevel by -1%
}
\makeatother






Re: Exporting Hyperlinks ?

2023-11-04 Thread Max Nikulin

On 04/11/2023 04:55, Samuel Wales wrote:

[[file:contacts.org::#custom_id][My
text]] made me think of the need for global custom id in addition to a
file-specific one like this.


Taking into account that there is another active thread on user-global 
links, I am not going to discuss that feature here.


Human-readable link targets are susceptible to collisions. So ox-latex 
should support links to particular locations in the specified files, 
either an Org one or inside external PDF files. Code from ox-html should 
be adapted for ox-latex.


[[file:test.pdf::#anchor][Another document]]
  -> \href{test.pdf\#anchor}{Another document}

[[file:test.org::#anchor][Another document]]
Either for xr-hyper
 -> Another document \ref{f1-orgabc123}
with \label{orgabc123} in test.tex
or with redefined \label to generate additional \hypertarget
 -> \href{test.pdf\#anchor}{Another document}