emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Patch] ob-tangle.el: New value 'ascii' for the header argument ':co


From: Juan Manuel Macías
Subject: Re: [Patch] ob-tangle.el: New value 'ascii' for the header argument ':comments'
Date: Mon, 25 Jul 2022 17:13:48 +0000

Hi, Ihor,

Here is a new fixed version of the patch, with the addition to NEWS.

Ihor Radchenko writes:

>> -                     (org-back-to-heading t) ; Sets match data
>> -                     (match-end 0))
>> +                     (re-search-backward org-heading-regexp) ; Sets match 
>> data
>> +                     (match-beginning 0))
>
> This will err when the source block is before the first headline in the
> document.

I've reverted the first line to (org-back-to-heading t), keeping the
(match-beginning 0), otherwise you don't get the full headline and all
property drawers would be exported. But it's strange, it doesn't give me
any error when the source block is before the first headline in the
document. Isn't that error prevented with this:

(condition-case nil
...                
(error (point-min)))

?

By the way, I've noticed that it's not convenient to export numbered
headers, so I've modified org-babel-export-comment-text-as-plain-text so
that it removes header numbering. I don't know if it's ok to do it this
way...

Best regards,

Juan Manuel

Attachment: 0001-lisp-ob-tangle.el-The-org-value-for-comments-is-now-.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]