Org-mode task dependency not working - emacs

I have the following tasks in an org-mode file
* TODO [#A] Morning tasks [0/7]
:PROPERTIES:
:RESET_CHECK_BOXES: t
:END:
- [ ] Check Agenda
- [ ] Empty head
- [ ] Refile tasks
- [ ] Clean-up mails
- [ ] Set MIT
- [ ] clean up download and inbox
- [ ] Clean up Onenote
In my .emacs, I have
(setq org-enforce-todo-dependencies t)
(setq org-enforce-todo-checkbox-dependencies t)
I thought that if I checked all the boxes, my parent todo would automatically be set to "done". However, this is not happening. I tried it with a clean start (only the two lines above in the .emacs file), but it still doesn't work. I also tried with todos as subtasks, but this doesn't work either (setting the status of TODO to DONE of the subtasks, doesn't automatically set the status of the parent to "done".
Perhaps somebody knows how to get the behavior?
Cheers
Renger

Dependency checking prevents you from setting the parent to DONE if any of the children are still not DONE. It does not automatically change the state of the parent.
I had written a function to do what you want, but that was a long time ago, with a version of org-mode that is ancient by current standards. I don't know if it still works, but it might give you some idea of how to go about it. You can find it at http://orgmode.org/worg/org-hacks.html#mark-done-when-all-checkboxes-checked
HTH.
N.B. The above page refers to a couple of postings to the org-mode mailing list. Those references use links to GMane, but GMane had severe problems about a year ago and it was taken out of commission for a while; part of it is back, but not the part that would allow those references to work: currently and at least for the time being, those links are dead.
PS. I found the conversation in the mail archive: check the thread starting at https://www.mail-archive.com/emacs-orgmode#gnu.org/msg51952.html and read all of it: there are caveats galore that I had forgotten about.
EDIT (2020/08/04): There is an improved version of the code in this Emacs SE question.

Related

Emacs orgmode Todo item automatically generates property drawer

I use Emacs org-mode to organise my todo list. Recently I found under each todo item it automatically generates a property drawer containing a key ID and the corresponding value, something like this:
** TODO meeting XXX
SCHEDULED: <2014-07-12 Sat 14:00>
:PROPERTIES:
:ID: 46673B08-F9D9-4966-B70A-A2ADBC2ADE0E
:END:
Entered on [2014-07-08 Tue 20:40]
I have no idea how this property drawer is generated, and I did not have it before. If delete it, next time I start Emacs to read the file, it will come back again. What would I do?
Would you have used MobileOrg? If yes, that's the culprit (and that clutter is something more that keeps me away from using MobileOrg ATM).
Posting your configuration file would definitely help diagnose what's causing this. For some, this is the desired behavior of the org-id package, which is explained in Handling Links in the Org-mode Manual:
The library org-id.el must first be loaded, either through org-customize by enabling org-id in org-modules, or by adding (require 'org-id) in your .emacs.
An init.el / .emacs file that enables this functionality, might for example, include the following:
;; Use global IDs
(require 'org-id)
(setq org-id-link-to-org-use-id t)
;; Update ID file .org-id-locations on startup
(org-id-update-id-locations)
Additionally, you could check your .emacs.d directory to see if there is a .org-id-locations file, which is generated by the org-id package.
To disable this behavior, you should remove all org-id package related code from your configuration files.
It's likely that this behavior occurs every time you use (org-store-link), commonly bound to C-l l. You might also want to check out Assign IDs to every entry in Org-mode

How to view the taken "Notes" in a new buffer in Emacs Org Mode?

I use Emacs Org mode to deal with my daily staffs. Now I use Emacs to manage some research papers. When reading the papers, I would like to take some notes as the following using the shortcut key C-c C-z or only z in the Agenda View.
When taking a new note it looks like this:
However, after completing the note taking with C-c C-c, the note is stored in the LOGBOOK under where it was taken:
The first problem is that the note itself is not highlight. The second problem is that, if I would like to revise this note, I do not know how to display it as when it was taken(just as in the first picture above, in a new buffer with highlight). It seems that I could only revise this note under the "Note taken on ..." line with no highlight plain text.
However, I am not pleased with this editing method since it should be as the same as the first picture, i.e., when the note was first created.
Thanks for your attention and help.
In addition to using subtasks (as discussed in the comments underneath the initial question in this thread), here is an alternative approach that places the notes at the tail end of a task without any blank lines between sentences. The stock org-mode has the ability to handle this -- i.e., no modifications are required (other than keywords and priority settings)
** Active [#A] 0 # Ender's Game (Orson Scott Card). :lawlist:
DEADLINE: <2014-02-22 Sat 08:00> SCHEDULED: <2014-02-22 Sat>
:PROPERTIES:
:ToodledoID: 353081871
:ToodledoFolder: TASKS
:Hash: 680920196368d9f25c95c09063243a7f
:END:
• This novel was of particular interest because . . .
• Orson Scott Card has written other books . . .
• Compare and contrast Ender's brother and sister.
(source: lawlist.com)
(source: lawlist.com)

Dr Racket fails when trying to create ]

I'm playing around a bit with DrRacket in the BSL language.
When I'm trying to create a comment like so:
;; Hi(10, 50]
The program fails in the moment when typing the ]. I can only end it via TaskManager. It uses 13 CPU in the TM.
Has anyone of you a solution for that? or is it simply not to use ].
Thank you
This is some bug that was reported several times recently, and there's no fix, yet. It's probably a result of some non-english keyboard layout (which was the case in these reports). Hopefully it will get fixed soon...
UPDATE: The bug was fixed for the next release, but in the meanwhile Matthew posted some instructions on how to do a temporary fix -- repeated here for reference:
We have tracked down a problem that occurs when the AltGr key is needed
to type ].
DrRacket gets stuck due to a bad implementation of an operation that is
intended to be bound to Alt-]. For most of you, though, the problem is
that you didn't want the Alt-] keybinding at all; you're just trying to
type ], and it's misinterpreted as Alt-].
You can work around the problem by placing the five lines at the end of
this message in a file, and then selecting the file via the
Edit -> Keybindings -> Add User-defined Keybindings...
menu item in DrRacket. Typing ] should work immediately after, and
typing [ will also give you just [ (instead of [ and ]).
Beware that after you select the file, it will be difficult to unselect
it. It turns out the the menu item to un-select a keybindings file is
also buggy! Your best bet is to put the file in a place that it can
stay. (You can still edit the file and restart DrRacket if you just
want to drop the bindings.)

Org-mode: divide agenda by blocks of 20 items

I want to implement Autofocus system in org-mode using agenda views. Autofocus is a time-management system, where you write tasks in a lined notebook with 25-35 lines on a page and you don't start working on the next page until you processed the current page.
By default agenda collects all todos and throws them in a buffer altogether. I want to break these todos by blocks of 20 tasks, for example, so i can process one batch of 20 tasks, then another batch, and so on.
How can i do it? Any solution from using org-mode built-in trick to some emacs lisp snippet is appreciated.
I don't see this going the same way as the agenda usually goes, i.e. chronology, so I don't think there are meant-to-be ways to do that. What comes to my mind, though, is defining your batches with tags (: in the agenda to set tags, say on the first 20), then filtering by tags (/ SPC to filter on tags of the current line).
The first idea I had was basically the same with priorities : S-<up> in the agenda to set them, but then filtering by priority is described here on the mailing list, but doesn't seem that easy.
From the documentation, org-agenda-max-todos and org-agenda-max-entries might be what you are looking for.
Note: I have never used them. I came across these a while ago

I want to try org-mode. What's the shortest path from zero to typing?

I want to give emacs' org-mode a try. What is the shortest path for me to accomplish that?
Assume NO previous experience with emacs.
(I'm aware that other editors, like vim and textmate, have similar task lists. I'm specifically interested in learning about the emacs org-mode)
My laptop runs Win7 Home Premium x64
I use Emacs (when I'm on Windows) with the official binaries at http://ftp.gnu.org/gnu/emacs/windows/emacs-22.3-barebin-i386.zip Just unzip to a directory and double click "runemacs".
In all the commands that follow, C stands for Ctrl.
Create a file ending in .org. If using recent Emacs, that will automatically start org-mode. You can create a file using C-x C-f.
Start creating outlines like this:
* Level 1
** Level 2
Collapse/Uncollapse outline levels with TAB
Todo's you can cycle by hitting C-c C-t
That's the basics, and pretty much all I know, but I already use it extensively :)
Have a look at the tutorials on http://orgmode.org/worg/org-tutorials/
I started org mode with an article in the linux journal and a very useful & simply tutorial.
David O'Toole Org tutorial
Get Organized with Emacs Org-mode
Both sources give you in my opinion a superb and fast introduction to org mode.
Start org mode with M-x org-mode RET, or by visiting a file with the .org extension.
Type C-h m in an org mode buffer to see the (brief) mode description and (importantly) all of its key-bindings.
Type C-h i m org RET to read the Org Mode manual.
(Typing q will bury either of the *Help* or *info* buffers.)
Visit the web site at http://orgmode.org/ for more.
I found a very extensive list of youtube video regarding org-mode. See it here : Org-Mode on Youtube. Use the latest Emacs release, it already has org-mode installed. Create a file with .org extension. Now, type the title of the file, then start create these:
* Roles
** Role 1
*** Todo 1
*** Todo 2
*** Todo 3
** Role 2
*** Todo 1
*** Todo 2
While your cursor on Role1, press TAB and see the way org-mode hide/show the only relevant tree structure. Press tab again to toggle the visibility status.
Now, while you are in Role 1, type C-x n s, or the command org-narrow-to-subtree. It will only displayed Role 1. To get back, use the command widen, or C-x n w.
I found it very helpful!
Lots of other great stuff in org-mode
By the way, you can easily convert and display in browser your org-file. Type : org-export-as-html-and-open. I use it a lot!
Since others already mentioned how to install and start using org-mode, I would like to point you to the excellent collection of tutorials on Worg (it is a community driven documentation effort in the form of tutorials, How tos and other articles).
Everyone starts Emacs without previous experience.You just need to:
Install Emacs
Install org-mode
Use org-mode to write something
I think both Emacs and org-mode are well documented.So if you have any trouble, read the official documents.
That's all. Good luck.
Org-mode beginning at the basics sounds promising, it starts with
The absolute minimum you need to know about Emacs
The absolute minimum you need to know about Emacs, to be able to do
anything, is more then you need to know about many other applications.
But, you might compare it to a regular toy and lego. Lego is harder to
begin with (you start with a box with little plastic pieces), but in
the long run, you can do more with it.
I have a portable version with .emacs configure ready, which setup org mode, etc. It also included org sample file. I think that is a better start point.
http://nd.edu/~gsong/portable_emacs.html
Best,