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

check if org attachment directory exists #203

Closed
wants to merge 1 commit into from
Closed

check if org attachment directory exists #203

wants to merge 1 commit into from

Conversation

dogayuksel
Copy link

org-attach-dir returns a path even if the directory doesn't exist. Wrapped it with a prompt, otherwise can't visualize headlines anymore.

@Kungsgeten
Copy link
Owner

Hi! I don't quite understand the problem here. When I'm looking at the code for org-attach-dir it ends with the following:

(and (file-exists-p attach-dir)
	   attach-dir)

To me this seems like it already checks if the directory exists. Which version of org-mode are you using?

@dogayuksel
Copy link
Author

Hi, thank you for the reply and also for all the great work!
I was on master branch of org-mode. Seems like the check is removed on this commit:

code.orgmode.org @commit ae9cd43 @line 285

Perhaps the check should be there after all, I will try to send a bug report to them.

@Kungsgeten
Copy link
Owner

Yes please hear what they say, perhaps there's an error or maybe the function is meant to be used in a different way now.

@Whil-
Copy link

Whil- commented Sep 2, 2019

Stumbled upon this - author of the patch you linked to here. I'll add the check back - it makes sense to have it there. It also makes sense to return the attachment-directory even if it's not initialized though, but I'll keep that behavior with an optional flag I think.

Whil- added a commit to Whil-/org that referenced this pull request Sep 2, 2019
In commit ae9cd43 the filsystem check for org-attach-dir was
removed.  Adding it back here, together with an optional flag to
override the check.

To satisfy compatabilty issues with org-brain. Ref. thread here:
- Kungsgeten/org-brain#203
@Whil-
Copy link

Whil- commented Sep 2, 2019

Should be fixed in org-mode master now.

@dogayuksel
Copy link
Author

Hey, that sounds great! Thanks a lot for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants