alphapapa / org-now

Conveniently show current Org tasks in a sidebar window
59 stars 3 forks source link

Error: org-find-olp: Buffer now.org needs to be in Org mode #9

Closed max6166 closed 11 months ago

max6166 commented 11 months ago

When I run org-now, I receive the following error:

org-find-olp: Buffer now.org needs to be in Org mode

I am using an org file with just the following contents: * NOW.

And my setting is '(org-now-location '("~/org/productivity/now.org/" "NOW"))

When I run describe-mode on the buffer, it states that the major mode is actually org-mode.

And if I run (org-find-olp (list "NOW") 't), it returns #<marker at 1 in now.org> which is correct.

Any ideas what the problem could be?

BTW, thank you very much for this package. I have been doing almost exactly the same procedure manually which was very tedious. :)

alphapapa commented 11 months ago

Hello,

Well, the first thing I notice is that the file path ends in a slash. I don't know if that is causing this problem, but ending in a slash would indicate that the path is to a directory, not a file.

max6166 commented 11 months ago

Well, the first thing I notice is that the file path ends in a slash.

Yes, that was the problem. I can't believe I didn't notice that. Thanks again.

alphapapa commented 11 months ago

I pushed this change to hopefully prevent this from happening: https://github.com/alphapapa/org-now/commit/d9d6b93daedab2a137a67a14ca41c40426f3c1bf