Re: is it possible to choose a completion engine?

2023-05-22 Thread Samuel Wales
i guess menu selection is a kind of completion and frameworks coud be
used also.  a big thing for me that works with ido and ido-hacks and
ido-clever-match is olpath completion for refile-goto and refile.


On 5/22/23, Ihor Radchenko  wrote:
> web...@toryanderson.com (Tory S. Anderson) writes:
>
>> Org currently stands out from my workflow because it does completions its
>> own way, with lists and number/letter keys. It would be nice if I could
>> instead have the benefit of vertico, or helm, or whatever else instead.
>> Org would even benefit from marginalia and embark in some cases. Is there
>> an easy variable I'm missing to make org use completing-reads instead of
>> the indexing thing it does?
>
> This is because you customized your tags/todo keywords to have a quick
> key binding to set. By default, Org uses custom "fast" interface for
> completion in such cases. You can either remove the bindings to
> explicitly set `org-use-fast-tag-selection' and/or
> `org-use-fast-todo-selection' to nil.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 
>
>


-- 
The Kafka Pandemic

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



Re: [PATCH] Highlight ANSI sequences in the whole buffer (was [PATCH] ANSI color on example blocks and fixed width elements)

2023-05-22 Thread Nathaniel Nicandro


Ihor Radchenko  writes:

> Nathaniel Nicandro  writes:
>
>>> 1. Do not allow ANSI sequences to intersect markup boundaries of the
>>>same AST depth:
>>>*bold * plain text  should not trigger fontification
>>>*bold  /italic/ * should trigger
>>>plain text  *bold* plain text  also should
>>
>> Just to make sure I'm getting you right.  You're saying that
>> fontification should trigger if the sequences live in the same
>> org-element-context?
>
>> What about cases like:
>>
>> *bold* plain text 
>> plain text *bold * paragraph end
>>
>> In the first case, should only "bold" be fontified? Since the sequence
>> lives in the bold context.
>
>> In the second, should only "text"? Since the sequence lives at a higher
>> depth (the paragraph context, compared to the bold context). Or should
>> it be that the fontification should extend to the end of the paragraph
>> because the sequence lives at a higher depth?
>
> I completely missed the point that  codes are not 
> pairs, but switches; this is completely different from Org syntax.
>
> So, let me re-consider where  codes are likely to be used in
> practice:
>
> 1. Inside shell code blocks (src-block element)
> 2. Inside results of evaluation, which are usually fixed-width element,
>but might also be example-block, export-block, drawer, table, or
>other element.
> 3. Inside shell inline code blocks (inline-src-block object)
> 4. Inside results of evaluation of an inline code block - usually
>code/verbatim markup.
>
> I think that the most reasonable approach to fontify ANSI sequences will
> be the following:
>
> 1. We will consider ANSI within (a) all greater elements and lesser
>elements that have RESULTS affiliated keyword (indicating that they
>are result of code block evaluation); (b) otherwise, just lesser
>elements, like paragraph, src block, example block, export block,
>etc., but _not_ tables (c) otherwise, within verbatim-like objects,
>like code, export-snippet, inline-src-block, table-cell, verbatim.
>
>The three groups above should be declared via variables, so that
>users can tweak them as necessary.
>
> 2. If ANSI sequence is encountered inside a verbatim-like object and we
>did not see any ANSI sequences within parent element or greater
>element, limit ANSI triggers to the current object.
>
>Example:
>
>#+RESULTS:
>Lorem upsum =valor=. Some more text.
>
>(only "valor" will be affected)
>
> 3. If the first ANSI sequence is encountered inside element and outside
>verbatim-like object, the rest of the element is affected, including
>all the objects.
>
>Example:
>
>#+RESULTS:
>Lorem upsum =valor=. Some more text.
>
>(the first ANSI affects everything, including verbatim; the second
>ANSI also affects everything)
>
> 4. If the first ANSI sequence is encountered inside greater element with
>RESULTS affiliated keyword, all the lesser elements inside will be
>affected.
>
>Example:
>
>#+RESULTS:
>:drawer:
>Lorem upsum =valor=. Some more text.
>
>Another paragraph inside drawer.
>:end:
>
>(everything down to :end: is affected)
>
>or
>
>#+RESULTS:
>- list
>- one
>- two
>- three
>
>(everything is affected down to the end of the list)
>
> Does it make sense?
>

Sounds good to me.

 +(cl-letf (((symbol-function #'delete-region)
 +   (lambda (beg end)
 + (add-text-properties beg end '(invisible t
>>>
>>> This is fragile and relies on internal implementation details of
>>> ansi-color.el. Is there another way?
>>
>> Since the context in which the sequences live in need to be considered,
>> it doesn't look like ansi-color-apply-on-region can be used any more
>> since it isn't aware of Org objects.
>>
>> I've come up with a function that calculates the highlightable regions
>> (considering contexts) and fontifies them, but it requires the use of
>> private functions from ansi-color. Specifically
>> ansi-color--face-vec-face, ansi-color--update-face-vec, and
>> ansi-color--code-as-hex (used internally by ansi-color--face-vec-face).
>> Does it make sense to copy over these functions into Org for the
>> purposes of handling ANSI escapes? There would be some backward
>> compatibility issues, e.g. ansi-color only started using faces as colors
>> in Emacs 28.
>
> If we really need to, we can propose an extension of
> ansi-color-apply-on-region upstream for Emacs itself.


-- 
Nathaniel



Re: [BUG] org-element-cache [9.6.5 (release_9.6.5-3-g2993f4 @ /opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/emacs/29.0.90/lisp/org/)]

2023-05-22 Thread Ihor Radchenko
Daniel Popescu  writes:

> Warning (org-element-cache): org-element--cache: Unregistered buffer
> modifications detected (126308 != 126242). Resetting.
> If this warning appears regularly, please report the warning text to Org
> mode mailing list (M-x org-submit-bug-report).
> The buffer is: data-intro.org
>  Current command: nil
>  Backtrace:
> "  backtrace-to-string(nil)
>   org-element--cache-sync(#)

Thanks for reporting!
Are you seeing this regularly?

>From a first glance, it looks like you are using some third-party
package that is trying to bypass Org parser that keeps track of the
buffer modifications.

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



Re: [BUG] org-mode cached element has wrong parent in daily.org [9.6.1 (9.6.1-??-fe92a3c @ /home/woopityscoop/.config/emacs/.local/straight/build-28.1/org/)]

2023-05-22 Thread Ihor Radchenko
Lucas Mei  writes:

> This is my org file that I use for daily tracking. For some reason on
> the agenda mode, it breaks around Break (2)

Thanks for reporting!
I can see that you are not using the latest Org release.
May you please update to Org 9.6.6 and then let us know if you are still seeing 
the problem?

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



[BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]

2023-05-22 Thread Patrick Useldinger
Hello

I've come across what seems to be a bug in org-element-cache handling.

To reproduce:
1) create a level 1 heading (in my case: "CAPTURE") and a level 2 heading
(in my case: "CAPTURE-TEST")
2) create a similar template to file tasks under a level-2 heading:
("x" "Todo (test)" entry
(file+olp "~/Workcloud/org/WORK.org" "CAPTURE" "CAPTURE-TEST")
"* TODO %^{Task Description}"
:prepend t)
3) create a task using this template (x)
4) while in the narrowed buffer, try to tag the task using C-c C-q
(org-set-tags-command)

This will hang. Pressing C-g helps you recover, the stack trace being
Debugger entered--Lisp error: (quit)
  #f(compiled-function () #)()
  org-element--parse-to(77445)
  org-element-cache-map(#f(compiled-function (el) #))
  org-get-buffer-tags()
  org-set-tags-command(nil)
  funcall-interactively(org-set-tags-command nil)
  call-interactively(org-set-tags-command nil nil)
  command-execute(org-set-tags-command)

Disabling the cache with (setq org-element-use-cache nil) solves the
problem.
As does dropping "CAPTURE-TEST" in the template (i.e. putting the task
under a level-1 heading instead of level-2).

Relevant Reddit threat:
https://www.reddit.com/r/orgmode/comments/13lwu2o/orgmode_starting_to_be_way_more_buggy/?s=8
)

HTH,
-Patrick

P.S. I am not subscribed to the mailing list, so please cc: me if necessary.



Emacs  : GNU Emacs 28.2 (build 1, aarch64-apple-darwin22.4.0, NS
appkit-2299.50 Version 13.3.1 (a) (Build 22E772610a))
 of 2023-05-10
Package: Org mode version 9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)

current state:
==
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-agenda-custom-commands '(("q" . "PU's views")
 ("qq" "PU's view"
  ((todo "WAIT"
((org-agenda-skip-function
  '(org-agenda-skip-entry-if 'scheduled))
 (org-agenda-prefix-format '((todo . ""
)
(todo "DELG"
((org-agenda-skip-function
  '(org-agenda-skip-entry-if 'scheduled))
 (org-agenda-prefix-format '((todo . ""
)
(todo "TODO"
((org-agenda-skip-function
  '(org-agenda-skip-entry-if 'scheduled))
 (org-agenda-prefix-format '((todo . ""
)
(agenda ""
((org-agenda-span 35)
 (org-agenda-prefix-format '((agenda . ""
)
nil ("~/Workcloud/org/agenda.txt"))
  )
 )
 org-load-hook '((lambda nil (setq org-element-use-cache nil)
 (setq org-startup-with-inline-images t)
 (setq org-element--cache-self-verify-frequency 0.01)
 (setq org-hide-leading-stars t)
 (setq org-tags-sort-function 'org-string-collate-lessp)
 (setq org-priority-start-cycle-with-default nil)
 (setq org-refile-targets '((org-agenda-files :maxlevel . 9)))
 (setq org-outline-path-complete-in-steps nil) (setq org-log-into-drawer t)
 (setq org-reverse-note-order t) (setq org-return-follows-link t)
 (setq org-tags-column -90)
 (setq org-todo-keyword-faces
  '(("WAIT" :foreground "magenta") ("TODO" :foreground "red")
("DELG" :foreground "orange") ("DONE" :foreground "grey"))
  )
 (setq calendar-week-start-day 1) (setq org-todo-fast-selection t)
 (setq org-ellipsis "……") (setq org-startup-indented nil)
 (setq org-adapt-indentation t) (setq org-deadline-warning-days 0)
 (setq org-todo-repeat-to-state "TODO")
 (if work
  (progn (define-key org-mode-map " a" 'org-agenda)
   (setq org-agenda-files '("~/Workcloud/org/WORK.org"))
   (setq org-agenda-skip-scheduled-if-done t)
   (setq org-agenda-skip-scheduled-if-deadline-is-shown t)
   (setq org-agenda-skip-scheduled-if-deadline-if-done t)
   (setq org-agenda-use-time-grid nil)
   (setq org-agenda-show-future-repeats nil)
   (setq org-agenda-start-with-follow-mode t)
   (add-hook 'org-agenda-mode-hook
#'(lambda nil
(define-key org-agenda-mode-map "\360" 'org-agenda-backward-block)
(define-key org-agenda-mode-map "\356" 'org-agenda-forward-block))
)
   (setq org-agenda-sorting-strategy
'((agenda priority-down todo-state-up alpha-up)
  (todo priority-down todo-state-up category-keep)
  (tags priority-down category-keep) (search category-keep))
)
   (setq org-agenda-custom-commands
'(("q" . "PU's views")
  ("qq" "PU's view"
((todo "WAIT"
 ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))
  (org-agenda-prefix-format '((todo . ""
 )
(todo "DELG"
 ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))
  (org-agenda-prefix-format '((todo . ""
 )
(todo "TODO"
 ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))
  (org-agenda-prefix-format '((todo . ""
 )
(agenda ""
 ((org-agenda-span 35) (org-agenda-prefix-format '((agenda . "")
nil ("~/Workcloud/org/agenda.txt"))
)
  )
)
   (global-set-key (kbd "") 'org-capture)
   (setq org-capture-templates
'(("t" "Todo (work)" entry
(file+olp "~/Workcloud/org/WORK.org" "CAPTURE")
"* TODO %^{Task Description}" :prepend t)
  ("n" "Note (work)" entry
(file+olp 

[BUG] org-mode cached element has wrong parent in daily.org [9.6.1 (9.6.1-??-fe92a3c @ /home/woopityscoop/.config/emacs/.local/straight/build-28.1/org/)]

2023-05-22 Thread Lucas Mei
This is my org file that I use for daily tracking. For some reason on
the agenda mode, it breaks around Break (2)

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.




Emacs  : GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, 
cairo version 1.16.0)
 of 2023-05-08
Package: Org mode version 9.6.1 (9.6.1-??-fe92a3c @ 
/home/woopityscoop/.config/emacs/.local/straight/build-28.1/org/)

current state:
==
(setq
 org-link-elisp-confirm-function nil
 org-directory "~/org/"
 org-after-refile-insert-hook '(save-buffer)
 org-indirect-buffer-display 'current-window
 org-crypt-key nil
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-load-hook '(+org-init-org-directory-h +org-init-appearance-h 
+org-init-agenda-h
 +org-init-attachments-h +org-init-babel-h 
+org-init-babel-lazy-loader-h
 +org-init-capture-defaults-h +org-init-capture-frame-h 
+org-init-custom-links-h
 +org-init-export-h +org-init-habit-h +org-init-hacks-h 
+org-init-keybinds-h
 +org-init-popup-rules-h +org-init-smartparens-h)
 org-startup-folded nil
 org-babel-after-execute-hook '(+org-redisplay-inline-images-in-babel-result-h)
 org-link-abbrev-alist '(("doomdir" . "/home/woopityscoop/.config/doom/%s")
 ("emacsdir" . "/home/woopityscoop/.config/emacs/%s")
 ("doom-repo" . 
"https://github.com/doomemacs/doomemacs/%s;)
 ("wolfram" . "https://wolframalpha.com/input/?i=%s;)
 ("wikipedia" . "https://en.wikipedia.org/wiki/%s;)
 ("duckduckgo" . "https://duckduckgo.com/?q=%s;)
 ("gmap" . "https://maps.google.com/maps?q=%s;)
 ("gimages" . "https://google.com/images?q=%s;)
 ("google" . "https://google.com/search?q=;)
 ("youtube" . "https://youtube.com/watch?v=%s;)
 ("github" . "https://github.com/%s;))
 org-agenda-files '("~/Sync/org/refile.org" 
"/home/woopityscoop/Sync/org/daily.org"
"/home/woopityscoop/Sync/org/org-basics.org")
 org-capture-templates '(("t" "Personal todo" entry (file+headline 
+org-capture-todo-file "Inbox")
  "* [ ] %?\n%i\n%a" :prepend t)
 ("n" "Personal notes" entry
  (file+headline +org-capture-notes-file "Inbox") "* %u 
%?\n%i\n%a"
  :prepend t)
 ("j" "Journal" entry (file+olp+datetree 
+org-capture-journal-file)
  "* %U %?\n%i\n%a" :prepend t)
 ("p" "Templates for projects")
 ("pt" "Project-local todo" entry
  (file+headline +org-capture-project-todo-file "Inbox")
  "* TODO %?\n%i\n%a" :prepend t)
 ("pn" "Project-local notes" entry
  (file+headline +org-capture-project-notes-file 
"Inbox") "* %U %?\n%i\n%a"
  :prepend t)
 ("pc" "Project-local changelog" entry
  (file+headline +org-capture-project-changelog-file 
"Unreleased")
  "* %U %?\n%i\n%a" :prepend t)
 ("o" "Centralized templates for projects")
 ("ot" "Project todo" entry 
#'+org-capture-central-project-todo-file
  "* TODO %?\n %i\n %a" :heading "Tasks" :prepend nil)
 ("on" "Project notes" entry 
#'+org-capture-central-project-notes-file
  "* %U %?\n %i\n %a" :heading "Notes" :prepend t)
 ("oc" "Project changelog" entry
  #'+org-capture-central-project-changelog-file "* %U 
%?\n %i\n %a"
  :heading "Changelog" :prepend t)
 )
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-refile-targets '((nil :maxlevel . 3) (org-agenda-files :maxlevel . 3))
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-cycle-tab-first-hook '(+org-yas-expand-maybe-h +org-indent-maybe-h
org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand
+org-clear-babel-results-h 
+org-cycle-only-current-subtree-h)
 org-default-notes-file "/home/woopityscoop/org/notes.org"
 org-refile-use-outline-path 'file
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-file-apps '((remote . emacs) (auto-mode . emacs) (directory . emacs) 
("\\.mm\\'" . default)
   

[BUG] org-element-cache [9.6.5 (release_9.6.5-3-g2993f4 @ /opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/emacs/29.0.90/lisp/org/)]

2023-05-22 Thread Daniel Popescu
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Warning (org-element-cache): org-element--cache: Unregistered buffer
modifications detected (126308 != 126242). Resetting.
If this warning appears regularly, please report the warning text to Org
mode mailing list (M-x org-submit-bug-report).
The buffer is: data-intro.org
 Current command: nil
 Backtrace:
"  backtrace-to-string(nil)
  org-element--cache-sync(#)
  apply(org-element--cache-sync #)
  timer-event-handler([t 0 0 311452 nil org-element--cache-sync (#) idle 99 nil])
"

Emacs  : GNU Emacs 29.0.90 (build 1, aarch64-apple-darwin22.4.0, NS
appkit-2299.50 Version 13.3.1 (a) (Build 22E772610a))
 of 2023-05-12
Package: Org mode version 9.6.5 (release_9.6.5-3-g2993f4 @
/opt/homebrew/Cellar/emacs-plus@29/29.0.90/share/emacs/29.0.90/lisp/org/)


[FR] Enhance footnote editing?

2023-05-22 Thread Andrea Lazzarini
I have recently developed a very simple package, org-footnote-assistant (link:
https://github.com/lazzalazza/org-footnote-assistant), which aims to enhance the
functionality and user experience of footnotes within Org Mode. It mainly uses
an indirect buffer to try to solve the problem of limited inline viewing of
footnotes, making it easier to review and modify content without disrupting your
workflow. I recently shared this package via Reddit, and it received, I think, a
fairly positive feedback from the community.

The org-footnote-assistant package introduces several features that improve the
management and editing of footnotes in Org Mode. The features include commands
for easy navigation between footnote references. Users can quickly jump to the
next reference or return to the previous one, ensuring a smooth editing
workflow.

The positive feedback and interest received on Reddit (and a comment by
alphapapa) have encouraged me to explore the possibility of integrating some of
these features upstream to prevent bitrot, ensure wider accessibility, and
leverage the collaborative power of the Org Mode community for their continued
maintenance and development.

I kindly request your feedback, evaluation, and suggestions regarding the
org-footnote-assistant package. I don’t know if some of these features might be
useful upstream, but I believe that your insights and expertise will be
invaluable in refining and optimizing these features for the benefit of all Org
Mode users.

Thank you,

Andrea Lazzarini
[GitHub: lazzalazza]
[Link to org-footnote-assistant: 
https://github.com/lazzalazza/org-footnote-assistant]



Re: [FR] Enhancing footnote managment (via indirect buffer)?

2023-05-22 Thread Ihor Radchenko
Andrea Lazzarini  writes:

> Eldoc (or tooltips) could be great for previewing: I'm going to give them a 
> try
> and to see how they might be integrated in an academic writing workflow.
> I wander if they would maintain buffer-specific highlighting though...

AFAIK, Eldoc expects a function that will return the string to be
displayed. You can use `font-lock-ensure' to fontify the footnote
definition you need to display. Then, the copied string will hold the
fontification as it would be in Org mode buffer.

>> "Eeasier Footnote Deletion": How is it different from `org-footnote-delete'?
>> 
>
> That was nothing more than a simple wrapper for org-footnote-delete, which
> is not an interactive function: btw, I am curious to know if there is a 
> reason for
> that. Why should users re-implement org-footnote-delete with wrappers if 
> they want to use it interactively?

I see nothing in git history and mailing list.
I think that it makes sense to convert org-footnote-delete into
interactive function.

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



Re: How to filter a clock table by property value?

2023-05-22 Thread Nick Dokos
Marcin Borkowski  writes:

> On 2023-05-08, at 17:30, Ihor Radchenko  wrote:
>
>> Marcin Borkowski  writes:
>>
>>> #+BEGIN: clocktable :match "property=\"value\""
>>> #+END
>>
>> "+property=\"value\""
>>
>> I just tried #+BEGIN: clocktable :scope subtree :match "+ID=\"Organization\""
>> and it worked.
>
> Thanks!  Still didn't work, it turned out that I didn't set
> `org-use-property-inheritance'.  Then it turned out that I don't even
> need the plus sign.
>

The `+' (or `-') sign is needed for tags matching.

(info "(org)Matching Tags and Properties")

-- 
Nick




Change colour of hyperlinks in Beamer presentation

2023-05-22 Thread Loris Bennett
Hi,

In my Beamer presentation the hyperlinks, all URLs, appear as normal
text and can only be identified by the change in the cursor when the
mouse moves over them.

How can I change the colour of such links? 

I have already several lines such as 

  #+LATEX_HEADER: \setbeamercolor{title}{fg=mFubMainGreen}

to tweak the appearance, but wasn't able to find an appropriate keyword
for URLs.

Cheers,

Loris

-- 
This signature is currently under constuction.



Re: [FR] Enhancing footnote managment (via indirect buffer)?

2023-05-22 Thread Andrea Lazzarini



> Il giorno 22 mag 2023, alle ore 13:45, Ihor Radchenko  
> ha scritto:
> 
> Andrea Lazzarini  writes:
> 
>> I am writing to you because I have recently published a simple package called
>> org-footnote-assistant 
>> [https://github.com/lazzalazza/org-footnote-assistant],
>> which aims at improving the overall functionality and user experience of 
>> footnotes
>> within Org Mode.
> 
> Thanks for your interest to contribute to Org mode!

Thank you for your kind reply, for the consideration and the great tips!

> 
>> The current management of footnotes has certain limitations that can 
>> sometimes
>> hinder the overall user experience. One major limitation is the limited 
>> inline
>> viewing of footnotes, which makes it challenging to review and modify 
>> footnote
>> content precisely and without disrupting the workflow.
>> 
>> Org-footnote-assistant addresses the limitations of inline viewing of 
>> footnotes
>> by using an indirect buffer.
> 
> I am not sure if indirect buffer is the right approach for _previews_.
> It is more common in Emacs to either use eldoc or tooltips.
> You may use
> https://www.masteringemacs.org/article/seamlessly-merge-multiple-documentation-sources-eldoc
> as reference about eldoc.
> 

Eldoc (or tooltips) could be great for previewing: I'm going to give them a try
and to see how they might be integrated in an academic writing workflow.
I wander if they would maintain buffer-specific highlighting though...

>> The package also provides commands for easy
>> navigation between footnote references, enabling quick jumps to the next or
>> previous reference.
> 
> This sounds like something we can extend `org-forward-element' and
> `org-backward-element' with - it may not only jump to the next element,
> but also jump to the next element of the same type. Jumping to next/previous
> footnote might will useful as a separate command as well though, as a
> complement to the existing `org-next-item', `org-next-link',
> `org-next-block', etc.
> 

Yes, this actually sounds great, and would make it really easier to implement
focused jumping.

> "Footnote Editing Window" sounds like a duplicate of the existing C-c '
> functionality (`org-edit-special').
> 

Yep! It is, and that's also very good to know: I am sorry but this totally flew
over my head in these years of using org... 

> "Customized Footnote Definition Jumping" does not sound too different
> from editing window. May you elaborate why it is useful?
> 
> I am not sure if I understand what "Enhanced Footnote Reference
> Searching" does from its description.
> 
> "Eeasier Footnote Deletion": How is it different from `org-footnote-delete'?
> 

That was nothing more than a simple wrapper for org-footnote-delete, which
is not an interactive function: btw, I am curious to know if there is a reason 
for
that. Why should users re-implement org-footnote-delete with wrappers if 
they want to use it interactively?

Many thanks!

Andrea Lazzarini

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




Re: is it possible to choose a completion engine?

2023-05-22 Thread Ihor Radchenko
web...@toryanderson.com (Tory S. Anderson) writes:

> Org currently stands out from my workflow because it does completions its own 
> way, with lists and number/letter keys. It would be nice if I could instead 
> have the benefit of vertico, or helm, or whatever else instead. Org would 
> even benefit from marginalia and embark in some cases. Is there an easy 
> variable I'm missing to make org use completing-reads instead of the indexing 
> thing it does?

This is because you customized your tags/todo keywords to have a quick
key binding to set. By default, Org uses custom "fast" interface for
completion in such cases. You can either remove the bindings to
explicitly set `org-use-fast-tag-selection' and/or
`org-use-fast-todo-selection' to nil.

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



Re: [PATCH] lisp/org.el: allow org-return to call org-open-at-point on citations

2023-05-22 Thread Bruno Cardoso

On 2023-05-22, 10:49 +, Ihor Radchenko  wrote:

> Thanks!
> May you also update the docstring of `org-return-follows-link' and add
> etc/ORG-NEWS entry?

Hi Ihor, here's the updated patch as suggested.

Best,

Bruno.

>From 436cd212507cc948af8de6f9e57b5e14e29f23dd Mon Sep 17 00:00:00 2001
From: bruno 
Date: Sun, 21 May 2023 15:53:42 -0300
Subject: [PATCH] lisp/org.el: allow org-return to call org-open-at-point on
 citations

* lisp/org.el (org-return): When `org-return-follows-link' is non-nil
and point is over an org-cite citation or citation reference, call `org-open-at-point'.

TINYCHANGE
---
 etc/ORG-NEWS | 5 +
 lisp/org-keys.el | 3 ++-
 lisp/org.el  | 9 +
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 6b40198b5..ddf1e9110 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -221,6 +221,11 @@ Running shell blocks with the ~:session~ header freezes Emacs until
 execution completes.  The new ~:async~ header allows users to continue
 editing with Emacs while a ~:session~ block executes.
 
+*** ~org-return~ now acts on citations at point
+
+When ~org-return-follows-link~ is non-nil and cursor is over an
+org-cite citation, ~org-return~ will call ~org-open-at-point~.
+
 ** Miscellaneous
 *** =org-crypt.el= now applies initial visibility settings to decrypted entries
 
diff --git a/lisp/org-keys.el b/lisp/org-keys.el
index c62d62a1d..5f3ea8da3 100644
--- a/lisp/org-keys.el
+++ b/lisp/org-keys.el
@@ -299,7 +299,8 @@ implementation is bad."
 
 (defcustom org-return-follows-link nil
   "Non-nil means on links RET will follow the link.
-In tables, the special behavior of RET has precedence."
+In tables, the special behavior of RET has precedence.
+On a timestamp or a citation, call `org-open-at-point'."
   :group 'org-link-follow
   :type 'boolean
   :safe #'booleanp)
diff --git a/lisp/org.el b/lisp/org.el
index 866af624e..8eab3ed22 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17774,8 +17774,8 @@ When optional INDENT argument is non-nil, call
 and INTERACTIVE.
 
 When `org-return-follows-link' is non-nil and point is on
-a timestamp or a link, call `org-open-at-point'.  However, it
-will not happen if point is in a table or on a \"dead\"
+a timestamp, a link or a citation, call `org-open-at-point'.
+However, it will not happen if point is in a table or on a \"dead\"
 object (e.g., within a comment).  In these case, you need to use
 `org-open-at-point' directly."
   (interactive "i\nP\np")
@@ -17795,8 +17795,8 @@ object (e.g., within a comment).  In these case, you need to use
 	  (insert "\n")
 	(org-table-justify-field-maybe)
 	(call-interactively #'org-table-next-row)))
- ;; On a link or a timestamp, call `org-open-at-point' if
- ;; `org-return-follows-link' allows it.  Tolerate fuzzy
+ ;; On a link, a timestamp or a citation, call `org-open-at-point'
+ ;; if `org-return-follows-link' allows it.  Tolerate fuzzy
  ;; locations, e.g., in a comment, as `org-open-at-point'.
  ((and org-return-follows-link
 	   (or (and (eq 'link element-type)
@@ -17808,6 +17808,7 @@ object (e.g., within a comment).  In these case, you need to use
 			(> (point) origin
 	   (org-in-regexp org-ts-regexp-both nil t)
 	   (org-in-regexp org-tsr-regexp-both nil  t)
+   (org-element-lineage context '(citation citation-reference))
 	   (org-in-regexp org-link-any-re nil t)))
   (call-interactively #'org-open-at-point))
  ;; Insert newline in heading, but preserve tags.
-- 
2.40.1



Re: [FR] Enhancing footnote managment (via indirect buffer)?

2023-05-22 Thread Ihor Radchenko
Andrea Lazzarini  writes:

> I am writing to you because I have recently published a simple package called
> org-footnote-assistant [https://github.com/lazzalazza/org-footnote-assistant],
> which aims at improving the overall functionality and user experience of 
> footnotes
> within Org Mode.

Thanks for your interest to contribute to Org mode!

> The current management of footnotes has certain limitations that can sometimes
> hinder the overall user experience. One major limitation is the limited inline
> viewing of footnotes, which makes it challenging to review and modify footnote
> content precisely and without disrupting the workflow.
>
> Org-footnote-assistant addresses the limitations of inline viewing of 
> footnotes
> by using an indirect buffer.

I am not sure if indirect buffer is the right approach for _previews_.
It is more common in Emacs to either use eldoc or tooltips.
You may use
https://www.masteringemacs.org/article/seamlessly-merge-multiple-documentation-sources-eldoc
as reference about eldoc.

> The package also provides commands for easy
> navigation between footnote references, enabling quick jumps to the next or
> previous reference.

This sounds like something we can extend `org-forward-element' and
`org-backward-element' with - it may not only jump to the next element,
but also jump to the next element of the same type. Jumping to next/previous
footnote might will useful as a separate command as well though, as a
complement to the existing `org-next-item', `org-next-link',
`org-next-block', etc.

"Footnote Editing Window" sounds like a duplicate of the existing C-c '
functionality (`org-edit-special').

"Customized Footnote Definition Jumping" does not sound too different
from editing window. May you elaborate why it is useful?

I am not sure if I understand what "Enhanced Footnote Reference
Searching" does from its description.

"Eeasier Footnote Deletion": How is it different from `org-footnote-delete'?

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



Re: [PATCH] lisp/org.el: allow org-return to call org-open-at-point on citations

2023-05-22 Thread Ihor Radchenko
Bruno Cardoso  writes:

> This patch is a tiny change that allows `org-return' to call 
> `org-open-at-point' when cursor is over org-cite citations.

Thanks!
May you also update the docstring of `org-return-follows-link' and add
etc/ORG-NEWS entry?

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



[PATCH] lisp/org.el: allow org-return to call org-open-at-point on citations

2023-05-22 Thread Bruno Cardoso

Hello everyone.

This patch is a tiny change that allows `org-return' to call 
`org-open-at-point' when cursor is over org-cite citations.

Best,

Bruno.

>From 19409cbf70958aa1d7f508cd7151f36a92212341 Mon Sep 17 00:00:00 2001
From: bruno 
Date: Sun, 21 May 2023 15:53:42 -0300
Subject: [PATCH] lisp/org.el: allow org-return to call org-open-at-point on
 citations

* lisp/org.el (org-return): When `org-return-follows-link' is non-nil
and point is over an org-cite citation or citantion reference, call `org-open-at-point'.

TINYCHANGE
---
 lisp/org.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 866af624e..8eab3ed22 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17774,8 +17774,8 @@ When optional INDENT argument is non-nil, call
 and INTERACTIVE.
 
 When `org-return-follows-link' is non-nil and point is on
-a timestamp or a link, call `org-open-at-point'.  However, it
-will not happen if point is in a table or on a \"dead\"
+a timestamp, a link or a citation, call `org-open-at-point'.
+However, it will not happen if point is in a table or on a \"dead\"
 object (e.g., within a comment).  In these case, you need to use
 `org-open-at-point' directly."
   (interactive "i\nP\np")
@@ -17795,8 +17795,8 @@ object (e.g., within a comment).  In these case, you need to use
 	  (insert "\n")
 	(org-table-justify-field-maybe)
 	(call-interactively #'org-table-next-row)))
- ;; On a link or a timestamp, call `org-open-at-point' if
- ;; `org-return-follows-link' allows it.  Tolerate fuzzy
+ ;; On a link, a timestamp or a citation, call `org-open-at-point'
+ ;; if `org-return-follows-link' allows it.  Tolerate fuzzy
  ;; locations, e.g., in a comment, as `org-open-at-point'.
  ((and org-return-follows-link
 	   (or (and (eq 'link element-type)
@@ -17808,6 +17808,7 @@ object (e.g., within a comment).  In these case, you need to use
 			(> (point) origin
 	   (org-in-regexp org-ts-regexp-both nil t)
 	   (org-in-regexp org-tsr-regexp-both nil  t)
+   (org-element-lineage context '(citation citation-reference))
 	   (org-in-regexp org-link-any-re nil t)))
   (call-interactively #'org-open-at-point))
  ;; Insert newline in heading, but preserve tags.
-- 
2.40.1



[FR] Enhancing footnote managment (via indirect buffer)?

2023-05-22 Thread Andrea Lazzarini
I am writing to you because I have recently published a simple package called
org-footnote-assistant [https://github.com/lazzalazza/org-footnote-assistant],
which aims at improving the overall functionality and user experience of 
footnotes
within Org Mode.

The current management of footnotes has certain limitations that can sometimes
hinder the overall user experience. One major limitation is the limited inline
viewing of footnotes, which makes it challenging to review and modify footnote
content precisely and without disrupting the workflow.

Org-footnote-assistant addresses the limitations of inline viewing of footnotes
by using an indirect buffer.The package also provides commands for easy
navigation between footnote references, enabling quick jumps to the next or
previous reference.

On Reddit I have been encouraged to seek your feedback and explore the
possibility of integrating some of these features upstream to prevent bitrot and
ensure wider accessibility, and I am of course open to any suggestion or input.

Best,

Andrea Lazzarini
GitHub: lazzalazza




Re: how to insert, interactively org-time-stamp with any time

2023-05-22 Thread Uwe Brauer

> Uwe Brauer  writes:

> C-u C-c . 2023-05-22 16:45 
> or (is you do it today)
> C-u C-c . 16:45 

Ah, thanks


> That's your setting, no? It looks like you have no equivalent of AM/PM
> in your locale, so %p expands to empty string, prepended by space, as
> you instructed. On my side, your value of
> `org-time-stamp-custom-formats' works just fine.


Ok, I see, I deleted th %p entry and now everything is fine, thanks.
-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/


smime.p7s
Description: S/MIME cryptographic signature


Re: how to insert, interactively org-time-stamp with any time

2023-05-22 Thread Ihor Radchenko
Uwe Brauer  writes:

> Using C-u C-c .
>
> Prompts a date and the actual time, however how can I change the actual
> time? No key seems to allow that, so only end up with for example
>
> <2023-05-22 09:45>
>
> But I would like for example to chose 
>
> <2023-05-22 16:45>
>
> How can I achieve that?

C-u C-c . 2023-05-22 16:45 
or (is you do it today)
C-u C-c . 16:45 

> BTW the way the time stamp is displayed is
>
> <22.05.2023 09:45 >
>
> While 
> ,
> | org-time-stamp-formats is a variable defined in ‘org_init.el’.
> | 
> | Its value is ("<%Y-%m-%d>" . "<%Y-%m-%d %H:%M>")
> `
>
> And my setting is 
>
>  '(org-time-stamp-custom-formats '("%d.%m.%Y" . "%d.%m.%Y %I:%M %p"))
>
>
> Not sure what the %p

That's your setting, no? It looks like you have no equivalent of AM/PM
in your locale, so %p expands to empty string, prepended by space, as
you instructed. On my side, your value of
`org-time-stamp-custom-formats' works just fine.

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



Re: [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]

2023-05-22 Thread Ihor Radchenko
Patrick Useldinger  writes:

>> https://github.com/Malabarba/elisp-bug-hunter
>> 
>
> bug hunter hasn't helped at all, maybe I've missed something, will have 
> to try again later.

It will not catch anything automatically - you likely need to do
interactive debugging here.
I provided an example in https://cubeatic.com/index.php/s/iQakFWXgxsJzyXP
Hope it helps.

> I tried to profile the loop though:

This is not useful for infinite loop - the logic might be faulty here or
some third-party package doing something weird. We instead need to
identify how to reproduce the problem, so that I can diagnose further on
my side.

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



how to insert, interactively org-time-stamp with any time

2023-05-22 Thread Uwe Brauer


Hi

Using C-u C-c .

Prompts a date and the actual time, however how can I change the actual
time? No key seems to allow that, so only end up with for example

<2023-05-22 09:45>

But I would like for example to chose 

<2023-05-22 16:45>

How can I achieve that?


BTW the way the time stamp is displayed is

<22.05.2023 09:45 >

While 
,
| org-time-stamp-formats is a variable defined in ‘org_init.el’.
| 
| Its value is ("<%Y-%m-%d>" . "<%Y-%m-%d %H:%M>")
`

And my setting is 

 '(org-time-stamp-custom-formats '("%d.%m.%Y" . "%d.%m.%Y %I:%M %p"))


Not sure what the %p

Regards

Uwe Brauer 
-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/




Re: is it possible to choose a completion engine?

2023-05-22 Thread Pedro Andres Aranda Gutierrez
Tory writes:

> Org currently stands out from my workflow because it does completions its
own way, with lists and number/letter keys. It would be nice if I could
instead have the benefit of vertico, or helm, or whatever else instead. Org
would even benefit from marginalia and embark in some cases. Is there an
easy variable I'm missing to make org use completing-reads instead of the
indexing thing it does?

Hi Tory,

I'm using company-mode and I do have auto-completions without any specific
org configuration. Org is also quite well integrated with jinx as my
spellchecker. Since I mainly use org as a 'high-level' layer for
presentations and documents, I'm well served with that. And it is basically
the same I have for LaTEX and markdown.

Hope it helps,
/PA
-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet