Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per-site link formatting is difficult to use #111

Closed
rexim opened this issue Aug 14, 2018 · 1 comment
Closed

Per-site link formatting is difficult to use #111

rexim opened this issue Aug 14, 2018 · 1 comment
Labels

Comments

@rexim
Copy link
Owner

rexim commented Aug 14, 2018

Derived from #107

Right now to achieve that you have to pretty much reimplement org-cliplink function from scratch (See Custom Transformers). I believe it should be as easy as setting up a custom variable:

(custom-set-variables
 '(org-cliplink-title-replacements
   (quote
    (("https://github.com/.+/?"
      ("GitHub - .*: \\(.*\\)" "\\1"))
     ("https://twitter.com/.+/status/[:digit:]+/?"
      (".+ on Twitter: \\(.+\\)" "\\1"))))))
@rexim rexim added the bug label Aug 14, 2018
Miciah added a commit to Miciah/org-cliplink that referenced this issue May 18, 2019
Fix issue rexim#111.

* org-cliplink.el (org-cliplink-title-replacements): New custom variable for
specifying rules for replacing link titles.
(org-cliplink-title-for-url): New function.  Replace the link title according to
the rules specified in org-cliplink-title-for-url.
(org-cliplink-org-mode-link-transformer): Use org-cliplink-title-for-url to
replace the link title before formatting the link.
Miciah added a commit to Miciah/org-cliplink that referenced this issue May 18, 2019
Fix issue rexim#111.

* org-cliplink.el (org-cliplink-title-replacements): New custom variable for
specifying rules for replacing link titles.
(org-cliplink-title-for-url): New function.  Replace the link title according to
the rules specified in org-cliplink-title-for-url.
(org-cliplink-org-mode-link-transformer): Use org-cliplink-title-for-url to
replace the link title before formatting the link.
@rexim
Copy link
Owner Author

rexim commented May 18, 2019

Resolved by #119

@rexim rexim closed this as completed May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant