Re: [PATCH] doc/org-manual.org: Document `org-latex-src-block-backend'

2023-05-23 Thread Nick Dokos
Ihor Radchenko  writes:

> Attaching tentative manual patch that explains about
> `org-latex-src-block-backend'. There was no explanation about different
> ways to export colored source blocks in the past.
>
> Please try to read and let me know if anything is confusing.

To me, it does not seem necessary to include the various descriptions. Just
the first three lines of the patch, perhaps with a prompt to consult
the doc string of the variable which describes these options in
detail, seems enough IMO.

My $0.02 - feel free to disregard.

-- 
Nick




Re: is it possible to choose a completion engine?

2023-05-23 Thread Samuel Wales
[well it does not work on some cmpleting-reads now in 27.1, and melpa
seems to be unsigned, so if i am able i have to upgrade a component,
try a different ido package perhaps, or try vertico and friends
but yes it was a sweet spot.]

On 5/23/23, Tory S. Anderson  wrote:
> Samuel Wales  writes:
>
>> 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.
>
> Thank you for the recommendation! I've never tried ido, having gone from
> Helm to Avy/Ivy to Selectrum to Vertico. IIRC, ido is built in to emacs,
> right? So that would be a big plus. It sounds like it finds a sweetspot for
> you.
>


-- 
The Kafka Pandemic

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



Re: Change colour of hyperlinks in Beamer presentation

2023-05-23 Thread Andrea
I believe you could do something like that (borrowed from the LaTeX Wikibook
):
#+LATEX_HEADER: \hypersetup{
#+LATEX_HEADER: colorlinks=true,% false: boxed links; true:
colored links
#+LATEX_HEADER: linkcolor=red,  % color of internal links
(change box color with linkbordercolor)
#+LATEX_HEADER: citecolor=green,% color of links to bibliography
#+LATEX_HEADER: filecolor=cyan, % color of file links
#+LATEX_HEADER: urlcolor=magenta% color of external links
#+LATEX_HEADER: }

Il giorno lun 22 mag 2023 alle ore 14:43 Loris Bennett <
loris.benn...@fu-berlin.de> ha scritto:

> 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: is it possible to choose a completion engine?

2023-05-23 Thread Tory S. Anderson
Ah! Turns out I rely on the Fast completion more than I realized; I am used to 
hitting "t p" from the agenda to tag an item with a custom status I've created, 
as you guessed in your message. But untouched was the type of key-menu I really 
want to hide when, for example, I hit =C-c a= =org-agenda= and get a menu of 
agenda options to choose from, or =(org-clock-goto '(4))= and I get a big 
indexed list of clock items. I don't mind keeping the fast keys, but would love 
for the big screens of options to go away. The =org-use-fast-todo-selection= 
and =org-use-fast-tag-selection= variables do not effect the method used for 
those big index screens, which are the ones I actually care about and would 
like to use with standard completion.

Ihor Radchenko  writes:

> 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.



Re: is it possible to choose a completion engine?

2023-05-23 Thread Tory S. Anderson
Samuel Wales  writes:

> 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.

Thank you for the recommendation! I've never tried ido, having gone from Helm 
to Avy/Ivy to Selectrum to Vertico. IIRC, ido is built in to emacs, right? So 
that would be a big plus. It sounds like it finds a sweetspot for you.



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

2023-05-23 Thread Payas Relekar
Andrea Lazzarini  writes:

> I've fiddled with org-edit-special and I see it has a major flaw, at least in 
> my opinion.
> It inserts all changes without keeping track of the undos, as opposed to the 
> indirect
> buffer solution, which also had the advantage of doing everything from a 
> single buffer:
> it operates as some sort of 'window' on a part of the file, rather than 
> feeling as some
> sort of out-of-the-normal operation. Aren't there other possibile use cases 
> for indirect
> buffers in org mode? Why are they considered inferior to other solutions? I 
> ask just
> for my understanding.
>
> (A combination of eldoc + org-edit-special might be rather affecting on the
> seamlessness of the workflow, but this is of course my simple personal 
> opinion).

I've been playing with org-footnote-assistance, and this is again just
another opinion, but I'm also preferring the indirect buffer. It just
puts things in better perspective.


--



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

2023-05-23 Thread Andrea Lazzarini



> Il giorno 22 mag 2023, alle ore 17:30, Ihor Radchenko  
> ha scritto:
> 
> 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.
> 

Ok, very good. This is my first attempt at it and, apparently, it works.

(setq eldoc-echo-area-use-multiline-p nil)

(defun org-footnote-eldoc-function (callback &rest _ignored)
  "Return the definition of the footnote at point for Eldoc."
  (when (org-footnote-at-reference-p)
(let* ((footnote-label (car (org-footnote-at-reference-p)))
   (footnote-definition (org-footnote-get-definition footnote-label))
   (start-def (nth 1 footnote-definition))
   (end-def (nth 2 footnote-definition)))
  (when footnote-definition
(font-lock-ensure start-def end-def)
(format "%s"  (buffer-substring start-def end-def))

(defun org-footnote-enable-eldoc ()
  "Enable Eldoc support for Org Mode footnotes."
  (add-hook 'eldoc-documentation-functions #'org-footnote-eldoc-function nil t))

(add-hook 'org-mode-hook #'org-footnote-enable-eldoc)

I now wonder if there is a way to prevent changing 
eldoc-echo-area-use-multiline-p
to nil globally to prevent footnotes from appearing there and not only in the
eldoc-doc-buffer.

Provided this might be considered useful, where could such a feature be
implemented? I checked org-eldoc.el, but it looks like it aims at
providing programming documentation inside org-mode rather than
implementing specific org-oriented features.


>>> "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.

That would be great.

I've fiddled with org-edit-special and I see it has a major flaw, at least in 
my opinion.
It inserts all changes without keeping track of the undos, as opposed to the 
indirect
buffer solution, which also had the advantage of doing everything from a single 
buffer:
it operates as some sort of 'window' on a part of the file, rather than feeling 
as some
sort of out-of-the-normal operation. Aren't there other possibile use cases for 
indirect
buffers in org mode? Why are they considered inferior to other solutions? I ask 
just
for my understanding.

(A combination of eldoc + org-edit-special might be rather affecting on the
seamlessness of the workflow, but this is of course my simple personal opinion).


> Il giorno 22 mag 2023, alle ore 13:45, Ihor Radchenko  
> ha scritto:
> 
> 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.


Functions that make navigation between similar elements easier would simply be 
great.







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-23 Thread Patrick Useldinger
On 20/05/2023 22:01, Ihor Radchenko wrote:
> You can try to bisect your config to identify which part is triggering
> the problem. See
> https://list.orgmode.org/orgmode/87ee2nlslt.fsf@localhost/ and
> https://github.com/Malabarba/elisp-bug-hunter

I have been able to create a minimal set of init.el and WORK.org which
allows me to reproduce the problem

1) start Emacs
2) F6 (shortcut for capture)
3) create a task in the capture buffer
4) press C-c C-q and enjoy the loop
5) C-g breaks the loop



