* Link-protocols @ 2010-02-26 13:57 Christian Zang 2010-02-26 17:18 ` Link-protocols Anthony Lander 0 siblings, 1 reply; 4+ messages in thread From: Christian Zang @ 2010-02-26 13:57 UTC (permalink / raw) To: emacs-orgmode Dear all, I use org-mode for notes, and DEVONthink and Papers on the mac for storing reference material. I want to add links to entries in DEVONthink and Papers to my org-files, but org doesn't understand links like papers://doi/10.1038/463860a or x-devonthink-item://6EB3DF6A-9B0D-4D26-A7D3-86D0B589E455 However, when I paste these links into my browser, the desired documents open in the respective app. Is there a way to add these "protocols" to the protocols org can handle? I looked into org-follow-link, but couldn't come up with a solution. Thanks! Christian ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Link-protocols 2010-02-26 13:57 Link-protocols Christian Zang @ 2010-02-26 17:18 ` Anthony Lander 2010-02-26 20:32 ` Link-protocols Christian Zang 0 siblings, 1 reply; 4+ messages in thread From: Anthony Lander @ 2010-02-26 17:18 UTC (permalink / raw) To: Christian Zang; +Cc: emacs-orgmode On 10-Feb-26, at 8:57 AM, Christian Zang wrote: > I use org-mode for notes, and DEVONthink and Papers on the mac for > storing reference material. I want to add links to entries in > DEVONthink and Papers to my org-files, but org doesn't understand > links like > > papers://doi/10.1038/463860a > > or > > x-devonthink-item://6EB3DF6A-9B0D-4D26-A7D3-86D0B589E455 > > However, when I paste these links into my browser, the desired > documents open in the respective app. > > Is there a way to add these "protocols" to the protocols org can > handle? I looked into org-follow-link, but couldn't come up with a > solution. > Hi Christian, Here is a snippet I use for opening Together links (another mac organizer): -------------------------------------------------- (org-add-link-type "x-together-item" 'org-together-item-open) (defun org-together-item-open (uid) "Open the given uid, which is a reference to an item in Together" (shell-command (concat "open \"x-together-item:" uid "\""))) --------------------------------------------------- I suspect that this can be adapted for your purposes as well. Regards, --Anthony ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Link-protocols 2010-02-26 17:18 ` Link-protocols Anthony Lander @ 2010-02-26 20:32 ` Christian Zang [not found] ` <C5C97495-256A-4E77-A771-64162AAE9424@yahoo.com> 0 siblings, 1 reply; 4+ messages in thread From: Christian Zang @ 2010-02-26 20:32 UTC (permalink / raw) To: Anthony Lander; +Cc: emacs-orgmode Am 26.02.2010 um 18:18 schrieb Anthony Lander: > > On 10-Feb-26, at 8:57 AM, Christian Zang wrote: > >> I use org-mode for notes, and DEVONthink and Papers on the mac for storing reference material. I want to add links to entries in DEVONthink and Papers to my org-files, but org doesn't understand links like >> >> papers://doi/10.1038/463860a >> >> or >> >> x-devonthink-item://6EB3DF6A-9B0D-4D26-A7D3-86D0B589E455 >> >> However, when I paste these links into my browser, the desired documents open in the respective app. >> >> Is there a way to add these "protocols" to the protocols org can handle? I looked into org-follow-link, but couldn't come up with a solution. >> > > Hi Christian, > > Here is a snippet I use for opening Together links (another mac organizer): > > -------------------------------------------------- > (org-add-link-type "x-together-item" 'org-together-item-open) > > (defun org-together-item-open (uid) > "Open the given uid, which is a reference to an item in Together" > (shell-command (concat "open \"x-together-item:" uid "\""))) > --------------------------------------------------- > > I suspect that this can be adapted for your purposes as well. > > Regards, > > --Anthony Hi Anthony, thanks for the snippet, it works perfectly with DEVONthink, but not with Papers.app. I suppose because the Papers-link contains slashes and might not be a proper uid... Best, Christian ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <C5C97495-256A-4E77-A771-64162AAE9424@yahoo.com>]
[parent not found: <71467D6F-AFC1-41D1-98E1-769CEAC861BB@gmail.com>]
[parent not found: <709E8EC5-5644-4A8D-A512-19BF3A7F4BEC@yahoo.com>]
[parent not found: <1E6E90F1-CE8E-45E4-B420-10E2AF9BE493@gmail.com>]
[parent not found: <2EC25EC8-DB09-44A0-90DE-7F394DBB0D34@yahoo.com>]
* Re: Link-protocols [not found] ` <2EC25EC8-DB09-44A0-90DE-7F394DBB0D34@yahoo.com> @ 2010-03-01 19:03 ` Christian Zang 0 siblings, 0 replies; 4+ messages in thread From: Christian Zang @ 2010-03-01 19:03 UTC (permalink / raw) To: Anthony Lander; +Cc: emacs-orgmode Hi Anthony, thanks a lot - that works! Indeed, the org-mailing-list is one of the nicest places on the 'web! Best, Christian Am 01.03.2010 um 17:43 schrieb Anthony Lander: > Hi Christian, > > Just some small errors in the papers code. Try this instead: > > (org-add-link-type "papers" 'org-papers-item-open) > > (defun org-papers-item-open (url) > "Open the given uid, which is a reference to an item in Papers" > (shell-command (concat "open \"papers:" url "\""))) > > 'org-add-link-type needs the name of the protocol, so in this case 'papers', as that is the protocol part of the link. Also, there was a missed bad variable reference: you renamed uid to url, but missed the reference in the shell command accidentally. > > Anyway, this code should work. Please let me know one way or another. > > Best regards, > > -Anthony > > On 28-Feb-10, at 3:18 AM, Christian Zang wrote: > >> Hi Anthony, >> >> thanks a lot for your interest in that specific problem. >> >> Am 27.02.2010 um 14:37 schrieb Anthony Lander: >> >>> On 10-Feb-27, at 3:10 AM, Christian Zang wrote: >>> >>>> Am 26.02.2010 um 22:50 schrieb Anthony Lander: >>>> >>>>> Hmm... that's weird. Can you get papers.app to open the link from the command line with 'open'? I figured it out the format with Together by using the "copy item link" command. You could also try dragging the link from the app to the terminal and see what it pastes. Or if none of those work, you can try do some applescripting to try to figure it out. >>>> >>>> In Terminal "open" works just fine with the papers://... link, and so does pasting the link into a browser. I am a little bit confused, maybe I should look into applescript. >>> >>> Well, if 'open' works from the command line, then I suspect the bug is somewhere else. If you send me the code you modified for papers.app and a small org file with a link in it, I'll take a look at it to see if there is something missing in the org setup. Also, which emacs and which org versions are you using? >> >> Please find attached the part of my .emacs where I put the modified code, and an org-file with links. And: I am using the emacs 23.1.92 build from http://emacsformacosx.com/ with org-mode 6.34trans. >> >> Thanks! >> >> Best, >> Christian >> >> <papers_test.org><emacs_part.el> > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-01 19:04 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-02-26 13:57 Link-protocols Christian Zang 2010-02-26 17:18 ` Link-protocols Anthony Lander 2010-02-26 20:32 ` Link-protocols Christian Zang [not found] ` <C5C97495-256A-4E77-A771-64162AAE9424@yahoo.com> [not found] ` <71467D6F-AFC1-41D1-98E1-769CEAC861BB@gmail.com> [not found] ` <709E8EC5-5644-4A8D-A512-19BF3A7F4BEC@yahoo.com> [not found] ` <1E6E90F1-CE8E-45E4-B420-10E2AF9BE493@gmail.com> [not found] ` <2EC25EC8-DB09-44A0-90DE-7F394DBB0D34@yahoo.com> 2010-03-01 19:03 ` Link-protocols Christian Zang
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).