[fr] allow overriding the likely unintended consequence of org-export-with-tasks

2023-03-03 Thread Samuel Wales
when org-export-with-tasks is set to nil, tasks will not be exported,
but non-task entries will.

you can make non-exported todo items and notes about your exported text.

* REF this is the top level of the subtree
*** NOTE this is just a note and should not be exported
*** but this i want to export of course

you can specify other values for the variable that have a similar
effect.  let's use nil for this example.

this is highly useful, but in my case, there is an unintended
consequence.   the REF todo kw prevents anything from being exported,
for subtree or region export.  not exporting is not a useful behavior.
i would prefer the top level of the subtree to be exported in all
cases, because i have asked org to export.  it does not matter what kw
it is set to or what the variable is set to.

technically, at least for subtree export, org is doing what the
variable says on the tin, but it is not useful here.

therefore, in order to work around the lack of exporting, i.e. the
unintended consequence, you have to temporarily remove the todo kw,
export, then restore kw.  even exporting a region starting after the
REF kw does not work.  should it?

regardless of the answer, it would be great if it were /possible/ to
export the top level despite its having a todo kw.



PATCH] orgcard.tex: Fix `org-force-cycle-archived' binding

2023-03-03 Thread Max Nikulin

Hi,

During discussion in the following thread I realized that the refcard 
was not updated when `org-force-cycle-archived' binding was changed from 
C-TAB to C-c C- to avoid conflict with switching of tabs.


Karl Fogel to emacs-orgmode. PROPOSAL: Bind `org-fold-hide-subtree' by 
default in Org Mode. Wed, 22 Feb 2023 01:29:12 -0600. 
https://list.orgmode.org/87k00aw43b@red-bean.comFrom 6ad5ebf4c4a8c1546bbef1e9319f3b65c0b250b5 Mon Sep 17 00:00:00 2001
From: Max Nikulin 
Date: Sat, 4 Mar 2023 12:38:18 +0700
Subject: [PATCH] orgcard.tex: Fix `org-force-cycle-archived' binding

* doc/orgcard.tex (Capture): Fix `org-force-cycle-archived' binding.

Changed in the release 9.4 to avoid conflict with tab-bar.el, see

9092c289b 2020-06-01 14:39:28 +0200 Bastien: Bind `org-force-cycle-archived' to C-c C-TAB
---
 doc/orgcard.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/orgcard.tex b/doc/orgcard.tex
index 3fafacf25..13e8b8d7a 100644
--- a/doc/orgcard.tex
+++ b/doc/orgcard.tex
@@ -324,7 +324,7 @@
 \key{archive subtree using the default command}{C-c C-x C-a}
 \key{move subtree to archive file}{C-c C-x C-s}
 \key{toggle ARCHIVE tag / to ARCHIVE sibling}{C-c C-x a/A}
-\key{force cycling of an ARCHIVEd tree}{C-TAB}
+\key{force cycling of an ARCHIVEd tree}{C-c C-TAB}
 
 \section{Filtering and Sparse Trees}
 
-- 
2.25.1



Re: [PATCH] org-clock: Add a trailing space to the mode line string

2023-03-03 Thread Max Nikulin

On 04/03/2023 04:03, Rudolf Adamkovič wrote:

+(ert-deftest test-org-clock/mode-line ()
+  "Test mode line string ends in a space.
+
+\"Elements that are added to [the mode line] should normally end
+in a space (to ensure that consecutive 'global-mode-string'
+elements display properly)\" per Emacs manual, Section 24.4.4
+Variables Used in the Mode Line."


nitpick

(info "(elisp) Documentation Tips")
https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html


To make a hyperlink to Info documentation, write the single-quoted name
of the Info node (or anchor), preceded by ‘info node’, ‘Info node’,
‘info anchor’ or ‘Info anchor’. The Info file name defaults to ‘emacs’.
For example,

See Info node `Font Lock' and Info node `(elisp)Font Lock Basics'.






Re: [PATCH] org-clock: Add a trailing space to the mode line string

2023-03-03 Thread Rudolf Adamkovič
Ihor Radchenko  writes:

> Rudolf, I am OK with the patch, but could you please add a comment
> explaining why trailing space, so that people do not wonder in future?

Please see the attached patch, revised as follows:

- no leading space in the mode line element to make it completely correct
- a clear explanation (with a citation) to avoid pointless discussions
- two new automated tests to avoid future regressions
- a clearer commit message

Rudy
>From 29aca1a54a68aae1f2b38c3a7885f7ee2f155b24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= 
Date: Thu, 2 Mar 2023 15:06:19 +0100
Subject: [PATCH] org-clock: Add a trailing space to the mode line string

* lisp/org-clock.el (org-clock-get-clock-string): End the mode line
element in a space, instead of beginning with space, to make it play
well with other mode line strings, which typically end a space.  For
reference, see the mode line string of the Display Time mode.
---
 lisp/org-clock.el  |  4 ++--
 testing/lisp/test-org-clock.el | 35 ++
 2 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index d46458536..a300df8ff 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -728,9 +728,9 @@ If not, show simply the clocked time like 01:50."
 'org-mode-line-clock-overrun
 			  'org-mode-line-clock)))
 	   (effort-str (org-duration-from-minutes effort-in-minutes)))
-	  (format (propertize " [%s/%s] (%s)" 'face 'org-mode-line-clock)
+	  (format (propertize "[%s/%s] (%s) " 'face 'org-mode-line-clock)
 		  work-done-str effort-str org-clock-heading))
-  (format (propertize " [%s] (%s)" 'face 'org-mode-line-clock)
+  (format (propertize "[%s] (%s) " 'face 'org-mode-line-clock)
 	  (org-duration-from-minutes clocked-time)
 	  org-clock-heading
 
diff --git a/testing/lisp/test-org-clock.el b/testing/lisp/test-org-clock.el
index f732e471a..a1ca9e25b 100644
--- a/testing/lisp/test-org-clock.el
+++ b/testing/lisp/test-org-clock.el
@@ -1276,5 +1276,40 @@ CLOCK: [2012-03-29 Thu 16:00]--[2012-03-29 Thu 17:00] =>  1:00"
   (test-org-clock-clocktable-contents
(format ":hidefiles t :scope (lambda () (list %S))" the-file
 
+;;; Mode line
+
+(ert-deftest test-org-clock/mode-line ()
+  "Test mode line string ends in a space.
+
+\"Elements that are added to [the mode line] should normally end
+in a space (to ensure that consecutive 'global-mode-string'
+elements display properly)\" per Emacs manual, Section 24.4.4
+Variables Used in the Mode Line."
+  ;; Test the variant without effort.
+  (should
+   (equal
+" [0:00] (Heading)  "
+(org-test-with-temp-text
+"* Heading"
+  (org-clock-in)
+  (prog1 (concat " "
+ (org-clock-get-clock-string)
+ " ")
+(org-clock-out)
+  ;; Test the variant with effort.
+  (should
+   (equal
+" [0:00/1:00] (Heading)  "
+(org-test-with-temp-text
+"* Heading
+:PROPERTIES:
+:EFFORT: 1h
+:END:"
+  (org-clock-in)
+  (prog1 (concat " "
+ (org-clock-get-clock-string)
+ " ")
+(org-clock-out))
+
 (provide 'test-org-clock)
 ;;; test-org-clock.el end here
-- 
2.39.2

-- 
"One can begin to reason only when a clear picture has been formed in
the imagination."
-- Walter Warwick Sawyer, Mathematician's Delight, 1943

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


Re: [BUG] Effort range format broken [9.5.5 (release_9.5.5 @ /usr/local/share/emacs/28.2/lisp/org/)]

2023-03-03 Thread Derek Chen-Becker
Confirmed, I upgraded to 9.6.1 and it works for me. Thanks!

On Fri, Mar 3, 2023 at 9:03 AM Ihor Radchenko  wrote:

> Derek Chen-Becker  writes:
>
> > Here is the minimal org file to repro:
> >
> > 
> > #+COLUMNS: %ITEM(Task) %Effort(Estimate){est+}
> >
> > * Table
> > #+BEGIN: columnview :id input
> >
> > #+END
> > ...
>
> With point at #+BEGIN, pressing C-c C-c works just fine for me.
> Using Org 9.6.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 
>


-- 
+---+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+


Re: [PATCH] Async evaluation in ob-shell

2023-03-03 Thread Matt

  On Fri, 03 Mar 2023 09:52:09 -0500  Ihor Radchenko  wrote --- 
 > I tried the patch, and I am getting failed tests:
 > 
 > 1 unexpected results:
 >FAILED  test-ob-shell/session-async-evaluation  ((should (string= ": 1\n: 
 > 2\n" (buffer-substring-no-properties (point) (point-max :form (string= 
 > ": 1\n: 2\n" ": 1\n: 2\n: org_babel_sh_prompt>\n") :value nil :explanation 
 > (arrays-of-different-length 8 31 ": 1\n: 2\n" ": 1\n: 2\n: 
 > org_babel_sh_prompt>\n" first-mismatch-at 8))

Sorry for missing that.  The issue is that when I replaced 
`org-babel-sh-prompt' with `comint-prompt-regexp', the regexp no longer matches 
the output and grabs the next prompt.  It looks like the reason is 
`comint-prompt-regexp' is set to "^org_babel_sh_prompt>  *" (with two spaces 
between the '>' and '*').  Attached is a revised patch which removes one of the 
spaces by changing how `org-babel-sh-initiate-session' sets the 
`comint-prompt-regexp'.  Another place this could be done is in the defvar for 
`org-babel-sh-prompt' itself (which ends with a space).  However, I think it's 
customary to leave a trailing space for prompts?

 > > +  (let ((uuid (org-id-uuid)))
 > 
 > Do you need to use `org-id-uuid' here? ob-python directly uses `md5'.
 > If you still prefer org-id-uuid, we probably need to move it to
 > org-macs.el

I just need a random string.  `md5' would work for that.  However, might it be 
better to update ob-R and ob-python to use `org-id-uuid'?  Both of those 
manually declare the randomness.  It's conceivable that someone may delete or 
mistype the number (1), resulting in a lower entropy.  An md5 is also 
not a uuid, strictly speaking.  Of course, the chance of collision is still 
basically zero and the cost of collision about the same.  Using `org-id-uuid' 
would only provide a consistent way to do things.

0003-ob-shell-Add-async-evaluation.patch
Description: Binary data


Re: ox-beamer/latex questions

2023-03-03 Thread Leo Butler
On Fri, Mar 03 2023, Ihor Radchenko  wrote:

> Leo Butler  writes:
>
>>> This is because
>>>  *** DONE :B_block:
>>> is actually parsed as a heading with DONE todo keyword and title
>>> ":B_block:". Tag is not recognized.
>>>
>>> We probably need to fix it, though I am not sure. It is one of the edge
>>> cases about Org parser.
>>
>> Ok. I have become addicted to using TODO tags to organize composition of
>> beamer slides. I often have untitled blocks in the slides, in order to
>> control the pacing of the presentation.
>
> I understand. Just need to figure out the best way to alter the syntax.
> We should be careful with such things.

Understood.

>
>>> For cookies, just use stat:nil in OPTIONS. See "13.2 Export Settings"
>>> section of the manual.
>>
>> Thanks for that. I am not sure how I missed it.
>>
>> Anyhow, it does not work correctly for subtree export (or I am not
>> understanding something). The title still includes the cookie. See the
>> attached.
>
> That was a rather interesting edge case that triggered a bug in
> org-element.el.
>
> Fixed, on main. It was a core function, so I did not risk bugfix.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f93cc661c

Thanks, Ihor.

Leo


Re: Multiple noweb-ref

2023-03-03 Thread Ihor Radchenko
Théo Maxime Tyburn  writes:

>> + is a bit awkward.
>> Space would be more logical as separator.
>> Though I am wondering if people are using noweb reference names with
>> spaces in the wild.
>
> Might be. So maybe we could use another non-alphabetical character? What
> about "|" ?

I do not feel like being creative with characters here is a good idea.
I think that using multiple :noweb-ref+ will be more reliable and surely
will not break any existing configs.

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



Re: ox-rst still working?

2023-03-03 Thread Ihor Radchenko
Angel de Vicente  writes:

> Any idea why this could be?

No idea. A generic suggestion is to try finding out what can cause it in
your config. https://github.com/Malabarba/elisp-bug-hunter might be
helpful.

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



Re: [BUG] No space after footnote with org-export-with-footnotes set to nil [9.6.1 ( @ /Users/test/.emacs.d/elpa/28.0/develop/org-9.6.1/)]

2023-03-03 Thread Max Nikulin

On 03/03/2023 22:47, Ihor Radchenko wrote:

Max Nikulin writes:


Self-containing example:

 8< 
#+options: f:nil

Pellentesque dapibus suscipit ligula.[fn::1 ftnt]  Donec posuere augue
in quam.
 >8 


This is because spaces after Org syntax objects are considered a part of
those syntax objects.  So, excluding footnote automatically means
excluding spaces after.


In my opinion, the filter removing footnotes should transfer afterspaces 
to preceding objects.





Re: Links to external targets with (or despite) org-ref

2023-03-03 Thread Ihor Radchenko
John Kitchin  writes:

> If anyone knows how to use store functions that do not clobber the build in
> ones, I would be happy to update org-ref so you can use all the link store
> options.

This part of Org code has inconsistencies between the docstrings and the
implementation. https://orgmode.org/list/87tu4tppb6.fsf@localhost

I am currently unsure what will be the best way to approach this
problem. Ideally, someone with more experience creating and using custom
links could jump in and propose some solid API we should follow for Org.

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



Re: (org-icalendar-combine-agenda-files t) prints byte code

2023-03-03 Thread Ihor Radchenko
Robert Jäschke  writes:

>>> When I run this on the command line it prints (if I understand it
>>> correctly) Emacs byte code: #[514 "\302!\303!\304=\205B.
>>> Running it non-asynchronously just prints nil.
>> Just add an extra --eval "t" or something along that lines.
>
> Do you mean
>
> emacsclient --eval "(org-icalendar-combine-agenda-files t)" --eval "t"
>
> ?
>
> This still results in "#[514 "\302!\303!\304=\205B" being printed on STDOUT.

No idea then.

> Is there some way to figure out what's happening and why? (I'd really 
> like to understand.)

You can try debugging to figure out at which place in the code the
output is triggered.

#[...] structure looks like a byte-compiled function object.

> Another issue is that the above call works in a shell but not when 
> called by cron (both result in the strange output but with cron no file 
> is created). I am not sure if that's relevant. I'd like to fix both 
> issues but first things first. ;-)

It would help if you create a reproducer, so that we can test things on
our side.

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



Re: [BUG] Effort range format broken [9.5.5 (release_9.5.5 @ /usr/local/share/emacs/28.2/lisp/org/)]

2023-03-03 Thread Ihor Radchenko
Derek Chen-Becker  writes:

> Here is the minimal org file to repro:
>
> 
> #+COLUMNS: %ITEM(Task) %Effort(Estimate){est+}
>
> * Table
> #+BEGIN: columnview :id input
>
> #+END
> ...

With point at #+BEGIN, pressing C-c C-c works just fine for me.
Using Org 9.6.

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



Re: [PATCH] org-clock: Add a trailing space to the mode line string

2023-03-03 Thread Ihor Radchenko
Max Nikulin  writes:

> On 02/03/2023 21:14, Rudolf Adamkovič wrote:
>> +++ b/lisp/org-clock.el
>> @@ -728,9 +728,9 @@ If not, show simply the clocked time like 01:50."
>>  'org-mode-line-clock-overrun
>>'org-mode-line-clock)))
>> (effort-str (org-duration-from-minutes effort-in-minutes)))
>> -  (format (propertize " [%s/%s] (%s)" 'face 'org-mode-line-clock)
>> +  (format (propertize " [%s/%s] (%s) " 'face 'org-mode-line-clock)
>
> Previous discussion of spaces in mode-line:
>
> Ihor Radchenko to emacs-orgmode… Re: Weird gap in agenda mode-line. Sun, 
> 14 Nov 2021 15:52:31 +0800. 
> https://list.orgmode.org/87k0hbdvi8.fsf@localhost
>
> It seems agenda components use leading spaces but no trailing ones. I am 
> not familiar with mode line formatting, so it may be a false alarm.

It is because they are a part of mode string. Leading space is a
convention for minor modes.

M-x display-time-mode does the opposite - trailing space.

Rudolf, I am OK with the patch, but could you please add a comment
explaining why trailing space, so that people do not wonder in future?

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



Re: [BUG] No space after footnote with org-export-with-footnotes set to nil [9.6.1 ( @ /Users/test/.emacs.d/elpa/28.0/develop/org-9.6.1/)]

2023-03-03 Thread Ihor Radchenko
Max Nikulin  writes:

> Self-containing example:
>
>  8< 
> #+options: f:nil
>
> Pellentesque dapibus suscipit ligula.[fn::1 ftnt]  Donec posuere augue 
> in quam.
>  >8 

This is because spaces after Org syntax objects are considered a part of
those syntax objects.  So, excluding footnote automatically means
excluding spaces after.

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



Re: ox-beamer/latex questions

2023-03-03 Thread Ihor Radchenko
Leo Butler  writes:

>> This is because
>>  *** DONE :B_block:
>> is actually parsed as a heading with DONE todo keyword and title
>> ":B_block:". Tag is not recognized.
>>
>> We probably need to fix it, though I am not sure. It is one of the edge
>> cases about Org parser.
>
> Ok. I have become addicted to using TODO tags to organize composition of
> beamer slides. I often have untitled blocks in the slides, in order to
> control the pacing of the presentation.

I understand. Just need to figure out the best way to alter the syntax.
We should be careful with such things.

>> For cookies, just use stat:nil in OPTIONS. See "13.2 Export Settings"
>> section of the manual.
>
> Thanks for that. I am not sure how I missed it.
>
> Anyhow, it does not work correctly for subtree export (or I am not
> understanding something). The title still includes the cookie. See the
> attached.

That was a rather interesting edge case that triggered a bug in
org-element.el.

Fixed, on main. It was a core function, so I did not risk bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f93cc661c

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



Re: [ANN] orgtbl-fit

2023-03-03 Thread Ihor Radchenko
tbanelwebmin  writes:

> BTW, the dollar replacement is something org-table can benefit from---a
> number of people are confused because "$" is treated specially by Calc.
>
> I'm not sure what you mean. The dollar in spreadsheet formulas? Like:
> #+TBLFM: $6=$5+1

Which means that I misread the sources. I was referring to
 | 2$ | 3$| #ERROR |
 #+tblfm: $3=$2+$1

Error in the above is because Calc handles "$" specially.

> We can, but it should be first and foremost added to GNU Calc. On Org
> side, we just need appropriate integration. Maintaining generic data
> analysis code in Org is out of Org's scope.
>
> Absolutely
>
> Although the latest Calc release seams to be 2.02f, dating back in January 
> 1992. Has it reached perfection 31
> years ago?

No. It became a part of Emacs, AFAIU.
New (small) things are being added to Calc as a part of Emacs development.

>From NEWS.29:

** Calc

+++
*** New user option 'calc-kill-line-numbering'.
Set it to nil to exclude line numbering from kills and copies.

>From NEWS.28:

** Calc

*** The behavior when doing forward-delete has been changed.
Previously, using the 'C-d' command would delete the final number in
the input field, no matter where point was.  This has been changed to
work more traditionally, with 'C-d' deleting the next character.
Likewise, point isn't moved to the end of the string before inserting
digits.

*** Setting the word size to zero disables word clipping.
The word size normally clips the results of certain bit-oriented
operations such as shifts and bitwise XOR.  A word size of zero, set
by 'b w', makes the operation have effect on the whole argument values
and the result is not truncated in any way.

*** The '/' operator now has higher precedence in (La)TeX input mode.
It no longer has lower precedence than '+' and '-'.

*** New user option 'calc-make-windows-dedicated'.
When this user option is non-nil, Calc will mark its windows as
dedicated.

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



Re: [BUG] Emacs-29.0.60: (setopt org-babel-load-languages ...) may cause warnings

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

> Ihor Radchenko  writes:
>
>>> 1. I have assigned my copyright for Emacs stuff to the FSF
>>
>> Bastien, may you please confirm?
>
> I do, sorry for the delay.

Updated the contributor list.
https://git.sr.ht/~bzg/worg/commit/a5eaeb0d

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



Re: [BUG] Emacs-29.0.60: (setopt org-babel-load-languages ...) may cause warnings

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

> I have attached an amended patch with the :version tag removed.

Thanks!
Applied onto bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=e8010e8a9

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



Re: [PATCH] Async evaluation in ob-shell

2023-03-03 Thread Ihor Radchenko
Matt  writes:

> From b66d776346c992ec085bd719ab73f3d1773f71cc Mon Sep 17 00:00:00 2001
> From: Matthew Trzcinski 
> Date: Wed, 1 Mar 2023 20:31:46 -0500
> Subject: [PATCH] ob-shell: Add async evaluation

I tried the patch, and I am getting failed tests:

1 unexpected results:
   FAILED  test-ob-shell/session-async-evaluation  ((should (string= ": 1\n: 
2\n" (buffer-substring-no-properties (point) (point-max :form (string= ": 
1\n: 2\n" ": 1\n: 2\n: org_babel_sh_prompt>\n") :value nil :explanation 
(arrays-of-different-length 8 31 ": 1\n: 2\n" ": 1\n: 2\n: 
org_babel_sh_prompt>\n" first-mismatch-at 8))

> +  (let ((uuid (org-id-uuid)))

Do you need to use `org-id-uuid' here? ob-python directly uses `md5'.
If you still prefer org-id-uuid, we probably need to move it to
org-macs.el

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



Re: [BUG] No space after footnote with org-export-with-footnotes set to nil [9.6.1 ( @ /Users/test/.emacs.d/elpa/28.0/develop/org-9.6.1/)]

2023-03-03 Thread Max Nikulin

On 03/03/2023 17:07, Andrea Lazzarini wrote:


After setting 'org-export-with-footnotes' to 'nil',
the space following the footnote is removed when exporting (I’ve tested
this with pandoc [docx and html]).


I am unsure if pandoc is relevant. However the issue exists for ox, e.g. 
ox-latex and ox-html.



«Pellentesque dapibus suscipit ligula.[fn:1]  Donec posuere augue in quam.»


Self-containing example:

 8< 
#+options: f:nil

Pellentesque dapibus suscipit ligula.[fn::1 ftnt]  Donec posuere augue 
in quam.

 >8 

Confirmed.

A workaround is to either add a zero-width space or use non-breakable 
space (as literal character or as \nbsp{} entity) immediately after 
footnotes.




[BUG] No space after footnote with org-export-with-footnotes set to nil [9.6.1 ( @ /Users/test/.emacs.d/elpa/28.0/develop/org-9.6.1/)]

2023-03-03 Thread Andrea Lazzarini


After setting 'org-export-with-footnotes' to 'nil', 
the space following the footnote is removed when exporting (I’ve tested
this with pandoc [docx and html]).

So, given this example:

«Pellentesque dapibus suscipit ligula.[fn:1]  Donec posuere augue in quam.»

The resulting text is:

«Pellentesque dapibus suscipit ligula.Donec posuere augue in quam.»

The only way in which I can get a space in the correct place  is by putting an 
extra one
before the footnote.


Emacs  : GNU Emacs 28.0.91 (build 1, aarch64-apple-darwin21.2.0, NS 
appkit-2113.20 Version 12.1 (Build 21C52))
 of 2022-02-06
Package: Org mode version 9.6.1 ( @ 
/Users/test/.emacs.d/elpa/28.0/develop/org-9.6.1/)