{"action":"created","issue":{"url":"https://api.github.com/repos/bastibe/org-journal/issues/35","labels_url":"https://api.github.com/repos/bastibe/org-journal/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/bastibe/org-journal/issues/35/comments","events_url":"https://api.github.com/repos/bastibe/org-journal/issues/35/events","html_url":"https://github.com/bastibe/org-journal/pull/35","id":69811695,"number":35,"title":"Two minor improvements for org-mode","user":{"login":"vkazanov","id":47369,"avatar_url":"https://avatars.githubusercontent.com/u/47369?v=3","gravatar_id":"","url":"https://api.github.com/users/vkazanov","html_url":"https://github.com/vkazanov","followers_url":"https://api.github.com/users/vkazanov/followers","following_url":"https://api.github.com/users/vkazanov/following{/other_user}","gists_url":"https://api.github.com/users/vkazanov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkazanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkazanov/subscriptions","organizations_url":"https://api.github.com/users/vkazanov/orgs","repos_url":"https://api.github.com/users/vkazanov/repos","events_url":"https://api.github.com/users/vkazanov/events{/privacy}","received_events_url":"https://api.github.com/users/vkazanov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-04-21T10:50:04Z","updated_at":"2015-04-27T11:44:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bastibe/org-journal/pulls/35","html_url":"https://github.com/bastibe/org-journal/pull/35","diff_url":"https://github.com/bastibe/org-journal/pull/35.diff","patch_url":"https://github.com/bastibe/org-journal/pull/35.patch"},"body":"1. The first improvement is plain and simple: with a prefix arg `org-journal-new-entry` opens a current entry. If there's no entry - it opens an empty file, which is clearly wrong. The first commit fixes the problem by making the function throw an error in the situation.\r\n\r\n2. The second improvement is a bit controversial. \r\n\r\nA have my journal files stored in a Dropbox directory (~/Dropbox/Documents/journal), which allows for sharing between my home and office machines. My ~/Documents directory is just a symlink to ~/Dropbox/Documents (on both office Windows and home Linux machines).\r\n\r\nNow, if I set org-journal-dir to ~/Dropbox/Documents/journal, then (buffer-file-name) in any of the journal entry files does not match the auto-mode-alist regex (filename = \"~/Documents/journal/...\", regex = \"~/Dropbox/Documents/.....\").\r\n\r\nIf I set org-journal-dir to to ~/Documents/journal then org-journal-update-auto-mode-alist expands it to ~/Dropbox/Documents/journal anyway, because it uses `file-truename`, which expands the all the symlinks. So, I changed file-truename for `expand-file-name`, which works like charm.\r\n\r\nAnd I could not come up with a situation where the change would hurt."},"comment":{"url":"https://api.github.com/repos/bastibe/org-journal/issues/comments/96618373","html_url":"https://github.com/bastibe/org-journal/pull/35#issuecomment-96618373","issue_url":"https://api.github.com/repos/bastibe/org-journal/issues/35","id":96618373,"user":{"login":"vkazanov","id":47369,"avatar_url":"https://avatars.githubusercontent.com/u/47369?v=3","gravatar_id":"","url":"https://api.github.com/users/vkazanov","html_url":"https://github.com/vkazanov","followers_url":"https://api.github.com/users/vkazanov/followers","following_url":"https://api.github.com/users/vkazanov/following{/other_user}","gists_url":"https://api.github.com/users/vkazanov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkazanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkazanov/subscriptions","organizations_url":"https://api.github.com/users/vkazanov/orgs","repos_url":"https://api.github.com/users/vkazanov/repos","events_url":"https://api.github.com/users/vkazanov/events{/privacy}","received_events_url":"https://api.github.com/users/vkazanov/received_events","type":"User","site_admin":false},"created_at":"2015-04-27T11:44:25Z","updated_at":"2015-04-27T11:44:25Z","body":"...but this also means that org-journal will have to open a fresh file with no entries, and add some text into it, which still is a bit incomplete. Later, the user will have to either add a journal entry by hand or call another command. \r\n\r\nTo my taste and workflow having a warning and a possibility to resolve the problem at once (\"No entry -> created one?\") feels like a better solution.\r\n\r\nAnyway, this is becoming too lengthy for \"two minor issues\". :-) You should probably just make up your mind -> I can always just have a little customization of my own.\r\n\r\n"}}