-
Notifications
You must be signed in to change notification settings - Fork 268
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
Implement agenda view #34
Comments
I'm thinking about how to implement this properly. I'd create an agenda class that contains several documents. The user can define the documents. The nesesary information of the documents get extracted depending on the type of the agenda. The agenda info gets dumped in a new vimbuffer. That is the rough idea. Any suggestions? |
Sounds good to me. The agenda class should be part of liborgmode. The documents should be configurable by vim variables, similar to the TODO implementation. An imaginary orgcmd program, that implements a command line front-end to liborgmode can then override the configuration with it's own values. Regarding the agenda buffer in vim, I recommend implementing the auto command BufReadCmd for org:agenda or something similar. |
as reference #60 jceb said:
Thanks for the suggestion! 0: org only needs an active date like <2011-11-22 Mon> for the agenda. SCHEDULED and DEADLINE have different semantics. Besides that I introduced active_date in the Heading and wrote some unittests. I kinda want to split liborgmode.py. It's getting to huge. Even some classes are really big. I would introduce some factory methods, e.G. parse_heading_from_data(...) in the Heading class. That would also improve the testabillity. I would move Heading and HeadingList in heading.py. A OrgDate class would be helpful as well. It would simplify the Date plugin and and the agenda feature. Is that fine with you? |
That's fine for me. I'd recommend creating a python module "liborgmode" and putting all the separate files (heading.py & co.) in there. |
I started with the refactoring and have a tiny agenda running: https://github.com/sotte/vim-orgmode/tree/agenda Next I'll add the OrgDate classeses I want to use for the agenda (and a few other places). |
Great. I hope I'll find some time to look at it at the weekend. |
Is there any specific reason why init of Document should not be called directly? The Document as main class in liborgmode should be allowed to be instanciated directly. I'm about to write some unittest for the agenda manager and I need a Document object with some Headings in it. |
I want to be able to sort a list of headings by date. For this I would implement What do you think? |
Re: init. Of course you can instantiate Document directly. Except from test cases this is hardly ever needed because of the lack of a connection to any kind of file/buffer/... resource. Re: lt. Go ahead an implement |
Ok, my branch has the basic functionality for the agenda view. I restructured quite a bit and there is some more work needed. Current limitations:
Feel free to test. Also, if you integrate it into v0.4 we both can work on it. |
How can I get the bufnr of a buffer with a given name ('somefile.org')? |
Re bufnr: I suppose there is no direct api call that will return the bufnr. You have to know the full filename of the buffer, then you can iterate over vim.buffers to find the corresponding buffer. I reduced the plans for v0.4 to the agenda feature, so my plan is to merge all your work. Currently I'm very busy, I recommend that you continue working on your implementation till I merge it. I added you as a collaborator, so you can also merge it yourself :-) |
I guess iterating works. Thanks for making me a collaborator! I'll keep working on the agenda feature... |
|
I merged it into v0.4 and created a separate issue for the hyperlinks problem. |
Implement agenda view
The text was updated successfully, but these errors were encountered: