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

Add support for org links. #206

Merged
merged 1 commit into from Apr 12, 2017

Conversation

Projects
None yet
3 participants
@Fuco1
Contributor

Fuco1 commented Apr 9, 2017

This is based on #34 but also stores all the related entry metadata, so they can be used in capture templates.

Also adds support for org mode 9+ which uses different link syntax/functions.

For use in templates, you can use all the metadata under :elfeed-entry- namespace, for example

("l" "Read later" entry (file "~/org/refile.org")
         "* %?%:description :readlater:
- %:link
%(when (< 0 (length \"%:elfeed-entry-link\")) (concat \"- web link: \" \"%:elfeed-entry-link\"))")

@Fuco1 Fuco1 force-pushed the Fuco1:feature/org-link-support branch from 171dce7 to 3c412ad Apr 9, 2017

@Fuco1

This comment has been minimized.

Contributor

Fuco1 commented Apr 9, 2017

Hm, there seem to be a PR already opened for this (#128) but it seems there are conflicts and it's 2 years old, so probably abandoned? Also, doesn't work on org-mode 9 which is the "standard" these days.

@skeeto

This comment has been minimized.

Owner

skeeto commented Apr 10, 2017

The difficulty with these Org pull requests is that I don't use Org and I'm unfamiliar with how it's used. I don't really have the context I need make a decision about merging, so they just languish. That's why elfeed-org is a separate package, maintained by @remyhonig who (I presume) knows this stuff.

@Fuco1

This comment has been minimized.

Contributor

Fuco1 commented Apr 11, 2017

@skeeto The problem is that elfeed-org is not an integration for elfeed into org but some sort of hack to configure elfeed with org. So basically nothing else fits into that package.

You can think of org files as glorified markdown. Instead of just normal links (to websites), it supports links to email (gnus), files, bibtex, irc, bookmarks, git commits, search strings, direds, grep result sets and many more things. Basically a link provites a syntax to store "something" which when run provides the desired outcome.

So when I create such a link in my notes file which points to a mail or an elfeed entry, I can just click on it (or C-c C-o) to follow and it opens the target buffer in the appropriate mode. This is useful if you create TODO lists to entries you want to review/read later, for example (yes, I could tag them in elfeed, but I like to have one workflow for all the "consumable" media: email, feeds, youtube...)

Elfeed already provides integration with bookmarks, which is in principle very similar, org links are just textual representation for the same concept.

@caadar

This comment has been minimized.

caadar commented Apr 11, 2017

I vote for it.

@skeeto skeeto merged commit 3c412ad into skeeto:master Apr 12, 2017

skeeto added a commit that referenced this pull request Apr 12, 2017

skeeto added a commit that referenced this pull request Apr 12, 2017

@skeeto skeeto referenced this pull request Apr 12, 2017

Closed

code to create orgmode links #34

@skeeto

This comment has been minimized.

Owner

skeeto commented Apr 12, 2017

Alright, this seem simple enough, so I merged it. The header says to (require 'elfeed-link), but in the typical case the eval-after-load autoload should cover this, right? I definitely like the idea of not automatically loading Org alongside Elfeed unless the user explicitly asks for it.

@Fuco1

This comment has been minimized.

Contributor

Fuco1 commented Apr 12, 2017

@skeeto Provided this is installed via something that loads the generated autoloads, yes it will work as you describe. If you git clone and do nothing, then you would need to add the require.

@Fuco1 Fuco1 deleted the Fuco1:feature/org-link-support branch Apr 12, 2017

skeeto added a commit that referenced this pull request Apr 12, 2017

@Fuco1

This comment has been minimized.

Contributor

Fuco1 commented May 29, 2017

I have elfeed 2.1.1 on Emacs 24.5 and org 9.0.7 and it works fine. Can you show the entire template? Sometimes you need to quote the arguments inside the templates (when org isn't smart enough).

@Fuco1

This comment has been minimized.

Contributor

Fuco1 commented May 30, 2017

I'm not sure what is going on to be honest. If you know how the elisp debugger works maybe you can step through elfeed-link-store-link and see where the problem is.

The properties are only stored when you capture from the "show" mode (viewing an entry) not from the search. Are you doing that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment