* [QUESTION] What's the ":desk" link parameter?
@ 2020-05-23 12:23 stardiviner
2020-05-23 13:49 ` Bastien
2020-05-23 14:01 ` John Kitchin
0 siblings, 2 replies; 11+ messages in thread
From: stardiviner @ 2020-05-23 12:23 UTC (permalink / raw)
To: Org Mode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
I found some examples setting org-link-parameters with ":desk", like this:
#+begin_src emacs-lisp
(defun org-id-link-desk (link desk)
"Description function for id: link."
(let ((id (cadr (split-string link ":"))))
(org-with-point-at (org-id-find id 'marker)
(s-join "/" (org-get-outline-path 'with-self)))))
(org-link-set-parameters "id" :desk #'org-id-link-desk)
#+end_src
But I have not found any mention in help of variable ~org-link-parameters~. Also I
checked org mode source code by search, no matching of ":desk" found. Did I miss
something?
- --
[ 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
-----BEGIN PGP SIGNATURE-----
iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7JFckUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsONBggAy0z465LkTx1EYBo4GWZdObWXct8O
Fjz24HGzin/ffISIhytm0r4w5GE2Rb2/m+BwAsfHEDDvLu1mwU3HvLugXmIk0OUA
u9qRLHJ4Po1/Y1CRR0o/OHHnbTjhA/7ppljRcN0klwd6J0PDrSE3K/XOhV94xyfK
k0fUBhtQeTdW/uzx49hs14QlNQ5i6+HJWd1g/viXI+v0EIYJDV3PLwS6CFJWnvo3
Yi210RM87uKi8vWFcFP7fEW2dYDV5MRsKmQ8v9AKLcCW9+T6Zq3tI7Srxn7ZwFsQ
mFxZdLFyDlQq0M4VG0WL/epwr0f4B2SUZ3BcOEYrwv7N+7sfMN2cCWI8jQ==
=8aOD
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [QUESTION] What's the ":desk" link parameter?
2020-05-23 12:23 [QUESTION] What's the ":desk" link parameter? stardiviner
@ 2020-05-23 13:49 ` Bastien
2020-05-23 14:01 ` John Kitchin
1 sibling, 0 replies; 11+ messages in thread
From: Bastien @ 2020-05-23 13:49 UTC (permalink / raw)
To: stardiviner; +Cc: Org Mode
Hi,
stardiviner <numbchild@gmail.com> writes:
> I found some examples setting org-link-parameters with ":desk", like this:
>
> #+begin_src emacs-lisp
> (defun org-id-link-desk (link desk)
> "Description function for id: link."
> (let ((id (cadr (split-string link ":"))))
> (org-with-point-at (org-id-find id 'marker)
> (s-join "/" (org-get-outline-path 'with-self)))))
>
> (org-link-set-parameters "id" :desk #'org-id-link-desk)
> #+end_src
>
> But I have not found any mention in help of variable ~org-link-parameters~. Also I
> checked org mode source code by search, no matching of ":desk" found. Did I miss
> something?
I don't know. Probably your chances of getting an answer are higher
if you ask the people who wrote this code?
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [QUESTION] What's the ":desk" link parameter?
2020-05-23 12:23 [QUESTION] What's the ":desk" link parameter? stardiviner
2020-05-23 13:49 ` Bastien
@ 2020-05-23 14:01 ` John Kitchin
2020-05-23 23:52 ` stardiviner
1 sibling, 1 reply; 11+ messages in thread
From: John Kitchin @ 2020-05-23 14:01 UTC (permalink / raw)
To: numbchild; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 1925 bytes --]
Where did you find that code? I recall this was some kind of prototype
code, and maybe it never got fully developed. I think desk was shorthand
for description.
On Sat, May 23, 2020 at 8:24 AM stardiviner <numbchild@gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
>
> I found some examples setting org-link-parameters with ":desk", like this:
>
> #+begin_src emacs-lisp
> (defun org-id-link-desk (link desk)
> "Description function for id: link."
> (let ((id (cadr (split-string link ":"))))
> (org-with-point-at (org-id-find id 'marker)
> (s-join "/" (org-get-outline-path 'with-self)))))
>
> (org-link-set-parameters "id" :desk #'org-id-link-desk)
> #+end_src
>
> But I have not found any mention in help of variable
> ~org-link-parameters~. Also I
> checked org mode source code by search, no matching of ":desk" found. Did
> I miss
> something?
>
> - --
> [ 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
>
> -----BEGIN PGP SIGNATURE-----
>
> iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7JFckUHG51bWJjaGls
> ZEBnbWFpbC5jb20ACgkQG13xyVromsONBggAy0z465LkTx1EYBo4GWZdObWXct8O
> Fjz24HGzin/ffISIhytm0r4w5GE2Rb2/m+BwAsfHEDDvLu1mwU3HvLugXmIk0OUA
> u9qRLHJ4Po1/Y1CRR0o/OHHnbTjhA/7ppljRcN0klwd6J0PDrSE3K/XOhV94xyfK
> k0fUBhtQeTdW/uzx49hs14QlNQ5i6+HJWd1g/viXI+v0EIYJDV3PLwS6CFJWnvo3
> Yi210RM87uKi8vWFcFP7fEW2dYDV5MRsKmQ8v9AKLcCW9+T6Zq3tI7Srxn7ZwFsQ
> mFxZdLFyDlQq0M4VG0WL/epwr0f4B2SUZ3BcOEYrwv7N+7sfMN2cCWI8jQ==
> =8aOD
> -----END PGP SIGNATURE-----
>
> --
John
-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
[-- Attachment #2: Type: text/html, Size: 2826 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [QUESTION] What's the ":desk" link parameter?
2020-05-23 14:01 ` John Kitchin
@ 2020-05-23 23:52 ` stardiviner
2020-05-24 3:10 ` Ihor Radchenko
0 siblings, 1 reply; 11+ messages in thread
From: stardiviner @ 2020-05-23 23:52 UTC (permalink / raw)
To: John Kitchin; +Cc: Org Mode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
John Kitchin <jkitchin@andrew.cmu.edu> writes:
> Where did you find that code? I recall this was some kind of prototype
> code, and maybe it never got fully developed. I think desk was shorthand
> for description.
I remember I found this code on emacs.stackexchange.com website.
I did a Google search now, I found someone indeed proposed this feature. Here is
the email archive:
https://lists.gnu.org/archive/html/emacs-orgmode/2019-08/msg00013.html
I saw this thread is stopped. Seems no patch provided. Does anyone want to implement it?
>
> On Sat, May 23, 2020 at 8:24 AM stardiviner <numbchild@gmail.com> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>>
>> I found some examples setting org-link-parameters with ":desk", like this:
>>
>> #+begin_src emacs-lisp
>> (defun org-id-link-desk (link desk)
>> "Description function for id: link."
>> (let ((id (cadr (split-string link ":"))))
>> (org-with-point-at (org-id-find id 'marker)
>> (s-join "/" (org-get-outline-path 'with-self)))))
>>
>> (org-link-set-parameters "id" :desk #'org-id-link-desk)
>> #+end_src
>>
>> But I have not found any mention in help of variable
>> ~org-link-parameters~. Also I
>> checked org mode source code by search, no matching of ":desk" found. Did
>> I miss
>> something?
>>
>> - --
>> [ 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
>>
>> -----BEGIN PGP SIGNATURE-----
>>
>> iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7JFckUHG51bWJjaGls
>> ZEBnbWFpbC5jb20ACgkQG13xyVromsONBggAy0z465LkTx1EYBo4GWZdObWXct8O
>> Fjz24HGzin/ffISIhytm0r4w5GE2Rb2/m+BwAsfHEDDvLu1mwU3HvLugXmIk0OUA
>> u9qRLHJ4Po1/Y1CRR0o/OHHnbTjhA/7ppljRcN0klwd6J0PDrSE3K/XOhV94xyfK
>> k0fUBhtQeTdW/uzx49hs14QlNQ5i6+HJWd1g/viXI+v0EIYJDV3PLwS6CFJWnvo3
>> Yi210RM87uKi8vWFcFP7fEW2dYDV5MRsKmQ8v9AKLcCW9+T6Zq3tI7Srxn7ZwFsQ
>> mFxZdLFyDlQq0M4VG0WL/epwr0f4B2SUZ3BcOEYrwv7N+7sfMN2cCWI8jQ==
>> =8aOD
>> -----END PGP SIGNATURE-----
>>
>> --
> John
>
> -----------------------------------
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
- --
[ 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
-----BEGIN PGP SIGNATURE-----
iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7JtzoUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsMC4wf+Nzj7X+SDnSaYoFYWvdx/r0PtSbyJ
u4fmiT5TlWYJvx6+S9HVxTSmvR7QEdxWFTLU0zkVFAmuhFIehIDoQpCzunwCGKfl
Onn+TLwqm8UaeDS1GXs0yhRLRAgsDqM+jdd7+IKccljRonM1RVYDjFjfdXvh9U9h
mDU78HGL/yGg6rzlIHlzh+s0bvkM0xgmivI7zWmk1BF8PQofXcVzdGn3aWFz3rNN
clEgmCtOX/t7gRzn8H8Ydq+vg+J15OliNjWBRZ1Op26msaOYe+nly8tGAbfwqDgB
SSC4vi42vUbvVNzpjYfR6byqQ4RDxI8th66NJ6yuk0hkCnTHe69h1gQuqw==
=Q210
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [QUESTION] What's the ":desk" link parameter?
2020-05-23 23:52 ` stardiviner
@ 2020-05-24 3:10 ` Ihor Radchenko
2020-05-24 11:00 ` Bastien
2020-05-24 11:12 ` stardiviner
0 siblings, 2 replies; 11+ messages in thread
From: Ihor Radchenko @ 2020-05-24 3:10 UTC (permalink / raw)
To: numbchild, John Kitchin; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 373 bytes --]
> I remember I found this code on emacs.stackexchange.com website.
>
> I did a Google search now, I found someone indeed proposed this feature. Here is
> the email archive:
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2019-08/msg00013.html
>
> I saw this thread is stopped. Seems no patch provided. Does anyone want to implement it?
See the attached.
Best,
Ihor
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-link-description.patch --]
[-- Type: text/x-diff, Size: 4956 bytes --]
diff --git a/lisp/ol.el b/lisp/ol.el
index 0cb1b0a7e..32a80ee56 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -138,6 +138,13 @@ link.
Function that inserts a link with completion. The function
takes one optional prefix argument.
+`:description'
+
+ Function to use for generating link descriptions from links. This
+ function must take two parameters: the first one is the link, the
+ second one is the description generated by `org-insert-link'. The
+ function should return the description to use.
+
`:display'
Value for `invisible' text property on the hidden parts of the
@@ -193,16 +200,6 @@ You can interactively set the value of this variable by calling
:type 'boolean
:safe #'booleanp)
-(defcustom org-link-make-description-function nil
- "Function to use for generating link descriptions from links.
-This function must take two parameters: the first one is the
-link, the second one is the description generated by
-`org-insert-link'. The function should return the description to
-use."
- :group 'org-link
- :type '(choice (const nil) (function))
- :safe #'null)
-
(defcustom org-link-file-path-type 'adaptive
"How the path name in file links should be stored.
Valid values are:
@@ -1742,10 +1739,8 @@ If the LINK-LOCATION parameter is non-nil, this value will be used as
the link location instead of reading one interactively.
If the DESCRIPTION parameter is non-nil, this value will be used as the
-default description. Otherwise, if `org-link-make-description-function'
-is non-nil, this function will be called with the link target, and the
-result will be the default link description. When called non-interactively,
-don't allow to edit the default description."
+default description. When called non-interactively, don't allow to
+edit the default description."
(interactive "P")
(let* ((wcf (current-window-configuration))
(origbuf (current-buffer))
@@ -1890,17 +1885,27 @@ Use TAB to complete link prefixes, then RET for type-specific completion support
(setq desc path)))))
(unless auto-desc
- (let ((initial-input
- (cond
- (description)
- ((not org-link-make-description-function) desc)
- (t (condition-case nil
- (funcall org-link-make-description-function link desc)
- (error
- (message "Can't get link description from %S"
- (symbol-name org-link-make-description-function))
- (sit-for 2)
- nil))))))
+ (let* ((type (and (string-match "\\([^:]+\\):" link)
+ (match-string-no-properties 1 link)))
+ (initial-input
+ (cond
+ (description)
+ ((org-link-get-parameter type :description)
+ (condition-case nil
+ (funcall (org-link-get-parameter type :description) link desc)
+ (error
+ (message "Can't get link description from %S"
+ (symbol-name (org-link-get-parameter type :description)))
+ (sit-for 2)
+ nil)))
+ ((not org-link-make-description-function) desc)
+ (t (condition-case nil
+ (funcall org-link-make-description-function link desc)
+ (error
+ (message "Can't get link description from %S"
+ (symbol-name org-link-make-description-function))
+ (sit-for 2)
+ nil))))))
(setq desc (if (called-interactively-p 'any)
(read-string "Description: " initial-input)
initial-input))))
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 635a38dcd..c17d888fc 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -376,6 +376,21 @@ See `org-link-parameters' for documentation on the other parameters."
(make-obsolete 'org-add-link-type "use `org-link-set-parameters' instead." "Org 9.0")
+(defcustom org-link-make-description-function nil
+ "Function to use for generating link descriptions from links.
+This function must take two parameters: the first one is the
+link, the second one is the description generated by
+`org-insert-link'. The function should return the description to
+use."
+ :group 'org-link
+ :type '(choice (const nil) (function))
+ :safe #'null)
+
+(make-obsolete-variable
+ 'org-link-make-description-function
+ "use `org-link-set-parameters' to set :description link parameter instead."
+ "Org 9.3.6")
+
;;;; Functions unused in Org core.
(defun org-table-recognize-table.el ()
"If there is a table.el table nearby, recognize it and move into it."
@@ -516,8 +531,10 @@ use of this function is for the stuck project list."
(define-obsolete-variable-alias 'org-email-link-description-format
'org-link-email-description-format "Org 9.3")
-(define-obsolete-variable-alias 'org-make-link-description-function
- 'org-link-make-description-function "Org 9.3")
+(make-obsolete-variable
+ 'org-make-link-description-function
+ "use `org-link-set-parameters' to set :description link parameter instead."
+ "Org 9.3.6")
(define-obsolete-variable-alias 'org-from-is-user-regexp
'org-link-from-user-regexp "Org 9.3")
[-- Attachment #3: Type: text/plain, Size: 3630 bytes --]
stardiviner <numbchild@gmail.com> writes:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
>
> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>
>> Where did you find that code? I recall this was some kind of prototype
>> code, and maybe it never got fully developed. I think desk was shorthand
>> for description.
>
> I remember I found this code on emacs.stackexchange.com website.
>
> I did a Google search now, I found someone indeed proposed this feature. Here is
> the email archive:
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2019-08/msg00013.html
>
> I saw this thread is stopped. Seems no patch provided. Does anyone want to implement it?
>
>>
>> On Sat, May 23, 2020 at 8:24 AM stardiviner <numbchild@gmail.com> wrote:
>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA256
>>>
>>>
>>> I found some examples setting org-link-parameters with ":desk", like this:
>>>
>>> #+begin_src emacs-lisp
>>> (defun org-id-link-desk (link desk)
>>> "Description function for id: link."
>>> (let ((id (cadr (split-string link ":"))))
>>> (org-with-point-at (org-id-find id 'marker)
>>> (s-join "/" (org-get-outline-path 'with-self)))))
>>>
>>> (org-link-set-parameters "id" :desk #'org-id-link-desk)
>>> #+end_src
>>>
>>> But I have not found any mention in help of variable
>>> ~org-link-parameters~. Also I
>>> checked org mode source code by search, no matching of ":desk" found. Did
>>> I miss
>>> something?
>>>
>>> - --
>>> [ 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
>>>
>>> -----BEGIN PGP SIGNATURE-----
>>>
>>> iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7JFckUHG51bWJjaGls
>>> ZEBnbWFpbC5jb20ACgkQG13xyVromsONBggAy0z465LkTx1EYBo4GWZdObWXct8O
>>> Fjz24HGzin/ffISIhytm0r4w5GE2Rb2/m+BwAsfHEDDvLu1mwU3HvLugXmIk0OUA
>>> u9qRLHJ4Po1/Y1CRR0o/OHHnbTjhA/7ppljRcN0klwd6J0PDrSE3K/XOhV94xyfK
>>> k0fUBhtQeTdW/uzx49hs14QlNQ5i6+HJWd1g/viXI+v0EIYJDV3PLwS6CFJWnvo3
>>> Yi210RM87uKi8vWFcFP7fEW2dYDV5MRsKmQ8v9AKLcCW9+T6Zq3tI7Srxn7ZwFsQ
>>> mFxZdLFyDlQq0M4VG0WL/epwr0f4B2SUZ3BcOEYrwv7N+7sfMN2cCWI8jQ==
>>> =8aOD
>>> -----END PGP SIGNATURE-----
>>>
>>> --
>> John
>>
>> -----------------------------------
>> Professor John Kitchin
>> Doherty Hall A207F
>> Department of Chemical Engineering
>> Carnegie Mellon University
>> Pittsburgh, PA 15213
>> 412-268-7803
>> @johnkitchin
>> http://kitchingroup.cheme.cmu.edu
>
>
> - --
> [ 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
>
> -----BEGIN PGP SIGNATURE-----
>
> iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7JtzoUHG51bWJjaGls
> ZEBnbWFpbC5jb20ACgkQG13xyVromsMC4wf+Nzj7X+SDnSaYoFYWvdx/r0PtSbyJ
> u4fmiT5TlWYJvx6+S9HVxTSmvR7QEdxWFTLU0zkVFAmuhFIehIDoQpCzunwCGKfl
> Onn+TLwqm8UaeDS1GXs0yhRLRAgsDqM+jdd7+IKccljRonM1RVYDjFjfdXvh9U9h
> mDU78HGL/yGg6rzlIHlzh+s0bvkM0xgmivI7zWmk1BF8PQofXcVzdGn3aWFz3rNN
> clEgmCtOX/t7gRzn8H8Ydq+vg+J15OliNjWBRZ1Op26msaOYe+nly8tGAbfwqDgB
> SSC4vi42vUbvVNzpjYfR6byqQ4RDxI8th66NJ6yuk0hkCnTHe69h1gQuqw==
> =Q210
> -----END PGP SIGNATURE-----
>
--
Ihor Radchenko,
PhD,
Center for Advancing Materials Performance from the Nanoscale (CAMP-nano)
State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China
Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [QUESTION] What's the ":desk" link parameter?
2020-05-24 3:10 ` Ihor Radchenko
@ 2020-05-24 11:00 ` Bastien
2020-05-24 11:34 ` Ihor Radchenko
2020-05-24 11:12 ` stardiviner
1 sibling, 1 reply; 11+ messages in thread
From: Bastien @ 2020-05-24 11:00 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Org Mode, John Kitchin
Hi Ihor,
thanks for the patch. I assume you are submitting it against master,
am I right?
Ihor Radchenko <yantar92@gmail.com> writes:
> +`:description'
> +
> + Function to use for generating link descriptions from links. This
> + function must take two parameters: the first one is the link, the
> + second one is the description generated by `org-insert-link'. The
> + function should return the description to use.
From reading this, I don't see what bug it fixes, what problem it
solves or what real user need it responds to, but maybe I lost part
of the context. Can you explain why this should be applied?
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [QUESTION] What's the ":desk" link parameter?
2020-05-24 3:10 ` Ihor Radchenko
2020-05-24 11:00 ` Bastien
@ 2020-05-24 11:12 ` stardiviner
1 sibling, 0 replies; 11+ messages in thread
From: stardiviner @ 2020-05-24 11:12 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Org Mode, John Kitchin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Ihor Radchenko <yantar92@gmail.com> writes:
>> I remember I found this code on emacs.stackexchange.com website.
>>
>> I did a Google search now, I found someone indeed proposed this feature. Here is
>> the email archive:
>>
>> https://lists.gnu.org/archive/html/emacs-orgmode/2019-08/msg00013.html
>>
>> I saw this thread is stopped. Seems no patch provided. Does anyone want to implement it?
>
> See the attached.
>
> Best,
> Ihor
>
This is great. Nicolas, can you review this patch? If ok, I hope this new
feature can be added. WDYT?
>
>
> stardiviner <numbchild@gmail.com> writes:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>>
>> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>>
>>> Where did you find that code? I recall this was some kind of prototype
>>> code, and maybe it never got fully developed. I think desk was shorthand
>>> for description.
>>
>> I remember I found this code on emacs.stackexchange.com website.
>>
>> I did a Google search now, I found someone indeed proposed this feature. Here is
>> the email archive:
>>
>> https://lists.gnu.org/archive/html/emacs-orgmode/2019-08/msg00013.html
>>
>> I saw this thread is stopped. Seems no patch provided. Does anyone want to implement it?
>>
>>>
>>> On Sat, May 23, 2020 at 8:24 AM stardiviner <numbchild@gmail.com> wrote:
>>>
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA256
>>>>
>>>>
>>>> I found some examples setting org-link-parameters with ":desk", like this:
>>>>
>>>> #+begin_src emacs-lisp
>>>> (defun org-id-link-desk (link desk)
>>>> "Description function for id: link."
>>>> (let ((id (cadr (split-string link ":"))))
>>>> (org-with-point-at (org-id-find id 'marker)
>>>> (s-join "/" (org-get-outline-path 'with-self)))))
>>>>
>>>> (org-link-set-parameters "id" :desk #'org-id-link-desk)
>>>> #+end_src
>>>>
>>>> But I have not found any mention in help of variable
>>>> ~org-link-parameters~. Also I
>>>> checked org mode source code by search, no matching of ":desk" found. Did
>>>> I miss
>>>> something?
>>>>
>>>> - --
>>>> [ 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
>>>>
>>>> -----BEGIN PGP SIGNATURE-----
>>>>
>>>> iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7JFckUHG51bWJjaGls
>>>> ZEBnbWFpbC5jb20ACgkQG13xyVromsONBggAy0z465LkTx1EYBo4GWZdObWXct8O
>>>> Fjz24HGzin/ffISIhytm0r4w5GE2Rb2/m+BwAsfHEDDvLu1mwU3HvLugXmIk0OUA
>>>> u9qRLHJ4Po1/Y1CRR0o/OHHnbTjhA/7ppljRcN0klwd6J0PDrSE3K/XOhV94xyfK
>>>> k0fUBhtQeTdW/uzx49hs14QlNQ5i6+HJWd1g/viXI+v0EIYJDV3PLwS6CFJWnvo3
>>>> Yi210RM87uKi8vWFcFP7fEW2dYDV5MRsKmQ8v9AKLcCW9+T6Zq3tI7Srxn7ZwFsQ
>>>> mFxZdLFyDlQq0M4VG0WL/epwr0f4B2SUZ3BcOEYrwv7N+7sfMN2cCWI8jQ==
>>>> =8aOD
>>>> -----END PGP SIGNATURE-----
>>>>
>>>> --
>>> John
>>>
>>> -----------------------------------
>>> Professor John Kitchin
>>> Doherty Hall A207F
>>> Department of Chemical Engineering
>>> Carnegie Mellon University
>>> Pittsburgh, PA 15213
>>> 412-268-7803
>>> @johnkitchin
>>> http://kitchingroup.cheme.cmu.edu
>>
>>
>> - --
>> [ 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
>>
>> -----BEGIN PGP SIGNATURE-----
>>
>> iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7JtzoUHG51bWJjaGls
>> ZEBnbWFpbC5jb20ACgkQG13xyVromsMC4wf+Nzj7X+SDnSaYoFYWvdx/r0PtSbyJ
>> u4fmiT5TlWYJvx6+S9HVxTSmvR7QEdxWFTLU0zkVFAmuhFIehIDoQpCzunwCGKfl
>> Onn+TLwqm8UaeDS1GXs0yhRLRAgsDqM+jdd7+IKccljRonM1RVYDjFjfdXvh9U9h
>> mDU78HGL/yGg6rzlIHlzh+s0bvkM0xgmivI7zWmk1BF8PQofXcVzdGn3aWFz3rNN
>> clEgmCtOX/t7gRzn8H8Ydq+vg+J15OliNjWBRZ1Op26msaOYe+nly8tGAbfwqDgB
>> SSC4vi42vUbvVNzpjYfR6byqQ4RDxI8th66NJ6yuk0hkCnTHe69h1gQuqw==
>> =Q210
>> -----END PGP SIGNATURE-----
>>
- --
[ 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
-----BEGIN PGP SIGNATURE-----
iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7KVpYUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsMKtAgAn/ZdO3hWa60Rt4jvyA4xxJnWV8n4
oqva8Psq3NJNswpiruUoEOWV2OftQxe8HmyKHlAdOAnmpoIfLV21vp7YE85T8OBj
zpIOziQJdoMw/5KYImVRRZwwtpZ5nBdur90WO6vhhbhtCXnfGKBv1sQ0oXDHaxsq
TFWkt1Adqgc40xCAgSuaRoXq5k15kt4IvFYlwLfNybK57GcSxOCJUUQvfjaBPLEr
j9N6ZhgaJMHWdTPFunez1z+2XpJKI4i1W2JcOdaqT6CA5sgRFbEFUdsfIipuJi0v
Wq2O2sao7L2L/uzIKmEZavNgEWi7ohjcuKldMu65pA9gXgD6zUrmodUq+A==
=Ymys
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [QUESTION] What's the ":desk" link parameter?
2020-05-24 11:00 ` Bastien
@ 2020-05-24 11:34 ` Ihor Radchenko
2020-06-02 12:29 ` Bastien
0 siblings, 1 reply; 11+ messages in thread
From: Ihor Radchenko @ 2020-05-24 11:34 UTC (permalink / raw)
To: Bastien; +Cc: Org Mode, John Kitchin
> thanks for the patch. I assume you are submitting it against master,
> am I right?
The patch is against commit 2e96dc639.
> From reading this, I don't see what bug it fixes, what problem it
> solves or what real user need it responds to, but maybe I lost part
> of the context. Can you explain why this should be applied?
It does not fix any bug. Rather adds a new feature [1]. Currently, org
provides org-link-make-description-function as user customisation to
compute default link description. The patch provides a way to set such
description functions on per link type basis (via :description link
parameter). Using link parameters looks natural for me since similar
customisation is already done in :follow and :store link parameters.
[1] https://lists.gnu.org/archive/html/emacs-orgmode/2019-08/msg00013.html
Best,
Ihor
Bastien <bzg@gnu.org> writes:
> Hi Ihor,
>
> thanks for the patch. I assume you are submitting it against master,
> am I right?
>
> Ihor Radchenko <yantar92@gmail.com> writes:
>
>> +`:description'
>> +
>> + Function to use for generating link descriptions from links. This
>> + function must take two parameters: the first one is the link, the
>> + second one is the description generated by `org-insert-link'. The
>> + function should return the description to use.
>
> From reading this, I don't see what bug it fixes, what problem it
> solves or what real user need it responds to, but maybe I lost part
> of the context. Can you explain why this should be applied?
>
> Thanks,
>
> --
> Bastien
--
Ihor Radchenko,
PhD,
Center for Advancing Materials Performance from the Nanoscale (CAMP-nano)
State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China
Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [QUESTION] What's the ":desk" link parameter?
2020-05-24 11:34 ` Ihor Radchenko
@ 2020-06-02 12:29 ` Bastien
2020-06-02 13:22 ` Ihor Radchenko
0 siblings, 1 reply; 11+ messages in thread
From: Bastien @ 2020-06-02 12:29 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Org Mode, John Kitchin
Hi Ihor,
Ihor Radchenko <yantar92@gmail.com> writes:
>> thanks for the patch. I assume you are submitting it against master,
>> am I right?
>
> The patch is against commit 2e96dc639.
I see, thanks.
>> From reading this, I don't see what bug it fixes, what problem it
>> solves or what real user need it responds to, but maybe I lost part
>> of the context. Can you explain why this should be applied?
>
> It does not fix any bug. Rather adds a new feature [1]. Currently, org
> provides org-link-make-description-function as user customisation to
> compute default link description. The patch provides a way to set such
> description functions on per link type basis (via :description link
> parameter). Using link parameters looks natural for me since similar
> customisation is already done in :follow and :store link parameters.
Okay, I understand. It feels natural to me too.
I'm not sure `org-link-make-description-function' is used a lot out
there, but the change may break existing configurations/hacks.
Also, is it something we could use in the current export backends
or just for the users? If the latter, then I'm in favor of making
this move, probably for 9.5.
Nicolas, what do you think?
--
Bastien
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [QUESTION] What's the ":desk" link parameter?
2020-06-02 12:29 ` Bastien
@ 2020-06-02 13:22 ` Ihor Radchenko
2020-06-02 13:55 ` stardiviner
0 siblings, 1 reply; 11+ messages in thread
From: Ihor Radchenko @ 2020-06-02 13:22 UTC (permalink / raw)
To: Bastien; +Cc: Org Mode, John Kitchin
> I'm not sure `org-link-make-description-function' is used a lot out
> there, but the change may break existing configurations/hacks.
It should not break anything. I did not remove
`org-link-make-description-function' functionality. Just marked it as
deprecated.
> Also, is it something we could use in the current export backends
> or just for the users? If the latter, then I'm in favor of making
> this move, probably for 9.5.
I am not very familiar with the export code, but the function provided
in :description property should follow the same conventions with
`org-link-make-description-function'. The only place it is used is
org-insert-link. I do not see how it can influence export code. As I
understand, org-insert-link is mostly for users.
Best,
Ihor
Bastien <bzg@gnu.org> writes:
> Hi Ihor,
>
> Ihor Radchenko <yantar92@gmail.com> writes:
>
>>> thanks for the patch. I assume you are submitting it against master,
>>> am I right?
>>
>> The patch is against commit 2e96dc639.
>
> I see, thanks.
>
>>> From reading this, I don't see what bug it fixes, what problem it
>>> solves or what real user need it responds to, but maybe I lost part
>>> of the context. Can you explain why this should be applied?
>>
>> It does not fix any bug. Rather adds a new feature [1]. Currently, org
>> provides org-link-make-description-function as user customisation to
>> compute default link description. The patch provides a way to set such
>> description functions on per link type basis (via :description link
>> parameter). Using link parameters looks natural for me since similar
>> customisation is already done in :follow and :store link parameters.
>
> Okay, I understand. It feels natural to me too.
>
> I'm not sure `org-link-make-description-function' is used a lot out
> there, but the change may break existing configurations/hacks.
>
> Also, is it something we could use in the current export backends
> or just for the users? If the latter, then I'm in favor of making
> this move, probably for 9.5.
>
> Nicolas, what do you think?
>
> --
> Bastien
--
Ihor Radchenko,
PhD,
Center for Advancing Materials Performance from the Nanoscale (CAMP-nano)
State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China
Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [QUESTION] What's the ":desk" link parameter?
2020-06-02 13:22 ` Ihor Radchenko
@ 2020-06-02 13:55 ` stardiviner
0 siblings, 0 replies; 11+ messages in thread
From: stardiviner @ 2020-06-02 13:55 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Bastien, emacs-orgmode, John Kitchin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Ihor Radchenko <yantar92@gmail.com> writes:
>> I'm not sure `org-link-make-description-function' is used a lot out
>> there, but the change may break existing configurations/hacks.
>
> It should not break anything. I did not remove
> `org-link-make-description-function' functionality. Just marked it as
> deprecated.
>
>> Also, is it something we could use in the current export backends
>> or just for the users? If the latter, then I'm in favor of making
>> this move, probably for 9.5.
>
> I am not very familiar with the export code, but the function provided
> in :description property should follow the same conventions with
> `org-link-make-description-function'. The only place it is used is
> org-insert-link. I do not see how it can influence export code. As I
> understand, org-insert-link is mostly for users.
I agree, I used org-store-link and org-insert-link a lot. If this patch is
applied, then I can add more smart rules to auto generate the description based
on file extension etc.
>
> Best,
> Ihor
>
>
> Bastien <bzg@gnu.org> writes:
>
>> Hi Ihor,
>>
>> Ihor Radchenko <yantar92@gmail.com> writes:
>>
>>>> thanks for the patch. I assume you are submitting it against master,
>>>> am I right?
>>>
>>> The patch is against commit 2e96dc639.
>>
>> I see, thanks.
>>
>>>> From reading this, I don't see what bug it fixes, what problem it
>>>> solves or what real user need it responds to, but maybe I lost part
>>>> of the context. Can you explain why this should be applied?
>>>
>>> It does not fix any bug. Rather adds a new feature [1]. Currently, org
>>> provides org-link-make-description-function as user customisation to
>>> compute default link description. The patch provides a way to set such
>>> description functions on per link type basis (via :description link
>>> parameter). Using link parameters looks natural for me since similar
>>> customisation is already done in :follow and :store link parameters.
>>
>> Okay, I understand. It feels natural to me too.
>>
>> I'm not sure `org-link-make-description-function' is used a lot out
>> there, but the change may break existing configurations/hacks.
>>
>> Also, is it something we could use in the current export backends
>> or just for the users? If the latter, then I'm in favor of making
>> this move, probably for 9.5.
>>
>> Nicolas, what do you think?
>>
>> --
>> Bastien
- --
[ 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
-----BEGIN PGP SIGNATURE-----
iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7WWmEUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsMUewf/RK9/BCnTbNyiNKMklORPitNALPxb
xJC4OKQiwkrPLK1y8m1sUa8Qu1rgg/vb/CSa/lJYJOY448hL6IxAJAxMdGvw0k1g
xIyslnyHu7WxneouxhYr5qIQFWtdJFtKPcuPvMN9VfryD/fxtA+n9rjfw9FLEZuf
Rqp+/clRzQC6BfrYP35OTb1srryST9PblUv283VR6MQASS7QRlHRlVNykFsNWvb9
2kaRt+uB5KqIGVYWIkLYwE1aelw4iUdg/sQkl5keZHIBU/DE5RqPEWFzyIfgcROz
EGUVBh0z0wiAqpm8Ncj7M0MwjkQnNLiRuMWH485NhlSKdMKjDKog7fOMkA==
=pi7r
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-06-02 13:56 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-23 12:23 [QUESTION] What's the ":desk" link parameter? stardiviner
2020-05-23 13:49 ` Bastien
2020-05-23 14:01 ` John Kitchin
2020-05-23 23:52 ` stardiviner
2020-05-24 3:10 ` Ihor Radchenko
2020-05-24 11:00 ` Bastien
2020-05-24 11:34 ` Ihor Radchenko
2020-06-02 12:29 ` Bastien
2020-06-02 13:22 ` Ihor Radchenko
2020-06-02 13:55 ` stardiviner
2020-05-24 11:12 ` stardiviner
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.