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

counsel-org-file should use org-attach-directory variable #1340

Closed
neurolit opened this issue Dec 4, 2017 · 4 comments
Closed

counsel-org-file should use org-attach-directory variable #1340

neurolit opened this issue Dec 4, 2017 · 4 comments

Comments

@neurolit
Copy link

@neurolit neurolit commented Dec 4, 2017

Hi!

org-attach-directory variable sets the directory where attachments are stored with Orgmode. It would be nice to use it in counsel-org-files function as well, instead of "./data/" directory.

@neurolit neurolit changed the title counsel-org-file should use org-attach-directory variable counsel-org-file should use org-attach-directory variable Dec 4, 2017
@abo-abo abo-abo closed this in a924089 Dec 4, 2017
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Dec 4, 2017

Thanks, please test.

Loading

@neurolit
Copy link
Author

@neurolit neurolit commented Dec 5, 2017

Works perfectly for me! However, if org-attach-directory is not defined, I think it will break your implementation.

Loading

@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Dec 5, 2017

The default setting is "data/", so it should still work.

Loading

@basil-conto
Copy link
Collaborator

@basil-conto basil-conto commented Dec 5, 2017

@abo-abo

The default setting is "data/", so it should still work.

I think what @neurolit is referring to is the use of org-attach-directory without first loading org-attach.el, in which case you get a void variable error.

Another couple of issues I found with the current implementation are that it does not support :ID: properties indented past the first column and it disregards dotfile attachments (i.e. filenames beginning with a full-stop). Older Org versions ignored dotfiles as well, but this is no longer the case - see org-attach-file-list in org-attach.el.

I have opened PR #1345 to address all three of these issues.

Loading

basil-conto added a commit to basil-conto/swiper that referenced this issue Dec 5, 2017
(counsel-org-file-ids): Remove function.
(counsel-org-files): Use org-attach API.  Clarify docstring.

Re abo-abo#1340
abo-abo added a commit that referenced this issue Dec 5, 2017
(counsel-org-file-ids): Remove function.
(counsel-org-files): Use org-attach API.  Clarify docstring.

Re #1340
Fixes #1345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants