* [BUG] (org-element-context) on some link does not return search-option correctly
@ 2021-11-20 11:13 Christopher M. Miles
2021-11-20 12:28 ` Ihor Radchenko
0 siblings, 1 reply; 3+ messages in thread
From: Christopher M. Miles @ 2021-11-20 11:13 UTC (permalink / raw)
To: Org Mode
[-- Attachment #1: Type: text/plain, Size: 1362 bytes --]
When I put point on an custom org link:
#+begin_src org
[[pdf:~/Org/Wiki/Computer Technology/Programming/Programming Languages/Clojure/data/Books/Clojure经典实例.pdf::40++0.00][Clojure经典实例.pdf: Page 40]]
#+end_src
Then press =[M-: (org-element-context) RET]= to get link element properties. I got:
#+begin_example
(link (:type "pdf" :path "~/Org/Wiki/Computer Technology/Programming/Programming Languages/Clojure/data/Books/Clojure经典实例.pdf::40++0.00" :format bracket :raw-link "pdf:~/Org/Wiki/Computer Technology/Programming/Programming Languages/Clojure/data/Books/Clojure经典实例.pdf::40++0.00" :application nil :search-option nil ...))
#+end_example
You can see the result ~:search-option nil~. It suppose to be ~40++0.00~.
I tested with other link like this:
#+begin_src org
[[file:hs_err_pid20491.log::kkk+2]]
#+end_src
It returns ~:search-option~ correctly:
#+begin_example
(link (:type "file" :path "hs_err_pid20491.log" :format bracket :raw-link "file:hs_err_pid20491.log::kkk+2" :application nil :search-option "kkk+2" ...))
#+end_example
--
[ stardiviner ]
I try to make every word tell the meaning that I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BUG] (org-element-context) on some link does not return search-option correctly
2021-11-20 11:13 [BUG] (org-element-context) on some link does not return search-option correctly Christopher M. Miles
@ 2021-11-20 12:28 ` Ihor Radchenko
2021-11-21 8:15 ` [ANSWERED] " Christopher M. Miles
0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2021-11-20 12:28 UTC (permalink / raw)
To: numbchild; +Cc: Org Mode
"Christopher M. Miles" <numbchild@gmail.com> writes:
> When I put point on an custom org link:
>
> #+begin_src org
> [[pdf:~/Org/Wiki/Computer Technology/Programming/Programming Languages/Clojure/data/Books/Clojure经典实例.pdf::40++0.00][Clojure经典实例.pdf: Page 40]]
> #+end_src
> ...
> You can see the result ~:search-option nil~. It suppose to be ~40++0.00~.
AFAIK, only file: links are parsed to have search-option.
If you want a custom link type to have search-option property, you
should use link abbrev.
Best,
Ihor
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ANSWERED] Re: [BUG] (org-element-context) on some link does not return search-option correctly
2021-11-20 12:28 ` Ihor Radchenko
@ 2021-11-21 8:15 ` Christopher M. Miles
0 siblings, 0 replies; 3+ messages in thread
From: Christopher M. Miles @ 2021-11-21 8:15 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 943 bytes --]
Ihor Radchenko <yantar92@gmail.com> writes:
> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>> When I put point on an custom org link:
>>
>> #+begin_src org
>> [[pdf:~/Org/Wiki/Computer Technology/Programming/Programming Languages/Clojure/data/Books/Clojure
>> 经典实例.pdf::40++0.00][Clojure经典实例.pdf: Page 40]]
>> #+end_src
>> ...
>> You can see the result ~:search-option nil~. It suppose to be ~40++0.00~.
>
> AFAIK, only file: links are parsed to have search-option.
>
> If you want a custom link type to have search-option property, you
> should use link abbrev.
I see. Thanks, I will use other code way to parse the :search-option value.
--
[ stardiviner ]
I try to make every word tell the meaning that I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-21 8:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-20 11:13 [BUG] (org-element-context) on some link does not return search-option correctly Christopher M. Miles
2021-11-20 12:28 ` Ihor Radchenko
2021-11-21 8:15 ` [ANSWERED] " Christopher M. Miles
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).