[PATCH v4.1] Re: Improve the performance of `org-set-tags-command` on large `org-tag-alist`

2023-05-16 Thread Christopher M. Miles

Ihor Radchenko  writes:

> "Christopher M. Miles"  writes:
>
 (seq-take (seq-uniq (append bound-tags 
 fulltable))
   org-fast-tag-selection-maximum-tags))
>>>
>>> This will behave awkwardly with tag groups. You may better use 
>>> `org--tag-add-to-alist'.
>>
>> I think here should use `append' instead of `org--tag-add-to-alist' to merge.
>
> Yeah. `org--tag-add-to-alist' does not tell it, but it actually prefers
> keeping duplicate tag copies from its second argument.
>
> Yet, however, tags with their binding assigned might occur inside a
> group. Your code will incorrectly pull them out.
>
> I think that the right approach to handle tag groups and explicitly
> bound tags is showing them all the time, even when the total number of
> tags exceeds the limit:
>
> 1. If a tag is bound explicitly (cdr non-nil) show it
> 2. If a tag is inside a group - show it
> 3. If there is still some room left, show up to the limit.
>
> My logic is that tag groups and bound tags can only be customized by the
> user. So, it makes sense to display them all the time - users likely
> expect such behaviour.
>
> WDYT?

I improved the code a little. Can't figure out how to implement upper logic.
Can you finish the last part? Thanks

#+begin_src emacs-lisp
(setq tbl (let* ((tags-grouped (org-tag-alist-to-groups fulltable))
 (fulltable-accurate (flatten-list 
(org-tag-alist-to-groups fulltable)))
 (bound-tags (seq-filter 'cdr fulltable)))
;; TODO: consider tag groups.
;; the right approach to handle tag groups and explicitly
;; bound tags is showing them all the time, even when the 
total number of
;; tags exceeds the limit
;; 
;; 1. If a tag is bound explicitly (cdr non-nil) show it
;; 2. If a tag is inside a group - show it
;; 3. If there is still some room left, show up to the 
limit.
(if (length< fulltable-accurate 
org-fast-tag-selection-maximum-tags)
fulltable
  (if (length< bound-tags 
org-fast-tag-selection-maximum-tags)
  (progn
(insert (format-message "Tags are limited displayed 
by `org-fast-tag-selection-maximum-tags'.\n"))
;; TODO:
(seq-take (seq-uniq (org--tag-add-to-alist 
bound-tags fulltable))
  org-fast-tag-selection-maximum-tags))
(insert "Tags are limited displayed only has key 
bound.\n")
bound-tags)))
  char ?a cnt 0)
#+end_src

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


signature.asc
Description: PGP signature


ob-clojure: results quoted nil

2023-05-16 Thread rab

Hello!
I am trying to follow examples on a book and I noticed a minor bug that 
is literally "bugging" me. :-D

The quoted NIL is not showing on the Result block.

Org mode version 9.6.1 (9.6.1-??-fe92a3ced @ 
/Users/rafiks/.emacs.d/.local/straight/build-28.2/org/)


 #+begin_src clojure :results value
(nil? 1)
(nil? nil)
(if "bears eat beets"
  "bears beets Battlestar Galactica")
(if nil
  "This won't be the result because nil is falsey"
  "nil is falsey")
   #+end_src

   #+RESULTS:
   | false  |
   | true   |
   | "bears beets Battlestar Galactica" |
   | " is falsey"   |




Re: org code and error catching

2023-05-16 Thread Michael Heerdegen
Ihor Radchenko  writes:

> As for condition-case-unless-debug, may you create a patch?
> But please do not replace everything blindly - I know for sure that at
> least some `condition-case' clauses are there on purpose.

I nearly never had a closer look at the org-mode code (other than
blindly).  I would prefer to help differently (like reviewing a patch),
honestly, unless there is really no one more appropriate to find.

Michael.



Re: Minimal list of packages for `guix shell` for documentation compilation?

2023-05-16 Thread Kyle Meyer
Kyle Meyer writes:

> Ah, sorry, I should have tested that with --pure.  Indeed you'll need to
> pull in other packages if they're not already on your system.  [...]

Here's the minimum set of packages I needed with --pure:

 $ guix shell --pure \
   coreutils diffutils emacs-minimal glibc git grep make sed tar texinfo 
texlive \
   -- make doc

(Note: texlive is large, so that will take some time if you don't
already have it in your store.)



Re: org code and error catching

2023-05-16 Thread Ihor Radchenko
Michael Heerdegen  writes:

> Ihor Radchenko  writes:
>
>> What are those?
>> I do not have anything failing on my side.
>
> See the attached file.  I had been using an up-to-date Emacs master build.

Ah. Different locale (LANG). It is
https://list.orgmode.org/orgmode/d140fa73-9995-4467-963e-00d596448...@axelkielhorn.de/

As for condition-case-unless-debug, may you create a patch?
But please do not replace everything blindly - I know for sure that at
least some `condition-case' clauses are there on purpose.

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



Re: org code and error catching

2023-05-16 Thread Michael Heerdegen
Ihor Radchenko  writes:

> What are those?
> I do not have anything failing on my side.

See the attached file.  I had been using an up-to-date Emacs master build.

Michael.

<>


Re: [PATCH] lisp/org/ol.el: org-link-make-description-function is always applied

2023-05-16 Thread Ihor Radchenko
Feraidoon Mehri  writes:

> The change is very small, so I think taking a look at the diff is more
> informative than I trying to explain it; the old code did not use
> `org-link-make-description-function` when some other alternatives were
> available, but my changes make it always use
> `org-link-make-description-function` if set.
>
> This change is a breaking API change, but I think the previous behavior was
> a bug. If you want to preserve the old behavior, perhaps we should add a
> new variable `org-link-postprocess-description-function`?

The truth is that old behaviour is not fully documented.
So, this part of code is extremely fragile.

See https://list.orgmode.org/orgmode/87mtb6w2rq.fsf@localhost/

May you go through the `org-insert-link' code and summarize its current
behaviour? Then, we can discuss further if and how we want to change it.

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



Re: [ANN] lisp/ob-tangle-sync.el

2023-05-16 Thread Ihor Radchenko
Mehmet Tekman  writes:

>> I feel confused when reading the modified code.
>>
>
> Okay, I guess comments are not my strong suit. I will try to remove any
> unnecessary comments and use better variable names.

No, comments were useful. They revealed that our understanding of the
expected behaviour might differ.

>> I recommend trying various edge cases with your patch.
>> In particular:
>>
>> 1. Testing exclusive group inheritance when we inherit a header arg
>>value that matches :any:
>>
>>#+PROPERTIES: header-args :tangle "foo.txt"
>>#+begin_src ... :tangle no
>>
>>#+PROPERTIES: header-args :tangle no
>>#+begin_src ... :tangle "foo.txt"
>>
>>#+PROPERTIES: header-args :tangle no
>>* Heading
>>
>>:PROPERTIES:
>>:header-args: :tangle "foo.txt"
>>:END:
>>#+begin_src ... :tangle yes
> ...
>> I feel that the following code is not reliable when we inherit exact and
>> :any exclusive group members in alternations.
>
> Ah, hmm - can you give me an example here? I thought the idea was that
> an :any string would only be invokable once for a given header
> parameter.

See the above 3 examples: (1) "foo.txt" shadowed by "no"; (2) "no"
shadowed by "foo.txt"; (3) "no" shadowed by "foo.txt" then shadowed by
"yes".

You can also consider "foo.txt" shadowed by "bar.txt" and other
variations.

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



Re: [PATCH v4] Re: Improve the performance of `org-set-tags-command` on large `org-tag-alist`

2023-05-16 Thread Ihor Radchenko
"Christopher M. Miles"  writes:

>>> (seq-take (seq-uniq (append bound-tags 
>>> fulltable))
>>>   org-fast-tag-selection-maximum-tags))
>>
>> This will behave awkwardly with tag groups. You may better use 
>> `org--tag-add-to-alist'.
>
> I think here should use `append' instead of `org--tag-add-to-alist' to merge.

Yeah. `org--tag-add-to-alist' does not tell it, but it actually prefers
keeping duplicate tag copies from its second argument.

Yet, however, tags with their binding assigned might occur inside a
group. Your code will incorrectly pull them out.

I think that the right approach to handle tag groups and explicitly
bound tags is showing them all the time, even when the total number of
tags exceeds the limit:

1. If a tag is bound explicitly (cdr non-nil) show it
2. If a tag is inside a group - show it
3. If there is still some room left, show up to the limit.

My logic is that tag groups and bound tags can only be customized by the
user. So, it makes sense to display them all the time - users likely
expect such behaviour.

WDYT?

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



[PATCH] lisp/org/ol.el: org-link-make-description-function is always applied

2023-05-16 Thread Feraidoon Mehri
I have signed the copyright assignment before.

The change is very small, so I think taking a look at the diff is more
informative than I trying to explain it; the old code did not use
`org-link-make-description-function` when some other alternatives were
available, but my changes make it always use
`org-link-make-description-function` if set.

This change is a breaking API change, but I think the previous behavior was
a bug. If you want to preserve the old behavior, perhaps we should add a
new variable `org-link-postprocess-description-function`?


Changelog:

* lisp/org/ol.el (org-insert-link): org-link-make-description-function is
always applied to the description.


0001-lisp-org-ol.el-org-link-make-description-function-is.patch
Description: Binary data


Re: Minimal list of packages for `guix shell` for documentation compilation?

2023-05-16 Thread Kyle Meyer
Kyle Meyer writes:

> Running this from the top of the Org repo works for me (Guix
> 270db2a56bc5):
>
>   $ guix shell emacs -- make doc

Ah, sorry, I should have tested that with --pure.  Indeed you'll need to
pull in other packages if they're not already on your system.  Adding
'-D emacs' to pull in emacs dev inputs may you a good way there, but
you'll probably at least need to add texlive on top.  (Sorry, I can't
test at the moment.)




Re: Minimal list of packages for `guix shell` for documentation compilation?

2023-05-16 Thread Kyle Meyer
Yuval Langer writes:

> I would like to run `make doc` under `guix shell` to test my
> documentation patches.
>
> Does anyone know the minimal list of packages and proper `guix shell`
> incantation for that?

Running this from the top of the Org repo works for me (Guix
270db2a56bc5):

  $ guix shell emacs -- make doc



Minimal list of packages for `guix shell` for documentation compilation?

2023-05-16 Thread Yuval Langer
I would like to run `make doc` under `guix shell` to test my
documentation patches.

Does anyone know the minimal list of packages and proper `guix shell`
incantation for that?

Thank you,
Yuval Langer.



[PATCH v4] Re: Improve the performance of `org-set-tags-command` on large `org-tag-alist`

2023-05-16 Thread Christopher M. Miles

Ihor Radchenko  writes:

> "Christopher M. Miles"  writes:
>
>> Updated version which fix the `message` error in upper code:
>
> Thanks!
>
>> #+begin_src emacs-lisp
>> (setq tbl (let ((bound-tags (seq-filter 'cdr fulltable)))
>> (if (length< fulltable 
>> org-fast-tag-selection-maximum-tags)
>
> Because of (:startgroup) markers and similar things, this condition is
> not fully accurate. See `org-tag-alist' docstring.
>
> You may also need to consider special alist items in the rest of the code.
>
I added a let-binding to modify fulltable at first to filter out special tag 
markers.

>> fulltable
>>   (if (length< bound-tags 
>> org-fast-tag-selection-maximum-tags)
>>   (progn
>> (insert "Tags are limited displayed by 
>> `org-fast-tag-selection-maximum-tags'.\n")
>
> If you want to have proper Elisp symbol markup when using `...', use
> `format-message'.

Updated.

>
>> (seq-take (seq-uniq (append bound-tags 
>> fulltable))
>>   org-fast-tag-selection-maximum-tags))
>
> This will behave awkwardly with tag groups. You may better use 
> `org--tag-add-to-alist'.

I think here should use `append' instead of `org--tag-add-to-alist' to merge.

Using `append':

#+begin_example
Inherited:  video
Current:

Tags are limited displayed by ‘org-fast-tag-selection-maximum-tags’.
  [d] drill   [z] crypt 
  [A] ARCHIVE 
  [E] noexport[P] private   
  [D] deprecated  
  [O] outdated[t] translate 
  [i] idea
  [h] book[b] bookmark  
  [w] work
  [a] appointment [m] meeting   
  [u] urgent  
  [X] SEX [k] wiki  
  [C] code
  [e] Emacs   [o] Org_mode  
  [G] git 
  [L] Linux   [M] macOS 
  [W] Windows 
  [l] LISP[c] Clojure   
  [s] ClojureScript   
  [J] Java[S] Shell 
  [p] Python  
  [r] Ruby[j] JavaScript
  [d] database
  [f] LOG [g] @marks
  [n] on  
  [q] off [v] star  
  [x] like
  [y] favorite[{] suggested 
  [|] heart   
  [}] smile   [~] brain 
  [ ] check   
  [ ] alert   [ ] important 
  [ ] flag
  [ ] error   [ ] label 
  
#+end_example

Using `org--tag-add-to-alist':

#+begin_example
Inherited:  video
Current:

Tags are limited displayed by ‘org-fast-tag-selection-maximum-tags’.
  [d] drill   [z] crypt 
  [f] LOG 
  [A] ARCHIVE [E] noexport  
  [P] private 
  [D] deprecated  [O] outdated  
  [g] @marks  
  [n] on  [q] off   
  [v] star
  [x] like[y] favorite  
  [{] suggested   
  [|] heart   [}] smile 
  [~] brain   
  [ ] check   [ ] alert 
  [ ] important   
  [ ] flag[ ] error 
  [ ] label   
  [ ] question[ ] info  
  [ ] quote   
  [ ] table   [t] translate 
  [ ] language
  [i] idea[ ] comment   

Re: [ANN] lisp/ob-tangle-sync.el

2023-05-16 Thread Mehmet Tekman


Hello, thanks for the last review and sorry for the lapse in
communication. May is proving to be a very strange month.

Ihor Radchenko  writes:

> Mehmet Tekman  writes:
>>
>> I've modified the `merge' function within `org-babel-merge-params' so
>> that the main logic now accumulates a list of potential candidates that
>> could be the :any keyword, and selects the last added candidate as the
>> match.
>
> I feel confused when reading the modified code.
>

Okay, I guess comments are not my strong suit. I will try to remove any
unnecessary comments and use better variable names.

>> It all seems to be passing tests, though I would like to add my toy.org
>> file to the org testing framework at some point.
>
> I recommend trying various edge cases with your patch.
> In particular:
>
> 1. Testing exclusive group inheritance when we inherit a header arg
>value that matches :any:
>
>#+PROPERTIES: header-args :tangle "foo.txt"
>#+begin_src ... :tangle no
>
>#+PROPERTIES: header-args :tangle no
>#+begin_src ... :tangle "foo.txt"
>
>#+PROPERTIES: header-args :tangle no
>* Heading
>
>:PROPERTIES:
>:header-args: :tangle "foo.txt"
>:END:
>#+begin_src ... :tangle yes
>
> 2. :tangle "file with spaces.txt"
>

I think before I do any more disastrous changes, I will try to expand
the existing ert test suite to incorporate my toy org file and your
above examples.

That way I'd at least have a consistent framework to validate some of my
work.

> I feel that the following code is not reliable when we inherit exact and
> :any exclusive group members in alternations.

Ah, hmm - can you give me an example here? I thought the idea was that
an :any string would only be invokable once for a given header
parameter.

Ihor Radchenko  writes:

>>> We should modify it. For example like the following:
>>>
>>> 1. We will assume that :any can only occur one time in the exclusive
>>>groups. (Otherwise, there is no single definite way to parse header
>>>arguments)

Best,
Mehmet



Re: [PATCH v2] Re: [PATCH] add a function to only refresh inline images under current headline instead of global buffer

2023-05-16 Thread Christopher M. Miles

Ihor Radchenko  writes:

> "Christopher M. Miles"  writes:
>
>>> I'd prefer something more closely resembling `org-latex-preview'
>>> approach with prefix arguments:
>>> ...
>>> `org-toggle-inline-images' should also be changed.
>>
>> Here is the source code of `org-toggle-inline-images'. I implement this
>> by reference `org-latex-preview'. I have not write testing, but only
>> manually tested with Edebug and on actual Org buffer displaying and
>> disable inline images. The command works fine. Ihor, can you review the code?
>
> Unlike `org-latex-preview', here we need to (1) respect active region;
> (2) keep the backward compatibility for INCLUDE-LINKED.
>
> For (1), for example, it would make sense to respect region when prefix
> argument is C-u and clear images only there. For (2), we need to at
> least allow toggling images with description using some prefix argument
> (previously, any prefix argument would do).

I indeed implemented all same behavior like `org-latex-preview' in new
`org-toggle-inline-images'.

For (1), org-latex-preview has a `cond' logic to toggle preview in
region. Here is the code from `org-latex-preview'.

((use-region-p)
(message "Creating LaTeX previews in region...")
(org--latex-preview-region (region-beginning) (region-end))
(message "Creating LaTeX previews in region... done."))

+

;; Clear current section.
   ((equal arg '(4))
(org-clear-latex-preview
 (if (use-region-p)
 (region-beginning)
   (if (org-before-first-heading-p) (point-min)
 (save-excursion
   (org-with-limited-levels (org-back-to-heading t) (point)
 (if (use-region-p)
 (region-end)
   (org-with-limited-levels (org-entry-end-position)

And I also implement the toggle inline images in region logic in
`org-toggle-inline-images' as bellowing:

;; Display region selected inline images.
   ((use-region-p)
(message "Displaying inline images in region...")
(org-display-inline-images include-linked t (region-beginning) (region-end))
(message "Displaying inline images in region... done."))

+

;; Clear current section.
   ((equal arg '(4))
(org-clear-latex-preview
 (if (use-region-p)
 (region-beginning)
   (if (org-before-first-heading-p) (point-min)
 (save-excursion
   (org-with-limited-levels (org-back-to-heading t) (point)
 (if (use-region-p)
 (region-end)
   (org-with-limited-levels (org-entry-end-position)



For (2), It's working. The code passed the parameter `include-linked' to
`org-display-inline-images'. So they works in any case of [C-u] prefix.

Maybe you want to eval the patch code to test.

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


signature.asc
Description: PGP signature


[PATCH v4] Re: Improve the performance of `org-set-tags-command` on large `org-tag-alist`

2023-05-16 Thread Christopher M. Miles

Ihor Radchenko  writes:

> "Christopher M. Miles"  writes:
>
>> Updated version which fix the `message` error in upper code:
>
> Thanks!
>
>> #+begin_src emacs-lisp
>> (setq tbl (let ((bound-tags (seq-filter 'cdr fulltable)))
>> (if (length< fulltable 
>> org-fast-tag-selection-maximum-tags)
>
> Because of (:startgroup) markers and similar things, this condition is
> not fully accurate. See `org-tag-alist' docstring.
>
> You may also need to consider special alist items in the rest of the code.
>
I added a let-binding to modify fulltable at first to filter out special tag 
markers.

>> fulltable
>>   (if (length< bound-tags 
>> org-fast-tag-selection-maximum-tags)
>>   (progn
>> (insert "Tags are limited displayed by 
>> `org-fast-tag-selection-maximum-tags'.\n")
>
> If you want to have proper Elisp symbol markup when using `...', use
> `format-message'.

Updated.

>
>> (seq-take (seq-uniq (append bound-tags 
>> fulltable))
>>   org-fast-tag-selection-maximum-tags))
>
> This will behave awkwardly with tag groups. You may better use 
> `org--tag-add-to-alist'.

I think here should use `append' instead of `org--tag-add-to-alist' to merge.

Using `append':

#+begin_example
Inherited:  video
Current:

Tags are limited displayed by ‘org-fast-tag-selection-maximum-tags’.
  [d] drill   [z] crypt 
  [A] ARCHIVE 
  [E] noexport[P] private   
  [D] deprecated  
  [O] outdated[t] translate 
  [i] idea
  [h] book[b] bookmark  
  [w] work
  [a] appointment [m] meeting   
  [u] urgent  
  [X] SEX [k] wiki  
  [C] code
  [e] Emacs   [o] Org_mode  
  [G] git 
  [L] Linux   [M] macOS 
  [W] Windows 
  [l] LISP[c] Clojure   
  [s] ClojureScript   
  [J] Java[S] Shell 
  [p] Python  
  [r] Ruby[j] JavaScript
  [d] database
  [f] LOG [g] @marks
  [n] on  
  [q] off [v] star  
  [x] like
  [y] favorite[{] suggested 
  [|] heart   
  [}] smile   [~] brain 
  [ ] check   
  [ ] alert   [ ] important 
  [ ] flag
  [ ] error   [ ] label 
  
#+end_example

Using `org--tag-add-to-alist':

#+begin_example
Inherited:  video
Current:

Tags are limited displayed by ‘org-fast-tag-selection-maximum-tags’.
  [d] drill   [z] crypt 
  [f] LOG 
  [A] ARCHIVE [E] noexport  
  [P] private 
  [D] deprecated  [O] outdated  
  [g] @marks  
  [n] on  [q] off   
  [v] star
  [x] like[y] favorite  
  [{] suggested   
  [|] heart   [}] smile 
  [~] brain   
  [ ] check   [ ] alert 
  [ ] important   
  [ ] flag[ ] error 
  [ ] label   
  [ ] question[ ] info  
  [ ] quote   
  [ ] table   [t] translate 
  [ ] language
  [i] idea[ ] comment   

Re: org-element tutorial?

2023-05-16 Thread Ihor Radchenko
bvchg...@mail.com writes:

> Does anyone know of a good tutorial on using org-element? I'm finding
> the documentation hard to grok.

We have https://orgmode.org/worg/dev/org-element-api.html

> Alternatively, given a doc like
>
> * TODO No
> ** Uninteresting
>- item 1
>- item 2
>
> * NEXT My thing
>   SCHEDULED: <2023-05-16 Tue .+1d>
>   :PROPERTIES:
>   :STYLE: habit
>   :LAST_REPEAT: [2023-05-15 Mon 12:12]
>   :END:
>   - State "DONE"   from "NEXT"   [2023-05-15 Mon 12:12] \\
> I want this
>
> how would I get at the note entered for the state change, i.e. the "I
> want this" list item, in this example  (which might be in a drawer,
> just doesn't happen to be, here)?

You may find `org-log-beginning' useful.

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



Re: org code and error catching

2023-05-16 Thread Ihor Radchenko
Michael Heerdegen  writes:

> Hmm - mine gave a different result: I cloned the org-mode archive from
> https://git.savannah.gnu.org/git/emacs/org-mode.git, called "make" and
> ran the tests as described in the "testing/README".  That gave 6 failing
> tests.

What are those?
I do not have anything failing on my side.

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



Re: [PATCH v3.1] Re: Improve the performance of `org-set-tags-command` on large `org-tag-alist`

2023-05-16 Thread Ihor Radchenko
"Christopher M. Miles"  writes:

> Updated version which fix the `message` error in upper code:

Thanks!

> #+begin_src emacs-lisp
> (setq tbl (let ((bound-tags (seq-filter 'cdr fulltable)))
> (if (length< fulltable 
> org-fast-tag-selection-maximum-tags)

Because of (:startgroup) markers and similar things, this condition is
not fully accurate. See `org-tag-alist' docstring.

You may also need to consider special alist items in the rest of the code.

> fulltable
>   (if (length< bound-tags 
> org-fast-tag-selection-maximum-tags)
>   (progn
> (insert "Tags are limited displayed by 
> `org-fast-tag-selection-maximum-tags'.\n")

If you want to have proper Elisp symbol markup when using `...', use 
`format-message'.

> (seq-take (seq-uniq (append bound-tags fulltable))
>   org-fast-tag-selection-maximum-tags))

This will behave awkwardly with tag groups. You may better use 
`org--tag-add-to-alist'.

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



Re: [PATCH v2] Re: [PATCH] add a function to only refresh inline images under current headline instead of global buffer

2023-05-16 Thread Ihor Radchenko
"Christopher M. Miles"  writes:

>> I'd prefer something more closely resembling `org-latex-preview'
>> approach with prefix arguments:
>> ...
>> `org-toggle-inline-images' should also be changed.
>
> Here is the source code of `org-toggle-inline-images'. I implement this
> by reference `org-latex-preview'. I have not write testing, but only
> manually tested with Edebug and on actual Org buffer displaying and
> disable inline images. The command works fine. Ihor, can you review the code?

Unlike `org-latex-preview', here we need to (1) respect active region;
(2) keep the backward compatibility for INCLUDE-LINKED.

For (1), for example, it would make sense to respect region when prefix
argument is C-u and clear images only there. For (2), we need to at
least allow toggling images with description using some prefix argument
(previously, any prefix argument would do).

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