--- WORK.org

;; -*- coding: utf-8 -*-
#+TODO: WAIT(w) TODO(t) DELG(d) | DONE(x)
#+STARTUP: show2levels hidestars nologrepeat
#+ARCHIVE: %s_archive::
* CAPTURE
** Regulars
*** TODO [#C] -- Empty CAP.org/CAPTURE
 SCHEDULED: <2023-05-26 Fri ++1w>
** Cap-X
** WAIT hello
:test:
** DONE read "acceptable use"
DEADLINE: <2023-05-19 Fri>

--- init.el


;; custom variables
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
  '(org-capture-templates
'(("x" "Todo (test)" entry
   (file+olp "/Users/pu/Workcloud/org/WORK.org" "CAPTURE" "Cap-X")
   "* TODO %^{Task Description}" :prepend t)
  ("t" "Todo (work)" entry
   (file+olp "~/Workcloud/org/WORK.org" "CAPTURE")
   "* TODO %^{Task Description}" :prepend t)
  ("n" "Note (work)" entry
   (file+olp "~/Workcloud/org/WORK.org" "CAPTURE")
   "* %^{Note Description}" :prepend t

;; system-specific
(when (eq system-type 'darwin)
   (setq ns-alternate-modifier 'meta)
   (setq ns-right-alternate-modifier nil))

;; package: org
(add-hook
  'org-load-hook
  (lambda ()
(define-key org-mode-map "\C-ca" 'org-agenda)
(add-hook
 'org-agenda-load-hook
 (lambda ()
   (define-key org-agenda-mode-map "\M-p" 'org-agenda-backward-block)
   (define-key org-agenda-mode-map "\M-n" 'org-agenda-forward-block)))
(global-set-key (kbd "") 'org-capture)))

(defun pu/options ()
   (interactive)
   (pu/option-org))
(add-hook 'window-setup-hook 'pu/options)

(defun pu/option-org ()
   (find-file "~/Workcloud/org/WORK.org"))



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-23 Thread Patrick Useldinger
On 20/05/2023 22:01, Ihor Radchenko wrote:
> You can try to bisect your config to identify which part is triggering
> the problem. See
> https://list.orgmode.org/orgmode/87ee2nlslt.fsf@localhost/ and
> https://github.com/Malabarba/elisp-bug-hunter

I have "bisected" init.el to no avail, the problem remains.
Then I started doing the same with the org file and I was able to
reproduce the problem with the following minimal file:

---

;; -*- coding: utf-8 -*-
#+TODO: WAIT(w) TODO(t) DELG(d) | DONE(x)
#+STARTUP: show2levels hidestars nologrepeat
#+ARCHIVE: %s_archive::
* CAPTURE
** Regulars
*** TODO [#C] -- Empty CAP.org/CAPTURE
 SCHEDULED: <2023-05-26 Fri ++1w>
** Cap-X
** WAIT hello
:test:
** DONE read "acceptable use"
DEADLINE: <2023-05-19 Fri>

---

I am also posting my init.el here, just in case anybody can spot
anything problematic.



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-23 Thread Patrick Useldinger

On 20/05/2023 18:04, Ihor Radchenko wrote:

I am unable to reproduce.
Could you please try to detail all the steps more precisely, starting
from emacs -Q?



I have been able to create a minimal set of init.el and WORK.org which
allows me to reproduce the problem:

1) start Emacs
2) F6 (shortcut for capture)
3) x
4) create a task in the capture buffer
5) press C-c C-q and enjoy the loop
6) C-g breaks the loop

OTOH, using t at step 3 works well.
As indicated, the only difference between the remplates x and t is that
x uses 2 levels of heading, whereas t only uses one.

--- WORK.org

;; -*- coding: utf-8 -*-
#+TODO: WAIT(w) TODO(t) DELG(d) | DONE(x)
#+STARTUP: show2levels hidestars nologrepeat
#+ARCHIVE: %s_archive::
* CAPTURE
** Regulars
*** TODO [#C] -- Empty CAP.org/CAPTURE
 SCHEDULED: <2023-05-26 Fri ++1w>
** Cap-X
** WAIT hello
:test:
** DONE read "acceptable use"
DEADLINE: <2023-05-19 Fri>

--- init.el

;; custom variables
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
  '(org-capture-templates
'(("x" "Todo (test)" entry
   (file+olp "/Users/pu/Workcloud/org/WORK.org" "CAPTURE" "Cap-X")
   "* TODO %^{Task Description}" :prepend t)
  ("t" "Todo (work)" entry
   (file+olp "~/Workcloud/org/WORK.org" "CAPTURE")



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-23 Thread Patrick Useldinger

On 20/05/2023 22:01, Ihor Radchenko wrote:

You can try to bisect your config to identify which part is triggering
the problem. See
https://list.orgmode.org/orgmode/87ee2nlslt.fsf@localhost/ and
https://github.com/Malabarba/elisp-bug-hunter


I have been able to create a minimal set of init.el and WORK.org which 
allows me to reproduce the problem:


1) start Emacs
2) F6 (shortcut for capture)
3) x
4) create a task in the capture buffer
5) press C-c C-q and enjoy the loop
6) C-g breaks the loop

OTOH, using t at step 3 works well.
As indicated, the only difference between the remplates x and t is that 
x uses 2 levels of heading, whereas t only uses one.


HTH!


--- WORK.org

;; -*- coding: utf-8 -*-
#+TODO: WAIT(w) TODO(t) DELG(d) | DONE(x)
#+STARTUP: show2levels hidestars nologrepeat
#+ARCHIVE: %s_archive::
* CAPTURE
** Regulars
*** TODO [#C] -- Empty CAP.org/CAPTURE
SCHEDULED: <2023-05-26 Fri ++1w>
** Cap-X
** WAIT hello 
   :test:

** DONE read "acceptable use"
   DEADLINE: <2023-05-19 Fri>

--- init.el

;; custom variables
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(org-capture-templates
   '(("x" "Todo (test)" entry
  (file+olp "/Users/pu/Workcloud/org/WORK.org" "CAPTURE" "Cap-X")
  "* TODO %^{Task Description}" :prepend t)
 ("t" "Todo (work)" entry
  (file+olp "~/Workcloud/org/WORK.org" "CAPTURE")
  "* TODO %^{Task Description}" :prepend t)
 ("n" "Note (work)" entry
  (file+olp "~/Workcloud/org/WORK.org" "CAPTURE")
  "* %^{Note Description}" :prepend t

;; system-specific
(when (eq system-type 'darwin)
  (setq ns-alternate-modifier 'meta)
  (setq ns-right-alternate-modifier nil))

;; package: org
(add-hook
 'org-load-hook
 (lambda ()
   (define-key org-mode-map "\C-ca" 'org-agenda)
   (add-hook
'org-agenda-load-hook
(lambda ()
  (define-key org-agenda-mode-map "\M-p" 'org-agenda-backward-block)
  (define-key org-agenda-mode-map "\M-n" 'org-agenda-forward-block)))
   (global-set-key (kbd "") 'org-capture)))

(defun pu/options ()
  (interactive)
  (pu/option-org))
(add-hook 'window-setup-hook 'pu/options)

(defun pu/option-org ()
  (find-file "~/Workcloud/org/WORK.org"))