Clock becomes a paragraph by prefixing with not-really-affiliated-keyword

2023-10-12 Thread Tom Alexander
This test document correctly parses as a clock:
```
CLOCK: [2023-04-21 Fri 19:43]
```

This test document incorrectly parses as a paragraph:
```
#+NAME: foo
CLOCK: [2023-04-21 Fri 19:43]
```

--
Tom Alexander
pgp: https://fizz.buzz/pgp.asc



Re: Keyword becoming a paragraph based on optval

2023-10-12 Thread Tom Alexander
> Note that _affiliated keyword_ has an optional form of

Ah, that was what I was missing, thanks!

--
Tom Alexander
pgp: https://fizz.buzz/pgp.asc



Re: Keyword becoming a paragraph based on optval

2023-10-12 Thread Ihor Radchenko
"Tom Alexander"  writes:

> Emacs version: 29.1
> Org-mode version: f3de4c3e041e0ea825b5b512dc0db37c78b7909e (latest in git)
>
> This test document parses as a keyword:
> ```
> #+CAPTION[*foo*]: baz
> ```
>
> but this test document parses as a paragraph:
> ```
> #+CAPTION[*foo* bar]: baz
> ```

Expected. In the first case,
KEY = CAPTION[*foo*]
and VALUE = baz

In the second case, keyword does not match, because KEY cannot have
spaces.

https://orgmode.org/worg/org-syntax.html#Keywords

Note that _affiliated keyword_ has an optional form of

#+KEY[OPTVAL]: VALUE

where OPTVAL can have spaces.

But isolated #+CAPTION cannot be an affiliated keyword, which is why you
see what you see.

Whether we should allow OPTVAL in ordinary keywords has been discussed ,
and we might do it to simplify things at some point. But the rules are
like the above for now.

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



Keyword becoming a paragraph based on optval

2023-10-12 Thread Tom Alexander
Emacs version: 29.1
Org-mode version: f3de4c3e041e0ea825b5b512dc0db37c78b7909e (latest in git)

This test document parses as a keyword:
```
#+CAPTION[*foo*]: baz
```

but this test document parses as a paragraph:
```
#+CAPTION[*foo* bar]: baz
```

--
Tom Alexander
pgp: https://fizz.buzz/pgp.asc



Re: [BUG] org-babel-tangle may fail due to (org-babel-tangle-collect-blocks lang-re tangle-file) [9.6.9 ( @ /home/andrea/.emacs.d/elpa/org-9.6.9/)]

2023-10-12 Thread Andrea


On Thu 12 Oct 2023 at 15:29, Ihor Radchenko  wrote:

>
> I recommend trying to shrink the problematic file to the smallest possible.
> Then, try with emacs -Q. If cannot reproduce, you can use
> https://github.com/Malabarba/elisp-bug-hunter to bisect the config
> quickly.


Thanks Ihor! I found out that there was (likely) an encoding issue on
one of the source block. I had something like:
:PROPERTIES:
:ID: some-id
:END:

#+being_src emacs-lisp

And trying to evaluate (org-babel-get-src-block-info 'no-eval) at the
beginning of the source block was returning nil (as if I were outside of it).

Just adding a newline manually removed the issue, so I guessed there was
some special character there (which is weird, but I cannot be sure of my
copy pasting).

Sorry for the noise and thanks for your suggestions, they were useful in
debugging my issue.

Best,

Andrea



Re: [BUG] org-babel-tangle may fail due to (org-babel-tangle-collect-blocks lang-re tangle-file) [9.6.9 ( @ /home/andrea/.emacs.d/elpa/org-9.6.9/)]

2023-10-12 Thread Ihor Radchenko
Andrea  writes:

> Mmm... I run org-lint (and fix unrelated issues, thanks!) and the problem 
> remains.
> It is strange though, this is the block on which the function
> stops working (it is the first actually)
>
> ...
> Must be something wrong with my configuration then.
> I will update this issue if I find that out.

I recommend trying to shrink the problematic file to the smallest possible.
Then, try with emacs -Q. If cannot reproduce, you can use
https://github.com/Malabarba/elisp-bug-hunter to bisect the config
quickly.

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



Re: [BUG] org-babel-tangle may fail due to (org-babel-tangle-collect-blocks lang-re tangle-file) [9.6.9 ( @ /home/andrea/.emacs.d/elpa/org-9.6.9/)]

2023-10-12 Thread Andrea


On Thu 12 Oct 2023 at 14:40, Ihor Radchenko  wrote:

> Andrea  writes:
>
>> This is the full trace I get running "emacs --debug-init" (sorry I should 
>> have added it in my bug report):
>>
>>Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>>  string-match("\\`\\(?:e\\(?:\\(?:macs-\\)?lisp\\)\\)\\'" nil nil)
>>  string-match-p("\\`\\(?:e\\(?:\\(?:macs-\\)?lisp\\)\\)\\'" nil)
>>  (not (string-match-p lang-re src-lang))
>
> That looks like a malformed src block with missing lang.
> I recommend running M-x org-lint
>

Mmm... I run org-lint (and fix unrelated issues, thanks!) and the problem 
remains.
It is strange though, this is the block on which the function
stops working (it is the first actually)

   #+begin_src emacs-lisp :tangle yes
   (defun my/init-audit-message (string)
 "Print out STRING and calculate length of init."
 (message string)
 (if (not (string= "end" (substring string -3)))
 (setq my/init-audit-message-begin (current-time))
   (message
"It took %s seconds in total."
(time-to-seconds
 (time-subtract
  (current-time)
  my/init-audit-message-begin
 nil)
   #+end_src

Must be something wrong with my configuration then.
I will update this issue if I find that out.



Re: [the cryptic @@#$7]

2023-10-12 Thread Uwe Brauer
>>> "BB" == Bruno Barbier  writes:

> Hi Uwe,

> Uwe Brauer  writes:
>> Here is an example where the org-lookup-first method seems to fail

>> #+TBLFM: $3='(org-lookup-first $2 '(remote(Table1A, @I$1..@II$1))
>> '(remote(Table1A, @I$7..@II$7)))::$4='(org-lookup-first $2
>> '(remote(Table2A, @I$1..@II$1)) '(remote(Table2A,
>> @I$7..@II$7)))::$5=vsum($3..$4);f2

> You forgot to update the column numbers: the names to look for are now in
> the column '2', and, the totals are now in column '8'. This should work:

> #+TBLFM: $3='(org-lookup-first $2 '(remote(Table1A, @I$2..@II$2)) 
> '(remote(Table1A, @I$8..@II$8)))
> #+TBLFM: $4='(org-lookup-first $2 '(remote(Table2A, @I$2..@II$2)) 
> '(remote(Table2A, @I$8..@II$8)))

> #+TBLFM: $5=vsum($3..$4);f2

Arg 


I even tried 
#+TBLFM: $3='(org-lookup-first $2 '(remote(Table1A, 
@I$1..@II$1))'(remote(Table1A, @I$8..@II$8)))
#+TBLFM:$4='(org-lookup-first $2 '(remote(Table2A, @I$1..@II$1)) 
'(remote(Table2A, @I$8..@II$8)))
#+TBLFM:$5=vsum($3..$4);f2


So I changed 

1. $7-->$8 

2. but *not* $1-->$2

Thanks very much

Uwe 



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


smime.p7s
Description: S/MIME cryptographic signature


Re: [BUG] org-babel-tangle may fail due to (org-babel-tangle-collect-blocks lang-re tangle-file) [9.6.9 ( @ /home/andrea/.emacs.d/elpa/org-9.6.9/)]

2023-10-12 Thread Ihor Radchenko
Andrea  writes:

> This is the full trace I get running "emacs --debug-init" (sorry I should 
> have added it in my bug report):
>
>Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>  string-match("\\`\\(?:e\\(?:\\(?:macs-\\)?lisp\\)\\)\\'" nil nil)
>  string-match-p("\\`\\(?:e\\(?:\\(?:macs-\\)?lisp\\)\\)\\'" nil)
>  (not (string-match-p lang-re src-lang))

That looks like a malformed src block with missing lang.
I recommend running M-x org-lint

I now made Org skip source blocks without defined language when
tangling.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f3de4c3e0

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



Re: [BUG] org sub tree sort broken [9.7-pre (release_9.6.10-827-ge15699 @ /home/d/src/git-org-mode/lisp/)]

2023-10-12 Thread Daniel Ortmann

Fix confirmed.

Thank you!

On 10/12/23 03:21, Ihor Radchenko wrote:

Daniel Ortmann  writes:


org-element--generate-copy-script: Symbol\u2019s function definition is
void: org-export--list-bound-variables

Sorry. Silly mistake in a recent commit.
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f660afc50






Re: [BUG] org-babel-tangle may fail due to (org-babel-tangle-collect-blocks lang-re tangle-file) [9.6.9 ( @ /home/andrea/.emacs.d/elpa/org-9.6.9/)]

2023-10-12 Thread Andrea


Thanks Ihor for the super quick response!

On Thu 12 Oct 2023 at 13:04, Ihor Radchenko  wrote:

> Andrea  writes:
>
>> 
>> Sometimes I get an error on org-babel-load-file saying that
>> org-babel-tangle-collect-blocks was called with target-file set to nil.
>
> May it be possible to provide more details about the error you are
> seeing? You can set `debug-on-error' to t and post the backtrace, which
> will give more details. Or, better, provide a reproducer. See
> https://orgmode.org/manual/Feedback.html#Feedback
>

This is the full trace I get running "emacs --debug-init" (sorry I should have 
added it in my bug report):

   Debugger entered--Lisp error: (wrong-type-argument stringp nil)
 string-match("\\`\\(?:e\\(?:\\(?:macs-\\)?lisp\\)\\)\\'" nil nil)
 string-match-p("\\`\\(?:e\\(?:\\(?:macs-\\)?lisp\\)\\)\\'" nil)
 (not (string-match-p lang-re src-lang))
 (and lang-re (not (string-match-p lang-re src-lang)))
 (or (string= src-tfile "no") (and tangle-file (not (equal tangle-file 
src-tfile))) (and lang-re (not (string-match-p lang-re src-lang
 (if (or (string= src-tfile "no") (and tangle-file (not (equal tangle-file 
src-tfile))) (and lang-re (not (string-match-p lang-re src-lang nil (let* 
((block (org-babel-tangle-single-block counter)) (src-tfile (cdr (assq :tangle 
(nth 4 block (file-name (org-babel-effective-tangled-filename (nth 1 block) 
src-lang src-tfile)) (by-fn (assoc file-name blocks))) (if by-fn (setcdr by-fn 
(cons (cons src-lang block) (cdr by-fn))) (setq blocks (cons (cons file-name 
(list (cons src-lang block))) blocks)
 (let* ((info (org-babel-get-src-block-info 'no-eval)) (src-lang (nth 0 
info)) (src-tfile (cdr (assq :tangle (nth 2 info) (if (or (string= 
src-tfile "no") (and tangle-file (not (equal tangle-file src-tfile))) (and 
lang-re (not (string-match-p lang-re src-lang nil (let* ((block 
(org-babel-tangle-single-block counter)) (src-tfile (cdr (assq :tangle (nth 4 
block (file-name (org-babel-effective-tangled-filename (nth 1 block) 
src-lang src-tfile)) (by-fn (assoc file-name blocks))) (if by-fn (setcdr by-fn 
(cons (cons src-lang block) (cdr by-fn))) (setq blocks (cons (cons file-name 
(list ...)) blocks))
 (if (or (org-in-commented-heading-p) (org-in-archived-heading-p)) nil 
(let* ((info (org-babel-get-src-block-info 'no-eval)) (src-lang (nth 0 info)) 
(src-tfile (cdr (assq :tangle (nth 2 info) (if (or (string= src-tfile "no") 
(and tangle-file (not (equal tangle-file src-tfile))) (and lang-re (not 
(string-match-p lang-re src-lang nil (let* ((block 
(org-babel-tangle-single-block counter)) (src-tfile (cdr (assq :tangle ...))) 
(file-name (org-babel-effective-tangled-filename (nth 1 block) src-lang 
src-tfile)) (by-fn (assoc file-name blocks))) (if by-fn (setcdr by-fn (cons 
(cons src-lang block) (cdr by-fn))) (setq blocks (cons (cons file-name ...) 
blocks)))
 (let ((full-block (match-string 0)) (beg-block (match-beginning 0)) 
(end-block (match-end 0)) (lang (match-string 2)) (beg-lang (match-beginning 
2)) (end-lang (match-end 2)) (switches (match-string 3)) (beg-switches 
(match-beginning 3)) (end-switches (match-end 3)) (header-args (match-string 
4)) (beg-header-args (match-beginning 4)) (end-header-args (match-end 4)) (body 
(match-string 5)) (beg-body (match-beginning 5)) (end-body (match-end 5))) 
(ignore full-block beg-block end-block lang beg-lang end-lang switches 
beg-switches end-switches header-args beg-header-args end-header-args body 
beg-body end-body) (let ((current-heading-pos (if (org-element--cache-active-p) 
(or (org-element-property :begin (org-element-lineage ... ... t)) 1) 
(save-excursion (save-restriction (widen) (progn ... ... ... ... ...)) (if 
(eq last-heading-pos current-heading-pos) (setq counter (1+ counter)) (setq 
counter 1) (setq last-heading-pos current-heading-pos))) (if (or 
(org-in-commented-heading-p) (org-in-archived-heading-p)) nil (let* ((info 
(org-babel-get-src-block-info 'no-eval)) (src-lang (nth 0 info)) (src-tfile 
(cdr (assq :tangle (nth 2 info) (if (or (string= src-tfile "no") (and 
tangle-file (not (equal tangle-file src-tfile))) (and lang-re (not 
(string-match-p lang-re src-lang nil (let* ((block 
(org-babel-tangle-single-block counter)) (src-tfile (cdr ...)) (file-name 
(org-babel-effective-tangled-filename ... src-lang src-tfile)) (by-fn (assoc 
file-name blocks))) (if by-fn (setcdr by-fn (cons ... ...)) (setq blocks (cons 
... blocks))) (goto-char end-block))
 (progn (goto-char (match-beginning 0)) (let ((full-block (match-string 0)) 
(beg-block (match-beginning 0)) (end-block (match-end 0)) (lang (match-string 
2)) (beg-lang (match-beginning 2)) (end-lang (match-end 2)) (switches 
(match-string 3)) (beg-switches (match-beginning 3)) (end-switches (match-end 
3)) (header-args (match-string 4)) (beg-header-args (match-beginning 4)) 
(end-header-args (match-end 4)) (body (match-string 5)) (beg-body 

Re: [the cryptic @@#$7]

2023-10-12 Thread Bruno Barbier


Hi Uwe,

Uwe Brauer  writes:
> Here is an example where the org-lookup-first method seems to fail

> #+TBLFM: $3='(org-lookup-first $2 '(remote(Table1A, @I$1..@II$1)) 
> '(remote(Table1A, @I$7..@II$7)))::$4='(org-lookup-first $2 '(remote(Table2A, 
> @I$1..@II$1)) '(remote(Table2A, @I$7..@II$7)))::$5=vsum($3..$4);f2

You forgot to update the column numbers: the names to look for are now in
the column '2', and, the totals are now in column '8'. This should work:


#+TBLFM: $3='(org-lookup-first $2 '(remote(Table1A, @I$2..@II$2)) 
'(remote(Table1A, @I$8..@II$8)))
#+TBLFM: $4='(org-lookup-first $2 '(remote(Table2A, @I$2..@II$2)) 
'(remote(Table2A, @I$8..@II$8)))
#+TBLFM: $5=vsum($3..$4);f2


Bruno






Re: [BUG] org-babel-tangle may fail due to (org-babel-tangle-collect-blocks lang-re tangle-file) [9.6.9 ( @ /home/andrea/.emacs.d/elpa/org-9.6.9/)]

2023-10-12 Thread Ihor Radchenko
Andrea  writes:

> 
> Sometimes I get an error on org-babel-load-file saying that
> org-babel-tangle-collect-blocks was called with target-file set to nil.

May it be possible to provide more details about the error you are
seeing? You can set `debug-on-error' to t and post the backtrace, which
will give more details. Or, better, provide a reproducer. See
https://orgmode.org/manual/Feedback.html#Feedback

> Since that seems an effective but senseless action, I just looked into it and 
> there is
> something weird in the code of org-babel-tangle:
>
> Given the header of the function:
>
>   (defun org-babel-tangle ( arg target-file lang-re)
>
> and the docstring section
>
>   "Optional argument TARGET-FILE can be used to specify a default export
>   file for all source blocks.  "
>
> I think this let binding in org-babel-tangle is weird and the cause of my 
> error:
>
>   (tangle-file
>(when (equal arg '(16))
>  (or (cdr (assq :tangle (nth 2 (org-babel-get-src-block-info 
> 'no-eval
>  (user-error "Point is not in a source code block"
>
> Shouldn't that be:
>
>   (tangle-file
>(or
>(when (equal arg '(16))
>(or (cdr (assq :tangle (nth 2 (org-babel-get-src-block-info 
> 'no-eval
>(user-error "Point is not in a source code
>block")))
>  target-file ;; the target file which was passed as input of 
> org-babel-tangle
>  ))

No, tangle-file being nil should not be a problem.

> Any chance I found a bug?

Likely, but not necessarily in `org-babel-tangle'.

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



Re: Event management

2023-10-12 Thread Ihor Radchenko
Rainer Hansen  writes:

> 
> The event is managed via LinkedIn:
> https://www.linkedin.com/events/communicatesuccessfullyininterv7115081313199509504/
>
> but it is difficult to keep track of who has recently signed-up in
> LinkedIn. I can only see the complete list of people having
> signed-up. Therefore I use Firefox and the extension Copy as Org-Mode to
> copy the participant lists into Org Mode manually. In Org Mode I can
> finally sort them after I have done a lot of manual cleaning ... Then I
> can track in Org Mode to whom I have sent a reminder or a question and
> if I have got feedback.

In the absence of an API, the best I can see you can do is automating
the cleanup. Either using text manipulation in Elisp or some kind of
HTML parsing library (for example, see
https://github.com/yantar92/org-capture-ref/blob/master/org-capture-ref.el#L1026
where I extract some metadata from various HTML pages).

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



Re: Inconsistent text markup handling when double-nesting markers

2023-10-12 Thread Ihor Radchenko
Max Nikulin  writes:

> By the way, is it explicitly specified that within an element namely 
> top-down strategy must be used to recognize objects?

https://orgmode.org/worg/org-syntax.html has it, I think.

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



Re: Add new word before an org-agenda entry (like "MODIFIED")

2023-10-12 Thread Ihor Radchenko
Cletip Cletip  writes:

> Here's an example for clarification:
> Consider this line in org-agenda:
>
> 14:08-14:10 Clocked: (0:02) name-of-the-heading
>
> I want exactly the same thing, but not with the "Clocked" word !

This is not easy. The supported log types are hard-coded in
`org-agenda-get-progress'.

You may need to implement a custom agenda block type to achieve 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: Exporting elisp: and shell: links

2023-10-12 Thread Ihor Radchenko
Max Nikulin  writes:

>> I like more how ox-ascii (without the
>> proposed diff) handles the situation via footnote-like link.
>
> That is why I believe that extracting fragments of code into helper 
> functions is important. If ox-ascii.el had a function that adds an item 
> to link list then ol.el would use it to add src_elisp elements to this list.

May you elaborate? I am not talking about implementation details, but
about the reasonable defaults for the export. Not necessary ASCII, but
other backends as well.

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



[BUG] org-babel-tangle may fail due to (org-babel-tangle-collect-blocks lang-re tangle-file) [9.6.9 ( @ /home/andrea/.emacs.d/elpa/org-9.6.9/)]

2023-10-12 Thread Andrea


Hello, thanks for maintaining the great Org Mode!

I have been keeping a literate Org Mode configuration for my init file.
This means that I have tons of src blocks looking like

#+begin_src emacs-lisp :tangle yes
...
#+end_src

Sometimes I get an error on org-babel-load-file saying that
org-babel-tangle-collect-blocks was called with target-file set to nil.

Not totally sure if this is had something to do with my configuration, I
always solved this by adding some spaces before my blocks (it doesn't
make sense, but strangely tended to work).

Since that seems an effective but senseless action, I just looked into it and 
there is
something weird in the code of org-babel-tangle:

Given the header of the function:

  (defun org-babel-tangle ( arg target-file lang-re)

and the docstring section

  "Optional argument TARGET-FILE can be used to specify a default export
  file for all source blocks.  "

I think this let binding in org-babel-tangle is weird and the cause of my error:

  (tangle-file
 (when (equal arg '(16))
   (or (cdr (assq :tangle (nth 2 (org-babel-get-src-block-info 
'no-eval
   (user-error "Point is not in a source code block"

Shouldn't that be:

  (tangle-file
 (or
   (when (equal arg '(16))
 (or (cdr (assq :tangle (nth 2 (org-babel-get-src-block-info 
'no-eval
 (user-error "Point is not in a source code
 block")))
 target-file ;; the target file which was passed as input of 
org-babel-tangle
 ))

With that my problem seems resolved. I think that code is weird because
using a when clause causes a possible nil value for that binding. But we
may still use the target-file input to save the day, no?

Any chance I found a bug?

Best,

Andrea

Emacs  : GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, 
cairo version 1.16.0)
 of 2022-05-31
Package: Org mode version 9.6.9 ( @ /home/andrea/.emacs.d/elpa/org-9.6.9/)



Re: Comments following not-really-affiliated keywords are becoming paragraphs

2023-10-12 Thread Ihor Radchenko
"Tom Alexander"  writes:

> Test document:
> ```
> #+CAPTION: foo
> # bar
> ```
>
> This parses as a paragraph with the caption of foo and the body of "# bar" 
> when it should parse as a regular keyword followed by a comment.

Thanks for reporting!
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=0e3d0e3d1

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



Re: Document-level properties incorrect and/or missing based on preceding blank lines and/or comments

2023-10-12 Thread Ihor Radchenko
"Tom Alexander"  writes:

> ### Issue 1
>
> Putting a comment before it makes the value for the foo property incorrect 
> (seems to be grabbing an earlier string slice):
> 
> ### Issue 2
>
> Putting any blank lines before it makes the foo property not appear in 
> org-data at all
> ```
>
> :PROPERTIES:
> :FOO:bar
> :END:
> ```

Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a52c74e96
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=fba3fd56c

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



Re: Inconsistent text markup handling when double-nesting markers

2023-10-12 Thread Max Nikulin

On 11/10/2023 19:26, Ihor Radchenko wrote:

Max Nikulin writes:


P.S. Juan Manuel at certain moment discovered that pandoc allows nesting
for *b1 *b2* b3*.


Which is a bug in pandoc.

I think we discussed this topic a number of times in the past - our
markup is a compromise between simplicity for users and simplicity of
the parser. This works in many simple cases, but edge cases become
problematic.


I have no intention to raise discussions of changing patterns to 
recognize beginning and end of objects or extending of syntax.


My guess is that pandoc may use bottom-up, not top-down approach. I 
admit, my opinion may be biased by reading complains concerning 
unexpected behavior of current implementation. Perhaps besides 
advantages pandoc parser has downsides. I would not be surprised if 
bottom up parser is unbearable without some tool that generates code for 
provided rules.


By the way, is it explicitly specified that within an element namely 
top-down strategy must be used to recognize objects?




Re: [BUG] org sub tree sort broken [9.7-pre (release_9.6.10-827-ge15699 @ /home/d/src/git-org-mode/lisp/)]

2023-10-12 Thread Ihor Radchenko
Daniel Ortmann  writes:

> org-element--generate-copy-script: Symbol\u2019s function definition is 
> void: org-export--list-bound-variables

Sorry. Silly mistake in a recent commit.
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f660afc50

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



Re: Org-mode starting with 37d6bde27 errors out parsing org-mode/testing/examples/pub/a.org

2023-10-12 Thread Ihor Radchenko
"Tom Alexander"  writes:

> I've attached a Dockerfile that reproduces the issue. Just throw that in a 
> directory and run `docker build -t temp .` to see it fail. Change the `ARG 
> ORG_VERSION=` line to `ac108a3ac1b332bf27ff2984a9cf26af3744185d` to see it 
> succeed.
>
> Error message:
> ```
> File mode specification error: (void-function 
> org-export--list-bound-variables)

Oops.
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f660afc50

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