Re: [patch] ox-latex.el: add `:options' LaTeX attribute to tables

2021-10-26 Thread Vikas Rawal


>
> Example:
>
> #+ATTR_LATEX: :environment longtblr
> #+ATTR_LATEX: :align colspec = {XXX}, width = 0.85\linewidth
> #+ATTR_LATEX: :options remark{Note} = {Lorem ipsum dolor sit amet}
>
> ==> \begin{longtblr}[remark{Note} = {Lorem ipsum dolor sit amet}]{colspec = 
> {XXX}, width = 0.85\linewidth}

This is excellent. There is only one improvement that I would like you to 
consider. Is it possible to allow multiple ":options " lines that are appended 
when exported to
+latex? Something like this:

#+ATTR_LATEX: :environment longtblr
#+ATTR_LATEX: :align colspec = {XXX}, width = 0.85\linewidth
#+ATTR_LATEX: :options remark{Note} = {Lorem ipsum dolor sit amet}
#+ATTR_LATEX: :options remark{Source} = {The source of data}

 ==> \begin{longtblr}[remark{Note} = {Lorem ipsum dolor sit amet},
  remark{Source} = {The source of data}]{colspec = {XXX}, 
width = 0.85\linewidth}

This would be more elegant since table notes can be elaborate and putting them 
all in one line would make them unwieldy.

At the moment, only the last ":options" line is considered.

Thanks a lot.

Vikas



[PATCH] Fast tag de-selection face

2021-10-26 Thread Daniel Fleischer

Bumping a patch; it solves a minor bug in which the tags in the fast tag
selection buffer do not toggle their face back to default after being
selected and deselected.

Attached.

 >From 50fd7e953eed7c339886722c8247d9e492113eb8 Mon Sep 17 00:00:00 2001
From: Daniel Fleischer 
Date: Fri, 8 Oct 2021 12:55:04 +0300
Subject: [PATCH] lisp/org.el: Fast tag selection disabled tag face

* lisp/org.el (org-fast-tag-selection): Disabled tags face

A tag can be either selected in "current", "inherited" or disabled. When
disabled, it should have the default face. Previously, if a tag was
already selected, when deselection it will still have an org-todo face.
---
 lisp/org.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 21b2c5470..bcc8356bb 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12566,8 +12566,7 @@ (defun org-fast-tag-selection (current inherited table  todo-table)
 			   (cond
 ((member tag current) c-face)
 ((member tag inherited) i-face)
-(t (get-text-property (match-beginning 1) '
-		  face
+(t 'default)))
 		  (goto-char (point-min)
 	(delete-overlay org-tags-overlay)
 	(if rtn
-- 
2.33.1


-- 

Daniel Fleischer


Re: org-persist warning when archiving

2021-10-26 Thread Colin Baxter 
Hi Ihor,

> Ihor Radchenko  writes:

> Colin Baxter   writes:
>> I'm running Org mode version 9.5 (release_9.5-178-gcf8906) on
>> emacs-28.0.60. Unfortunately, I could not apply your patch
>> ('patch would not apply') using either 'git apply /path/to/patch'
>> or 'git a /path/to/patch'.

> Oops. Try the updated patch. The old one was based on my working
> branch.

Ok, I now applied your patch and remade org-mode. Unfortunately, I don't
see any change. I still get the warning on all the archive commands:
org-agenda-archive-default, org-agenda-archive and
org-agenda-archive-default-with-confirmation. I've appended the warning
for the latter command.

--8<---cut here---start->8---
Warning (emacs): org-element--cache: Unregistered buffer modifications 
detected. Resetting.
If this warning appears regularly, please report it to Org mode mailing list 
(M-x org-submit-bug-report).
The buffer is: todo.org_archive
 Current command: org-agenda-archive-default-with-confirmation Disable showing 
Disable logging
Warning (emacs): org-element--cache: Unregistered buffer modifications 
detected. Resetting.
If this warning appears regularly, please report it to Org mode mailing list 
(M-x org-submit-bug-report).
The buffer is: todo.org_archive
Current command: org-agenda-archive-default-with-confirmation Disable showing 
Disable logging
--8<---cut here---end--->8---

I've not tried it on emacs -Q yet. For that, do I need to start afresh
and first delete the org-persist-directory?

Best wishes,

Colin.



Re: Sub-figures in Org Mode

2021-10-26 Thread Jason Ross

Hi Juan,

On 10/22/21 5:00 PM, Juan Manuel Macías wrote:

Hi Jason,

Jason Ross  writes:


Are there any workarounds people use to create subfigures in Org Mode
when exporting to LaTeX? Example output:


In this thread I explain a procedure to export images as subfigures
using org links: https://list.orgmode.org/87mty1an66@posteo.net/

Best regards,

Juan Manuel



Those are some really clever solutions. I hadn't considered using a
dsl for figure options.

I'm looking at declaring a "figure" block the way you are, but
`org-element-map'ing over the links inside the block and processing them
with the "normal" link-handling machinery. That way, image options work
the same way in a subfigure as they do normally.

