Re: kaobook tex template integration to a org file to make self-contained, portable?

2023-08-08 Thread Zenny
Aloha Tom,

Thank you for taking time to respond with an useful pointer. I feel like I
reached the right person who is  an expert in both LaTeX and Orgmode who
has contributed to org-tufte book earlier as seen in your github repo. I am
a novice, fyi.

I appreciate if you take some time to point out the non-standard features
in order to make Orgmode can recognize.

On Tue, Aug 8, 2023 at 10:06 PM Thomas S. Dye  wrote:

> Aloha Zenny,
>
> Zenny  writes:
> >
> > However, the pdf did not inherit all the kaobook template
> > features like:
> >
> > 1 Mini table of contents in the margin at the start of each
> > chapter.
> > 2 Chapter headings.
> > 3 Huge chapter number with a vertical line
>
> The kaobook.cls defines non-standard LaTeX commands for some of
> its features.  Org mode doesn't know about these, so you'll have
> to figure out how Org mode can recognize and export them.
>
> All the best,
> Tom
> --
> Thomas S. Dye
> https://tsdye.online/tsdye
>


-- 
Cheers,
/z

-.. .. ... -.-. .-.. .- .. -- . .-. | -.. .. ... -.-. .-.. .- .. -- . .-.
CONFIDENTIALITY NOTICE AND DISCLAIMER: Access to this e-mail and its
contents by anyone other than the intended recipient is unauthorized as it
contains privileged and confidential information, and is subject to legal
privilege. Please do not re/distribute it.  If you are not the intended
recipient (or responsible for delivery of the message to such person), you
may not use, copy, distribute or deliver the email and part of its contents
to anyone this message (or any part of its contents or take any action in
connection to it. In such case, you should destroy this message, and notify
the sender immediately. If you have received this email in error, please
notify the sender or your sysadmin immediately by e-mail or telephone, and
delete the e-mail from any computer. If you or your employer does not
consent to internet e-mail messages of this kind, please notify the sender
immediately. All reasonable precautions have been taken to ensure no
viruses are present in this e-mail and attachments included. As the sender
cannot accept responsibility for any loss or damage arising from the use of
this e-mail or attachments it is recommended that you are responsible to
follow your virus checking procedures prior to use. The views, opinions,
conclusions and other informations expressed in this electronic mail are
not given or endorsed by any company including the network providers unless
otherwise indicated by an authorized representative independent of this
message.
-.. .. ... -.-. .-.. .- .. -- . .-. | -.. .. ... -.-. .-.. .- .. -- . .-.


blank line in ido as default when refiling

2023-08-08 Thread Samuel Wales
Subject: is blank option in ido a bugfix refile change?
idk if this is etireoly user eror but i ave made no changes to my
config that i am aware of so want to confirm with others who mght be
able to guess or know there was a change i bugfix..

recent bugfix refile trying to insert link, presents a blank line in
my choices and makes it default.

this reults in

  user-error: No link selected

so to insert i have to arrow down to number 2 efery time.  this
behavior started recently in bugfix, but again idk why.  i am aware
that the moving link fix is still only in master as there has not been
a release so this might be another issue.



ox-html: no tests, besides mathjax?

2023-08-08 Thread Hraban Luyat
Hi all,


I was looking for ox-html unit tests and found 
testing/lisp/test-ox-html.el, which contains only mathjax tests. I 
didn't find any other (unit) tests for HTML. Is that correct?


Thought I'd sanity check this, before I go on a wild goose chase.


Thanks all


Hraban





Re: kaobook tex template integration to a org file to make self-contained, portable?

2023-08-08 Thread Thomas S. Dye

Aloha Zenny,

Zenny  writes:


However, the pdf did not inherit all the kaobook template 
features like: 

1 Mini table of contents in the margin at the start of each 
chapter.

2 Chapter headings.
3 Huge chapter number with a vertical line


The kaobook.cls defines non-standard LaTeX commands for some of 
its features.  Org mode doesn't know about these, so you'll have 
to figure out how Org mode can recognize and export them.


All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Re: [ANN] lisp/ob-tangle-sync.el

2023-08-08 Thread Mehmet Tekman
Ihor Radchenko  writes:

> No. :result-params is not an actual header argument. It is
> implementation detail - parsing :results header arg internally produces
> (:results . "all the values concatenated") and _also_ (:result-params
> "val 1" "val 2" ...).

Hmm... what is the benefit if they encode the same
information? (e.g. :tangle "one two \"three and four\"" vs
:tangle-params "one" "two "three and four").

Edit: Oh, I see -- Org parses the action from the `:tangle-params'
and Users can extend tangle as much as they want via `:tangle'

> > Why can't we just go back to that?
>
> We can. I did not expect that we would need to go this far into the
> rabbit hole. Although, I still think that unifying header argument
> parsing is something worth doing, even if I need to implement it myself.

Hah, me either. At the same time, it doesn't make sense to have
`:tangle-sync' present in one release of Org-mode and then deprecated in
the next (after your header rewrite). It would just confuse users.

I'm happy to have another go at a unified header approach, I will
just need to explore the code base a bit more.



Re: [BUG] `org-open-at-point' surprisingly asks for tags table [9.7-pre (release_9.6.7-640-ga18ebc @ /home/jschmidt/work/org-mode/lisp/)]

2023-08-08 Thread Jens Schmidt

Sorry, just followed that recent side-effect-thread to the root

https://list.orgmode.org/orgmode/87o7omg4ie@alphaville.usersys.redhat.com/

and found that everything already got documented.  It was that thread
that triggered my bug report as an example of a particular nasty side
effect.



[BUG] `org-open-at-point' surprisingly asks for tags table [9.7-pre (release_9.6.7-640-ga18ebc @ /home/jschmidt/work/org-mode/lisp/)]

2023-08-08 Thread Jens Schmidt

make EMACS=../emacs-master/src/emacs vanilla

Create a new Org-mode buffer with the following contents:

--
<>

[[test][test link]]
--

Position point on the link then type C-c C-o: Point jumps to the link as
expected.

Now type

  C-h f org- TAB C-g

Reposition point on link, type C-c C-o.  The following prompt pops up:

  Visit tags table (default TAGS): ...

which is annoying.

It took me some time to realize that the innocent sequence

  C-h f org- TAB C-g

autoloads org-ctags, which hooks into `org-open-link-functions'
through `org-ctags-enable'.



Re: [ANN] lisp/ob-tangle-sync.el

2023-08-08 Thread Ihor Radchenko
Mehmet Tekman  writes:

> Hello, I'm a bit overworked at the moment, sorry for the delay in
> response.

No worries. We are not in hurry. Take your time as needed and comfortable.

>> We may have to use the approach employed for :results header argument
>> where in addition to (:results . "string value"), we have
>> (:result-params "sub-value" "sub-value" ...).
>
> Isn't this similar to my `:tangle-sync' parameter, i.e, completely separate
> from the `:tangle' header itself but complementary to it?

No. :result-params is not an actual header argument. It is
implementation detail - parsing :results header arg internally produces
(:results . "all the values concatenated") and _also_ (:result-params
"val 1" "val 2" ...).

> Why can't we just go back to that?

We can. I did not expect that we would need to go this far into the
rabbit hole. Although, I still think that unifying header argument
parsing is something worth doing, even if I need to implement it myself.

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



Re: [ANN] lisp/ob-tangle-sync.el

2023-08-08 Thread Mehmet Tekman
Hello, I'm a bit overworked at the moment, sorry for the delay in
response.

> We may have to use the approach employed for :results header argument
> where in addition to (:results . "string value"), we have
> (:result-params "sub-value" "sub-value" ...).

Isn't this similar to my `:tangle-sync' parameter, i.e, completely separate
from the `:tangle' header itself but complementary to it?

Why can't we just go back to that?

Best



Re: kaobook tex template integration to a org file to make self-contained, portable?

2023-08-08 Thread Zenny
Hi again,

I updated the texlive to 2023 and can produce a pdf with the following
snippets inside the https://github.com/asilata/emacsconf2021/ggm.org:

** Org LaTeX setup
> #+latex_class: kaobook
> #+latex_class_options: [openany, a5paper]
> #+latex_header:
> \usepackage{amsmath,amssymb,amsthm,geometry,hyperref,paralist,svg,thmtools,tikz,tikz-cd}
> #+latex_header: \usepackage{mathtools}
> #+latex_header: \usepackage[capitalise,noabbrev]{cleveref}
> #+latex_header: \usepackage{environ} \NewEnviron{abmn}{\marginnote{\BODY}}
> #+latex_header: \setcounter{tocdepth}{1}
> #+latex_header: \newtheorem{theorem}{Theorem}
> #+latex_header: \newtheorem{example}[theorem]{Example}
> #+latex_header: \newtheorem{exmpl}[theorem]{Example}
> #+latex_header: \newtheorem{definition}[theorem]{Definition}
> #+latex_header: \newtheorem{proposition}[theorem]{Proposition}
> #+latex_header: \newtheorem{lemma}[theorem]{Lemma}
> #+latex_header: \newtheorem{exercise}[theorem]{Exercise}
> #+latex_header: \usetikzlibrary{arrows,automata,positioning}
> ** Export settings
> Export into the artifacts directory
> #+export_file_name: artifacts/ggm
>
> Add ~kaobook~ to ~org-latex-classes~ and update ~org-latex-pdf-process~.
> #+name: export-setup
> #+begin_src emacs-lisp :results silent :var this-year="2023"
>   (add-to-list 'org-latex-classes
>`("kaobook"
>  ,(string-join
>'("\\documentclass{kaobook}"
>  "\\usepackage{color}"
>  "\\usepackage{amsmath,amssymb}")
>"\n")
>  ("\\chapter{%s}" . "\\chapter*{%s}")
>  ("\\section{%s}" . "\\section*{%s}")
>  ("\\subsection{%s}" . "\\subsection*{%s}")
>  ("\\paragraph{%s}" . "\\paragraph*{%s}")
>  ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
>

However, the pdf did not inherit all the kaobook template features like:

   1. Mini table of contents in the margin at the start of each chapter.
   2. Chapter headings.
   3. Huge chapter number with a vertical line

Any input will be appreciated to render the file that looks like
https://github.com/fmarotta/kaobook/blob/master/example_and_documentation.pdf
or https://github.com/tudelft3d/terrainbook/releases/latest.

Thank you in advance,
/z

On Mon, Aug 7, 2023 at 1:55 PM Christian Moe  wrote:

>
>
> Hi,
>
> For starters, have you added the kaobook document class to the variable
> org-latex-classes? (If yes, ignore the rest of this message, if not, do
> so and see what happens.)
>
> This is needed to tell Org how to set the document class and what commands
> are used for sections. See the manual 13.10.2 and 13.10.3,
> [[info:org#LaTeX specific export settings]] and [[info:org#LaTeX header
> and sectioning]], and look up the docstring for org-latex-classes if you
> need help.
>
> E.g., in .emacs I have this for Tufte-Latex:
>
> (add-to-list 'org-latex-classes
>  '("tufte-handout"
> "\\documentclass[11pt,a4paper]{tufte-handout}"
>("\\section{%s}" . "\\section*{%s}")
>("\\subsection{%s}" . "\\subsection*{%s}")))
>
> (add-to-list 'org-latex-classes
>  '("tufte-book"
> "\\documentclass[11pt,a5paper,nols]{tufte-book}"
>("\\part{%s}" . "\\part*{%s}")
>("\\section{%s}" . "\\section*{%s}")
>("\\subsection{%s}" . "\\subsection*{%s}")
>("\\paragraph{%s}" . "\\paragraph*{%s}")))
>
> Yours,
> Christian
>
>
> Zenny writes:
>
> > Hi,
> >
> > References of interest:
> > 1. https://github.com/fmarotta/kaobook
> > 2. https://github.com/asilata/emacsconf2021
> >
> > Can anyone guide me how to get a self-contained and portable template
> that
> > executes kaobook tex templates (see 1) to create an org-file that
> resembles
> > with the instance in 2 above?
> >
> > I tried the best I can by adding the kaobook.cls and kaobook.sty files
> > inside `~/texmf/tex/latex/kaobook/` folder and specified 'kaobook' in the
> > `#+latex_class: kaobook` but it failed to produce the desired look of pdf
> > similar to
> >
> https://github.com/fmarotta/kaobook/blob/master/example_and_documentation.pdf
> > withing the same examples directory!
> >
> > Any input appreciated!
> >
> > Cheers and have a nice week,
> > /z
>
>


Re: BUG: org-cycle does not unfold some subtrees

2023-08-08 Thread Ihor Radchenko
Michael Dauer  writes:

> The issue is still easy to reproduce:

> * h1
> a
> * h2
> b
> * h3
> b
> * h4
> c
> <<<
> Fold all. On * h1 call swiper-isearch, enter bbb and select the first
> match. -> h2 cannot be unfold anymore.
> If you repeat it and select the second match then h3 cannot be unfold
> anymore, but h2 works again.
> (org-fold-core--clear-isearch-overlays) still fixes the buffer.

Sorry, but I cannot reproduce.
May you please provide more detailed steps starting from emacs -Q?

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



Re: [ANN] [[bbb:OrgMeetup]] on Wed, Aug 9, 19:00 UTC+3 (was: Interest in an Org video meetup?)

2023-08-08 Thread Ihor Radchenko
Ihor Radchenko  writes:

> URL: https://bbb.emacsverse.org/b/iho-h7r-qg8-led
> Time & Date: <2023-08-09 Wed 19:00-21:00 @+03,Europe/Istanbul>
> The room will be open half an hour before the official start.

This is a reminder that OrgMeetup is still scheduled for tomorrow, as
planned.

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



Re: BUG: org-cycle does not unfold some subtrees

2023-08-08 Thread Michael Dauer
The issue is still easy to reproduce:
>>>
* h1
a
* h2
b
* h3
b
* h4
c
<<<
Fold all. On * h1 call swiper-isearch, enter bbb and select the first
match. -> h2 cannot be unfold anymore.
If you repeat it and select the second match then h3 cannot be unfold
anymore, but h2 works again.
(org-fold-core--clear-isearch-overlays) still fixes the buffer.

Am Fr., 4. Aug. 2023 um 16:11 Uhr schrieb William Denton :

> On 4 August 2023, Michael Dauer wrote:
>
> > I'm on main (Org mode version 9.7-pre (release_9.6.7-594-gf03b83), and
> it's
> > not fixed. Am I missing something?
>
> The fix did fix it for me, and the problem went away.  It did seem to
> introduce
> a new problem with searching in a buffer with Swiper, where the search
> would
> fail or throw an error or require me to collapse headings before it would
> work,
> but that hasn't happened in a while and I didn't try to debug it.
>
>
> Bill
>
> --
> William Denton
> https://www.miskatonic.org/
> Librarian, artist and licensed private investigator.
> Toronto, Canada
> CO₂: 421.92 ppm (Mauna Loa Observatory, 2023-08-03)


Re: Add a Chinese version to index.org of orgmode.org

2023-08-08 Thread General discussions about Org-mode.
Hello Ihor, Lux and all,

On Aug 8, 2023, at 14:55, Ihor Radchenko  wrote:
> 
> lux  writes:
> 
>> Hi
>>  To facilitate Chinese users' understanding of Org Mode, I have
>> translated index.org into Simplified Chinese. Please review it.
> 
> Thanks!
> However, we already have another, more complete translation pending.
> See https://list.orgmode.org/orgmode/sdvzg71zzor@netyu.xyz/

Thank you, Ihor, for mentioning my translation. 

I had been busy for a few months (and will be for a while as far as I know), 
and don’t currently have the energy to push the translation further until 
probably early October.  However, I believe what I had done was pretty much 
complete (apart from the changelog etc that are pointless to translate), so, 
Lux, please try to make improvements to it first (by, I guess, comparing your 
translation with mine and determining what needs rewording).  Getting that 
patchset installed would help the lot of Chinese speaking users in 
understanding Org better.  

FWIW, all my translation work was done before my employment status changed (and 
the patchset consisted of almost no real code), so I have no concern with 
seeing it installed without having gotten the employer disclaimer. 

P.S.: I do still scan over the Emacs mailing lists daily, but I’m only on 
mobile where I am not fully equipped for email conversations nor sending 
patches. :)

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

-- 


RY



Re: [PATCH] Re: what is the purpose of "This link has already been stored"?

2023-08-08 Thread Bastien Guerry
Ihor Radchenko  writes:

> This would be yet another breaking change...

Of course, you're right!

Then here are two suggestions, assuming it's best to spare us yet
another option:

(1) by always store the latest link on top and remove old dups.

(2) always store latest link at the top and remove old dups and allow
to keep dups with 3 universal prefix args.

if you move the recent one to top of list, that would work for my
mindless store/insert, but it might not work for a user who has
carefully cultivated a set of links that are all to be inserted, or
such.  although idk if the mechanism supports.

I'm in favor of option (2) as it deals with the above use-case, and
storing a link for each lines in the active region should be the
default behavior anyway, with no need for a prefix arg.

WDYT?

-- 
 Bastien Guerry



Re: [POLL] Should we accept breaking changes to get rid of Org libraries that perform side effects when loading?

2023-08-08 Thread Bastien Guerry
Thanks a lot for the detailed clarification.

The Elisp coding convention explicitely targets Emacs "editing
behavior".  The definition of a new function is not a side-effect 
that affects Emacs editing behavior, so Babel and export libs are
OK.

Ihor Radchenko  writes:

> Finally, we have org-mouse.el discussed here, which modifies key
> bindings and org-inlinetask.el, which modifies how Org treats headlines
> in Org files, modifying syntax.

org-mouse.el should not modify default Org _editing_ key bindings.
Is it really the case?  If so, can we fix this?

Does org-inlinetask.el modifies the way non-inline headlines are
edited?  If so, can we fix this?  IIRC org-inlinetask.el only adds
editing function for inline tasks, it is an extension, not a
modification of the default Org editing behavior, but the limit
can be thin here.

> With the current state of affairs, it is often enough to
> (require 'org-library) to get things work. If we get rid of all the
> possible side effects, users will have to adapt their configurations
> and we will thus violate "I won't force you to update your
> configuration."
>
> Of course, we can change babel implementation to use explicit registry
> like for export backends and force users to call explicit activation
> commands in addition to (require 'library). But I am not sure if we are
> not crossing the line with such an approach: "I won't use software
> correctness as an excuse.".

Defining new functions is a desirable "side-effect" of all Elisp
library, I don't think we should worry abou this.

-- 
 Bastien Guerry



Re: How to put a string produced by an Elisp form in an Org source block in the Org file?

2023-08-08 Thread Ihor Radchenko
Marcin Borkowski  writes:

> And here it is:
> https://mbork.pl/2023-08-05_Plotting_ASCII_art_charts_from_Org_mode_tables

There is also
(org-babel-ref-resolve "weight-data[-60:-1]")

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



Re: [BUG] WORG example for ob-lilypond is no longer working as described (was: Moving some lisp/ob-*.el files to org-contrib - your advice?)

2023-08-08 Thread Ihor Radchenko
Jonathan Gregory  writes:

> On 31 Jul 2023, Ihor Radchenko wrote:
>
>> May it be possible to mix multiple \version commands? So that we 
>> declare \version for \paper and user can declare other \version 
>> for the code block body.
>
> Probably not. Wouldn't that confuse the compiler? In any case, the 
> \version number is relative to the lilypond version for which the 
> input file was written, so it's up to the user to provide that 
> information.

Jonathan, do you think that your original patch is still what you want
to get merged? Or do you want to update it?

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



Re: [FR] Add an option to use ID links during tangling

2023-08-08 Thread Ihor Radchenko
Evgenii Klimov  writes:

>> I do not like the idea of creating side effects in the original Org
>> document during tangling.
>> We can, however, use (org-id-link-to-org-use-id 'use-existing) to use
>> the already present IDs.
>
> Understandable, with (org-id-link-to-org-use-id 'use-existing) I would
> at least be able to manually add them where needed.

Considering that users have an option to set org-id-link-to-org-use-id to
'create-if-interactive, I decided to remove the original change that
force-sets it to nil.

Handled.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a18ebc789

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



Re: [PATCH] Re: [bug] Setting org-id-link-to-org-use-id to t creates IDs properties when tangling

2023-08-08 Thread Ihor Radchenko
Ihor Radchenko  writes:

> In a recent feature request [1], one user expressed an interest in using
> ID links during tangling, as they are more reliable wrt heading renames.
>
> I am now re-considering this fix.
>
> `org-id-link-to-org-use-id', apart from t, can be set to
> 'create-if-interactive, which could be used by people who do not want ID
> links be created during tangling.

Reverted, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a18ebc789

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



Re: [PATCH] testing: Delete duplicate tests

2023-08-08 Thread Ihor Radchenko
Ihor Radchenko  writes:

> It looks like the real test is supposed to be
>
> (equal " foo "
> ...
> (org-table-get-field 2 " foo ")
> (buffer-string)
> ...

I have re-introduced the new tests in place of the removed ones,
according to my and Max's findings. On top of the patch.

Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=fe85d61a9
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=173b5de0e

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



Re: [PATCH] Highlight ANSI sequences in the whole buffer (was [PATCH] ANSI color on example blocks and fixed width elements)

2023-08-08 Thread Ihor Radchenko
Hi,

A few months have passed since the last activity in this thread.
May I know if you are still interested in the idea?
Should you need any help, feel free to ask.

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



Re: [BUG] Evaluating org-class throws a void-variable error [9.6 (9.6-??-0c9b30e96 @ ~/.emacs.d/.local/straight/build-27.2/org/)]

2023-08-08 Thread Ihor Radchenko
Ihor Radchenko  writes:

> AFAIK, org-element-timestamp-parser does not support diary-type
> timestamps that contain time/time intervals. Consider the following:
>
> ** Monday Lecture
> SCHEDULED: <%%(org-class 2021 08 30 2021 12 11 1) 19:30-20:45>
>
> org-element-context gives
>
> (planning
>  (:closed nil :deadline nil
>   :scheduled nil :begin 311 :end 376
>   :post-blank 2 :post-affiliated 311))
>
> Note that agenda did support the above example. Apparently, simply
> because agenda somehow parsed sexps by itself without invoking
> org-element. After I changed agenda to use org-element API,
> <%%(...) time> does not work anymore.

Bastien, could you please take a look?
What we have here is feature regression, but it is unclear if it is
justified to change the Org diary timestamp syntax.

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



Re: Add a Chinese version to index.org of orgmode.org

2023-08-08 Thread Ihor Radchenko
"Dr. Arne Babenhauserheide"  writes:

>> Thanks!
>> However, we already have another, more complete translation pending.
>> See https://list.orgmode.org/orgmode/sdvzg71zzor@netyu.xyz/
>
> Maybe you can use the experience with the text you now have to review
> this other translation and suggest improvements?

Agree.
I hope that my initial message did not sound like your patch is not
valuable.

If you can, you may also compare your translation with the linked
translation of the same files and point out where your translation is
better. [ Unfortunately, doing this comparison would be much more
difficult for me, since I can only compare by translating back to
English with translation software ] 

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



Re: [PATCH] Re: what is the purpose of "This link has already been stored"?

2023-08-08 Thread Ihor Radchenko
Samuel Wales  writes:

> i am confused.  org-stored-links is a command?  what are the known
> user needs for storing and pasting links?

Typo. Meant to be org-store-link.

> i am also unclear on why we have a dedicated paste function as opposed
> to kill ring.  probably a good reason.  but wfm.

This is because a workflow of opening the link target, storing it, and
then inserting the stored link is not the only workflow we support.
Another workflow is running M-x org-insert-link  type  select
location using completion.

For example, you do not have to open a file to store link to that file.
Instead, you can directly type M-x org-insert-link  file 
/path/to/file . When selecting path to file, the standard file
completion interface will be used.

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



Re: [PATCH] Re: what is the purpose of "This link has already been stored"?

2023-08-08 Thread Ihor Radchenko
Bastien  writes:

> Ihor Radchenko  writes:
>
>> * lisp/ol.el (org-link-store-existing): New customization controlling
>> how to deal with already stored links.
>> (org-store-link): Respect the new customization, allowing duplicates
>> to (1) be added anyway; (2) be ignored; (3) be moved to front of
>> `org-stored-links'.  The default is (3).
>> * etc/ORG-NEWS (~org-store-link~ now moves an already stored link to
>> front of the ~org-stored-links~): Document the breaking change.
>
> I'm not sure what is the real world use-case for allowing storing the
> same link several times.  Maybe one was provided, but I missed it.

I added it mostly because it was easy to do.

Also, I thought that one might do a sequence of M-x org-store-link as one
is reading things in different buffers. Later, M-x org-insert-all-links
would insert the stored links from history, even if reading involved
back-and-forth switching of the same buffer.
This is rather imaginary use case though.

> I believe the new default behavior makes a lot of sense, thanks for
> implementing this.
>
> I'm skeptical about the need for a new dedicated option, though.
>
> The current single universal prefix argument seems not that useful ("A
> single `C-u' negates `org-context-in-file-links' for file links or
> `org-gnus-prefer-web-links' for links to Usenet articles.") and we
> could use it to force storing duplicates, which is more useful.

This would be yet another breaking change...

> Here is the suggested new behavior, also modifying other universal
> prefix args:
>
> - M-x org-stored-links : don't store dups, move upfront if dup
> - C-u M-x org-stored-links : force storing the link, even if dup
> - [2 universal prefix arg] : negates ‘org-context-in-file-links’, etc
> - [3 universal prefix arg] : forces skipping storing functions
>   that are not part of Org core.
>
> The current behavior for 3 prefix args should be the default when the
> region is active.
>
> WDYT?

AFAIU, you suggest changing the meaning of C-u prefix argument and also
remove the previous default behavior completely.

As I said in the above, storing duplicates is rather imaginary case. I
am not sure if it is strictly more useful compared to the current
negation of `org-context-in-file-links'.

For removing the previous default (do nothing when duplicate), Samuel
previously expressed a concern:

>>>if you move the recent one to top of list, that would work for my
>>>mindless store/insert, but it might not work for a user who has
>>>carefully cultivated a set of links that are all to be inserted, or
>>>such.  although idk if the mechanism supports.

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



Re: [PATCH] org-macs: Fix incorrect use of relative paths in org-compile-file

2023-08-08 Thread Ihor Radchenko
Bastien Guerry  writes:

> Ihor Radchenko  writes:
>
>> Bastien, may you please confirm Roshan's copyright status?
>
> Yes, I do confirm Roshan is a FSF registered contributor for Emacs.

Updated our records.
https://git.sr.ht/~bzg/worg/commit/9015a8ea

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



Re: [POLL] Should we accept breaking changes to get rid of Org libraries that perform side effects when loading?

2023-08-08 Thread Ihor Radchenko
Bastien Guerry  writes:

>> This is convincing.
>> I am then CCing Bastien, as, despite the Elisp convention, following it
>> will break https://bzg.fr/en/the-software-maintainers-pledge/
>
> FWIW, in this case, the mistake lies in breaking the Emacs Lisp coding
> convention first.  When the breaking change is a side-effect of fixing
> a bug, it is unavoidable.

The situation is a bit more complex.
Strictly speaking, loading Elisp library _always_ has side effects of
defining new functions. And, for example, Org babel's behavior is
modified when ob-foo.el is loaded because `fboundp' on
'org-babel-execute:foo returns non-nil.

A bit different approach is used for ol-foo.el, where more significant
side effect is triggered by top-level calls to
`org-link-set-parameters'. Similarly, ox-foo.el uses
`org-export-define-derived-backend' or `org-export-define-backend'.

Finally, we have org-mouse.el discussed here, which modifies key
bindings and org-inlinetask.el, which modifies how Org treats headlines
in Org files, modifying syntax.

With the current state of affairs, it is often enough to
(require 'org-library) to get things work. If we get rid of all the
possible side effects, users will have to adapt their configurations
and we will thus violate "I won't force you to update your
configuration."

Of course, we can change babel implementation to use explicit registry
like for export backends and force users to call explicit activation
commands in addition to (require 'library). But I am not sure if we are
not crossing the line with such an approach: "I won't use software
correctness as an excuse.".

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



Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-08-08 Thread Ihor Radchenko
WANG Yicheng  writes:

> Also, the org-latex-preview also rendered (deliberately put) inline \[…\] as 
> inline images.
>
> I guess it could be caused by org-latex-math-environments-re. Could you add 
> support to recognize \[…\] also as equations? Thank you.

For context, \[...\] fragments are considered as a part of paragraph by Org
mode. Changing org-latex-math-environments-re would break this
assumption will be considered a breaking change in Org syntax.

How these fragments are displayed and exported is another question and
may be a subject of discussion.

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



Re: kaobook tex template integration to a org file to make self-contained, portable?

2023-08-08 Thread Zenny
Thanks Christian for the pointer,

But I already have,

 (add-to-list 'org-latex-classes
>`("kaobook"
>  ,(string-join
>'("\\documentclass{kaobook}"
>  "\\usepackage{color}"
>  "\\usepackage{amsmath,amssymb}")
>"\n")
>  ("\\chapter{%s}" . "\\chapter*{%s}")
>  ("\\section{%s}" . "\\section*{%s}")
>  ("\\subsection{%s}" . "\\subsection*{%s}")
>  ("\\paragraph{%s}" . "\\paragraph*{%s}")
>  ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
>

yet `C-c C-e l o` fails to produce pdf.

Cheers,

On Mon, Aug 7, 2023 at 1:55 PM Christian Moe  wrote:

>
>
> Hi,
>
> For starters, have you added the kaobook document class to the variable
> org-latex-classes? (If yes, ignore the rest of this message, if not, do
> so and see what happens.)
>
> This is needed to tell Org how to set the document class and what commands
> are used for sections. See the manual 13.10.2 and 13.10.3,
> [[info:org#LaTeX specific export settings]] and [[info:org#LaTeX header
> and sectioning]], and look up the docstring for org-latex-classes if you
> need help.
>
> E.g., in .emacs I have this for Tufte-Latex:
>
> (add-to-list 'org-latex-classes
>  '("tufte-handout"
> "\\documentclass[11pt,a4paper]{tufte-handout}"
>("\\section{%s}" . "\\section*{%s}")
>("\\subsection{%s}" . "\\subsection*{%s}")))
>
> (add-to-list 'org-latex-classes
>  '("tufte-book"
> "\\documentclass[11pt,a5paper,nols]{tufte-book}"
>("\\part{%s}" . "\\part*{%s}")
>("\\section{%s}" . "\\section*{%s}")
>("\\subsection{%s}" . "\\subsection*{%s}")
>("\\paragraph{%s}" . "\\paragraph*{%s}")))
>
> Yours,
> Christian
>
>
> Zenny writes:
>
> > Hi,
> >
> > References of interest:
> > 1. https://github.com/fmarotta/kaobook
> > 2. https://github.com/asilata/emacsconf2021
> >
> > Can anyone guide me how to get a self-contained and portable template
> that
> > executes kaobook tex templates (see 1) to create an org-file that
> resembles
> > with the instance in 2 above?
> >
> > I tried the best I can by adding the kaobook.cls and kaobook.sty files
> > inside `~/texmf/tex/latex/kaobook/` folder and specified 'kaobook' in the
> > `#+latex_class: kaobook` but it failed to produce the desired look of pdf
> > similar to
> >
> https://github.com/fmarotta/kaobook/blob/master/example_and_documentation.pdf
> > withing the same examples directory!
> >
> > Any input appreciated!
> >
> > Cheers and have a nice week,
> > /z
>
>

-- 
Cheers,
/z

-.. .. ... -.-. .-.. .- .. -- . .-. | -.. .. ... -.-. .-.. .- .. -- . .-.
CONFIDENTIALITY NOTICE AND DISCLAIMER: Access to this e-mail and its
contents by anyone other than the intended recipient is unauthorized as it
contains privileged and confidential information, and is subject to legal
privilege. Please do not re/distribute it.  If you are not the intended
recipient (or responsible for delivery of the message to such person), you
may not use, copy, distribute or deliver the email and part of its contents
to anyone this message (or any part of its contents or take any action in
connection to it. In such case, you should destroy this message, and notify
the sender immediately. If you have received this email in error, please
notify the sender or your sysadmin immediately by e-mail or telephone, and
delete the e-mail from any computer. If you or your employer does not
consent to internet e-mail messages of this kind, please notify the sender
immediately. All reasonable precautions have been taken to ensure no
viruses are present in this e-mail and attachments included. As the sender
cannot accept responsibility for any loss or damage arising from the use of
this e-mail or attachments it is recommended that you are responsible to
follow your virus checking procedures prior to use. The views, opinions,
conclusions and other informations expressed in this electronic mail are
not given or endorsed by any company including the network providers unless
otherwise indicated by an authorized representative independent of this
message.
-.. .. ... -.-. .-.. .- .. -- . .-. | -.. .. ... -.-. .-.. .- .. -- . .-.


Re: [BUG] (error "rx ‘**’ range error") [9.7 (9.7-??-d6f3aed7b @ /Users/melody/.emacs.d/.local/straight/build-28.2/org/)]

2023-08-08 Thread Angela L
Ok. Thank you so much.

Cheers,
Annie
On Aug 8, 2023, 4:00 PM +0800, Ihor Radchenko , wrote:
> Angela L  writes:
>
> > org-roam-buffer-p is a byte-compiled function defined in org-roam.el.
> > ...
> > This function has :before-until advice: md-roam-buffer-p.
>
> So, md-roam package, which you likely use, modified `org-roam-buffer-p'
> and caused the breakage.
>
> Please report this bug to md-roam developers.
> Handled. Closing.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 


Re: [BUG] (error "rx ‘**’ range error") [9.7 (9.7-??-d6f3aed7b @ /Users/melody/.emacs.d/.local/straight/build-28.2/org/)]

2023-08-08 Thread Ihor Radchenko
Angela L  writes:

> org-roam-buffer-p is a byte-compiled function defined in org-roam.el.
> ...
> This function has :before-until advice: md-roam-buffer-p.

So, md-roam package, which you likely use, modified `org-roam-buffer-p'
and caused the breakage.

Please report this bug to md-roam developers.
Handled. Closing.

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



Re: [BUG] (error "rx ‘**’ range error") [9.7 (9.7-??-d6f3aed7b @ /Users/melody/.emacs.d/.local/straight/build-28.2/org/)]

2023-08-08 Thread Angela L
org-roam-buffer-p is a byte-compiled function defined in org-roam.el.

Signature
(org-roam-buffer-p  BUFFER)

Documentation
Return t if BUFFER is for an Org-roam file.

If BUFFER is not specified, use the current buffer.

This function has :before-until advice: md-roam-buffer-p.

References
References in org-roam.el:
(defun org-roam-buffer-list ...) 1 reference

Find all references Functions used by org-roam-buffer-p

Advice
This function is advised.

Debugging
Enable edebug Enable tracing
Disassemble Forget

Source Code
;; Defined in ~/.emacs.d/.local/straight/repos/org-roam/org-roam.el
(defun org-roam-buffer-p ( buffer)
 "Return t if BUFFER is for an Org-roam file.
If BUFFER is not specified, use the current buffer."
 (let ((buffer (or buffer (current-buffer)))
 path)
 (with-current-buffer buffer
 (and (derived-mode-p 'org-mode)
 (setq path (buffer-file-name (buffer-base-buffer)))
 (org-roam-file-p path)

Symbol Properties
defalias-fset-function
 #[128 "\300\301\302#\207"
 [apply advice--defalias-fset nil nil]
 5 nil]
 Disassemble
function-documentation
 (advice--make-docstring 'org-roam-buffer-p)

Cheers,
Annie
On Aug 8, 2023, 3:52 PM +0800, Ihor Radchenko , wrote:
> Angela L  writes:
>
> > It’s nil
>
> This is unexpected.
> AFAIK, org-roam-buffer-p is defined as
>
> (defun org-roam-buffer-p ( buffer)
> "Return t if BUFFER is for an Org-roam file.
> If BUFFER is not specified, use the current buffer."
> (let ((buffer (or buffer (current-buffer)))
> path)
> (with-current-buffer buffer
> (and (derived-mode-p 'org-mode)
> (setq path (buffer-file-name (buffer-base-buffer)))
> (org-roam-file-p path)
>
> And it does check (derived-mode-p 'org-mode).
>
> May you please post the information displayed in C-h f org-roam-buffer-p?
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 


Re: [BUG] (error "rx ‘**’ range error") [9.7 (9.7-??-d6f3aed7b @ /Users/melody/.emacs.d/.local/straight/build-28.2/org/)]

2023-08-08 Thread Angela L
It’s nil

Cheers,
Annie
On Aug 8, 2023, 3:48 PM +0800, Ihor Radchenko , wrote:
> [ Please use "Reply all" to keep the conversation public ]
>
> Angela L  writes:
>
> > > What does M-: (org-roam-buffer-p) say in that buffer?
> > It replies t.
>
> This is strange.
> What about M-: (derived-mode-p 'org-mode) ?
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 


Re: [BUG] (error "rx ‘**’ range error") [9.7 (9.7-??-d6f3aed7b @ /Users/melody/.emacs.d/.local/straight/build-28.2/org/)]

2023-08-08 Thread Ihor Radchenko
Angela L  writes:

> It’s nil

This is unexpected.
AFAIK, org-roam-buffer-p is defined as

(defun org-roam-buffer-p ( buffer)
  "Return t if BUFFER is for an Org-roam file.
If BUFFER is not specified, use the current buffer."
  (let ((buffer (or buffer (current-buffer)))
path)
(with-current-buffer buffer
  (and (derived-mode-p 'org-mode)
   (setq path (buffer-file-name (buffer-base-buffer)))
   (org-roam-file-p path)

And it does check (derived-mode-p 'org-mode).

May you please post the information displayed in C-h f org-roam-buffer-p?

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



Re: [BUG] (error "rx ‘**’ range error") [9.7 (9.7-??-d6f3aed7b @ /Users/melody/.emacs.d/.local/straight/build-28.2/org/)]

2023-08-08 Thread Ihor Radchenko
[ Please use "Reply all" to keep the conversation public ]

Angela L  writes:

>> What does M-: (org-roam-buffer-p) say in that buffer?
> It replies t.

This is strange.
What about M-: (derived-mode-p 'org-mode) ?

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



Re: Add a Chinese version to index.org of orgmode.org

2023-08-08 Thread Dr. Arne Babenhauserheide
Hi lux,

Ihor Radchenko  writes:
> lux  writes:
>>   To facilitate Chinese users' understanding of Org Mode, I have
>> translated index.org into Simplified Chinese. Please review it.
> Thanks!
> However, we already have another, more complete translation pending.
> See https://list.orgmode.org/orgmode/sdvzg71zzor@netyu.xyz/

Maybe you can use the experience with the text you now have to review
this other translation and suggest improvements?

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de


signature.asc
Description: PGP signature


Re: [BUG] (error "rx ‘**’ range error") [9.7 (9.7-??-d6f3aed7b @ /Users/melody/.emacs.d/.local/straight/build-28.2/org/)]

2023-08-08 Thread Ihor Radchenko
Angela L  writes:

> And I just found that this only happened when I changed to markdown buffer. I 
> am currently using md-roam with org-roam-ui as well.

Curious.
What does M-: (org-roam-buffer-p) say in that buffer?

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



Re: org-agenda queries for absent properties

2023-08-08 Thread Ihor Radchenko
Jens Schmidt  writes:

> I was trying to decipher and document the acronyms used for the
> let-bindings in that `let*' sexp.  I think I got them right but was
> unsure about the "gv".  Removed the question mark, let's just assume
> that "gv" means "getter value" and be done with it.

Yeah. I also think that it should be something like "getter value".

> Updated patch attached.

Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f689eb44f
Thanks for your contribution!

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



Re: Add a Chinese version to index.org of orgmode.org

2023-08-08 Thread Ihor Radchenko
lux  writes:

> Hi
>   To facilitate Chinese users' understanding of Org Mode, I have
> translated index.org into Simplified Chinese. Please review it.

Thanks!
However, we already have another, more complete translation pending.
See https://list.orgmode.org/orgmode/sdvzg71zzor@netyu.xyz/

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



[BUG] Fontification of scheme code blocks

2023-08-08 Thread Ihor Radchenko
We have recently got WORG build failures because running scheme-mode
spawns an interactive prompt to select Scheme implementation.

This happens when Org export attempts to fontify scheme source blocks,
and calling major mode (scheme-mode) expects user interaction -
something we do not anticipate.

The failure is https://builds.sr.ht/~bzg/job/1036834

There are two issues here:

1. Potentially with scheme configuration in WORG build, where geiser is
   not fully configured.

2. More generally with our fontification code in ox-html and also in
   org-src - we may need to handle similar scenarios somehow. For
   example, by detecting interactivity attempts and aborting
   fontfication. Not sure if it is technically doable though.

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