Re: Smart processing of http(s) links

2020-06-29 Thread Christian Heinrich
I'm not sure if this is of interest to you, but I like org-cliplink to insert links with their titles. Maybe you can look at their source to build your own if it doesn't work for you? On Sun, 2020-06-28 at 13:43 -0700, Ag Ibragimov wrote: > I want to make something like this: > > Whenever I I u

Re: Smart processing of http(s) links

2020-06-29 Thread Bonface M. K.
Ag Ibragimov writes: > Oh cool. This is exactly what I needed: > > I was able to build this: > > #+begin_src emacs-lisp > (defun get-gh-item-title (uri &optional include-number?) > "Based on given github URI for (pull request or an issue), > returns its title" > (when (string-match "\\(gith

Re: Smart processing of http(s) links

2020-06-28 Thread Ag Ibragimov
seems more complicated and requiring more maintenance than just typing the appropriate description when you insert the link. Actually, it is not. See my reply to Kyle. You still can modify the link description, it just gives you an option to make it as the title of the GitHub issue or PR. htt

Re: Smart processing of http(s) links

2020-06-28 Thread Tim Cross
Ag Ibragimov writes: > I want to make something like this: > > Whenever I I use org-insert-link and it turns out to be a URI that starts > with "https://github.com"; I would like it to be processed differently than > any other link, one example - if it is a PR or a Github Issue, I'd like it t

Re: Smart processing of http(s) links

2020-06-28 Thread Ag Ibragimov
Oh cool. This is exactly what I needed: I was able to build this: #+begin_src emacs-lisp (defun get-gh-item-title (uri &optional include-number?) "Based on given github URI for (pull request or an issue), returns its title" (when (string-match "\\(github.com\\).*\\(issues\\|pull\\)" uri) ;

Re: Smart processing of http(s) links

2020-06-28 Thread Kyle Meyer
Ag Ibragimov writes: > Whenever I I use org-insert-link and it turns out to be a URI that > starts with "https://github.com"; I would like it to be processed > differently than any other link, one example - if it is a PR or a > Github Issue, I'd like it to fetch summary(title) of it and create a >

Smart processing of http(s) links

2020-06-28 Thread Ag Ibragimov
I want to make something like this: Whenever I I use org-insert-link and it turns out to be a URI that starts with "https://github.com"; I would like it to be processed differently than any other link, one example - if it is a PR or a Github Issue, I'd like it to fetch summary(title) of it and