Here's what I'm messing with for the ConTeXt backend (this relies
on some changes to figure handling I haven't pushed yet):

#+begin_src elisp
(defun org-context--special-block-figure (orig-fun special-block 
contents info)

  (let ((type (org-element-property :type special-block)))
(if (string= "figure" (downcase type))
(let* ((attr (org-export-read-attribute :attr_context 
special-block))

   (links (org-element-map special-block 'link #'identity))
   (placefigure-options
(org-context--format-arguments
 (org-context--get-placefigure-options special-block 
info)))

   (captionp
(mapcan
 (lambda (link)
   (let* ((parent (org-export-get-parent-element link))
  (caption (org-string-nw-p 
(org-context--caption/label-string parent info

 (and caption (list caption
 links))
   (image-codes
(mapconcat
 (lambda (link)
   (let ((figure-string 
(org-context--get-link-figure-string link info)))

 (if captionp
   (let ((caption
  (org-string-nw-p
   (org-context--caption/label-string
(org-export-get-parent-element link) 
info

 (format "{%s}\n{%s}"
 figure-string (or caption "")))
 (format "{%s}" figure-string)))

   )
 links
 "\n"))
   (dimensions
(let* ((rows (plist-get attr :rows))
   (cols (plist-get attr :cols))
   (nlinks (length links)))
  (if
  (and rows cols)
  (cons (string-to-number rows) (string-to-number 
cols))

(cons 1 nlinks
   combination-options)
  (if captionp
   (push (cons "alternative" "text") combination-options)
(push (cons "alternative" "label") combination-options))
  (push (cons "nx" (format "%s" (cdr dimensions))) 
combination-options)
  (push (cons "ny" (format "%s" (car dimensions))) 
combination-options)

  (message (format "%S" combination-options))
  (format "\\startplacefigure[%s]
\\startcombination[%s]
%s
\\stopcombination
\\stopplacefigure"
  placefigure-options
  (org-context--format-arguments combination-options)
  image-codes))
  (funcall orig-fun special-block contents info

(advice-add 'org-context-special-block :around 
#'org-context--special-block-figure)


#+end_src




Re: [patch suggestion] Mitigating the poor Emacs performance on huge org files: Do not use overlays for PROPERTY and LOGBOOK drawers

2021-10-26 Thread Matt Price
On Tue, Sep 21, 2021 at 9:36 AM Timothy  wrote:

> I’m suspect it too short notice for such a large change to make its way
> into Org
> 9.5, but Bastien’s release email is certainly a good prompt to bump this.
>
> Bastien  writes:
>
> > Thank you *very much* for this work and sorry for the slow reply.
> >
> > I urge everyone to test this change, as I’d like to include it in
> > Org 9.5 if it’s ready.
> >
> > I will test this myself this week and report.
>
> All the best,
> Timothy
>

Is this code in main now, and do I have to do anything special to test it
out?


Re: Bug: font-lock error with - in code-mode [9.4.6 (9.4.6-gab9f2a @ /gnu/store/2pny4z6mbi2aybgzzxz0yrzkds7hbpmq-emacs-org-9.4.6/share/emacs/site-lisp/org-9.4.6/)]

2021-10-26 Thread Max Nikulin

On 26/10/2021 00:33, Bastien wrote:

Ihor Radchenko writes:


I am thinking to revert the patch and reopen (BTW, how to do it in
Woof!?) this bug report for now.


Sure, please go ahead, thanks.

PS: I'm not sure how to do this with Woof! but I'm working on the next
version of Woof! where this will be possible.


Would not it be enough to just add X-Woof-Bug header to the message? 
Maybe even with "(Reopened)" suffix to the title to warn other people 
that it is not a forgotten bug, even if they remember that some patch 
was committed. It is a wild guess, I did not looked into the "Woof!" 
code. I just assume that logic inside is not overcomplicated.






Re: the GNU bug tracker, use it or have something similar? Gmane might block attachments in bug reports

2021-10-26 Thread Max Nikulin

On 26/10/2021 02:21, Uwe Brauer wrote:

Max Nikulin writes:

I am unsure to which list you are going to send a copy. Emacs-orgmode
is hosted on gnu.org just as other emacs lists.


To bug-gnu-em...@gnu.org
That one I can access via debbugs-org

That function seems a good compromise: it does not require to be
subscribed to the list, and it does not suffer from gmane's problem.


I may be wrong in some minor details, but Emacs bug tracker (among other 
GNU projects) resides on https://debbugs.gnu.org/ Its main interface 
though is email, but ...@debbugs.gnu.org, not bug-gnu-em...@gnu.org. The 
latter is just a broadcast notification channel. I do not think, 
messages sent directly to bug-gnu-em...@gnu.org are forwarded to 
debbugs.gnu.org. Sometimes emacs-orgmode is added as Cc address for bugs 
tracked by debbugs. In such cases it is better to reply directly to mail 
address associated with the bug, not to the mail list, otherwise the 
response will not appear in the debbugs archive.



When I call debbugs-org I do not see my bug, are you saying I should?


You may see your bug on https://updates.orgmode.org/ that is independent 
tracker, see e.g. https://list.orgmode.org/87wnmtb7dd@gnu.org/

However someone should confirm that it is a real bug.

https://list.orgmode.org/87v9kavoms@gnu.org/
Bastien. Re: issue tracker? Mon, 01 Jun 2020 16:36:59 +0200

I'd like to keep this mailing list as the central place to discuss
everything about Org, including bug reports.


I do not know what are the reasons why Bastien prefers to develop 
"Woof!" instead of relying on much more powerful debbugs. As to me, for 
some reason it requires a bit more time and cognitive efforts to realize 
current status of a debbugs issue in comparison to the most of other 
trackers. In addition, I do not like that GNU's debbugs instance exposes 
contents to general purpose search engines in a form that makes it hard 
to provide relevant search results and descriptive summary snippet (due 
to some performance reasons). So bugs are often rates much lower than 
reddit threads and stackexchange questions.



Well one thing I learned is to stick to emacs -Q strictly, but I would
like to know whether debbugs-org could access this bug?


org-submit-bug-report may act better by adding a warning that user may 
expose some private information to public and by suggesting -Q if state 
size is above some threshold.


-Q is mentioned in almost all sources related to bug reports, e.g.
https://orgmode.org/manual/Feedback.html (info "(org) Feedback")

debbugs-org is an interface to debbugs, but Org mostly uses mail list 
directly and updates.orgmode.org, so the only way to get a bug in 
debbugs-org is to send it to debbugs. It is neither forbidden nor 
encouraged.





[patch] ox-latex.el: add `:options' LaTeX attribute to tables

2021-10-26 Thread Juan Manuel Macías
Hi,

The `:options' attr. allows adding an optional argument with various
table options (between brackets in LaTeX export), since certain tabular
environments, such as `longtblr' of the `tabularray' LaTeX package,
provides this structure (see:
https://list.orgmode.org/CALtzAB1yM+uG_xHghCxTLRX5mgbzNvT5+PO=duabb28ncsv...@mail.gmail.com/#r)

Example:

#+ATTR_LATEX: :environment longtblr
#+ATTR_LATEX: :align colspec = {XXX}, width = 0.85\linewidth
#+ATTR_LATEX: :options remark{Note} = {Lorem ipsum dolor sit amet}

==> \begin{longtblr}[remark{Note} = {Lorem ipsum dolor sit amet}]{colspec = 
{XXX}, width = 0.85\linewidth}

Best regards,

Juan Manuel

>From 9b51d999029f91adc93a6009bc3ddf56bba7ba4a Mon Sep 17 00:00:00 2001
From: Juan Manuel Macias 
Date: Tue, 26 Oct 2021 12:29:55 +0200
Subject: [PATCH] ox-latex.el: add `options' latex attribute to tables

* lisp/ox-latex.el (org-latex--org-table): The `:options' LaTeX
attribute allows adding an optional argument (\begin{env}[opt]), since
certain tabular environments, such as longtblr, accept optional
arguments.
---
 lisp/ox-latex.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 3e3967033..409d92164 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -3314,6 +3314,7 @@ This function assumes TABLE has `org' as its `:type' property and
 `table' as its `:mode' attribute."
   (let* ((attr (org-export-read-attribute :attr_latex table))
 	 (alignment (org-latex--align-string table info))
+ (opt (org-export-read-attribute :attr_latex table :options))
 	 (table-env (or (plist-get attr :environment)
 			(plist-get info :latex-default-table-environment)))
 	 (width
@@ -3343,8 +3344,9 @@ This function assumes TABLE has `org' as its `:type' property and
 		(format "\\end{%s}" table-env)
 		(and fontsize "}"
  (t
-  (let ((output (format "\\begin{%s}%s{%s}\n%s\\end{%s}"
+  (let ((output (format "\\begin{%s}%s%s{%s}\n%s\\end{%s}"
 			table-env
+(if opt (format "[%s]" opt) "")
 			width
 			alignment
 			contents
-- 
2.33.0



Re: org-persist warning when archiving

2021-10-26 Thread Ihor Radchenko
Colin Baxter   writes:

> I'm running Org mode version 9.5 (release_9.5-178-gcf8906) on
> emacs-28.0.60. Unfortunately, I could not apply your patch ('patch would
> not apply') using either 'git apply /path/to/patch' or 'git a
> /path/to/patch'.

Oops. Try the updated patch. The old one was based on my working branch.

Best,
Ihor

>From 722f595c7bef4801e7d0e5f476ecbb9eb63a16ab Mon Sep 17 00:00:00 2001
Message-Id: <722f595c7bef4801e7d0e5f476ecbb9eb63a16ab.1635260679.git.yanta...@gmail.com>
From: Ihor Radchenko 
Date: Tue, 26 Oct 2021 19:19:57 +0800
Subject: [PATCH] org.el/org-mode: Do not inhibit `after-change-functions' when
 loading

* lisp/org.el (org-mode): Let-bind `buffer-undo-list' instead of using
`org-unmodified'.  The latter suppresses org-element-cache handling of
buffer changes.
---
 lisp/org.el | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 21b2c5470..e2a02c115 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4940,22 +4940,22 @@ (define-derived-mode org-mode outline-mode "Org"
 	 (= (point-min) (point-max)))
 (insert "#-*- mode: org -*-\n\n"))
   (unless org-inhibit-startup
-(org-unmodified
- (when org-startup-with-beamer-mode (org-beamer-mode))
- (when (or org-startup-align-all-tables org-startup-shrink-all-tables)
-   (org-table-map-tables
-	(cond ((and org-startup-align-all-tables
-		org-startup-shrink-all-tables)
-	   (lambda () (org-table-align) (org-table-shrink)))
-	  (org-startup-align-all-tables #'org-table-align)
-	  (t #'org-table-shrink))
-	t))
- (when org-startup-with-inline-images (org-display-inline-images))
- (when org-startup-with-latex-preview (org-latex-preview '(16)))
- (unless org-inhibit-startup-visibility-stuff (org-set-startup-visibility))
- (when org-startup-truncated (setq truncate-lines t))
- (when org-startup-numerated (require 'org-num) (org-num-mode 1))
- (when org-startup-indented (require 'org-indent) (org-indent-mode 1
+(let ((buffer-undo-list t))
+  (when org-startup-with-beamer-mode (org-beamer-mode))
+  (when (or org-startup-align-all-tables org-startup-shrink-all-tables)
+(org-table-map-tables
+	 (cond ((and org-startup-align-all-tables
+		 org-startup-shrink-all-tables)
+	(lambda () (org-table-align) (org-table-shrink)))
+	   (org-startup-align-all-tables #'org-table-align)
+	   (t #'org-table-shrink))
+	 t))
+  (when org-startup-with-inline-images (org-display-inline-images))
+  (when org-startup-with-latex-preview (org-latex-preview '(16)))
+  (unless org-inhibit-startup-visibility-stuff (org-set-startup-visibility))
+  (when org-startup-truncated (setq truncate-lines t))
+  (when org-startup-numerated (require 'org-num) (org-num-mode 1))
+  (when org-startup-indented (require 'org-indent) (org-indent-mode 1
 
   ;; Add a custom keymap for `visual-line-mode' so that activating
   ;; this minor mode does not override Org's keybindings.
-- 
2.32.0



Re: Problems generating the org-mode documentation

2021-10-26 Thread Jean-Christophe Helary



> On Oct 22, 2021, at 15:34, Pedro Andres Aranda Gutierrez  
> wrote:
> 
> I have checked on a MacBook Pro with 16G running non-virtualised 

Same here. It is not a resource problem.

-- 
Jean-Christophe Helary @brandelune
https://mac4translators.blogspot.com
https://sr.ht/~brandelune/omegat-as-a-book/




Re: org-persist warning when archiving

2021-10-26 Thread Colin Baxter 
Hi Thor,
> Ihor Radchenko  writes:

> Colin Baxter   writes:
>> > Hello, Whenever I archive a DONE item via 'C-c C-x C-a' I get
>> the > warning:
>> 
>> > Warning (emacs): org-element--cache: Unregistered buffer >
>> modifications detected. Resetting.
>> 
>> > The archiving is successful, but I keep getting the warning and
>> > therefore wonder if there is some org-persist or cache setting
>> > that needs to be adjusted.
>> 
>> Thinking a little more about this, I have not yet had a chance of
>> archiving an item in a new emacs session. It may be that the
>> warning is temporary to the first session and will disappear if
>> and when I archive a DONE item in a new session.

> This message always indicates some problem. However, I cannot
> reproduce what you observe on my side. Did you try with emacs -Q?
> Also, you might not be running the latest Org. I have extended
> this warning in recent commits.

I'm running Org mode version 9.5 (release_9.5-178-gcf8906) on
emacs-28.0.60. Unfortunately, I could not apply your patch ('patch would
not apply') using either 'git apply /path/to/patch' or 'git a
/path/to/patch'. I then tried manually to apply it, but that produced
errors when I ran the command org-agenda. I may have messed up the
manual apply so I'll try again tonight.

Best wishes,

Colin.



Re: Problems generating the org-mode documentation

2021-10-26 Thread Pedro Andres Aranda Gutierrez
Hi

> I think the trouble with "TeX capacity exceeded" is not a trouble with "make 
> doc", Emacs or Org.
> Probably a trouble with make or TeX environment as for example the size of 
> available RAM.
> I have already met that on Virtual machine with not enough memory for 
> compilation but just enough for installation of the OS.

I have checked on a MacBook Pro with 16G running non-virtualised and I
met the problem at the same place as on a Ubuntu Linux VM with 2, 4 or
8 GBytes of memory

Best, /PA


On Fri, 22 Oct 2021 at 08:16, Vincent Breton 
wrote:

> >* On Oct 18, 2021, at 20:51, Pedro Andres Aranda Gutierrez 
> >  *
> >* wrote:
> *>* I'm trying to generate the documentation
> *>* ./org.texi:17579: TeX capacity exceeded, sorry [input stack size=5000].
> **Jean-Christophe Helary reported too the location of the source of trouble 
> identified by *Takesi Ayanokoji.
>
> I think the trouble with "TeX capacity exceeded" is not a trouble with "make 
> doc", Emacs or Org.
> Probably a trouble with make or TeX environment as for example the size of 
> available RAM.
> I have already met that on Virtual machine with not enough memory for 
> compilation but just enough for installation of the OS.
>
> On my system "make doc" generate an error but I found a temporary solution to 
> generate the documentation in PDF.
>
> 1) I start to make a git clone:
> git clone https://git.savannah.gnu.org/git/emacs/org-mode.git
> 2) I used make
> cd org-mode
> make cleanall
> make all
> 3) I generate the pdf files inside the doc directory without using make file:
> cd doc
> makeinfo --pdf org.texi
> makeinfo --pdf orgguide.texi
> 4) You can find the files generated in 
> http://www.presentiel.com/org/orgguide.pdf and  in 
> http://www.presentiel.com/org/org.pdf
>
>
> About "make doc":
> "make doc" don't work on my environment:
> "make info" and "make html" are working fine but "make pdf", a part of "make 
> doc", is not working on my environment.
>
> I reproduce below the error and I suppose there is something wrong with the 
> initial path:
>
> entering extended mode
> (../../../org.t2d/pdf/src/org.texi)
> *
> ! Emergency stop.
> <*> \input ../../../org.t2d/pdf/src/org.texi
>
> !  ==> Fatal error occurred, no output PDF file produced!
> Transcript written on org.log.
>
>

-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler


[BUG] "args out of range" on link heading completion [9.5 (9.5-gd361c7 @ /Users/carlos/.emacs.d/straight/build/org/)]

2021-10-26 Thread Carlos Pita
Hi,

when I try to autocomplete a heading inside a link I get:

completion--some: Args out of range: #("*hea" 0 1 (fontified t
help-echo "LINK: *head" htmlize-link (:uri "*head") rear-nonsticky
(mouse-face highlight keymap invisible intangible help-echo
org-linked-text htmlize-link) face org-link ...) 1 2 (fontified t
help-echo "LINK: *head" htmlize-link (:uri "*head") rear-nonsticky
(mouse-face highlight keymap invisible intangible help-echo
org-linked-text htmlize-link) face org-link ...) 2 3 (fontified t
help-echo "LINK: *head" htmlize-link (:uri "*head") rear-nonsticky
(mouse-face highlight keymap invisible intangible help-echo
org-linked-text htmlize-link) face org-link ...) 3 4 (fontified t
help-echo "LINK: *head" htmlize-link (:uri "*head") rear-nonsticky
(mouse-face highlight keymap invisible intangible help-echo
org-linked-text htmlize-link) face org-link ...)), 0, 5


To reproduce:

1. Create org file with a heading:

* heading

2. Start typing a link to that heading and press  to autocomplete:

[[*head]]

Best regards,
Carlos

---

Emacs  : GNU Emacs 28.0.60 (build 3, x86_64-apple-darwin20.6.0, NS 
appkit-2022.60 Version 11.6 (Build 20G165))
 of 2021-10-18
Package: Org mode version 9.5 (9.5-gd361c7 @ 
/Users/carlos/.emacs.d/straight/build/org/)

current state:
==
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-directory "~/Documents"
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-babel-after-execute-hook '(org-redisplay-inline-images)
 org-agenda-files '("/tmp/test.org")
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-default-notes-file "~/Documents/inbox.org"
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-font-lock-set-keywords-hook '(doom-themes-enable-org-fontification)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-show-all append local] 5]
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-confirm-shell-link-function 'yes-or-no-p
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer doom-modeline-set-org-src-modeline)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-todo-keywords '((sequence "TODO" "NEXT" "|" "DONE"))
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-preview-latex-default-process 'dvisvgm
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-pre-tangle-hook '(save-buffer)
 org-agenda-loop-over-headlines-in-active-region nil
 org-occur-hook '(org-first-headline-recenter)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("attachment" :follow org-attach-follow :complete 
org-attach-complete-link) ("id" :follow org-id-open)
   ("eww" :follow org-eww-open :store org-eww-store-link) 
("rmail" :follow org-rmail-open :store org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link 
:export org-irc-export)
   ("info" :follow org-info-open :export org-info-export 
:store org-info-store-link)
   ("gnus" :follow org-gnus-open :store org-gnus-store-link)
   ("docview" :follow org-docview-open :export 
org-docview-export :store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store 
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export 
:complete org-bbdb-complete-link :store org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link) ("doi" :follow 
org-link-doi-open :export org-link-doi-export) ("file+sys")
   ("file+emacs") ("shell" :follow org-link--open-shell)
   ("news" :follow #[514 "\301\300\302Q\"\207" ["news" 
browse-url ":"] 6 "\n\n(fn URL ARG)"])
   ("mailto" :follow #[514 "\301\300\302Q\"\207" ["mailto" 
browse-url ":"] 6 "\n\n(fn URL ARG)"])
   ("https" :follow #[514 "\301\300\302Q\"\207" ["https" 
browse-url ":"] 6 "\n\n(fn URL ARG)"])
   ("http" :follow #[514 "\301\300\302Q\"\207" ["http" 
browse-url ":"] 6 "\n\n(fn URL ARG)"])
   ("ftp" :follow #[514 "\301\300\302Q\"\207" ["ftp" 
browse-url ":"] 6 "\n\n(fn URL ARG)"])
   

Bug: Inconsistent macro replacement [9.4.4 (release_9.4.4 @ /nix/store/jzj2bbfjlbv08xjgyljf7aqf7q2jcbm8-emacs-27.2/share/emacs/27.2/lisp/org/)]

2021-10-26 Thread Vinicius Vinicius
While {{{title}}} concatenates multiple #+TITLE lines, {{{author}}} retrieves only the first one. MWE:#+TITLE: Foo#+TITLE: Foo2 #+AUTHOR: First Author#+AUTHOR: Second Author {{{title}}} vs {{{author}}} Emacs  : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)Package: Org mode version 9.4.4 (release_9.4.4 @ /nix/store/jzj2bbfjlbv08xjgyljf7aqf7q2jcbm8-emacs-27.2/share/emacs/27.2/lisp/org/) current state:==(setq org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-link-shell-confirm-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-odt-format-headline-function 'org-odt-format-headline-default-function org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-mode-hook '(#[0 "\300\301\302\303\304$\207"                   [add-hook change-major-mode-hook org-show-all append local] 5]                 #[0 "\300\301\302\303\304$\207"                   [add-hook change-major-mode-hook org-babel-show-result-all append local] 5]                 org-babel-result-hide-spec org-babel-hide-all-hashes) org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-archive-hook '(org-attach-archive-delete-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-agenda-before-write-hook '(org-agenda-add-entry-text) org-metaup-hook '(org-babel-load-in-session-maybe) org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-babel-pre-tangle-hook '(save-buffer) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines                  org-optimize-window-after-visibility-change) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function org-export-before-parsing-hook '(org-attach-expand-links) org-confirm-shell-link-function 'yes-or-no-porg-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link)   ("id" :follow org-id-open)   ("eww" :follow org-eww-open :store org-eww-store-link)   ("rmail" :follow org-rmail-open :store org-rmail-store-link)   ("mhe" :follow org-mhe-open :store org-mhe-store-link)   ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export)   ("info" :follow org-info-open :export org-info-export :store    org-info-store-link)   ("gnus" :follow org-gnus-open :store org-gnus-store-link)   ("docview" :follow org-docview-open :export org-docview-export :store    org-docview-store-link)   ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)   ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete    org-bbdb-complete-link :store org-bbdb-store-link)   ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs")   ("shell" :follow org-link--open-shell)   ("news" :follow    #[514 "\301\300\302Q\"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"])   ("mailto" :follow    #[514 "\301\300\302Q\"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"]    )                      ("https" :follow                        #[514 "\301\300\302Q\"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"])                       ("http" :follow                        #[514 "\301\300\302Q\"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"])                       ("ftp" :follow                        #[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"])                       ("help" :follow org-link--open-help) ("file" :complete org-link-complete-file)                       ("elisp" :follow org-link--open-elisp) ("doi" :follow org-link--open-doi)) org-latex-format-headline-function 'org-latex-format-headline-default-function org-link-elisp-confirm-function 'yes-or-no-p org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-html-format-headline-function 'org-html-format-headline-default-function )

Re: Problems generating the org-mode documentation

2021-10-26 Thread Pedro Andres Aranda Gutierrez
Let’s hope then this makes its way to Emacs-28 sooner than later ;-)

/PA

Enviado desde mi iPhone

> El 23 oct 2021, a las 6:06, Kyle Meyer  escribió:
> 
> Hoffmann, Jobst writes:
> 
>> But I think I found the culprit:
>> 
>> Line 17568 of org.texi reads:
>> 
>> @kindex C-c C-x @
>> 
>> and @ starts a command, which leads to the stack overflow.
>> 
>> Line 17568 of org.texi should read
>> 
>> @kindex C-c C-x @@
>> 
>> witha doubled @ at the end of the line and after applying this change
>> org.texi the documentation org.pdf can be generated without any error.
> 
> Marco Wahl fixed this entry a few days ago on the bugfix branch:
> 37791bb4f (org-manual: Fix one kindex entry, 2021-10-18).



Re: org-persist warning when archiving

2021-10-26 Thread Ihor Radchenko
Colin Baxter   writes:

> > Hello, Whenever I archive a DONE item via 'C-c C-x C-a' I get the
> > warning:
>
> > Warning (emacs): org-element--cache: Unregistered buffer
> > modifications detected. Resetting.
>
> > The archiving is successful, but I keep getting the warning and
> > therefore wonder if there is some org-persist or cache setting
> > that needs to be adjusted.
>
> Thinking a little more about this, I have not yet had a chance of
> archiving an item in a new emacs session. It may be that the warning
> is temporary to the first session and will disappear if and when I
> archive a DONE item in a new session.

This message always indicates some problem. However, I cannot reproduce
what you observe on my side. Did you try with emacs -Q? Also, you might
not be running the latest Org. I have extended this warning in recent
commits.

My crystal ball tells me that the attached patch might help. Can you try
it?

Best,
Ihor

>From da1e23bd1d8aaa673d034b288a6088868fe8abb7 Mon Sep 17 00:00:00 2001
Message-Id: 
From: Ihor Radchenko 
Date: Tue, 26 Oct 2021 19:19:57 +0800
Subject: [PATCH] org.el/org-mode: Do not inhibit `after-change-functions' when
 loading

* lisp/org.el (org-mode): Let-bind `buffer-undo-list' instead of using
`org-unmodified'.  The latter suppresses org-element-cache handling of
buffer changes.
---
 lisp/org.el | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 69ff7a8d4..a20be7aac 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4672,22 +4672,22 @@ (define-derived-mode org-mode outline-mode "Org"
 	 (= (point-min) (point-max)))
 (insert "#-*- mode: org -*-\n\n"))
   (unless org-inhibit-startup
-(org-unmodified
- (when org-startup-with-beamer-mode (org-beamer-mode))
- (when (or org-startup-align-all-tables org-startup-shrink-all-tables)
-   (org-table-map-tables
-	(cond ((and org-startup-align-all-tables
-		org-startup-shrink-all-tables)
-	   (lambda () (org-table-align) (org-table-shrink)))
-	  (org-startup-align-all-tables #'org-table-align)
-	  (t #'org-table-shrink))
-	t))
- (when org-startup-with-inline-images (org-display-inline-images))
- (when org-startup-with-latex-preview (org-latex-preview '(16)))
- (unless org-inhibit-startup-visibility-stuff (org-cycle-set-startup-visibility))
- (when org-startup-truncated (setq truncate-lines t))
- (when org-startup-numerated (require 'org-num) (org-num-mode 1))
- (when org-startup-indented (require 'org-indent) (org-indent-mode 1
+(let ((buffer-undo-list t))
+  (when org-startup-with-beamer-mode (org-beamer-mode))
+  (when (or org-startup-align-all-tables org-startup-shrink-all-tables)
+(org-table-map-tables
+	 (cond ((and org-startup-align-all-tables
+		 org-startup-shrink-all-tables)
+	(lambda () (org-table-align) (org-table-shrink)))
+	   (org-startup-align-all-tables #'org-table-align)
+	   (t #'org-table-shrink))
+	 t))
+  (when org-startup-with-inline-images (org-display-inline-images))
+  (when org-startup-with-latex-preview (org-latex-preview '(16)))
+  (unless org-inhibit-startup-visibility-stuff (org-cycle-set-startup-visibility))
+  (when org-startup-truncated (setq truncate-lines t))
+  (when org-startup-numerated (require 'org-num) (org-num-mode 1))
+  (when org-startup-indented (require 'org-indent) (org-indent-mode 1
 
   ;; Add a custom keymap for `visual-line-mode' so that activating
   ;; this minor mode does not override Org's keybindings.
-- 
2.32.0



Re: org-persist warning when archiving

2021-10-26 Thread Colin Baxter 
> Colin Baxter   writes:

> Hello, Whenever I archive a DONE item via 'C-c C-x C-a' I get the
> warning:

> Warning (emacs): org-element--cache: Unregistered buffer
> modifications detected. Resetting.

> The archiving is successful, but I keep getting the warning and
> therefore wonder if there is some org-persist or cache setting
> that needs to be adjusted.

Thinking a little more about this, I have not yet had a chance of
archiving an item in a new emacs session. It may be that the warning
is temporary to the first session and will disappear if and when I
archive a DONE item in a new session.

Colin.




org-persist warning when archiving

2021-10-26 Thread Colin Baxter 
Hello,

Whenever I archive a DONE item via 'C-c C-x C-a' I get the warning:

Warning (emacs): org-element--cache: Unregistered buffer modifications
detected. Resetting.

The archiving is successful, but I keep getting the warning and
therefore wonder if there is some org-persist or cache setting that
needs to be adjusted.

Best wishes,

Colin Baxter.





Re: prettify-symbols-mode in org agenda?

2021-10-26 Thread William Xu
Any updates here? I do hope the patch can be merged.. 

-- 
William




Re: Lisp error: (void-function org-element-keyword-parser)

2021-10-26 Thread Eric S Fraga
On Monday, 25 Oct 2021 at 15:00, Nick Dokos wrote:
> Eric S Fraga  writes:
>> For the record, I have had this or something very similar for a very
>> long time (years) now.  All my org-agenda-files which get loaded during
>> my initialization, when I set up the appointment handling, are in org
>> mode but none of the in-file settings have been applied.  
>
> I'm pretty sure that that should *NOT* be the case: setting the mode
> on the file consists of calling `org-mode'; that calls
> `org-set-regexps-and-options' which loops over all the in-buffer
> options and sets them.

Hi Nick,

I was told (I will try to find the original answer but it was indeed a
very long time ago) that the files were loaded in some way that avoided
all/most initialization.

The behaviour I see does seem to match the behaviour I would expect if
org-agenda-inhibit-startup were t but I have it set to nil.

Going through the org agenda appt code also seems to ensure that this
variable is nil in any case.

So I remain puzzled but it's not a biggie (for me) as Emacs is my window
manager (exwm) and my system is up 24/7: I seldom re-start Emacs.

-- 
: Eric S Fraga via Emacs 28.0.60, Org release_9.5-163-g4eab5b
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: [ISSUE] org-mode fill paragraph is slow and suspend often

2021-10-26 Thread Ihor Radchenko
"Christopher M. Miles"  writes:

> Emacs often suspend for a long time.
> ...
> 1467  26%   - org-element--cache-sync
> ...
> 1334  23%  - catch
> 1332  23%   - and
> 1332  23%- org-indent-add-properties

Thanks for reporting!
It looks like competing catch..throw.  Both org-indent and org-element
are using `interrupt' signals.

Can you try the attached patch and report back?

Best,
Ihor

>From cb0a73d58d429b62576822a98235a6bd3ff85809 Mon Sep 17 00:00:00 2001
Message-Id: 
From: Ihor Radchenko 
Date: Tue, 26 Oct 2021 16:14:40 +0800
Subject: [PATCH] org-element-cache: Rename `interrupt'
 `org-element--cache-interrupt'

* lisp/org-element.el (org-element--cache-sync,
org-element--cache-process-request, org-element--parse-to): Some other
code (at least, `org-indent-mode') is using `interrupt' signal in
`after-change-functions'.  Rename `interrupt' signal used in
org-element-cache to unique `org-element--cache-interrupt'.

Reported in https://list.orgmode.org/paxpr08mb66400699daceb31f4f0650f1a3...@paxpr08mb6640.eurprd08.prod.outlook.com/T/#u
---
 lisp/org-element.el | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index acc6c56c2..33c7a4051 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -5818,7 +5818,7 @@ (defun org-element--cache-sync (buffer  threshold future-change)
 	  (when org-element--cache-sync-timer
 	(cancel-timer org-element--cache-sync-timer))
   (let ((time-limit (time-add nil org-element-cache-sync-duration)))
-	(catch 'interrupt
+	(catch 'org-element--cache-interrupt
   (when org-element--cache-sync-requests
 (org-element--cache-log-message "Syncing down to %S-%S" (or future-change threshold) threshold))
 	  (while org-element--cache-sync-requests
@@ -5877,8 +5877,8 @@ (defun org-element--cache-process-request
 not registered yet in the cache are going to happen.  See
 `org-element--cache-submit-request' for more information.
 
-Throw `interrupt' if the process stops before completing the
-request."
+Throw `org-element--cache-interrupt' if the process stops before
+completing the request."
   (org-element--cache-log-message "org-element-cache: Processing request %s up to %S-%S, next: %S"
(let ((print-length 10) (print-level 3)) (prin1-to-string request))
future-change
@@ -5899,7 +5899,7 @@ (defun org-element--cache-process-request
   (while t
 	(when (org-element--cache-interrupt-p time-limit)
   (org-element--cache-log-message "Interrupt: time limit")
-	  (throw 'interrupt nil))
+	  (throw 'org-element--cache-interrupt nil))
 	(let ((request-key (org-element--request-key request))
 		  (end (org-element--request-end request))
 		  (node (org-element--cache-root))
@@ -6012,7 +6012,7 @@ (defun org-element--cache-process-request
   (let ((limit (+ (org-element--request-beg request) (org-element--request-offset request
 	(cond ((and threshold (> limit threshold))
(org-element--cache-log-message "Interrupt: position %d after threshold %d" limit threshold)
-   (throw 'interrupt nil))
+   (throw 'org-element--cache-interrupt nil))
 	  ((and future-change (>= limit future-change))
 	   ;; Changes happened around this element and they will
 	   ;; trigger another phase 1 request.  Skip re-parenting
@@ -6086,7 +6086,7 @@ (defun org-element--cache-process-request
 (org-element--cache-log-message "Interrupt: %s" (if exit-flag "threshold" "time limit"))
 (setf (org-element--request-key request) key)
 (setf (org-element--request-parent request) parent)
-(throw 'interrupt nil))
+(throw 'org-element--cache-interrupt nil))
 	  ;; Shift element.
 	  (unless (zerop offset)
 (when (>= org-element--cache-diagnostics-level 3)
@@ -6207,8 +6207,9 @@ (defun org-element--parse-to (pos  syncp time-limit)
 When optional argument SYNCP is non-nil, return the parent of the
 element containing POS instead.  In that case, it is also
 possible to provide TIME-LIMIT, which is a time value specifying
-when the parsing should stop.  The function throws `interrupt' if
-the process stopped before finding the expected result."
+when the parsing should stop.  The function throws
+`org-element--cache-interrupt' if the process stopped before finding
+the expected result."
   (catch 'exit
 (save-match-data
   (org-with-wide-buffer
@@ -6280,7 +6281,7 @@ (defun org-element--parse-to (pos  syncp time-limit)
 	   (parent (org-element-property :parent element)))
(while t
 	 (when (org-element--cache-interrupt-p time-limit)
-   (throw 'interrupt nil))
+   (throw 

Re: Bug: font-lock error with - in code-mode [9.4.6 (9.4.6-gab9f2a @ /gnu/store/2pny4z6mbi2aybgzzxz0yrzkds7hbpmq-emacs-org-9.4.6/share/emacs/site-lisp/org-9.4.6/)]

2021-10-26 Thread Greg Minshall
> Actually, when I told my daughter I was programming "Woof!" as a tool
> to ensure that important emails where receiving enough attention from
> the community, she suggested I should program something for the "poor
> unimportant emails" out there... of course she'd call it "Mew!"
> 
> And I'm seriously considering this: something like an auto-bumper for
> bug reports and help requests that didn't get any anwer...

:)



Re: Bug: font-lock error with - in code-mode [9.4.6 (9.4.6-gab9f2a @ /gnu/store/2pny4z6mbi2aybgzzxz0yrzkds7hbpmq-emacs-org-9.4.6/share/emacs/site-lisp/org-9.4.6/)]

2021-10-26 Thread Greg Minshall
Bastien,

> PS: I'm not sure how to do this with Woof! but I'm working on the next
> version of Woof! where this will be possible.

i hope you will call the next version: Woof, woof!

:)



Re: Bug: font-lock error with - in code-mode [9.4.6 (9.4.6-gab9f2a @ /gnu/store/2pny4z6mbi2aybgzzxz0yrzkds7hbpmq-emacs-org-9.4.6/share/emacs/site-lisp/org-9.4.6/)]

2021-10-26 Thread Bastien
Greg Minshall  writes:

> i hope you will call the next version: Woof, woof!

Ahah!  

Actually, when I told my daughter I was programming "Woof!" as a tool
to ensure that important emails where receiving enough attention from
the community, she suggested I should program something for the "poor
unimportant emails" out there... of course she'd call it "Mew!"

And I'm seriously considering this: something like an auto-bumper for
bug reports and help requests that didn't get any anwer...

:)

-- 
 Bastien



[ISSUE] org-mode fill paragraph is slow and suspend often

2021-10-26 Thread Christopher M. Miles


When I press [M-q] on the following org-mode buffer content:

#+begin_src org
,* 绵羊是太阳能农场的优秀管理员
:PROPERTIES:
:SOURCE: 奇客Solidot–传递最新科技情报
:DATE(original): [2021-10-25 Mon 17:28]
:DATE: [2021-10-26 Tue]
:END:

有利于放养家畜和有利于太阳能发电的地方经常重叠。它们都需要平坦、阳光充足,没有高大植被的开阔地。因此
太阳能生产商正越来越多地租用农田运营。

太阳能产量的增加具有环境效益,但是其代价可能是农业产量的下降。因而人们越来越有兴趣寻找在同一个地方结
合农业和太阳能生产的方法。对于康奈尔大学农业综合企业副教授 Todd Schmit 
来说,[[https://arstechnica.com/science/2021/10/shepherds-can-cash-in-on-their-sheep-grazing-around-solar-panels/][问题的答案是羊群]]。

这仍然是一个新领域,部分农民正和太阳能生产商合作,在后者的土地上放牧。太阳能生产商付钱给农民,让他们
把羊送到他们的太阳能农场,羊会吃掉杂草和其他可能阻挡阳光到达太阳能板的植物。

羊得到了食物,农民得到了报酬,而太阳能生产商则在不使用割草机和除草机的情况下管理农场的植被--割草
机和除草机很难伸到太阳能面板下方,而且需要使用化石燃料。American Solar Grazing Association(ASGA)的
[[https://solargrazing.org/wp-content/uploads/2021/02/Solar-Site-Sheep-Grazing-in-NY.pdf][报告]]显示,该行业自
 2017 年以来,一直在纽约州扩张。帝国州(纽约州)报告指出,目前有 900 英亩的太阳能
生产土地正在放牧。增长空间仍然很大。
#+end_src

Emacs often suspend for a long time.

So I take a profiling test with Emacs profiler. Seems =org-fill-element= spend 
a lot of CPU and memory.

Here is the result:

CPU Profiler Report:

#+begin_example
3623  65% - command-execute
3623  65%  - call-interactively
3623  65%   - funcall-interactively
3141  56%- org-fill-paragraph
3141  56% - let
3141  56%  - cond
3141  56%   - let
3141  56%- unwind-protect
3141  56% - progn
3140  56%  - while
2096  37%   - org-fill-element
2090  37%- let
2090  37% - unwind-protect
2089  37%  - progn
2079  37%   - let
2044  36%- save-excursion
2032  36% - org-element-at-point
2027  36%  - let
1546  27%   - if
1473  26%- progn
1473  26% - if
1473  26%  - if
1467  26%   - org-element--cache-sync
1467  26%- if
1467  26% - progn
1441  25%  - save-current-buffer
1416  25%   - if
1410  25%- let
1400  25% - let
1334  23%  - catch
1332  23%   - and
1332  23%- org-indent-add-properties
1332  23% - let
1332  23%  - unwind-protect
1332  23%   - progn
1332  23%- save-excursion
1332  23% - save-restriction
1301  23%  - let
1301  23%   - catch
1301  23%- and
1301  23% - 
org-indent-add-properties
1301  23%  - let
1301  23%   - unwind-protect
1301  23%- progn
1301  23% - save-excursion
1301  23%  - 
save-restriction
1301  23%   - let*
1296  23%- let*
1296  23% - 
unwind-protect
1296  23%  - progn
1296  23%   - while
1296  23%- cond
1155  20%   and
  87   1% - 
org-at-item-p
  83   1%  - 
save-excursion
  80   1%   - and
  65   1%- 
org-list-in-valid-context-p
  64   1% - not
  63   1%  - 
org-in-block-p
  63   1%   - 
let
  60   1%- 
unwind-protect
  60   1% - 
progn
  60   1%  
+ catch
   8   0%