-
Notifications
You must be signed in to change notification settings - Fork 83
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
Can’t parse trivial .org file #68
Comments
I just tried it with an empty file, same result. |
@tokuchan I have done a little work on the parser, so I can tell you from memory what's the issue. What's "trivial" and what is not is itself not trivial^^ org-web expects a file to start with either these keywords I have opened a separete issue two weeks ago that's going in a similar direction: #55 |
Ah. I see. It might be well to mention that in the documentation then.
Emacs considers almost any text file to be valid orgmode. They don't
necessarily have to start with a header or tag. Thank you for the
information! I really like the concept and want to use org-web.
On Sat, Aug 17, 2019 at 12:36 Alain M. Lafon ***@***.***> wrote:
@tokuchan <https://github.com/tokuchan> I have done a little work on the
parser, so I can tell you from memory what's the issue. What's "trivial"
and what is not is itself not trivial^^
org-web expects a file to start with either these keywords #+TODO,
#+TYP_TODO or with a header (indicated by a *).
I have opened a separete issue two weeks ago that's going in a similar
direction: #55 <#55>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#68?email_source=notifications&email_token=AAOIMB5LAB3DULA3AG3L46DQFASKVA5CNFSM4IMPVXX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QO6XQ#issuecomment-522252126>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOIMB7DK7SQTIWDEDBGUK3QFASKVANCNFSM4IMPVXXQ>
.
--
Sincerely,
Sean R. Spillane
sean@spillane.us
*╭-----╮*
*┃の の┃*
*┃ も ┃*
*┃ へ ┃*
*╰-----╯*
*★ Sean Spillane ★*
|
I already have several open PRs regarding the parser which the maintainer can review/merge. I had to do those to work on my ~10k LOC of org files.
I wouldn’t consider documenting this in the readme a good fix. Instead I’d rather spend time towards better org file compatibility^^
|
Hey @tokuchan, thanks for the report! org-web was largely built around my own particular use cases, which is one monolithic org file. Adding support for creating new files has been a rather commonly requested feature, however. Is that your use case here? |
As I mentioned in #71, org allows content before the first headline, so opening such a file should ideally be supported by org-web. I think many people stumble on the complex syntax of org, which has no real formal definition except the elisp-implementation (even though this "draft" page on worg seems to document it well). Would there be a point of using something like this in org-web? Otherwise I guess it’s a quite pragmatic solution to parse the basics, and then allow free-text editing of other things in the sections. In my understanding, org-web isn’t supposed to enable all org mode workflows, but is mainly aimed towards the planning functionality. |
I looked into that parser but had already done so much work on my own by that point that I opted not to use it. One day it might make sense to swap it in, though. My philosophy behind org-web has always been a sort of progressive enhancement. That is, I've wanted to allow editing the raw headers as plain text, but progressively over time support more org features natively (like TODOs, checklists, timestamps, etc). I think I just missed this case of allowing text before a header like this. |
I noticed that text content before the first |
Ah, yep, that is probably contained in this issue. I didn't realize you could put valid org-mode content before the first header. |
Definitely! After all, one has to be able to define things like properties and todo keywords. Speaking of which, how much work would it take to become able to parse custom todo keywords? |
Ah I think I misunderstood what "valid content" was in this context. org-web actually already does support custom todo keywords, @tokuchan! In the help file (Settings icon in the top right corner > Help), check out the third header under |
Store and restore settings (#+ lines) and content lines (other lines) before the first headline in the file. The settings and content are invisible and can’t be edited but are read in by the parser and saved when exported again Fixes DanielDe#55. Partial fix for DanielDe#68.
I created a file with a single word, “foo” in it, named foo.org. When I attempted to access it with orgweb I was told it couldn’t parse.
The text was updated successfully, but these errors were encountered: