Re: org-clock-report on headings and subheadings or for the whole file?

2022-11-12 Thread Uwe Brauer

> Uwe Brauer  writes:

> I had point before first heading and typed M-x org-clock-report.
> You probably had point at or inside a heading.


Correct, I did since I found it «logical» to have that table at the end of the 
file, but now I understand the problem with this. Thanks 

Ok, but I think it would not be bad to add this information to the docstring of 
org-clock-report!? It is not that intuitive.


BTW when I move one heading to a subheading the table reads 

#+BEGIN: clocktable :scope file :maxlevel 2
#+CAPTION: Clock summary at [2022-11-13 08:46]
| Headline | Time   |  |
|--++--|
| *Total time* | *2:33* |  |
|--++--|
| Symmetric| 2:33   |  |
| \_  $A^0$ condition   || 0:03 |
#+END:

Is there any way to avoid \   in the tanble

-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/


smime.p7s
Description: S/MIME cryptographic signature


Re: org-clock-report on headings and subheadings or for the whole file?

2022-11-12 Thread Ihor Radchenko
Uwe Brauer  writes:

> I realized that I have 
> #+BEGIN: clocktable :scope subtree :maxlevel 2
>
> While you have
>
> #+BEGIN: clocktable :scope file :maxlevel 2
>
> But I don't know where shall I change the setting, the documentation of 
>
> ,
> | org-clock-report (found in org-mode-map), which
> ...
> But I don't understand why org assumes that I call that function from a 
> subtree.

I had point before first heading and typed M-x org-clock-report.
You probably had point at or inside a heading.

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



[PATCH] Re: [STYLE] :version tags in defcustom definitions (was: [PATCH] Improve look of agenda on graphical displays)

2022-11-12 Thread Ihor Radchenko
Timothy  writes:

>>> Sure. Just trying to clarify my confusion. The inconsistency with some
>>> defcustoms using :version and some not is bugging me.
>>
>> Agreed.  It would be better to be consistent with this.
>
> Given that org-mode is distributed separately to Emacs, and I get the 
> impression
> having a newer org-mode version that Emacs version is not uncommon, I think it
> would make sense to have /just/ org-mode version tags.

I have just updated the :package-version tags in the new and changed
variables in Org 9.6.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5a10517d021acba071cd4a2c3b90de84c8e9f3cb

I also plan to push the attached change to org-maintenance document in
WORG.

I think we can replace the old :package keywords as needed, similar to
the Emacs' whitespace policy.

Let me know if there are any objections.

>From f1e2b8daca3bb4bdde0d6d98376d2f1e4c608e94 Mon Sep 17 00:00:00 2001
Message-Id: 
From: Ihor Radchenko 
Date: Sun, 13 Nov 2022 15:33:50 +0800
Subject: [PATCH] org-maintenance.org: Document updating :package-version

* org-maintenance.org (For minor and major releases): Document that it
is necessary to update :package-version in the new and changed
`defcustom' statements.
---
 org-maintenance.org | 4 
 1 file changed, 4 insertions(+)

diff --git a/org-maintenance.org b/org-maintenance.org
index 3cc1ea53..35b70e0a 100644
--- a/org-maintenance.org
+++ b/org-maintenance.org
@@ -274,6 +274,10 @@ *** For minor and major releases
 When doing a minor or major release, the =main= branch should be merged
 into the =bugfix= branch.
 
+Also, ~:package-version~ tags should be added to new and changed
+~defcustom~ statements as needed.  If a statement also contain ~:version~
+tag, it should be removed in favor of ~:package-version~.
+
 *** Releasing by adding a new tag
 :PROPERTIES:
 :CUSTOM_ID: release-tags
-- 
2.35.1


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


Re: org-clock-report on headings and subheadings or for the whole file?

2022-11-12 Thread Uwe Brauer








> Yes, *but* I obtain

> #+BEGIN: clocktable :scope subtree :maxlevel 2
> #+CAPTION: Clock summary at [2022-11-13 08:06]

> | Headline   | Time   |
> |+|
> | *Total time*   | *0:03* |
> |+|
> | $A^0$ condition | 0:03   |
> #+END:

> Which is *not* what I want.

> So I am wondering why I obtain something different from you

I realized that I have 
#+BEGIN: clocktable :scope subtree :maxlevel 2

While you have

#+BEGIN: clocktable :scope file :maxlevel 2

But I don't know where shall I change the setting, the documentation of 

,
| org-clock-report (found in org-mode-map), which
| is an autoloaded interactive compiled Lisp function in ‘org-clock.el’.
| 
| It is bound to H-r.
| 
| (org-clock-report  ARG)
| 
| Update or create a table containing a report about clocked time.
| 
| If point is inside an existing clocktable block, update it.
| Otherwise, insert a new one.
| 
| The new table inherits its properties from the variable
| ‘org-clock-clocktable-default-properties’.  The scope of the
| clocktable, when not specified in the previous variable, is
| ‘subtree’ when the function is called from within a subtree, and
| ‘file’ elsewhere.
| 
| When called with a prefix argument, move to the first clock table
| in the buffer and update it.
`

But I don't understand why org assumes that I call that function from a subtree.


-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/


smime.p7s
Description: S/MIME cryptographic signature


Re: org-clock-report on headings and subheadings or for the whole file?

2022-11-12 Thread Uwe Brauer
>>> "IR" == Ihor Radchenko  writes:

> Uwe Brauer  writes:
>> I just started to use logbooks and clocks. One of my org files looks
>> like this
>> 
>> * TODO Condition about symmetry  
>> :LOGBOOK:
>> CLOCK: [2022-11-11 16:40]--[2022-11-11 17:32] =>  0:52
>> CLOCK: [2022-11-11 13:58]--[2022-11-11 14:05] =>  0:07
>> CLOCK: [2022-11-11 11:22]--[2022-11-11 11:27] =>  0:05
>> CLOCK: [2022-11-11 09:55]--[2022-11-11 11:21] =>  1:26
>> :END:
>> 
>> 
>> * TODO $A^0$ condition
>> :LOGBOOK:
>> CLOCK: [2022-11-11 17:40]--[2022-11-11 17:43] =>  0:03
>> :END:
>> 
>> Now org-clock-report inserts a table for the lookbook of each heading.
>> 
>> 
>> 1. Either I can make one of the heading a subheading, and then I
>> would like to now how to make a report for heading and subheading.
>> 
>> 2. Or I leave it as it is and want a report for every heading.

> Could you please elaborate what you want to achieve?

> I am getting

> #+BEGIN: clocktable :scope file :maxlevel 2
> #+CAPTION: Clock summary at [2022-11-13 Sun 12:58]

> | Headline | Time |
> |--+--|
> | *Total time*   | *2h 33min* |
> |--+--|
> | Condition about symmetry | 2h 30min |
> | $A^0$ condition   | 0h 3min  |
> #+END:

> with Total time aggregating all the clock entries.
> Isn't it what you want?


Yes, *but* I obtain


#+BEGIN: clocktable :scope subtree :maxlevel 2
#+CAPTION: Clock summary at [2022-11-13 08:06]
| Headline   | Time   |
|+|
| *Total time*   | *0:03* |
|+|
| $A^0$ condition | 0:03   |
#+END:

Which is *not* what I want.

So I am wondering why I obtain something different from you

-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/


smime.p7s
Description: S/MIME cryptographic signature


[RFC] Re: Headings and Headlines

2022-11-12 Thread Ihor Radchenko
André A. Gomes  writes:

> The project's documentation refers to headings and headlines as
> synonyms.  Relying on a single definition would be beneficial.  If I had
> to choose between the two, I'd go with heading.

I've been looking into changing all the instances of "headline" to
"heading" and I ran into a serious issue: We use `headline' _symbol_ in
multiple places in the code.

Most importantly, org-element.el uses element type `headline' to parse
headings. We cannot easily change this symbol for backwards
compatibility reasons.

