Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL=TITLE"

2022-01-30 Thread Tim Cross


chris  writes:

> On Monday, 31 January 2022 04:49:59 CET chris wrote:
>> On Monday, 31 January 2022 04:43:34 CET chris wrote:
>> > On Monday, 31 January 2022 04:28:06 CET Ihor Radchenko wrote:
>> > > chris  writes:
>> > > >> What will happen if you try (kill-new "something") in your Emacs
>> > > >> (preferably, emacs -Q)? Will "something" be present in your Wayland
>> > > >> clipboard?
>> > > > 
>> > > > emacs -Q, then `M-: (kill-new "something")`
>> > > > Then `C-y` in `*scratch*`, string "something" is pasted.
>> > > > Then go to terminal (Konsole, specifically), `C-S-v`, string
>> > > > "something"
>> > > > is
>> > > > pasted, too.
>> > > 
>> > > Got it. What about emacsclient -e "(kill-new \"test123\")"?
>> > 
>> > `~/path-to-emacs/lib-src/emacsclient -e "(kill-new \"test123
>> > \")"`
>> > 
>> > Emacs side, `C-y` => "test123"
>> > 
>> > Terminal side, `C-S-v` => no trace of the "test123" string.
>> 
>> My, I missed one pivotal point:
>> Right after that operation, I cannot cut and paste straight away from
>> terminal to emacs.
>> If I copy and paste some string "test567" from terminal to Firefox or
>> whatever, it is working fine, but `C-y` in emacs is still "test123".
>> 
>
> Also, right now, emacs kill-ring is not very big, less than 10 items, so I 
> can 
> see all of them using `M-y`, and the most recent one, after several cut-and-
> paste operations none of them emacs related, is still "test123".
>
> And so now I do the converse operation and that works, and after that copying 
> from terminal to emacs works again.
>
> Bottom line, it seems org-mode independent.
>

This is most likely an Emacs 29 issue. The pgtk stuff has only very
recently been pulled into the mainline development tree and it is very
likely that little testing has been done on wayland using the pure gtk
build (and I'm assuming no wayland X window integration layer).

You probably need to log it as an Emacs bug. It might be worthwhile
asking on the emacs-devel list - it could be a known issue.



Re: looking for examples of `org-capture-templates` working with `org-protocol://capture`

2022-01-30 Thread chris
On Monday, 31 January 2022 04:07:01 CET chris wrote:
> On Monday, 31 January 2022 03:30:41 CET chris wrote:
> > Hi,
> > When you do
> > `emacsclient "org-protocol://capture?
> > template=X=URL=TITLE=BODY"`
> > I don't understand at all how you make use of `url` `title` and `body` in
> > `org- capture-template`.
> > I understand there is some sort of "encoding" that doesn't make use of the
> > keywords `url` `title` or `body`, but it's dense.
> > There are no indications of how to do that here:
> > https://orgmode.org/manual/The-capture-protocol.html[1]
> > I haven't found any example that I've been able to reproduce in the whole
> > web. I've spent hours on the documentation and the source code of
> > https://github.com/emacs-mirror/emacs/blob/master/lisp/org/org-protocol.el
> > [2 ] And I have absolutely no idea of how to use `url` `title` and `body`
> > in `org-capture- template`.
> 
> The last example in https://blog.jethro.dev/posts/capturing_inbox/[1],
> namely: ```emacs-lisp
> (setq org-capture-templates
>   `(("l" "org-protocol-capture" entry
>  (file "~/path/inbox.org")
> "* TODO [[%:link][%:description]]\n\n %i"
> 
> :immediate-finish t)))
> 
> ```
> Seems to work consistently with:
> `xdg-open "org-protocol://capture?template=l=URL$(date
> --iso-8601=s)=TITLE$ (date --iso-86
> 01=s)=BODY$(date --iso-8601=s)"`
> 
> 
> Provided I have opened at least one org buffer before hand, otherwise it
> opens a buffer named
> `"org-protocol://capture?template=l=URL=TITLE=BODY" ` at
> what point it can get messy. Probably I have to "start" somehow "org-mode"
> first, and it doesn't get enough started from my `init.el`.
> 

So, reverse-engineering the example I've eventually found the relevant points 
of the 
documentation:

https://orgmode.org/worg/org-contrib/org-protocol.html[1]
%i'
will be replaced by the selected text in your browser window if any.
In addition, you may use the following placeholders in your template:
Placeholders Replacement
%:link URL of the web-page
%:description The title of the web-page
%:initial Selected text.


https://orgmode.org/manual/Template-expansion.html[2]

So, not so many examples, that's all.

So I've rewritten Jethro's example using `%:initial` because it's easier to 
read:


```emacs-lisp
(setq org-capture-templates
  `(("l" "org-protocol-capture" entry
 (file "~/path/inbox.org")
"* TODO [[%:link][%:description]]\n\n %:initial"
:immediate-finish t)))
```

> 
> Goal is to have the capturing work in the background, with emacs started as
> a daemon, but with no opened emacsclient frame:
> capture, simply, silently, unobtrusively.
> 
> > Chris
> > 
> > 
> > [1] https://orgmode.org/manual/The-capture-protocol.html
> > [2]
> > https://github.com/emacs-mirror/emacs/blob/master/lisp/org/org-protocol.el
> 
> 
> [1] https://blog.jethro.dev/posts/capturing_inbox/




[1] https://orgmode.org/worg/org-contrib/org-protocol.html

Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL=TITLE"

2022-01-30 Thread chris
On Monday, 31 January 2022 04:49:59 CET chris wrote:
> On Monday, 31 January 2022 04:43:34 CET chris wrote:
> > On Monday, 31 January 2022 04:28:06 CET Ihor Radchenko wrote:
> > > chris  writes:
> > > >> What will happen if you try (kill-new "something") in your Emacs
> > > >> (preferably, emacs -Q)? Will "something" be present in your Wayland
> > > >> clipboard?
> > > > 
> > > > emacs -Q, then `M-: (kill-new "something")`
> > > > Then `C-y` in `*scratch*`, string "something" is pasted.
> > > > Then go to terminal (Konsole, specifically), `C-S-v`, string
> > > > "something"
> > > > is
> > > > pasted, too.
> > > 
> > > Got it. What about emacsclient -e "(kill-new \"test123\")"?
> > 
> > `~/path-to-emacs/lib-src/emacsclient -e "(kill-new \"test123
> > \")"`
> > 
> > Emacs side, `C-y` => "test123"
> > 
> > Terminal side, `C-S-v` => no trace of the "test123" string.
> 
> My, I missed one pivotal point:
> Right after that operation, I cannot cut and paste straight away from
> terminal to emacs.
> If I copy and paste some string "test567" from terminal to Firefox or
> whatever, it is working fine, but `C-y` in emacs is still "test123".
> 

Also, right now, emacs kill-ring is not very big, less than 10 items, so I can 
see all of them using `M-y`, and the most recent one, after several cut-and-
paste operations none of them emacs related, is still "test123".

And so now I do the converse operation and that works, and after that copying 
from terminal to emacs works again.

Bottom line, it seems org-mode independent.

> > (note that I don't have emacs system wide, only the emacs 29.0.50 build
> > from source, so there can be no conflict between two emacs)
> > 
> > > > Also, I understand your point, but the fact that the copying is
> > > > working
> > > > or
> > > > not working, in that direction, specifically, after using `xdg-open
> > > > "org-
> > > > protocol://store-link?url=URL=TITLE"`, etc...
> > > > Is really a detail in what is hindering the workflow there.
> > > 
> > > It seems that you don't (: To clarify, I am not trying to find a
> > > workaround for you yet, but trying to figure out if what you observe is
> > > a Emacs bug, an Org mode bug, or not bug at all.
> > 
> > Yeah, sorry about that.
> > 
> > > Best,
> > > Ihor







Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL=TITLE"

2022-01-30 Thread chris
On Monday, 31 January 2022 04:43:34 CET chris wrote:
> On Monday, 31 January 2022 04:28:06 CET Ihor Radchenko wrote:
> > chris  writes:
> > >> What will happen if you try (kill-new "something") in your Emacs
> > >> (preferably, emacs -Q)? Will "something" be present in your Wayland
> > >> clipboard?
> > > 
> > > emacs -Q, then `M-: (kill-new "something")`
> > > Then `C-y` in `*scratch*`, string "something" is pasted.
> > > Then go to terminal (Konsole, specifically), `C-S-v`, string "something"
> > > is
> > > pasted, too.
> > 
> > Got it. What about emacsclient -e "(kill-new \"test123\")"?
> 
> `~/path-to-emacs/lib-src/emacsclient -e "(kill-new \"test123
> \")"`
> 
> Emacs side, `C-y` => "test123"
> 
> Terminal side, `C-S-v` => no trace of the "test123" string.

My, I missed one pivotal point:
Right after that operation, I cannot cut and paste straight away from terminal 
to emacs.
If I copy and paste some string "test567" from terminal to Firefox or 
whatever, it is working fine, but `C-y` in emacs is still "test123".

> 
> (note that I don't have emacs system wide, only the emacs 29.0.50 build from
> source, so there can be no conflict between two emacs)
> 
> > > Also, I understand your point, but the fact that the copying is working
> > > or
> > > not working, in that direction, specifically, after using `xdg-open
> > > "org-
> > > protocol://store-link?url=URL=TITLE"`, etc...
> > > Is really a detail in what is hindering the workflow there.
> > 
> > It seems that you don't (: To clarify, I am not trying to find a
> > workaround for you yet, but trying to figure out if what you observe is
> > a Emacs bug, an Org mode bug, or not bug at all.
> 
> Yeah, sorry about that.
> 
> > Best,
> > Ihor







Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL=TITLE"

2022-01-30 Thread chris
On Monday, 31 January 2022 04:28:06 CET Ihor Radchenko wrote:
> chris  writes:
> >> What will happen if you try (kill-new "something") in your Emacs
> >> (preferably, emacs -Q)? Will "something" be present in your Wayland
> >> clipboard?
> > 
> > emacs -Q, then `M-: (kill-new "something")`
> > Then `C-y` in `*scratch*`, string "something" is pasted.
> > Then go to terminal (Konsole, specifically), `C-S-v`, string "something"
> > is
> > pasted, too.
> 
> Got it. What about emacsclient -e "(kill-new \"test123\")"?

`~/path-to-emacs/lib-src/emacsclient -e "(kill-new \"test123
\")"`

Emacs side, `C-y` => "test123"

Terminal side, `C-S-v` => no trace of the "test123" string.

(note that I don't have emacs system wide, only the emacs 29.0.50 build from 
source, so 
there can be no conflict between two emacs)


> > Also, I understand your point, but the fact that the copying is working or
> > not working, in that direction, specifically, after using `xdg-open "org-
> > protocol://store-link?url=URL=TITLE"`, etc...
> > Is really a detail in what is hindering the workflow there.
> 
> It seems that you don't (: To clarify, I am not trying to find a
> workaround for you yet, but trying to figure out if what you observe is
> a Emacs bug, an Org mode bug, or not bug at all.

Yeah, sorry about that.

> 
> Best,
> Ihor




Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL=TITLE"

2022-01-30 Thread Ihor Radchenko
chris  writes:

>> What will happen if you try (kill-new "something") in your Emacs
>> (preferably, emacs -Q)? Will "something" be present in your Wayland
>> clipboard?
>
> emacs -Q, then `M-: (kill-new "something")`
> Then `C-y` in `*scratch*`, string "something" is pasted.
> Then go to terminal (Konsole, specifically), `C-S-v`, string "something" is 
> pasted, too.

Got it. What about emacsclient -e "(kill-new \"test123\")"?

> Also, I understand your point, but the fact that the copying is working or 
> not 
> working, in that direction, specifically, after using `xdg-open "org-
> protocol://store-link?url=URL=TITLE"`, etc...
> Is really a detail in what is hindering the workflow there.

It seems that you don't (: To clarify, I am not trying to find a
workaround for you yet, but trying to figure out if what you observe is
a Emacs bug, an Org mode bug, or not bug at all.

Best,
Ihor



Re: looking for examples of `org-capture-templates` working with `org-protocol://capture`

2022-01-30 Thread chris
On Monday, 31 January 2022 03:30:41 CET chris wrote:
> Hi,
> When you do
> `emacsclient "org-protocol://capture?
> template=X=URL=TITLE=BODY"`
> I don't understand at all how you make use of `url` `title` and `body` in
> `org- capture-template`.
> I understand there is some sort of "encoding" that doesn't make use of the
> keywords `url` `title` or `body`, but it's dense.
> There are no indications of how to do that here:
> https://orgmode.org/manual/The-capture-protocol.html[1]
> I haven't found any example that I've been able to reproduce in the whole
> web. I've spent hours on the documentation and the source code of
> https://github.com/emacs-mirror/emacs/blob/master/lisp/org/org-protocol.el[2
> ] And I have absolutely no idea of how to use `url` `title` and `body` in
> `org-capture- template`.


The last example in https://blog.jethro.dev/posts/capturing_inbox/[1], namely:
```emacs-lisp
(setq org-capture-templates
  `(("l" "org-protocol-capture" entry
 (file "~/path/inbox.org")
"* TODO [[%:link][%:description]]\n\n %i"
:immediate-finish t)))
```
Seems to work consistently with:
`xdg-open "org-protocol://capture?template=l=URL$(date 
--iso-8601=s)=TITLE$
(date --iso-86
01=s)=BODY$(date --iso-8601=s)"`


Provided I have opened at least one org buffer before hand, otherwise it opens 
a buffer 
named `"org-protocol://capture?template=l=URL=TITLE=BODY"
` at what point it can get messy. Probably I have to "start" somehow "org-mode" 
first, and 
it doesn't get enough started from my `init.el`.


Goal is to have the capturing work in the background, with emacs started as a 
daemon, 
but with no opened emacsclient frame:
capture, simply, silently, unobtrusively.


> Chris
> 
> 
> [1] https://orgmode.org/manual/The-capture-protocol.html
> [2]
> https://github.com/emacs-mirror/emacs/blob/master/lisp/org/org-protocol.el


[1] https://blog.jethro.dev/posts/capturing_inbox/


looking for examples of `org-capture-templates` working with `org-protocol://capture`

2022-01-30 Thread chris
Hi,
When you do 
`emacsclient "org-protocol://capture?
template=X=URL=TITLE=BODY"`
I don't understand at all how you make use of `url` `title` and `body` in `org-
capture-template`.
I understand there is some sort of "encoding" that doesn't make use of the 
keywords 
`url` `title` or `body`, but it's dense.
There are no indications of how to do that here:
https://orgmode.org/manual/The-capture-protocol.html[1]
I haven't found any example that I've been able to reproduce in the whole web.
I've spent hours on the documentation and the source code of
https://github.com/emacs-mirror/emacs/blob/master/lisp/org/org-protocol.el[2]
And I have absolutely no idea of how to use `url` `title` and `body` in 
`org-capture-
template`.
Chris


[1] https://orgmode.org/manual/The-capture-protocol.html
[2] https://github.com/emacs-mirror/emacs/blob/master/lisp/org/org-protocol.el


Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL=TITLE"

2022-01-30 Thread chris
On Monday, 31 January 2022 02:14:34 CET Ihor Radchenko wrote:
> chris  writes:
> > After doing `xdg-open "org-protocol://store-link?url=URL=TITLE"`.
> > The string "URL" is pushed into Emacs kill-ring.
> > But, this very string "URL", is not inserted into Wayland clipboard.
> 
> I am not using Wayland. However, if I just do (kill-new "test") in X and
> my select-enable-primary is nil (default) - "test" will not go to my X
> clipboard. It is the default behaviour of Emacs in X that has nothing to
> do with Org mode.
> 
> What will happen if you try (kill-new "something") in your Emacs
> (preferably, emacs -Q)? Will "something" be present in your Wayland
> clipboard?

emacs -Q, then `M-: (kill-new "something")`
Then `C-y` in `*scratch*`, string "something" is pasted.
Then go to terminal (Konsole, specifically), `C-S-v`, string "something" is 
pasted, too.

Also, I understand your point, but the fact that the copying is working or not 
working, in that direction, specifically, after using `xdg-open "org-
protocol://store-link?url=URL=TITLE"`, etc...
Is really a detail in what is hindering the workflow there. What is hindering 
the workflow is that the cut and past in the opposite direction, namely from 
the terminal to emacs, stops working from that point onward.
And that is really cumbersome.
And again, at that point the only workaround I've found to have the cut and 
past from terminal to emacs working again, is to perform one operation of 
copying from emacs to the terminal.
If ever I omit that workaround step, next time I'll copy something from the 
terminal to emacs, it will end up in pasting the string that has been 
initially inserted into the kill-ring by `xdg-open "org-protocol://store-link?
url=URL=TITLE"` possibly hours before, so to speak.

And no, even though `M-: (kill-new "something")` is putting "something" in 
both kill-ring and wayland-clipboard as stated above, `xdg-open "org-
protocol://store-link?url=URL=TITLE"`, is only putting "URL" in the 
kill-ring, or so I have observe to the best of my knowledge: and it is not the 
issue in my workflow, only an observation I've made.

> 
> Best,
> Ihor







Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL=TITLE"

2022-01-30 Thread Ihor Radchenko
chris  writes:

> After doing `xdg-open "org-protocol://store-link?url=URL=TITLE"`.
> The string "URL" is pushed into Emacs kill-ring.
> But, this very string "URL", is not inserted into Wayland clipboard.

I am not using Wayland. However, if I just do (kill-new "test") in X and
my select-enable-primary is nil (default) - "test" will not go to my X
clipboard. It is the default behaviour of Emacs in X that has nothing to
do with Org mode.

What will happen if you try (kill-new "something") in your Emacs
(preferably, emacs -Q)? Will "something" be present in your Wayland
clipboard?

Best,
Ihor



Re: A callygraphy notebook environment

2022-01-30 Thread Juan Manuel Macías
Hi Uwe,

Thanks for testing the document.

Uwe Brauer writes:

> Interesting I like them all. I converted your org file to latex and run
> it with lualatex but the font used there does not correspond to all the
> three screenshots.

The default font for the environment 'mynotebook" is qtmerryscript
(shown in the third screenshot, if I remember correctly). I chose that
one because it is included in TeX live 2021.

> Now I am not really acquainted with lualatex but with xelatex, I
> converted QTMerryScript.otf to ttf and run it with xelatex. Nice.

But with XelaTeX the 'mynotebook' environment will not work, since it uses
a function in Lua to generate the grids in a notebook way.

> What are the other otf fonts you are using for these screenshots?

The document itself includes some links to download the other typefaces. Look
in the non-exportable section, named 'Conf', where it says "The different 
options
for the environment...". Anyway, I paste it here too:

- Vladimir Script :: https://fontzone.net/font-details/vladimir-script
- Anke Calligraphic :: https://fontzone.net/font-details/anke-calligraphic-fg
- Studio Script :: https://fontzone.net/download/studioscriptctt

(The third font was not in the screenshots).

Best regards,

Juan Manuel 




[BUG] Do not spell-check file-local variables in Org Mode [9.5.2 (release_9.5.2-9-g7ba24c @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]

2022-01-30 Thread Rudolf Adamkovič



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.


The Org Mode instructs Flyspell to ignore certain elements, such as:

#+setupfile: ~/setup.org

Could the Org Mode instruct Flyspell to also ignore:

# -*- org-html-htmlize-output-type: nil -*-

Thank you!

Rudy
Emacs  : GNU Emacs 29.0.50 (build 2, x86_64-apple-darwin21.2.0, NS 
appkit-2113.20 Version 12.1 (Build 21C52))
 of 2022-01-26
Package: Org mode version 9.5.2 (release_9.5.2-9-g7ba24c @ 
/Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)

current state:
==
(setq
 org-agenda-prefix-format "* % t%s"
 org-link-elisp-confirm-function 'yes-or-no-p
 org-agenda-skip-deadline-prewarning-if-scheduled t
 org-cite-insert-processor 'citar
 org-bibtex-headline-format-function #[257 "\300.\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-agenda-scheduled-leaders '("Scheduled: " "Scheduled %d×: ")
 org-agenda-custom-commands '(("a" "Agenda"
   ((agenda ""
 ((org-agenda-overriding-header "Fortune")
  (org-agenda-files nil) (org-agenda-span 1)
  (org-agenda-day-face-function
   (lambda (_) 'font-lock-comment-face))
  (org-agenda-format-date
   (lambda (_) (my/fortune-string)))
  )
 )
(agenda ""
 ((org-agenda-overriding-header "\nToday")
  (org-agenda-start-on-weekday nil)
  (org-agenda-span 1)
  (org-agenda-format-date
   'my/org-agenda-format-date-not-aligned)
  (org-agenda-day-face-function
   (lambda (_) 'calendar-today))
  (org-agenda-skip-function
   '(org-agenda-skip-entry-if 'todo 'done))
  )
 )
(todo "NEXT|NEXT-IN|ON-HOLD"
 ((org-agenda-overriding-header "\nNext 
actions")
  (org-agenda-todo-ignore-scheduled 'all)
  (org-agenda-todo-ignore-timestamp 'future)
  (org-habit-show-habits nil))
 )
(agenda ""
 ((org-agenda-overriding-header "\nTomorrow")
  (org-agenda-start-day "+1d") (org-agenda-span 
1)
  (org-agenda-format-date
   'my/org-agenda-format-date-not-aligned)
  (org-habit-show-habits-only-for-today nil)
  (org-habit-scheduled-past-days 0))
 )
(agenda ""
 ((org-agenda-overriding-header "\nNear future")
  (org-agenda-start-day "+2d")
  (org-agenda-start-on-weekday nil)
  (org-agenda-span 7) (org-habit-show-habits 
nil))
 )
(todo "WAIT-FOR"
 ((org-agenda-overriding-header "\nWaiting")))
)
   )
  )
 org-startup-folded t
 org-agenda-skip-scheduled-if-done t
 org-agenda-files '("~/agenda.org" "~/agenda-work.org")
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-link-descriptive nil
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cite-follow-processor 'citar
 org-file-apps '(("\\.pdf\\'" . emacs) (auto-mode . emacs) (directory . emacs)
 ("\\.mm\\'" . default) ("\\.x?html?\\'" . default)
 ("\\.pdf\\'" . default))
 org-html-postamble nil
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-edit-src-content-indentation 0
 org-ascii-format-drawer-function #[771 ".\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-habit-preceding-days 6
 org-link-from-user-regexp "|\\"
 org-image-actual-width 480
 org-babel-post-tangle-hook '(remove-final-newline)
 

Re: A callygraphy notebook environment

2022-01-30 Thread Uwe Brauer
>>> "JMM" == Juan Manuel Macías  writes:
Hi Juan
> Hi all,

> This is more related to LaTeX than Org, but I'm sharing it here in case
> anyone is interested. For a work I'm doing I've written a LaTeX
> environment that tries to mimic the look of a calligraphy notebook. By
> default it uses the qtmerryscript font, included in TeX live, but this
> can be changed to any other calligraphic-style font. It works only with
> LuaTeX, since it uses a function in Lua to add the grids.

> An screenshots:

> https://i.imgur.com/tgrgaWM.png

> https://i.imgur.com/AIolze2.png

> https://i.imgur.com/v2Mzyx5.png

Interesting I like them all. I converted your org file to latex and run
it with lualatex but the font used there does not correspond to all the
three screenshots.

Now I am not really acquainted with lualatex but with xelatex, I
converted QTMerryScript.otf to ttf and run it with xelatex. Nice. 

What are the other otf fonts you are using for these screenshots?

Thanks

Uwe


smime.p7s
Description: S/MIME cryptographic signature


[BUG] Make org-html-htmlize-output-type safe [9.5.2 (release_9.5.2-9-g7ba24c @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]

2022-01-30 Thread Rudolf Adamkovič



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.


In some of my notes, I have the following line:

# -*- org-html-htmlize-output-type: nil -*-

Every time I open such a file, Emacs wants me to confirm that doing so
poses no security risk.  Could we perhaps make this variable safe?

Thank you!

Rudy
Emacs  : GNU Emacs 29.0.50 (build 2, x86_64-apple-darwin21.2.0, NS 
appkit-2113.20 Version 12.1 (Build 21C52))
 of 2022-01-26
Package: Org mode version 9.5.2 (release_9.5.2-9-g7ba24c @ 
/Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)

current state:
==
(setq
 org-agenda-prefix-format "* % t%s"
 org-link-elisp-confirm-function 'yes-or-no-p
 org-agenda-skip-deadline-prewarning-if-scheduled t
 org-cite-insert-processor 'citar
 org-bibtex-headline-format-function #[257 "\300.\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-agenda-scheduled-leaders '("Scheduled: " "Scheduled %d×: ")
 org-agenda-custom-commands '(("a" "Agenda"
   ((agenda ""
 ((org-agenda-overriding-header "Fortune")
  (org-agenda-files nil) (org-agenda-span 1)
  (org-agenda-day-face-function
   (lambda (_) 'font-lock-comment-face))
  (org-agenda-format-date
   (lambda (_) (my/fortune-string)))
  )
 )
(agenda ""
 ((org-agenda-overriding-header "\nToday")
  (org-agenda-start-on-weekday nil)
  (org-agenda-span 1)
  (org-agenda-format-date
   'my/org-agenda-format-date-not-aligned)
  (org-agenda-day-face-function
   (lambda (_) 'calendar-today))
  (org-agenda-skip-function
   '(org-agenda-skip-entry-if 'todo 'done))
  )
 )
(todo "NEXT|NEXT-IN|ON-HOLD"
 ((org-agenda-overriding-header "\nNext 
actions")
  (org-agenda-todo-ignore-scheduled 'all)
  (org-agenda-todo-ignore-timestamp 'future)
  (org-habit-show-habits nil))
 )
(agenda ""
 ((org-agenda-overriding-header "\nTomorrow")
  (org-agenda-start-day "+1d") (org-agenda-span 
1)
  (org-agenda-format-date
   'my/org-agenda-format-date-not-aligned)
  (org-habit-show-habits-only-for-today nil)
  (org-habit-scheduled-past-days 0))
 )
(agenda ""
 ((org-agenda-overriding-header "\nNear future")
  (org-agenda-start-day "+2d")
  (org-agenda-start-on-weekday nil)
  (org-agenda-span 7) (org-habit-show-habits 
nil))
 )
(todo "WAIT-FOR"
 ((org-agenda-overriding-header "\nWaiting")))
)
   )
  )
 org-startup-folded t
 org-agenda-skip-scheduled-if-done t
 org-agenda-files '("~/agenda.org" "~/agenda-work.org")
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-link-descriptive nil
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cite-follow-processor 'citar
 org-file-apps '(("\\.pdf\\'" . emacs) (auto-mode . emacs) (directory . emacs)
 ("\\.mm\\'" . default) ("\\.x?html?\\'" . default)
 ("\\.pdf\\'" . default))
 org-html-postamble nil
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-edit-src-content-indentation 0
 org-ascii-format-drawer-function #[771 ".\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-habit-preceding-days 6
 org-link-from-user-regexp "|\\"
 org-image-actual-width 480
 

Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL=TITLE"

2022-01-30 Thread chris
On Sunday, 30 January 2022 04:36:01 CET Ihor Radchenko wrote:
> chris  writes:
> > 3- if you do `C-y` you can see the URL is in the kill-ring
> > But obviously there is no reason for this URL to be also in the Wayland
> > (or
> > x11) clipboard? (there is no law of nature saying that what is in emacs
> > kill- ring must necessarily also be in wayland clipboard. I think there
> > is a law of nature for the other way around though)
> > In any case, in the case of Kde/Kwin/Wayland, it is not copied in the
> > Wayland clipboard.
> > Maybe it's in the description of org-protocol/store-link that the URL
> > should be copied in emacs kill-ring, in any case, it is.
> > But no it doesn't show in the kde/wayland clipboard (and why would it).
> 
> I am not 100% sure if I understand your message clearly. However, just
> letting you know about existence of the following Emacs customisations:

It is, only, in conjunction with `org-protocol`, that kill-ring and 
Wayland-clipboard get out 
of sync.

Not in some general case. General case is fine.

But in the case of org-protocol, as described in the original post and not 
present in the 
excerpt you quoted, they do get out of sync.

To summarize again there are two things that are happening:

After doing `xdg-open "org-protocol://store-link?url=URL=TITLE"`.
The string "URL" is pushed into Emacs kill-ring.
But, this very string "URL", is not inserted into Wayland clipboard.

That was the first thing, string pushed into kill-ring, but not pushed 
simultaneously, into 
Wayland clipboard.

Now second thing: from that point onward, the other way around is broken. (And 
that is 
the part that is really annoying.)

[Then] I mouse-select a string in Firefox, or any application not Emacs. I 
verify the string is 
indeed in Wayland clipboard, I paste it in Firefox, or in the terminal (not 
Emacs).

Now I do `C-y`: this later string is not pasted, even though it should have 
been. I do `M-y` 
to see if I can find the string in the kill-ring: I can't find the string in 
the kill-ring.

What, instead, is the string at the top of Emacs kill-ring: the string "URL" 
(from the initial 
org-protocol action).

So Emacs has now stopped inserting strings from Wayland-clipboard into Emacs 
kill-ring.

No matter how hard I try.

The labor-intensive workaround:

Now what I do is copy a string inside Emacs using `C-w`.

Then, I verify if I can past it in Firefox: I can. It really is in Wayland 
clipboard.

Now I copy a string from Firefox into Emacs: it is not broken anymore, until 
the next time I 
use org-protocol, at which point it gets broken again.

And now it really is also present in Emacs kill-ring.

> save-interprogram-paste-before-kill:
> Whether to save existing clipboard text into kill ring before
> replacing it. select-enable-primary:
> Non-nil means cutting and pasting uses the primary selection.
> 
> Best,
> Ihor




Re: [BUG] Make SVG + LaTeX work by default [9.5.2 (release_9.5.2-9-g7ba24c @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]

2022-01-30 Thread Tom Gillespie
I do not think we can add -shell-escape by default because it
is an arbitrary code execution vector. It might be good to add
a setting in org that would do the right thing without requiring
a user to understand the arcana of latex cli options though.
Best,
Tom



[BUG] Confirmation message for elisp links is badly formatted [9.5.2 (9.5.2-gfbff08 @ /home/omarantolin/.emacs.d/elpa/org-9.5.2/)]

2022-01-30 Thread Omar Antolín Camarena


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.


By default Org prompts you to make sure you really want to execute the code in 
an elisp link; as the docstring for org-link-elisp-confirm-function says, just 
think about a link like [[elisp:(shell-command "rm -rf ~/*")][Web Search]]!

But the formatting of the default confirmation message leaves something to be 
desired. The function org-link--open-elisp which is in charge of confirming 
that you want to execute the code does this:

#+begin_src emacs-lisp
(funcall org-link-elisp-confirm-function
  (format "Execute %S as Elisp? "
  (org-add-props path nil 'face 'org-warning)))
#+end_src emacs-lisp

And the combination of capital %S with the propertized path produces 
confirmation prompts like the following:

 Execute #("(describe-variable 'org-capture-templates)" 0 42 (face 
org-warning)) as Elisp? 

Notice that instead of /being/ propertized with the org-warning face it shows a 
textual representation of the propertize string!

I'd suggest fixing this by /not/ propertizing the link target.

Emacs  : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, 
cairo version 1.16.0)
 of 2021-04-04, unofficial emacs-snapshot build: http://emacs.ganneff.de/, git 
commit dd5ba88afbb63f54603cc632fc55993c04531a85
Package: Org mode version 9.5.2 (9.5.2-gfbff08 @ 
/home/omarantolin/.emacs.d/elpa/org-9.5.2/)

current state:
==
(setq
 org-link-elisp-confirm-function 'y-or-n-p
 org-directory "~/Notes"
 org-hide-emphasis-markers t
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-agenda-files '("~/Notes/Refile.org" "~/Notes/Daily.org"
"~/Notes/Work.org" "~/Notes/Someday.org")
 org-capture-templates '(("s" "Someday" entry (file "Someday.org") "* %?\n")
 ("d" "Daily" entry (file+olp+datetree "Daily.org")
  "* TODO %?\n")
 ("r" "Refile" entry (file "Refile.org") "* %?\n")
 ("j" "Journal entry" plain
  (file+olp+datetree "Journal.org"))
 ("e" "Emacs templates")
 ("ei" "Idea" entry
  (file+olp "Editors/Emacs.org" "Ideas") "* %?\n")
 ("et" "Tip" entry
  (file+olp "Editors/Emacs.org" "Tips") "* %?\n")
 ("eq" "Question" entry
  (file+olp "Editors/Emacs.org" "Questions") "* %?\n")
 ("ep" "Package" entry
  (file+olp "Editors/Emacs.org" "Packages") "* %?\n")
 )
 org-refile-targets '((nil :maxlevel . 2) ("~/Notes/Notes.org" :maxlevel . 2)
  ("~/Notes/Someday.org" :level . 0)
  ("~/Notes/Daily.org" :level . 3)
  ("~/Notes/Work.org" :maxlevel . 2)
  ("~/Notes/Math.org" :maxlevel . 2))
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-refile-use-outline-path 'file
 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-link-from-user-regexp "|\\"
 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
 #[0 "\301\211\207"
   [imenu-create-index-function org-imenu-get-tree] 2]
 add-pretty-entities-hook org-tweak-syntax-table
 turn-off-visual-line-mode turn-on-auto-fill
 echo-area-tooltips ediff-with-org-show-all
 turn-on-org-cdlatex beginend-org-mode)
 outline-mode-hook '(beginend-outline-mode)
 org-ellipsis "…"
 org-confirm-shell-link-function 'yes-or-no-p
 org-reveal-start-hook '(org-decrypt-entry)
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-highlight-latex-and-related '(latex script entities)
 org-agenda-mode-hook '(beginend-org-agenda-mode)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-latex-packages-alist '(("AUTO" "babel" t ("pdflatex")))
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 

Re: [BUG] Make SVG + LaTeX work by default [9.5.2 (release_9.5.2-9-g7ba24c @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]

2022-01-30 Thread Timothy
Hi Rudolf,

> To make SVG work in Org Mode and LaTeX, one must:
>
> (1) add “-shell-escape” to “org-latex-pdf-process”:
>
> OLD: latexmk -f -pdf -%latex -interaction=nonstopmode …
> NEW: latexmk -f -pdf -%latex -interaction=nonstopmode -shell-escape …
>
> (2) add the header line:
>
> #+latex_header: 
>
> With these two changes, SVG images show in both PDF and HTML exports.
>
> Why does Org Mode not have this configured out of the box?  I have just
> spent 2 hours figuring it out, and someone else will have to figure it
> out again sooner or later.

For what consolation it may be, I have a plan to make this (and more) work OOTB
while using the minimal set of packages needed. However, unfortunately I need
more time to refine my changes into patches I’m happy with.

All the best,
Timothy


[BUG] Make SVG + LaTeX work by default [9.5.2 (release_9.5.2-9-g7ba24c @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]

2022-01-30 Thread Rudolf Adamkovič



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.


To make SVG work in Org Mode and LaTeX, one must:

(1) add "-shell-escape" to "org-latex-pdf-process":

OLD: latexmk -f -pdf -%latex -interaction=nonstopmode …
NEW: latexmk -f -pdf -%latex -interaction=nonstopmode -shell-escape …

(2) add the header line:

#+latex_header: \usepackage{svg}

With these two changes, SVG images show in both PDF and HTML exports.

Why does Org Mode not have this configured out of the box?  I have just
spent 2 hours figuring it out, and someone else will have to figure it
out again sooner or later.

Rudy

Emacs  : GNU Emacs 29.0.50 (build 2, x86_64-apple-darwin21.2.0, NS 
appkit-2113.20 Version 12.1 (Build 21C52))
 of 2022-01-26
Package: Org mode version 9.5.2 (release_9.5.2-9-g7ba24c @ 
/Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)

current state:
==
(setq
 org-agenda-prefix-format "* % t%s"
 org-link-elisp-confirm-function 'yes-or-no-p
 org-agenda-skip-deadline-prewarning-if-scheduled t
 org-cite-insert-processor 'citar
 org-bibtex-headline-format-function #[257 "\300.\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-agenda-scheduled-leaders '("Scheduled: " "Scheduled %d×: ")
 org-agenda-custom-commands '(("a" "Agenda"
   ((agenda ""
 ((org-agenda-overriding-header "Fortune")
  (org-agenda-files nil) (org-agenda-span 1)
  (org-agenda-day-face-function
   (lambda (_) 'font-lock-comment-face))
  (org-agenda-format-date
   (lambda (_) (my/fortune-string)))
  )
 )
(agenda ""
 ((org-agenda-overriding-header "\nToday")
  (org-agenda-start-on-weekday nil)
  (org-agenda-span 1)
  (org-agenda-format-date
   'my/org-agenda-format-date-not-aligned)
  (org-agenda-day-face-function
   (lambda (_) 'calendar-today))
  (org-agenda-skip-function
   '(org-agenda-skip-entry-if 'todo 'done))
  )
 )
(todo "NEXT|NEXT-IN|ON-HOLD"
 ((org-agenda-overriding-header "\nNext 
actions")
  (org-agenda-todo-ignore-scheduled 'all)
  (org-agenda-todo-ignore-timestamp 'future)
  (org-habit-show-habits nil))
 )
(agenda ""
 ((org-agenda-overriding-header "\nTomorrow")
  (org-agenda-start-day "+1d") (org-agenda-span 
1)
  (org-agenda-format-date
   'my/org-agenda-format-date-not-aligned)
  (org-habit-show-habits-only-for-today nil)
  (org-habit-scheduled-past-days 0))
 )
(agenda ""
 ((org-agenda-overriding-header "\nNear future")
  (org-agenda-start-day "+2d")
  (org-agenda-start-on-weekday nil)
  (org-agenda-span 7) (org-habit-show-habits 
nil))
 )
(todo "WAIT-FOR"
 ((org-agenda-overriding-header "\nWaiting")))
)
   )
  )
 org-startup-folded t
 org-agenda-skip-scheduled-if-done t
 org-agenda-files '("~/agenda.org" "~/agenda-work.org")
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-link-descriptive nil
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cite-follow-processor 'citar
 org-file-apps '(("\\.pdf\\'" . emacs) (auto-mode . emacs) (directory . emacs)
 ("\\.mm\\'" . default) ("\\.x?html?\\'" . default)
 ("\\.pdf\\'" . default))
 org-html-postamble nil
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-edit-src-content-indentation 0
 org-ascii-format-drawer-function #[771 ".\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 

Re: [PATCH] Add support for $…$ latex fragments followed by a dash

2022-01-30 Thread Max Nikulin

On 28/01/2022 23:37, Timothy wrote:



There is no point to discuss deprecation of $…$ and ... while usage of
such constructs is not discouraged by the org manual


Isn’t the point of discussing depreciation now that we’d change the manual etc.
to discourage it? 


It is funny that nobody have checked what the manual actually states:


Text within the usual LaTeX math delimiters. To avoid conflicts with
currency specifications, single ‘$’ characters are only recognized as
math delimiters if the enclosed text contains at most two line breaks,
is directly attached to the ‘$’ characters with no whitespace in
between, and if the closing ‘$’ is followed by whitespace, punctuation
or a dash. For the other delimiters, there is no such restriction, so

 ^^

when in doubt, use ‘\(...\)’ as inline math delimiters.


I have no idea whether it ever worked in such way. So either the manual 
must be updated or a fix must be committed.


False positive with the proposed patch:

> Balance decreased from $10 to negative value ($-2 approximately)

certainly it is more rare than $n$-th valid case.


If we do deprecate support for $…$, it might also be a good idea to
see if we can add a utility function which would make it easier for
people to migrate existing documents to the new/alternative syntax. For
the same reason it is hard to reliably parse $…$ syntax, we probably
can’t automate that transition, but we should be able to reduce the effort
required to update existing documents.


Tim, as mentioned before I’m strongly in favour of a ~half decade transition
including utility functions to shift existing TeX constructs to LaTeX, and
adding warnings, well before dropping support.


That period should be started when manual is updated.

Functions updating old file to the current syntax is an interesting 
idea, but it assumes a copy of org-element as it was in that old org 
version.





A callygraphy notebook environment

2022-01-30 Thread Juan Manuel Macías
Hi all,

This is more related to LaTeX than Org, but I'm sharing it here in case
anyone is interested. For a work I'm doing I've written a LaTeX
environment that tries to mimic the look of a calligraphy notebook. By
default it uses the qtmerryscript font, included in TeX live, but this
can be changed to any other calligraphic-style font. It works only with
LuaTeX, since it uses a function in Lua to add the grids.

An screenshots:

https://i.imgur.com/tgrgaWM.png

https://i.imgur.com/AIolze2.png

https://i.imgur.com/v2Mzyx5.png

To use it in Org, a special block would be ideal. For example:

#+ATTR_LaTeX: :options [fontfeature={Color=pen},fontsize=\large]
#+begin_mynotebook
Some text...
#+end_mynotebook

I am attaching an Org document to test it.

Best regards,

Juan Manuel



notebook.org
Description: Lotus Organizer


Re: [BUG] ob-tangle overrides user customization of org-id-link-to-org-use-id [9.5.2 (9.5.2-gfbff08 @ /home/ionasal/.emacs.d/elpa/org-9.5.2/)]

2022-01-30 Thread Ihor Radchenko
Allen Li  writes:

>> If someone is willing to check all the occurrences of
>> (defvar +[^ ]+ +nil) and remove nil values where we merely put a defvar
>> to silence byte-compiler, please do it.
>
> My initial request was just to fix this one instance that is actively
> troubling me.  If there are any other known cases of defvar, they should
> also be fixed.  If not, then let's wait until someone identifies them.
>
> If any maintainers reading this could fix this one defvar, that'd be
> great.

I just pushed the fix onto bugfix as dd6486a07.
Most of the occurrences of (defvar foo nil) in Org are just actual
variable definitions without docstring (which is not good, but not an
error).

Also, I only skimmed through org-agenda.el. I am afraid to touch that
monster even though most of such defvars are in org-agenda.el

Best,
Ihor



Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL=TITLE"

2022-01-30 Thread Max Nikulin

On 30/01/2022 10:12, chris wrote:


Yes, yes, possibly
Just something I've noticed, which is obvious, but I didn't thought about, and
which has probably no bearing:
1- click on the bookmarklet
2- `C-c C-l Ret Ret` in an org-buffer, so the link is created (this step not
necessary though)
3- if you do `C-y` you can see the URL is in the kill-ring
But obviously there is no reason for this URL to be also in the Wayland (or
x11) clipboard? (there is no law of nature saying that what is in emacs kill-
ring must necessarily also be in wayland clipboard. I think there is a law of
nature for the other way around though)
In any case, in the case of Kde/Kwin/Wayland, it is not copied in the Wayland
clipboard.
Maybe it's in the description of org-protocol/store-link that the URL should
be copied in emacs kill-ring, in any case, it is.
But no it doesn't show in the kde/wayland clipboard (and why would it).


Do you mean the following steps to reproduce behavior you have observed:

1. Copy something from any application, e.g. firefox
2. emacsclient 'org-protocol://store-link?url=http://o.rg/=Tt1'
3. Paste from CLIPBOARD

url from store link is inserted while you are expecting text copied in 
step 1.


After 2 emacs shows the following message:


‘M-x org-insert-link’ to insert new Org link, ‘C-y’ to insert "http://o.rg/;


So yanking the URL is expected behavior. I have never used this feature 
nor have been suffering from it. I do not know a reason behind this 
choice, maybe the developer implemented store-link decided that it is 
convenient.


Ihor pointed to variables that controls Emacs integration with desktop. 
See help for `kill-new' for more hints. I believe, it is reasonable that 
by default interaction with CLIPBOARD is enabled in Emacs. My complain 
is the opposite, there is no default key bindings for PRIMARY selection 
(in addition to CLIPBOARD, not instead of it). I had to look for keys 
that are not bound yet to add yank and kill to PRIMARY (as a side effect 
I added similar setup to bash).


As to org-store-link, desktop integration might be better as well, there 
is no text/html variant to paste link+description to application that 
supports rich text formatting. After org-store-link:


xclip -o -selection CLIPBOARD -target TARGETS
TIMESTAMP
MULTIPLE
TEXT
COMPOUND_TEXT
STRING
UTF8_STRING
TARGETS
LENGTH
DELETE
FILE_NAME
CHARACTER_POSITION
LINE_NUMBER
COLUMN_NUMBER
OWNER_OS
HOST_NAME
USER
CLASS
NAME
ATOM
INTEGER
SAVE_TARGETS

Notice that text/html is available when text containing a link is copied 
from firefox:


xclip -o -selection CLIPBOARD -target TARGETS
TIMESTAMP
TARGETS
MULTIPLE
SAVE_TARGETS
text/html
text/_moz_htmlcontext
text/_moz_htmlinfo
UTF8_STRING
COMPOUND_TEXT
TEXT
STRING
text/plain;charset=utf-8
text/plain
text/x-moz-url-priv

If you need both selection text and link URL than you may try 
org-protocol:/capture?body=B=T=U instead.



But why is there a `nil` here:

https://github.com/emacs-mirror/emacs/blob/19dcb237/lisp/org/org-protocol.
el#L467


And why is it working at all from `xdg-open
"org-protocol://store-link?url=URL=TITLE"`, with a `nil` in that
position?

Note: `(org-protocol-store-link "U/T")` works, `(org-protocol-store-link
"url=U=T")` doesn't work. Produces link `[[url=U=T]]`
instead of `[[U][T]]`.


What is the problem with nil there? New-style URIs are parsed before
they are passed to subprotocol handlers. Why are you trying to call
org-protocol-store-link directly?


Right, right, right
I was only trying to see if there was something obviously sticking out about
the cut and paste issue.


There is an explicit call of `kill-new' in `org-protocol-store-link'.


So you say "new style URIs are parsed before they are passed to subprotocol
handler": so, no worries then.
Thanks a lot for saying so. I've been searching but haven't found were they
were parsed. I've probably haven't searched enough, and anyway it's of no
bearing. Thanks again.


https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org-protocol.el#n679

P.S. There is an issue with the kill ring that I do not like. If I yank 
something in CAPTURE buffer and then refile captured item, the latest 
entry of the kill ring is not the one that I just yanked, so it is 
necessary to press M-Y.





Re: Org-learn failing to update calendar scheduling

2022-01-30 Thread Ihor Radchenko
Bithov Vinu Student  writes:

> * TODO Save the world
>
> I hovered my cursor over the heading, M-x org-smart-reschedule, and gave a
> grade of 5. It then switched to the calendar minibuffer, where the
> preselected date is the current date. It shouldn't be this, it should be
> the current date + n days (n increases as the heading is scheduled again
> and again).

org-smart-reschedule expects the item to be scheduled already. If it is
not the case, it asks the user to set scheduled date manually. It is the
original logic of org-learn explicitly implemented in
org-smart-reschedule function. If you want to change it, feel free to
modify that function locally.

Best,
Ihor