Re: copying text from links makes it with a starting [[

2023-01-11 Thread Luca Ferrari
On Tue, Dec 27, 2022 at 2:26 PM Ihor Radchenko  wrote:
>
> Luca Ferrari  writes:
> Could you please provide more details about what is happening?
> What exactly do you do to copy the link?
> See https://orgmode.org/manual/Feedback.html#Feedback
>

Imagine I've this org fragment:

Link: [[https://foo.com]]

where the link is displayed without brackets, in org mode.
I place the point at the beginning of the first visibile character,
hence the 'h', and the C-space M-e M-w and then go to another
application and paste the content of the clipboard.
I've seen that sometimes the link is copied as text, so both beginning
and ending brackets are there, but with long links the ending brackets
are not there, but it could be they I remove them accidentally.
I would like to copy only the visible part, but I guess there's no
solution unless I do something manually or configure a web package to
open the link into another application.


Luca



Re: TODO state for heading intersection?

2023-01-11 Thread Samuel Wales
i meant bulk.

On 1/11/23, Jean Louis  wrote:
> * Nick Dokos  [2023-01-10 20:53]:
>> IIUC, you can use `org-map-entries` to apply the function `org-todo`
>> (or a different function if you want) to a collection of nodes in a
>> file that are specified through tags/properties matches:
>>
>>(org-map-entries #'org-todo "LEVEL=1" 'file)
>>
>> will apply it to top-level nodes only.
>>
>> See
>>
>>(info "(org)Using the Mapping API")
>>
>> and
>>
>>(info "(org)Matching tags and properties")
>
> Programmatically I can do it in many ways.
>
> I speak of doing it in easy manner.
>
> I am thankful for all people who answered, though I found solution:
>
> 1. Run Org Agenda on keyword.
>
> 2. Mark the items
>
> 3. Invoke "B" for bulk action
>
> 4. Change the state of TODO.
>
>
> --
> Jean
>
> Take action in Free Software Foundation campaigns:
> https://www.fsf.org/campaigns
>
> In support of Richard M. Stallman
> https://stallmansupport.org/
>
>


-- 
The Kafka Pandemic

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



[bug] Org mode 9.6.1: Subtree export without body creates an empty code block on export

2023-01-11 Thread Kaushal Modi
Hello,

This issue is best explained with this small example.

1. Create this Org buffer:

=
#+options: author:nil toc:nil

* Post 1
:PROPERTIES:
:EXPORT_FILE_NAME: foo
:END:
* Post 2
=

2. Place the cursor at the end of :END:
3. C-c C-e C-s t A


You get this:

=


 POST 1



,

`
=

Note the empty code block exported (I see this for any backend; but I
discovered this as I was locally running the ox-hugo test suite.. and a few
dozen tests which did not have any body in the subtrees, I saw these empty
code blocks), which is not present in the Org source.

If I delete the "* Post 2" line, that empty code block is not exported (as
expected).



Org mode version 9.6.1 (release_9.6.1-116-g07c63d).





--
Kaushal Modi


Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects

2023-01-11 Thread Leo Butler
On Wed, Jan 11 2023, Ihor Radchenko  wrote:

> Leo Butler  writes:
>
>> Leo, could you please take a look?
>
> An earlier test is creating that *Org Babel Error Output* buffer.
>>>
>>> I will try to look into improving the tests so that we can trap the test(s)
>>> that is(are) creating that error buffer.
>>
>> See the attachment. There are four test failures that are currently
>> untrapped. I also see the `buffer-live-p' bug. 
>
> It looks like `buffer-live-p' is not a bug, but rather the result of
> backtrace being printed upon executing `kill-buffer' in unwind-protect
> form from the test body: (1) test fails; (2) unwind-protect executes
> kill-buffer; (3) backtrace is printed with "killed" buffer object.

Yes, that seems reasonable.

>
> So, the test failure is real.
>
> https://orgmode.org/list/94980226-d29a-4969-8640-1143a1979...@bundesbrandschatzamt.de
> might be related.

Ihor,

How do you want to treat the patch that was included? I think we should
have something like that to catch errors like these. And the failing
tests should be marked as known failures (that need to be fixed,
obviously). I note that both failures 3 & 4 are related to org's
built-in features.

Leo




[BUG] Emacs Org rendering glitch of '*' in '=' inline markup

2023-01-11 Thread Johan Bolmsjö
Org mode renders the following line in bold between the asterisks in the Emacs
window. It seems to be the last dot after the first asterisk that triggers the
assumed rendering bug.

┌
│ =org-*.css= and =org-*.css.el=
└

On the other hand, the same line exports properly with both the ASCII and HTML
exporters.

┌
│ `org-*.css' and `org-*.css.el'
└
Listing 1: Exported ASCII (UTF-8)

┌
│ org-*.css and org-*.css.el
└
Listing 2: Exported HTML


• Org mode version 9.6.1 (9.6.1-gbcca88 @
  /home/johan/.emacs.d/straight/build/org/)
• GNU Emacs 28.2 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0,
  Xaw scroll bars) of 2022-11-19



Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-11 Thread Matt


  On Wed, 11 Jan 2023 12:02:42 -0500  Ihor Radchenko  wrote --- 
 > It looks like you lost all the individual commits and commit messages in
 > the process.
 > 
 > Could you please revert 4f319088ba5 and re-push in such a way that
 > individual commits do appear on main?

Goodness!  Sorry!  Thanks for catching that.  I reverted the merge and then 
applied the patches.



Re: TODO state for heading intersection?

2023-01-11 Thread Jean Louis
* Nick Dokos  [2023-01-10 20:53]:
> IIUC, you can use `org-map-entries` to apply the function `org-todo`
> (or a different function if you want) to a collection of nodes in a
> file that are specified through tags/properties matches:
> 
>(org-map-entries #'org-todo "LEVEL=1" 'file)
> 
> will apply it to top-level nodes only.
> 
> See
> 
>(info "(org)Using the Mapping API")
> 
> and
> 
>(info "(org)Matching tags and properties")

Programmatically I can do it in many ways. 

I speak of doing it in easy manner.

I am thankful for all people who answered, though I found solution:

1. Run Org Agenda on keyword.

2. Mark the items

3. Invoke "B" for bulk action

4. Change the state of TODO.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: TODO state for heading intersection?

2023-01-11 Thread Jean Louis
* Samuel Wales  [2023-01-10 04:41]:
> idk if i understand your q but you can do agenda on tag and then batch 
> command.

Thanks, what batch command do you mean?

Do you mean this one:

org-batch-agenda is an autoloaded Lisp macro in ‘org-agenda.el’.

(org-batch-agenda CMD-KEY  PARAMETERS)

Run an agenda command in batch mode and send the result to STDOUT.
If CMD-KEY is a string of length 1, it is used as a key in
‘org-agenda-custom-commands’ and triggers this command.  If it is a
longer string it is used as a tags/todo match string.
Parameters are alternating variable names and values that will be bound
before running the agenda command.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-11 Thread Ihor Radchenko
Matt  writes:

> I was not, thank you.  I've since pushed.

This:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4f319088ba5f11d4b6adf808f39f11dfa52c08e4
?

It looks like you lost all the individual commits and commit messages in
the process.

Could you please revert 4f319088ba5 and re-push in such a way that
individual commits do appear on main?

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



Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-11 Thread Matt


  On Wed, 11 Jan 2023 06:53:41 -0500  Ihor Radchenko  wrote --- 
 > I have the following Git configuration:
 > 
 >  u remote.origin.url 
 > yanta...@git.savannah.gnu.org:/srv/git/emacs/org-mode.git
 > 
 > Are you using the same?

I was not, thank you.  I've since pushed.



Re: Request to bump up the Org version in Elpa [

2023-01-11 Thread Kaushal Modi
On Wed, Jan 11, 2023 at 10:50 AM Bastien  wrote:

> Ihor Radchenko  writes:
>
> > +1
>
> Done, thanks.
>
> Kaushal, it should appear on GNU ELPA in a few hours.
>

Wow, thanks a lot for this prompt action! This will help get the Github
Actions CI status back in green state.. soon :).


> Ihor, feel free to publish bugfix releases with no special permission
> in the future.
>


Re: Request to bump up the Org version in Elpa [

2023-01-11 Thread Bastien
Ihor Radchenko  writes:

> +1

Done, thanks.

Kaushal, it should appear on GNU ELPA in a few hours.

Ihor, feel free to publish bugfix releases with no special permission
in the future.

-- 
 Bastien



Re: Request to bump up the Org version in Elpa [

2023-01-11 Thread Ihor Radchenko
Bastien Guerry  writes:

>> Can a new version of Org be tagged from the bugfix branch?
>
> Ihor, if you agree, I can release Org 9.6.1 today.
>
> We can continue to work on Org 9.6.2 for later merge in Emacs.
>
> The problem with `org-assert-version' can be dealt with later
> on, even if many users will perhaps expect something for 9.6.1.
>
> WDYT?

+1

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



Re: Request to bump up the Org version in Elpa [

2023-01-11 Thread Bastien Guerry
Hi Kaushal,

Kaushal Modi  writes:

> Can a new version of Org be tagged from the bugfix branch?

Ihor, if you agree, I can release Org 9.6.1 today.

We can continue to work on Org 9.6.2 for later merge in Emacs.

The problem with `org-assert-version' can be dealt with later
on, even if many users will perhaps expect something for 9.6.1.

WDYT?

-- 
 Bastien



Request to bump up the Org version in Elpa [ Was: Incorrect numbering of tables (and other elements like figures) ]

2023-01-11 Thread Kaushal Modi
Hello,

Can a new version of Org be tagged from the bugfix branch?

The below-reported bug was fixed quickly but the Elpa version of Org
doesn't yet see that fix.

My ox-hugo package uses the Elpa version of Org mode for the tests on
Github Actions, so my test suite has been failing for quite some time.

I believe that for Elpa, the only way to update the version is to update
the version in the package's comment header.

--
Kaushal Modi


On Tue, Dec 13, 2022 at 3:51 PM Kaushal Modi  wrote:

> On Tue, Dec 13, 2022 at 3:52 AM Ihor Radchenko 
> wrote:
>
>> Kaushal Modi  writes:
>>
>> > Since Org 9.6, I am seeing that the numbering of tables (and other
>> elements
>> > like figures) resets to 1 and stays so, thought I cannot see a pattern
>> of
>> > why that happens.
>> >
>> > Org version: Org mode version 9.6 (release_9.6-40-g49cf3e ..)
>> >
>> > Here's a small reproducible example that shows the problem in any
>> exporter
>> > (ox-ascii, ox-html, ..)
>> > ...
>>
>> Thanks for reporting!
>> Fixed on bugfix. With a test now.
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=bdb4c4c66
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=02909fe37
>>
>>
> Thank you!
>
> I confirm the fix. Also thanks for adding the test.
>


Re: (org-element-parse-buffer) and (org-with-wide-buffer)

2023-01-11 Thread Ihor Radchenko
Michael Dauer  writes:

> Yes, but the missing headings are within the narrowed subtree.

You are right.
What is happening here is `org-element-parse-buffer' skipping over the
folded heading:

When VISIBLE-ONLY is non-nil, don't parse contents of hidden
elements.

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



Re: (org-element-parse-buffer) and (org-with-wide-buffer)

2023-01-11 Thread Michael Dauer
Yes, but the missing headings are within the narrowed subtree.

Am Mi., 11. Jan. 2023 um 12:22 Uhr schrieb Ihor Radchenko <
yanta...@posteo.net>:

> Michael Dauer  writes:
>
> > But within (org-with-wide-buffer) the collapsed branches should be
> visible.
>
> You have `org-narrow-to-subtree' inside `org-with-wide-buffer':
> 1. `org-with-wide-buffer' widens the buffer
> 2. `org-narrow-to-subtree' narrows it to subtree
> 3. `org-element-parse-buffer' gets executed on the narrowed buffer
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 
>


Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-11 Thread Ihor Radchenko
Matt  writes:

>   On Thu, 05 Jan 2023 06:21:16 -0500  Bastien Guerry  wrote --- 
>  > My bad: I did not warn Emacs maintainers in time.  Now it is done,
>  > I will let you know when they grand you access to the Emacs project.
>
> I got an email from Eli on Thursday saying I was added.  I've still been 
> getting an error when trying to push:
>
> fatal: remote error: access denied or repository not exported: 
> /emacs/org-mode.git

I have the following Git configuration:

 u remote.origin.url yanta...@git.savannah.gnu.org:/srv/git/emacs/org-mode.git

Are you using the same?

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



Re: (org-element-parse-buffer) and (org-with-wide-buffer)

2023-01-11 Thread Ihor Radchenko
Michael Dauer  writes:

> But within (org-with-wide-buffer) the collapsed branches should be visible.

You have `org-narrow-to-subtree' inside `org-with-wide-buffer':
1. `org-with-wide-buffer' widens the buffer
2. `org-narrow-to-subtree' narrows it to subtree
3. `org-element-parse-buffer' gets executed on the narrowed buffer

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



Re: (org-element-parse-buffer) and (org-with-wide-buffer)

2023-01-11 Thread Michael Dauer
But within (org-with-wide-buffer) the collapsed branches should be visible.

Ihor Radchenko  schrieb am Mi., 11. Jän. 2023, 11:02:

> Michael Dauer  writes:
>
> > I would expect both output rows to be identical. But it seems
> > that (org-with-wide-buffer) has no effect on (org-element-parse-buffer)
> > with VISIBLE-ONLY argument.
>
> > While I believe this is a bug, I would also appreciate hearing about
> > possible work-arounds.
>
> This behaviour is documented in the docstring of
> `org-element-parse-buffer':
>
> If narrowing is in effect, only parse the visible part of the
> buffer.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 
>


Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects

2023-01-11 Thread Ihor Radchenko
Leo Butler  writes:

> Leo, could you please take a look?

 An earlier test is creating that *Org Babel Error Output* buffer.
>>
>> I will try to look into improving the tests so that we can trap the test(s)
>> that is(are) creating that error buffer.
>
> See the attachment. There are four test failures that are currently
> untrapped. I also see the `buffer-live-p' bug. 

It looks like `buffer-live-p' is not a bug, but rather the result of
backtrace being printed upon executing `kill-buffer' in unwind-protect
form from the test body: (1) test fails; (2) unwind-protect executes
kill-buffer; (3) backtrace is printed with "killed" buffer object.

So, the test failure is real.

https://orgmode.org/list/94980226-d29a-4969-8640-1143a1979...@bundesbrandschatzamt.de
might be related.

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



Re: [PATCH] org-datetree.el: Allow datetrees with TODO, priority, tags

2023-01-11 Thread Ilya Chernyshov


Ihor Radchenko  writes:


Ilya Chernyshov  writes:


 (defun org-datetree--find-create
@@ -169,18 +167,19 @@ component.  If INSERT is non-nil and 
there is no match then it is

 inserted into the buffer."
   (when (or month day)
 (org-narrow-to-subtree))
-  (let ((re (format regex-template year month day))
+  (let ((re (format org-complex-heading-regexp-format
+(format regex-template year month day)))


These changes make the docstring for `org-datetree--find-create'
incorrect:

(defun org-datetree--find-create
(regex-template year  month day insert)
  "Find the datetree matched by REGEX-TEMPLATE for YEAR, 
  MONTH, or DAY.
REGEX-TEMPLATE is passed to `format' with YEAR, MONTH, and 
DAY as
arguments.  Match group 1 is compared against the specified 
date
component.  If INSERT is non-nil and there is no match then 
it is

inserted into the buffer."

Please update the docstring to reflect the new behaviour.


Changed the docs, please review the new patch.

>From 2345abe57d4942a47fd55c2c6f741ef5c2643d47 Mon Sep 17 00:00:00 2001
From: Ilya Chernyshov 
Date: Thu, 15 Dec 2022 02:08:15 +0600
Subject: [PATCH] lisp/org-datetree.el: Allow datetrees with TODO, priority,
 tags

* org-datetree.el (org-datetree--find-create,
org-datetree--find-create-group, org-datetree-find-iso-week-create):
Allow finding a datetree with TODO state, priority, tags, statistics
cookies, or COMMENT keyword.

* testing/lisp/test-org-datetree.el
(test-org-datetree/find-date-create,
test-org-datetree/find-iso-week-create): Add tests for a datetree with
tags, TODO or priority keywords.

* etc/ORG-NEWS (Datetree structure headlines can now be complex):
Document the change.

* doc/org-manual.org: Update datetree definition.
---
 doc/org-manual.org|  3 ++-
 etc/ORG-NEWS  |  7 +++
 lisp/org-datetree.el  | 35 ++-
 testing/lisp/test-org-datetree.el | 16 ++
 4 files changed, 46 insertions(+), 15 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index f3b77ebad..f816f8725 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -22507,7 +22507,8 @@ level.
 ,*** 2022-10-08 Saturday
 #+end_example
 
-Tags are allowed in the tree structure.
+TODO state, priority, tags, statistics cookies, and COMMENT keywords
+are allowed in the tree structure.
 
 [fn:31] This is always the other, not the user.  See the variable
 ~org-link-from-user-regexp~.
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index c5d9bdf6e..0c9c7bf91 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -55,6 +55,13 @@ document header:
 ,#+LATEX_HEADER: \DefineVerbatimEnvironment{lstlisting}{Verbatim}{...whatever...}
 #+END_src
 
+** New features
+*** Datetree structure headlines can now be complex
+
+~org-datetree--find-create~ function can now find datetree
+headlines with TODO state, priority, tags, statistics cookies, or
+COMMENT keyword
+
 * Version 9.6
 
 ** Important announcements and breaking changes
diff --git a/lisp/org-datetree.el b/lisp/org-datetree.el
index 035ef047a..22d9760b0 100644
--- a/lisp/org-datetree.el
+++ b/lisp/org-datetree.el
@@ -99,15 +99,14 @@ If time-period is month, then group entries by month."
 	  (month (calendar-extract-month d))
 	  (day (calendar-extract-day d)))
   (org-datetree--find-create
-   "^\\*+[ \t]+\\([12][0-9]\\{3\\}\\)\\(\\s-*?\
-\\([ \t]:[[:alnum:]:_@#%%]+:\\)?\\s-*$\\)"
+   "\\([12][0-9]\\{3\\}\\)"
year)
   (org-datetree--find-create
-   "^\\*+[ \t]+%d-\\([01][0-9]\\) \\w+$"
+   "%d-\\([01][0-9]\\) \\w+"
year month)
   (when (eq time-grouping 'day)
 	(org-datetree--find-create
-	 "^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\) \\w+$"
+ "%d-%02d-\\([0123][0-9]\\) \\w+"
 	 year month day)
 
 ;;;###autoload
@@ -147,40 +146,48 @@ will be built under the headline at point."
 	   (week (nth 0 iso-date)))
   ;; ISO 8601 week format is %G-W%V(-%u)
   (org-datetree--find-create
-   "^\\*+[ \t]+\\([12][0-9]\\{3\\}\\)\\(\\s-*?\
-\\([ \t]:[[:alnum:]:_@#%%]+:\\)?\\s-*$\\)"
+   "\\([12][0-9]\\{3\\}\\)"
weekyear nil nil
(format-time-string "%G" time))
   (org-datetree--find-create
-   "^\\*+[ \t]+%d-W\\([0-5][0-9]\\)$"
+   "%d-W\\([0-5][0-9]\\)"
weekyear week nil
(format-time-string "%G-W%V" time))
   ;; For the actual day we use the regular date instead of ISO week.
   (org-datetree--find-create
-   "^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\) \\w+$"
+   "%d-%02d-\\([0123][0-9]\\) \\w+"
year month day
 
 (defun org-datetree--find-create
 (regex-template year  month day insert)
   "Find the datetree matched by REGEX-TEMPLATE for YEAR, MONTH, or DAY.
-REGEX-TEMPLATE is passed to `format' with YEAR, MONTH, and DAY as
-arguments.  Match group 1 is compared against the specified date
+
+The result of `format' with REGEX-TEMPLATE as format string and
+YEAR, 

Re: [BUG] issue with texmathp [9.6 (release_9.6-22-g78d283 @ /home/jds6696/.emacs.d/straight/build/org-mode/)]

2023-01-11 Thread Ihor Radchenko
Daniel Fleischer  writes:

> Ihor Radchenko  writes:
>
>> Can you try to test the attached patch?
>
> Looks good. Now these work again: `cdlatex-dollar`, inserting symbols
> using ` outside math environments and inserting cdlatex environments
> with completion also outside math environments. Need to make sure the
> issue of the OP didn't regress.

Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=dfcf500df

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



Re: (org-element-parse-buffer) and (org-with-wide-buffer)

2023-01-11 Thread Ihor Radchenko
Michael Dauer  writes:

> I would expect both output rows to be identical. But it seems
> that (org-with-wide-buffer) has no effect on (org-element-parse-buffer)
> with VISIBLE-ONLY argument.

> While I believe this is a bug, I would also appreciate hearing about
> possible work-arounds.

This behaviour is documented in the docstring of
`org-element-parse-buffer':

If narrowing is in effect, only parse the visible part of the
buffer.

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



Re: [FR] Please add writing to existing heading in org-bibtex

2023-01-11 Thread Ihor Radchenko
Sterling Hooten  writes:

> Thanks for the instructions, this is my first patch.
>
> I think calling  `nonew’ invalidates the argument `no-indent’ as 
> `org-bibtex-put’ eventually 
> calls `org-entry-put’ which uses `org-indent-line’. I’m not sure what’s the 
> best way to handle that.

You are indeed right.
I suggest doing the following:
1. Change the function definition to ( arg no-indent nonew)
2. With C-u prefix ARG or ARG = 'new, update heading at point
3. When ARG is not C-u and not 'new, treat it as non-nil no-indent in
   the past
   "22.12 Prefix Command Arguments" section of Elisp manual might be
   helpful to understand how to check C-u programmatically.
4. If NO-INDENT or NONEW arguments are non-nil, use them unconditionally
   regardless of the value of ARG

This way, the previous usage of the function will be the least affected.

> diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
> index d4e9b4368..8eab4cae2 100644
> --- a/etc/ORG-NEWS
> +++ b/etc/ORG-NEWS
> @@ -513,6 +513,10 @@ use =attachment:= style links instead of the standard 
> =file:= link type.

If you can, please create a proper patch with commit message, as
suggested in https://orgmode.org/worg/org-contribute.html#commit-messages

You can also refer to
https://orgmode.org/worg/org-contribute.html#org8a3a431

> +*** ~org-bibtex-write~ can now write to heading at point with optional 
> interactive argument
> +
> +Previously, a new heading was created. Now with argument =nonew= the
> +bibtex data will be added to properties of heading at point.

Please use double space between sentences. It is our convention. See
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/doc/Documentation_Standards.org
 
 

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



(org-element-parse-buffer) and (org-with-wide-buffer)

2023-01-11 Thread Michael Dauer
I see a potential bug here: (org-element-parse-buffer) with VISIBLE-ONLY
does not include regions made visible with (org-with-wide-buffer).

Test (Have h2.2.1 collapsed before running it.):
>>>
* h1
** h2
*** h2.1
*** h2.2
#+begin_src elisp
(org-with-wide-buffer
 (org-narrow-to-subtree)
 (goto-char (point-min))
 (list
  (--map (cadr it)
 (s-match-strings-all "^\\*+ \\(.*\\)$"
  (buffer-substring-no-properties
   (point-min) (point-max
  (org-element-map (caddr (org-element-parse-buffer 'object t)) 'headline
(lambda (it) (org-element-property :raw-value it
)
#+end_src

#+RESULTS:
| h2.2 | h2.2.1 | h2.2.1.1 |
| h2.2 | h2.2.1 |  |

 h2.2.1
* h2.2.1.1
a
*** h2.3
* h3
<<<

I would expect both output rows to be identical. But it seems
that (org-with-wide-buffer) has no effect on (org-element-parse-buffer)
with VISIBLE-ONLY argument.

While I believe this is a bug, I would also appreciate hearing about
possible work-arounds.

thx