I'm afraid that a complete switch to use "heading" everywhere consistently
is not possible without backwards-incompatible change. I know for sure
that changing `headline' element to `heading' element type will break
important packages like org-roam. And there is no good way to work
around this. We cannot make symbol aliases in Elisp in scenarios like
(memq (org-element-type ...) '(headline inlinetask)).

I came to the conclusion that it will, in fact, be easier to change all
things to use "headline" -- all the instances of "heading" in Org code
are in function names, variable names, and docstrings. All can be
changed using obsolete aliases.

On the other hand, overwhelming feedback in this thread is the
opposite -- change "headline" to "heading".

Maybe others have better ideas how to deal with `headline' symbol issue?

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



Re: [OT] org and diff

2022-11-12 Thread Samuel Wales
On 11/12/22, Ihor Radchenko  wrote:
> I have the following in my ~/.gitconfig:
>
> [diff "org"]
>   xfuncname = "^(\\*+ +.*)$"
>
> [core]
>   attributesfile = /home/yantar92/.gitattributes
>
> And ~/.gitattributes:
>
> *.org   diff=org

this looks interesting.  i thought this stuff was just for configuring
the helper text on the hunk headers that tell you what function the
hunk is in, kind of thing.  [which i thought there wasn't much you
could do with for org even in principle.]

however, i will try it to see if it actually changes the diff hunk contents.

>
> This will help grouping changes under the same heading.

i think this is what i want.

at least probably.

>
> Source: https://protesilaos.com/codelog/2021-01-26-git-diff-hunk-elisp-org/

idk why but this page is blank for me.  then if i try to disable
noscript restrictions, noscript says "This is a privileged page, whose
permissions cannot be configured".  so i guess the blog, or whatever
it is, is incompatible with my firefox-esr.


in addition, i encountered a broken org-capture extension problem with
your email post in gmail.  first i selected text, and i didn't get the
"captured" notification from the org-capture extension.  well, that's
probably firefox-esr's weird selection something or other.  selection
color and my black bg are simiar so i couldn't tell.  but nothing got
captured.

but then i selected it accurately and i /did/ get the captured
notification.  but nothing was captured to emacs.

and that is precisely the problem that is being discussed on a couple
of other ml threads: getting notified that capture from firefox
worked, reliably.  [the org-capture extension notifies you, but it
doesn't really know whether capture worked.]

>
> --
> 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: [OT] org and diff

2022-11-12 Thread Samuel Wales
ugh.  i left out a probably significant fact that means i'd have to
rework the whole post which i can't do atm.

in /this particular example/ the file will actually still be there
after staging.  i forgot there are other changes in this concrete
example.  i am trying to clean up a set of magit changes that has this
kind of mingling, but not in the plain list.  as part of doing so, i
had the idea of getting this plain list out of the file entirely.
merely because i edit the plain list and don't want to make the diff
more complex by doing so.  the plain list is not part of the diff, and
i wanted to have it not re-enter the diff when i edit it.

when refiling the plain list entry created the same kind of chaos i
was trying to reduce, i thought to move it /within/ the file.  chaos.
so i moved it to near the beg.  chaos.  then at the end.  chaos.

so you can take the post as, not a specific example, but what causes
mingling in org with diff?  or something like that.

On 11/12/22, Samuel Wales  wrote:
> i have a very old version of Magit, for reasons I won't get into.
> Fancier diff settings might be differnet or not available.
>
> But something drives me crazy.  Probably not too Org-related, but it
> might be.  I just want to know why, is all.
>
> I have a 24k line org file, and it's not that complex wrt levels.  2
> or 3 levels with odd stars only.  various types of content.
>
> someplace in it, is an entry with a  234-item plain list.  if i try to
> move this entry, and make no other changes, diff goes insane.  if i
> try to refile this entry to a different org file, diff similarly goes
> insane, with the - part.  only that change.
>
> ok, what it does is, intersperse or mingle entries.  so suppose i want
> to stage this one tiny little change, namely moving one entry [the one
> with the large plain list] to a different location in the same file.
> even if i move it really distantly.
>
> i.e. i want to put the - and the + of the move to the staging area in
> magit.  unstaged changes should then not have this file in it at all
> after the staging operations.
>
> then, basically, staged changes will have this move.
>
> as a user, i want diff to make this two hunks, a big - and a big +.
> but diff mingles parts of another entry or entries with this list, so
> that it is scattered all over the diff.  to get the result i want
> requires tons of intra-hunk stage operations.  at best.
>
> so, what aspect of diff or org is triggering this kind of behavior?
> what is it that diff needs to understand about org, or what minimality
> etc. settings does it want to create a better diff?
>
> i know org has lots of similar lines [e.g. planning headers with
> scheduled dates that are identical].  but still, this is a nontrivial
> size org file, with no other changes that i made. diff's insanity
> still occurs even if i move the entry distantly.
>
> i am of course aware of histogram, patience, etc. and that git diff
> has a few experimental choices of options.  also long ago i read diff
> manual with its discussion of end of file beg of file and minimality
> with --minimal and all that stuff.
>
> however, here, though, i am mostly interested in specifically what
> diff's, or git diff's, or magit's, /deal/ is.  in /this/ case.
>
> where does it get off doing that?  everything else is the same, so why
> is it keying on the wrong thing?
>
> does it think i made the changes as it presents them, or does it go
> for some other goal like minimality or speed and not really care what
> i did?  is it because it e.g. ignores end or beg of file or so?  or is
> it getting confused by some line?
>
> i have of course heard of merge something or others.  which presumably
> tell diff about the structure of files or so.  like, the fact that the
> planning line always follows the header.  or perhaps i am imagining
> this kind of tool.
>
> now, whether i can mitigte it is interesting /after/ that.  my
> paleolithic magit version might not be capable, but still.
>
> --
> The Kafka Pandemic
>
> A blog about science, health, human rights, and misopathy:
> https://thekafkapandemic.blogspot.com
>


-- 
The Kafka Pandemic

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



Re: [OT] org and diff

2022-11-12 Thread Ihor Radchenko
Samuel Wales  writes:

> someplace in it, is an entry with a  234-item plain list.  if i try to
> move this entry, and make no other changes, diff goes insane.  if i
> try to refile this entry to a different org file, diff similarly goes
> insane, with the - part.  only that change.
>
> ok, what it does is, intersperse or mingle entries.  so suppose i want
> to stage this one tiny little change, namely moving one entry [the one
> with the large plain list] to a different location in the same file.
> even if i move it really distantly.
>
> i.e. i want to put the - and the + of the move to the staging area in
> magit.  unstaged changes should then not have this file in it at all
> after the staging operations.
>
> then, basically, staged changes will have this move.
>
> as a user, i want diff to make this two hunks, a big - and a big +.
> but diff mingles parts of another entry or entries with this list, so
> that it is scattered all over the diff.  to get the result i want
> requires tons of intra-hunk stage operations.  at best.
>
> so, what aspect of diff or org is triggering this kind of behavior?
> what is it that diff needs to understand about org, or what minimality
> etc. settings does it want to create a better diff?

Most likely, the default git's grouping of chunks is not good enough for
your case.

I have the following in my ~/.gitconfig:

[diff "org"]
  xfuncname = "^(\\*+ +.*)$"

[core]
attributesfile = /home/yantar92/.gitattributes

And ~/.gitattributes:

*.org   diff=org

This will help grouping changes under the same heading.

Source: https://protesilaos.com/codelog/2021-01-26-git-diff-hunk-elisp-org/

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



[OT] org and diff

2022-11-12 Thread Samuel Wales
i have a very old version of Magit, for reasons I won't get into.
Fancier diff settings might be differnet or not available.

But something drives me crazy.  Probably not too Org-related, but it
might be.  I just want to know why, is all.

I have a 24k line org file, and it's not that complex wrt levels.  2
or 3 levels with odd stars only.  various types of content.

someplace in it, is an entry with a  234-item plain list.  if i try to
move this entry, and make no other changes, diff goes insane.  if i
try to refile this entry to a different org file, diff similarly goes
insane, with the - part.  only that change.

ok, what it does is, intersperse or mingle entries.  so suppose i want
to stage this one tiny little change, namely moving one entry [the one
with the large plain list] to a different location in the same file.
even if i move it really distantly.

i.e. i want to put the - and the + of the move to the staging area in
magit.  unstaged changes should then not have this file in it at all
after the staging operations.

then, basically, staged changes will have this move.

as a user, i want diff to make this two hunks, a big - and a big +.
but diff mingles parts of another entry or entries with this list, so
that it is scattered all over the diff.  to get the result i want
requires tons of intra-hunk stage operations.  at best.

so, what aspect of diff or org is triggering this kind of behavior?
what is it that diff needs to understand about org, or what minimality
etc. settings does it want to create a better diff?

i know org has lots of similar lines [e.g. planning headers with
scheduled dates that are identical].  but still, this is a nontrivial
size org file, with no other changes that i made. diff's insanity
still occurs even if i move the entry distantly.

i am of course aware of histogram, patience, etc. and that git diff
has a few experimental choices of options.  also long ago i read diff
manual with its discussion of end of file beg of file and minimality
with --minimal and all that stuff.

however, here, though, i am mostly interested in specifically what
diff's, or git diff's, or magit's, /deal/ is.  in /this/ case.

where does it get off doing that?  everything else is the same, so why
is it keying on the wrong thing?

does it think i made the changes as it presents them, or does it go
for some other goal like minimality or speed and not really care what
i did?  is it because it e.g. ignores end or beg of file or so?  or is
it getting confused by some line?

i have of course heard of merge something or others.  which presumably
tell diff about the structure of files or so.  like, the fact that the
planning line always follows the header.  or perhaps i am imagining
this kind of tool.

now, whether i can mitigte it is interesting /after/ that.  my
paleolithic magit version might not be capable, but still.

-- 
The Kafka Pandemic

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



Re: org-clock-report on headings and subheadings or for the whole file?

2022-11-12 Thread Ihor Radchenko
Uwe Brauer  writes:

> I just started to use logbooks and clocks. One of my org files looks
> like this
>
> * TODO Condition about symmetry  
>   :LOGBOOK:
>   CLOCK: [2022-11-11 16:40]--[2022-11-11 17:32] =>  0:52
>   CLOCK: [2022-11-11 13:58]--[2022-11-11 14:05] =>  0:07
>   CLOCK: [2022-11-11 11:22]--[2022-11-11 11:27] =>  0:05
>   CLOCK: [2022-11-11 09:55]--[2022-11-11 11:21] =>  1:26
>   :END:
>
>
> * TODO $A^0$ condition
>   :LOGBOOK:
>   CLOCK: [2022-11-11 17:40]--[2022-11-11 17:43] =>  0:03
>   :END:
>
> Now org-clock-report inserts a table for the lookbook of each heading.
>
>
> 1. Either I can make one of the heading a subheading, and then I
>would like to now how to make a report for heading and subheading.
>
> 2. Or I leave it as it is and want a report for every heading.

Could you please elaborate what you want to achieve?

I am getting

#+BEGIN: clocktable :scope file :maxlevel 2
#+CAPTION: Clock summary at [2022-11-13 Sun 12:58]
| Headline | Time |
|--+--|
| *Total time*   | *2h 33min* |
|--+--|
| Condition about symmetry | 2h 30min |
| $A^0$ condition   | 0h 3min  |
#+END:

with Total time aggregating all the clock entries.
Isn't it what you want?

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



Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-11-12 Thread Ihor Radchenko
Max Nikulin  writes:

> On 26/10/2022 11:58, Ihor Radchenko wrote:
>> 
>> Yes. From org-capture-templates docstring:
>> 
>>%x  Content of the X clipboard.
>
> Ihor, I am afraid there are a couple of pitfalls with "%x" for Samuel 
> since he prefers to keep Emacs hidden so can not check result.
>
> 1. If something goes wrong, e.g. some application does not put 
> highlighted text to PRIMARY selection then wrong source (CLIPBOARD) or 
> empty string may be silently captured. I would prefer explicit source 
> however it will not protect against stale selection from the same source.
>
> Simulate empty selection:
> echo | xsel -bi ; echo | xsel -i ; killall xsel

I am unsure what can be done here. AFAIU, Org just follows the %x
description. Nothing wrong on Org side.

The best we can do is alternative %?? that will do something more
reliable. But I am unsure what it can be.

> 2. Jean pointed out that Emacs ignores X selection if it does not have 
> an X frame. It was almost buried in the haystack of "SQL instead of Org" 
> noise. It happens if Emacs is running as a daemon. I am unsure which way 
> Samuel starts Emacs (xinit, systemd user session, systemd socket 
> activation, manually, etc.)

May we modify org-get-x-clipboard adding
(server-select-display (getenv \"DISPLAY\")) ?
Will it be enough?

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



Re: [PATCH] ob-java: Define the list of all supported header arguments

2022-11-12 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

>> Yes, ideally, we need to know which exact test case fails. But please
>> open a new thread as it will be unrelated to java discussed herein.
>
> Now you lost me.  :)
>
> The linked mail has all the information already has its own thread.

You are right.
https://orgmode.org/list/m2ilkwso8r@me.com already reported this
exact failure.

I am not yet sure how to proceed there.

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



Re: [BUG] Incorrect background color [9.5.4 (release_9.5.4-3-g6dc785 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]

2022-11-12 Thread Ihor Radchenko
Jeremie Juste  writes:

>  >> WORG page is not accurate here. The truth is that ob-R.el does not provide
>  >> any defaults for header args. Instead, R defaults are used. I suspect
>  >> that defaults for background color changed in R since the WORG page has
>  >> been written.
>  >
>  > Jeremie, could you please take a look?
>
>  Yes. Thanks for confirming the issue. I confirm that the white backgroud is 
> the default and is R default.
>  I could not trace back any recent change in R. So I suspect white was always 
> the default.
>  But I could well be wrong here.
> ...
> Thanks also for updating the WORG page.

Thanks for the confirmation!
Also, it was Bastien who updated the page.
Fixed.
https://git.sr.ht/~bzg/worg/commit/5c24f6e33f20505ee161cd2c5fc93e39891d08ad

>  Note also that R parameters always takes precedence on the org-mode ones. As 
> in the example below.
>
>  #+BEGIN_SRC R :results graphics file :file test.svg :outputs both bg red
>   par(bg="blue")
>   plot(1:10, type = "n")
>  #+end_src
>
> In opinion the actual org parameters are the right ones. But I'm open to 
> suggestions.

I do not think that we can do anything about it and I do not think that
we do anything wrong.

Org can set options provided in header args as defaults, but the actual
code can do anything, including changing those defaults.

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



Re: Volunteering to maintain ob-asymptote.el within Org

2022-11-12 Thread Ihor Radchenko
Jarmo Hurri  writes:

> Greetings Ihor.
>
> Ihor Radchenko  writes:
>
>> Jarmo, did you hear anything from Luc? There was no action in
>> ob-asymptote for over a year. If the current maintainer does not reply
>> to email requests related to ob-asymptote, I'd rather transfer to
>> maintenance to someone more active.
>
> Nope. I sent him another email some weeks ago, no response.
>
> Let me know how we will proceed.

I am CCing Bastien.

Bastien, ob-asymptote is still a part of org-contrib [1]. 
Should we just go ahead and change the maintainer now?

[1] https://git.sr.ht/~bzg/org-contrib/tree/master/item/lisp/ob-asymptote.el

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



Re: [PATCH] Re: Update Org to MathJax 3

2022-11-12 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> Below, I attach the 7th revision of the patch.

Thanks!

I note that you did not mention in the news that MathJax 2 support is
dropped. This is a very important thing we must highlight and ring all
the bells about.

Consider that someone has customized path option to a local copy of
MathJax version 2. Then, things will get broken after the update!

Of course, MathJax 2 is severely outdated, and we may not want to support
it completely (though see
https://orgmode.org/list/87h6z69myp.fsf@localhost). However, it could be
at least a good idea to warn the users who are trying to use MathJax 2.
Would it be possible?

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



Re: Tutorials on creating pdfs with org-babel and sqlite

2022-11-12 Thread Jean Louis
* Jan Ulrich Hasecke  [2022-11-12 21:09]:
> Dear all,
> 
> I am doing my first steps to do some database publishing with org-babel
> and sqlite. So far quite successful, but I am still very new to this, so
> I would appreciate if you can recommend a tutorial on this. I am mostly
> interested in publishing use cases. Has anybody wrote a book or a report
> with org-mode, org-babel and sqlite? What options I have to format the
> output so that I can export it to pdf via pandoc and context?

Let me say from my experience of 20+ years of publishing and using
database:

- use PostgreSQL and its rich features, forget SQLite. Single user
  single computer database is good for you personally, but modifying
  tables and developing new features is far harder with SQLite.

- Separate lightweight markup language LWM from publishing objects
  table. Make the publishing available for any kind of LWM!

- For now I use following "Markup Types" in my `markuptypes' table:

 1  Default (Text)
 2  Markdown (Discount Markdown)
 3  Markdown (Pandoc, espresso)
 4  Asciidoc
 5  Asciidoctor
 6  Markdown (Discount) with Table of Content
 7  HTML
 8  Kotl
 9  Org
 10 Org Heading
 11 Org Standalone
 12 reStructuredText
 13 txt2tags
 14 Enriched
 15 PDF
 16 Text with lines joined
 17 Org with Markdown TOC
 18 PostgreSQL

My publishing object references foreign table of markuptypes. That way
it becomes known what LWM is used for the text of publishing object. 

Then I use extra table `markupconversions':
Table 
"public.markupconversions"
┌┬─┬───┬──┬─┐
│ Column │Type │ Collation │ 
Nullable │ Default │
├┼─┼───┼──┼─┤
│ markupconversions_id   │ integer │   │ 
not null │ nextval('markupconversions_markupconversions_id_seq'::regclass) │
│ markupconversions_datecreated  │ timestamp without time zone │   │ 
not null │ CURRENT_TIMESTAMP   │
│ markupconversions_datemodified │ timestamp without time zone │   │
  │ │
│ markupconversions_usercreated  │ text│   │ 
not null │ CURRENT_USER│
│ markupconversions_usermodified │ text│   │ 
not null │ CURRENT_USER│
│ markupconversions_name │ text│   │ 
not null │ │
│ markupconversions_markupinput  │ integer │   │ 
not null │ │
│ markupconversions_markupoutput │ integer │   │ 
not null │ │
│ markupconversions_emacslisp│ text│   │ 
not null │ │
│ markupconversions_description  │ text│   │
  │ │
│ markupconversions_templates│ integer │   │
  │ │
│ markupconversions_command  │ text│   │
  │ │
└┴─┴───┴──┴─┘

That one says how to convert between input markup and output
markup. The conversion Lisp snippet I keep in the database
`markupconversions_emacslisp' as that way no need to change the
source, it remains user's option.

Each publishing object references the web `area`foreign table, meaning
domain. Each `area' references one main template, but each object can
reference separate template. And markup conversion may need separate
template before everything is expanded in the object's or area's
template. 

Now we come back to question:

> What options I have to format the output so that I can export it to
> pdf via pandoc and context?

Maybe the above described design pattern may help you figure out how
to solve your problem.

- You can reference publishing objects to foreign 

Re: [RFC PATCH] Re: [bug] Macro in citation not expanded

2022-11-12 Thread Ihor Radchenko
M. ‘quintus’ Gülker  writes:

> thank for the WIP patch. I have applied it to current main
> (f83e45526b5ec4627d601673be3680e2dece1b33), but when I now export the
> document described in the OP to LaTeX, the macro is erased entirely. I
> receive:
>
> 1 Doe, Nothing important, 2. Aufl. (2022), 55, zum vorgenannten Argument 
> aaO.

This is to be expected. That's one of the issues we are discussing in
https://orgmode.org/list/87zgd87di9.fsf@localhost. citeproc.el (external
library) requires some trickery to handle formatting correctly, and we
need to find a way to pass all possible Org markup yet making use of the
necessary markup transformations dictated by CSL styles.

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



Re: [BUG] LaTeX export in non-English language [9.6-pre (release_9.5.5-1087-g620a96.dirty @ /home/yantar92/.emacs.d/straight/build/org/)]

2022-11-12 Thread Ihor Radchenko
Juan Manuel Macías  writes:

> I start by comment the error that you get when compiling. Is it possible
> that you have an incomplete TeX Live installation? Distro repositories
> usually offer TeX live in a modular way. On Arch Linux and its
> derivatives, the texlive-lang and texlive-lang-extra packages should be
> installed for non-Latin language support (this would include the luabidi
> package). In the Ubuntu/Debian family I think the required package is
> called texlive-lang-arabic. Anyway, I recommend installing TeX live in
> its entirety (the drawback is that it takes up more space). I think that
> in Ubuntu and family the meta-package is called texlive-full. Another
> possibility that I recommend, especially on distros that package older
> versions of TeX live, is to install the official TeX live distribution:
> https://tug.org/texlive/acquire.html (this has the advantage of being
> able to update everything more regularly via TeX live's own package
> manager). If you want to keep the official packages of your distro, but
> also want to try new things, it is also possible to create a portable
> installation of TeX live on a pen drive:
> https://tug.org/texlive/archive/portable-anchor.html

Thanks for the detailed explanation! We may put something similar (or
shorter) into the manual (maybe as a footnote).

On Gentoo, the required package is dev-texlive/texlive-langarabic.

However, installing the package is not yet enough!

With the same file, I am getting missing font errors:

Setting \if@calendar@hebrew
(/usr/share/texmf-dist/tex/latex/polyglossia/babel-hebrewalph.def)) (./bug.aux

! Package polyglossia Error: The current latin font  does not contain the "Hebr
ew" script!
(polyglossia)Please define \hebrewfont with \newfontfamily comm
and.

See the polyglossia package documentation for explanation.
Type  H   for immediate help.
 ...  
  
l.19 \selectlanguage *{hebrew}

) (/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
(/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
(/usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texmf-dist/tex/latex/refcount/refcount.sty)
(/usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty))
(./bug.out) (./bug.out)

! Package polyglossia Error: The current latin font  does not contain the "Hebr
ew" script!
(polyglossia)Please define \hebrewfont with \newfontfamily comm
and.

See the polyglossia package documentation for explanation.
Type  H   for immediate help.
 ...  
  
l.25 \begin{document}
   
(/usr/share/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/share/texmf-dist/tex/latex/amsfonts/umsb.fd)

! Package polyglossia Error: The current latin font  does not contain the "Hebr
ew" script!
(polyglossia)Please define \hebrewfont with \newfontfamily comm
and.

See the polyglossia package documentation for explanation.
Type  H   for immediate help.
 ...  
  
l.28 \tableofcontents
   
(./bug.toc

! Package polyglossia Error: The current latin font  does not contain the "Hebr
ew" script!
(polyglossia)Please define \hebrewfont with \newfontfamily comm
and.

See the polyglossia package documentation for explanation.
Type  H   for immediate help.
 ...  
  
l.1 \selectlanguage *{hebrew}
   
)

! Package polyglossia Error: The current latin font  does not contain the "Hebr
ew" script!
(polyglossia)Please define \hebrewfont with \newfontfamily comm
and.

See the polyglossia package documentation for explanation.
Type  H   for immediate help.
 ...  
  
l.32 \end{equation}
 

! Package polyglossia Error: The current latin font  does not contain the "Hebr
ew" script!
(polyglossia)Please define \hebrewfont with \newfontfamily comm
and.

See the polyglossia package documentation for explanation.
Type  H   for immediate help.
 ...  
  
l.34 \begin{verbatim}
   

! Package polyglossia Error: The current latin font  does not contain the "Hebr
ew" script!
(polyglossia)Please define \hebrewfont with \newfontfamily comm
and.

See the polyglossia package documentation for explanation.
Type  H   for immediate 

Re: [BUG] org-babel-comint-with-output: incorrect prompt detection [9.6-pre]

2022-11-12 Thread Ihor Radchenko
Bruno Barbier  writes:

>> We must also make `comint-prompt-regexp' more precise to avoid "lude> "
>> being detected as a prompt.
> If we need to do that for ob-haskell (when relying on the interpreter),
> the cleanest way might be to redefine the set of possible prompts. ghci
> is quite flexible:
>   GHCi, version 8.10.7
>
>:set prompt set the prompt used in GHCi
>:set prompt-contset the continuation prompt used in GHCi
>:set prompt-function  set the function to handle the prompt
>:set prompt-cont-function 
>set the function to handle the continuation 
> prompt

This is the approach I used in ob-shell. See
`org-babel-shell-set-prompt-commands' and its usage in the code.

> Do we have common design principles and/or generic tests that all
> languages based on org-babel/ob-comint must pass ?

No tests. (I am not sure what can be tested generically).

The common design is ob-comint.el API and ob-core.el API.

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



Re: Tutorials on creating pdfs with org-babel and sqlite

2022-11-12 Thread Vikas Rawal
> interested in publishing use cases. Has anybody wrote a book or a report
> with org-mode, org-babel and sqlite?

Many years ago, I wrote this book with orgmode: 
https://www.fao.org/3/a-i4921e.pdf

The source files are here: https://github.com/vikasrawal/endingmalnutrition

Much has changed in orgmode since then though.

Over the years, all these documents have also been published using orgmode: 
http://indianstatistics.org/ssermonographs.html

The source files for most of these are not public. But if you are looking for a 
recent sample, I would be happy to share it.

Vikas



Re: Tutorials on creating pdfs with org-babel and sqlite

2022-11-12 Thread Vikas Rawal
> interested in publishing use cases. Has anybody wrote a book or a report
> with org-mode, org-babel and sqlite?

Many years ago, I wrote this book with orgmode: 
https://www.fao.org/3/a-i4921e.pdf

The source files are here: https://github.com/vikasrawal/endingmalnutrition

Much has changed in orgmode since then though.

Over the years, all these documents have also been published using orgmode: 
http://indianstatistics.org/ssermonographs.html

The source files for most of these are not public. But if you are looking for a 
recent sample, I would be happy to share it.

Vikas



Re: Tutorials on creating pdfs with org-babel and sqlite

2022-11-12 Thread Christopher M. Miles

You can check out 
http://www.howardism.org/Technical/Emacs/literate-database.html

This is very great.

Jan Ulrich Hasecke  writes:

> [[PGP Signed Part:Undecided]]
> Dear all,
>
> I am doing my first steps to do some database publishing with org-babel
> and sqlite. So far quite successful, but I am still very new to this, so
> I would appreciate if you can recommend a tutorial on this. I am mostly
> interested in publishing use cases. Has anybody wrote a book or a report
> with org-mode, org-babel and sqlite? What options I have to format the
> output so that I can export it to pdf via pandoc and context?
>
> TIA
> juh
>
>
>
> [[End of PGP Signed Part]]


-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


signature.asc
Description: PGP signature


Re: [PATCH] ob-java: Define the list of all supported header arguments

2022-11-12 Thread Rudolf Adamkovič
Ihor Radchenko  writes:

>> In the linked mail, I discuss the problem starting from this test,
>> tracking it down to the problematic line of code.  Do you want me to
>> look into something further?
>
> Yes, ideally, we need to know which exact test case fails. But please
> open a new thread as it will be unrelated to java discussed herein.

Now you lost me.  :)

The linked mail has all the information already has its own thread.

Rudy
-- 
"Simplicity is complexity resolved."
-- Constantin Brâncuși, 1876-1957

Rudolf Adamkovič  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia



Tutorials on creating pdfs with org-babel and sqlite

2022-11-12 Thread Jan Ulrich Hasecke
Dear all,

I am doing my first steps to do some database publishing with org-babel
and sqlite. So far quite successful, but I am still very new to this, so
I would appreciate if you can recommend a tutorial on this. I am mostly
interested in publishing use cases. Has anybody wrote a book or a report
with org-mode, org-babel and sqlite? What options I have to format the
output so that I can export it to pdf via pandoc and context?

TIA
juh





signature.asc
Description: PGP signature


Re: Help with a (query) replacement

2022-11-12 Thread Juan Manuel Macías
Juan Manuel Macías writes:

> In the case of PDFs, I would use pdftotext. It converts the PDF to plain
> text and (in theory) removes hyphens from the PDF after conversion. The
> resulting plain text is somewhat ugly (page numbers and other elements
> are preserved), but if you just want to copy/paste text, I think it's
> enough.

And if you don't want to mess with the command line, you can also use
calibre here to convert from PDF to plain text or even Epub (the latter
is better because Epub is a tagged format and then you can have more
control over how to process that, for example by converting it to Org or
Markdown with pandoc). Calibre will do its best to preserve the
structure of the PDF, removing hyphens and other unnecessary elements.
But keep in mind that this process is largely heuristic, and the
conversion is not 100% perfect. However, it works acceptably well.

https://calibre-ebook.com/about



Re: Help with a (query) replacement

2022-11-12 Thread Juan Manuel Macías
Ypo writes:

> Thanks, Juan Manuel.
>
> I normally study using PDF books. Their typography is like
> "hardcoded", so a post-processing using Orgmode is needed, I think.

If it's a PDF then forget what I told you about pandoc, because here
pandoc would have nothing to do. I thought you were referring to files
in epub format, sorry.

In the case of PDFs, I would use pdftotext. It converts the PDF to plain
text and (in theory) removes hyphens from the PDF after conversion. The
resulting plain text is somewhat ugly (page numbers and other elements
are preserved), but if you just want to copy/paste text, I think it's
enough.

The command:

pdftotext my-file.pdf

https://man.archlinux.org/man/pdftotext.1.en

https://en.wikipedia.org/wiki/Pdftotext



Re: Help with a (query) replacement

2022-11-12 Thread Alain . Cochard
Ypo writes on Sat 12 Nov 2022 15:42:
 > Hi
 > 
 > I am copy-pasting e-books into org-mode to read and study them.
 > 
 > Usually, words come hyphenated, like "ato- mized", that I wanted to 
 > transform into "atomized".
 > 
 > I am trying with query replace, but I am starting to think that it is 
 > not the correct tool for this job.
 > I tried "query-replace [a-z]-" but I don't know how to exclude the 
 > letter before the "-".

I don't really understand the thing with e-books but as for
transforming "ato- mized" (or "ato-mized") into "atomized", how about
something like

query-replace-regex

\([a-z]\)-[[:blank:]]*\([a-z]\)

\1\2


-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France | [ slot available for rent ]




Re: Help with a (query) replacement

2022-11-12 Thread Ypo
ummm, so you copy-paste from nov.el into an org buffer and then format 
would be maintained... interesting.


Thanks

El 12/11/2022 a las 16:23, Juan Manuel Macías escribió:

Juan Manuel Macías writes:


I think it will be more practical for you to use pandoc:

With this command you can convert an epub format to org:

pandoc my-epub.epub -o my.epub.org

(https://pandoc.org)

You can also install calibre and convert your epubs to plain text from
there.

PS: And you can also open epubs in Emacs with the nov.el package
(https://github.com/wasamasa/nov.el) and copy whatever text you want
from there.

Re: Help with a (query) replacement

2022-11-12 Thread Juan Manuel Macías
Juan Manuel Macías writes:

> I think it will be more practical for you to use pandoc:
>
> With this command you can convert an epub format to org:
>
> pandoc my-epub.epub -o my.epub.org
>
> (https://pandoc.org)
>
> You can also install calibre and convert your epubs to plain text from
> there.

PS: And you can also open epubs in Emacs with the nov.el package
(https://github.com/wasamasa/nov.el) and copy whatever text you want
from there.



Re: [BUG] Null character in block/drawer regexps (but not in org-element parser)

2022-11-12 Thread Bastien Guerry
Hi Ihor,

Ihor Radchenko  writes:

> So, we should probably remove zero-width shenanigans from the code.

+1.

> Unless I miss something.
>
> Bastien, maybe you recall something about presence of null character in
> regexs?

No, I don't.

> P.S. If we decide to remove the null character, I'd prefer to do it
> after the release: this change may affect a lot of code and the bug is
> not that major to risk breakage.

Yes, that's more prudent.

-- 
 Bastien



Re: Help with a (query) replacement

2022-11-12 Thread Ypo

Thanks, Juan Manuel.

I normally study using PDF books. Their typography is like "hardcoded", 
so a post-processing using Orgmode is needed, I think.


El 12/11/2022 a las 16:10, Juan Manuel Macías escribió:

Ypo writes:


Hi

I am copy-pasting e-books into org-mode to read and study them.

Usually, words come hyphenated, like "ato- mized", that I wanted to
transform into "atomized".

I am trying with query replace, but I am starting to think that it is
not the correct tool for this job.
I tried "query-replace [a-z]-" but I don't know how to exclude the
letter before the "-".

What would you advise?

I think it will be more practical for you to use pandoc:

With this command you can convert an epub format to org:

pandoc my-epub.epub -o my.epub.org

(https://pandoc.org)

You can also install calibre and convert your epubs to plain text from
there.

Best regards,

Juan Manuel

Re: Help with a (query) replacement

2022-11-12 Thread Juan Manuel Macías
Ypo writes:

> Hi
>
> I am copy-pasting e-books into org-mode to read and study them. 
>
> Usually, words come hyphenated, like "ato- mized", that I wanted to
> transform into "atomized". 
>
> I am trying with query replace, but I am starting to think that it is
> not the correct tool for this job. 
> I tried "query-replace [a-z]-" but I don't know how to exclude the
> letter before the "-".
>
> What would you advise?

I think it will be more practical for you to use pandoc:

With this command you can convert an epub format to org:

pandoc my-epub.epub -o my.epub.org

(https://pandoc.org)

You can also install calibre and convert your epubs to plain text from
there.

Best regards,

Juan Manuel 



Help with a (query) replacement

2022-11-12 Thread Ypo

Hi

I am copy-pasting e-books into org-mode to read and study them.

Usually, words come hyphenated, like "ato- mized", that I wanted to 
transform into "atomized".


I am trying with query replace, but I am starting to think that it is 
not the correct tool for this job.
I tried "query-replace [a-z]-" but I don't know how to exclude the 
letter before the "-".


What would you advise?


Best regards


Re: Suggestion with footnotes when toggling headlines into plain lists

2022-11-12 Thread Ypo

elpa-devel did it!! (non installed git)

Thanks, working!


El 12/11/2022 a las 13:46, Ihor Radchenko escribió:

Ypo  writes:


Is it easy for a user to test if it works?

If you have git, you can clone Org repo (see
https://git.savannah.gnu.org/cgit/emacs/org-mode.git) and then run

   make repro

from inside the Org repo folder. It will open a clean Emacs instance
configured to use the Org version from the repository.

Alternatively, you can add devel package archives ELPA devel. See
https://protesilaos.com/codelog/2022-05-13-emacs-elpa-devel/


Re: [BUG] phantom newlines while moving headings [9.6-pre ( @ /home/chomwitt/.config/emacs/elpa/org-9.6pre0.20221110.85807/)]

2022-11-12 Thread Ihor Radchenko
Alexandros Prekates  writes:

> On Fri, 11 Nov 2022 02:28:27 +
> Ihor Radchenko  wrote:
>
> I found a more minimal issue-reproducer
> (i add $ because i used M-x whitespace mode . 
> Also @ is point) ;

Thanks!
Unfortunately, I am unable to reproduce.

I started from the latest main branch of Org
(https://git.savannah.gnu.org/cgit/emacs/org-mode.git/) running
  make repro

Then, opening a new org file and following the steps.

> Move point after headline d --
>
>
> * a$
> * b$
> * c@$
> * d$

Note that I moved point _before_ headline d as indicated by @, not like
you described in words.

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



Re: Formatting in citation locator

2022-11-12 Thread Ihor Radchenko
M. ‘quintus’ Gülker  writes:

> Am Mittwoch, dem 26. Oktober 2022 schrieb András Simonyi:
>> I've ended up making the necessary changes in citeproc and also posted
>> a patch here which should enable formatting in locators. Marvin, I'd
>> appreciate it if you could test it.
>
> I have updated citeproc-el to 69536c8776dea383951538fd197333bee766d7c7
> and org-mode to Org mode version 9.6-pre (release_9.5-1271-gf83e45 @
> /home/quintus/.emacs.d/org-mode/lisp/). However, using the material
> provided in the OP, I still do not get a formatted footnote, even with
> the zero-width space. The outcome still is

We are still discussing the aforementioned patch.
It is not yet merged.
See 
https://list.orgmode.org/orgmode/CAOWRwxDdi8L38+=eqXtXrub3vd5dt4RwnKkGw=x48f4+tna...@mail.gmail.com/

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



Re: [PATCH] ob-java: Define the list of all supported header arguments

2022-11-12 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> Ihor Radchenko  writes:
>
>> Could you narrow down the particular test condition which is failing?
>> Is it similar to previously discussed cases where MacOS sorting is not
>> consistent with Linux?
>
> In the linked mail, I discuss the problem starting from this test,
> tracking it down to the problematic line of code.  Do you want me to
> look into something further?

Yes, ideally, we need to know which exact test case fails. But please
open a new thread as it will be unrelated to java discussed herein.

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



[BUG] Null character in block/drawer regexps (but not in org-element parser) (was: BUG? Null character prevents org-babel-tangle from tangling a block)

2022-11-12 Thread Ihor Radchenko
Tommy Kelly  writes:

> The attached .org file describes a simple test to demonstrate the problem.
> I've also attached a .zip version, in case the NULL character in the test
> doesn't survive the gmailing process. (The null is In BLOCK 2, two
> characters after the '3' in ';; line3' If it's there, you should see the
> usual ^@ (as a single character) placeholder.

Confirmed.

This is because `org-babel-src-block-regexp' explicitly prohibits null
characters in the body. Similar situation is with `org-block-regexp',
`org-clock-drawer-re', `org-latex-regexps', and a number of other places
in Org sources.

At least for src blocks, prohibiting null character is inconsistent with
org-element parser. I am not very sure what is the rationale behind now
allowing null character. I see no clues in git history and a single
possibly relevant comment in `org-latex-regexps':

  ;; \000 in the following regexp is needed for org-inside-LaTeX-fragment-p

However, `org-inside-LaTeX-fragment-p' itself is outdated and needs
to be replaced with org-element machinery.

So, we should probably remove zero-width shenanigans from the code.

Unless I miss something.

Bastien, maybe you recall something about presence of null character in
regexs?

P.S. If we decide to remove the null character, I'd prefer to do it
after the release: this change may affect a lot of code and the bug is
not that major to risk breakage.

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



Re: Suggestion with footnotes when toggling headlines into plain lists

2022-11-12 Thread Ihor Radchenko
Ypo  writes:

> Is it easy for a user to test if it works?

If you have git, you can clone Org repo (see
https://git.savannah.gnu.org/cgit/emacs/org-mode.git) and then run

  make repro

from inside the Org repo folder. It will open a clean Emacs instance
configured to use the Org version from the repository.

Alternatively, you can add devel package archives ELPA devel. See
https://protesilaos.com/codelog/2022-05-13-emacs-elpa-devel/

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



Re: [BUG] Incorrect background color [9.5.4 (release_9.5.4-3-g6dc785 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]

2022-11-12 Thread Jeremie Juste


 Hello Ihor,

 On Sunday, 16 Oct 2022 at 10:44, Ihor Radchenko wrote:

 >>
 >> Confirmed.
 >>
 >> WORG page is not accurate here. The truth is that ob-R.el does not provide
 >> any defaults for header args. Instead, R defaults are used. I suspect
 >> that defaults for background color changed in R since the WORG page has
 >> been written.
 >
 > Jeremie, could you please take a look?

 Yes. Thanks for confirming the issue. I confirm that the white backgroud is 
the default and is R default.
 I could not trace back any recent change in R. So I suspect white was always 
the default.
 But I could well be wrong here.

 Note also that R parameters always takes precedence on the org-mode ones. As 
in the example below.

 #+BEGIN_SRC R :results graphics file :file test.svg :outputs both bg red
  par(bg="blue")
  plot(1:10, type = "n")
 #+end_src

In opinion the actual org parameters are the right ones. But I'm open to 
suggestions.
Thanks also for updating the WORG page.

Best regards,
Jeremie




Re: [BUG] Incorrect background color [9.5.4 (release_9.5.4-3-g6dc785 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]

2022-11-12 Thread Jeremie Juste


 On Sunday, 16 Oct 2022 at 10:44, Ihor Radchenko wrote:

 >>
 >> Confirmed.
 >>
 >> WORG page is not accurate here. The truth is that ob-R.el does not provide
 >> any defaults for header args. Instead, R defaults are used. I suspect
 >> that defaults for background color changed in R since the WORG page has
 >> been written.
 >
 > Jeremie, could you please take a look?

 Yes. Thanks for confirming the issue. I confirm that the white backgroud is 
the default and is R default.
 I could not trace back any recent change in R. So I suspect white was always 
the default.
 But I could well be wrong here.

 Note also that R parameters always takes precedence on the org-mode ones. As 
in the example below.

 #+BEGIN_SRC R :results graphics file :file test.svg :outputs both bg red
  par(bg="blue")
  plot(1:10, type = "n")
#+end_src

In opinion the actual org parameters are the right ones. But I'm open to 
suggestions.
Thanks also for updating the WORG page.

Best regards,
Jeremie




org-clock-report on headings and subheadings or for the whole file?

2022-11-12 Thread Uwe Brauer


Hi 

I just started to use logbooks and clocks. One of my org files looks
like this

* TODO Condition about symmetry  
  :LOGBOOK:
  CLOCK: [2022-11-11 16:40]--[2022-11-11 17:32] =>  0:52
  CLOCK: [2022-11-11 13:58]--[2022-11-11 14:05] =>  0:07
  CLOCK: [2022-11-11 11:22]--[2022-11-11 11:27] =>  0:05
  CLOCK: [2022-11-11 09:55]--[2022-11-11 11:21] =>  1:26
  :END:


* TODO $A^0$ condition
  :LOGBOOK:
  CLOCK: [2022-11-11 17:40]--[2022-11-11 17:43] =>  0:03
  :END:

Now org-clock-report inserts a table for the lookbook of each heading.


1. Either I can make one of the heading a subheading, and then I
   would like to now how to make a report for heading and subheading.

2. Or I leave it as it is and want a report for every heading.

I am aware  of 
https://emacs.stackexchange.com/questions/41393/merging-clock-logs-together-in-org-mode

But prefer not to touch the structure of the file.

Any idea how to insert a table for all logbooks? 

Thanks and regards

Uwe Brauer



-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/