Re: Should org-link-parser add type "file" when link has no "file:" prefix?

2024-02-02 Thread Ihor Radchenko
jos...@ushin.org writes: >> I did not make any changes to Org mode. And I will not, unless we need >> >> to pass this extra information to :follow functions. > > Thank you! I think we can close this issue. Can I close the issue myself? Sure. Handled. -- Ihor Radchenko // yantar92, Org mode

Re: Should org-link-parser add type "file" when link has no "file:" prefix?

2024-02-01 Thread joseph
February 1, 2024 at 4:23 AM, "Ihor Radchenko" wrote: > > jos...@ushin.org writes: > > > > > > > > > > > What we can do then is pass an extra argument to :follow function - > > > > > the > > > > > > > > link object. That way, :follow function can get all the information > > > it > > >

Re: Should org-link-parser add type "file" when link has no "file:" prefix?

2024-02-01 Thread Ihor Radchenko
jos...@ushin.org writes: >> > > What we can do then is pass an extra argument to :follow function - the >> > > link object. That way, :follow function can get all the information it >> > > needs. >> > > >> > >> > I like this idea! Would this change break existing :follow functions >> >

Re: Should org-link-parser add type "file" when link has no "file:" prefix?

2024-01-31 Thread joseph
January 17, 2024 at 5:15 AM, "Ihor Radchenko" wrote: > > Joseph Turner writes: > > > > > > > > > May you please provide an example with an Org file containing file links > > > > > > and how you envision to transform them? Will they be transformed > > > > > > depending on the directory

Re: Should org-link-parser add type "file" when link has no "file:" prefix?

2024-01-17 Thread Ihor Radchenko
Joseph Turner writes: >> May you please provide an example with an Org file containing file links >> and how you envision to transform them? Will they be transformed >> depending on the directory the Org file is located in? > > I don't want to transform the file links. The idea is that an Org

Re: Should org-link-parser add type "file" when link has no "file:" prefix?

2024-01-16 Thread Joseph Turner
Ihor Radchenko writes: > Joseph Turner writes: > I'd like for users to be able to take an existing directory of Org mode documents and copy them all into a hyperdrive. I think the least surprising behavior is for the links between those files to continue working. Perhaps

Re: Should org-link-parser add type "file" when link has no "file:" prefix?

2024-01-16 Thread Ihor Radchenko
Joseph Turner writes: >>> I'd like for users to be able to take an existing directory of Org mode >>> documents and copy them all into a hyperdrive. I think the least >>> surprising behavior is for the links between those files to continue >>> working. Perhaps the best option is for

Re: Should org-link-parser add type "file" when link has no "file:" prefix?

2024-01-15 Thread Joseph Turner
Ihor Radchenko writes: > Joseph Turner writes: > >>> See `org-open-file' IN-EMACS argument - we may use different handlers >>> to open file links. Currently, IN-EMACS can be 'system or 'emacs. But >>> nothing stops us from adding more options. >> >> Thanks! Are you suggesting something like

Re: Should org-link-parser add type "file" when link has no "file:" prefix?

2024-01-02 Thread Ihor Radchenko
Joseph Turner writes: >> See `org-open-file' IN-EMACS argument - we may use different handlers >> to open file links. Currently, IN-EMACS can be 'system or 'emacs. But >> nothing stops us from adding more options. > > Thanks! Are you suggesting something like [[file+hyper:/README.org]] ? Yes.

Re: Should org-link-parser add type "file" when link has no "file:" prefix?

2024-01-01 Thread Joseph Turner
Ihor Radchenko writes: > Joseph Turner writes: > >>> It would be more reliable to provide a separate link type. >>> We might even extend the special file+application: link type syntax that >>> already allows special behavior for opening file links. >> >> Thank you! Would you explain about

Re: Should org-link-parser add type "file" when link has no "file:" prefix?

2023-12-31 Thread Ihor Radchenko
Joseph Turner writes: >> It would be more reliable to provide a separate link type. >> We might even extend the special file+application: link type syntax that >> already allows special behavior for opening file links. > > Thank you! Would you explain about extending file+application syntax?

Re: Should org-link-parser add type "file" when link has no "file:" prefix?

2023-12-30 Thread Joseph Turner
Joseph Turner writes: > - When handling "file" type links, check if `org-current-uri-scheme' > matches one of the keys in `org-link-parameters', and use the > appropriate handler instead of the "file" handler. (see attached patch > for an example usage in `org-link-open') Please ignore the last

Re: Should org-link-parser add type "file" when link has no "file:" prefix?

2023-12-30 Thread Joseph Turner
Ihor Radchenko writes: > Joseph Turner writes: [...] > Thanks for reporting! > Fixed, on main. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d15e52fef Thank you for the quick fix! >> In hyperdrive.el currently, "[[/foobar]]" and "[[file:/foobar]]" have >> different

Re: Should org-link-parser add type "file" when link has no "file:" prefix?

2023-12-29 Thread Ihor Radchenko
Joseph Turner writes: > I expect the following to return "[[/foobar]]": > > (with-temp-buffer > (delay-mode-hooks (org-mode)) > (insert "[[/foobar]]") > (goto-char (point-min)) > (let ((link (org-element-link-parser))) > (org-element-link-interpreter link nil))) > > Instead, it

Should org-link-parser add type "file" when link has no "file:" prefix?

2023-12-28 Thread Joseph Turner
Hello! I expect the following to return "[[/foobar]]": (with-temp-buffer (delay-mode-hooks (org-mode)) (insert "[[/foobar]]") (goto-char (point-min)) (let ((link (org-element-link-parser))) (org-element-link-interpreter link nil))) Instead, it returns "[[file:/foobar]]". In