Skip to content
Brett Terpstra edited this page Mar 26, 2024 · 4 revisions

Several command can be used to add new entries.

now, next     - Add an entry
done, did     - Add a completed item with @done(date). No argument finishes last entry.
meanwhile     - Finish any @meanwhile tasks and optionally create a new one
again, resume - Duplicate the last entry as new entry (without @done tag)

NOTE: later was removed as a default command. It's the same as running doing now --section Later ... and in its present state was a bit redundant as anything but a shortcut. However, you can easily add it back in as a plugin. The source for the plugin is here, and you can find instructions here. It takes just a minute to create the plugins directory and drop the file in there, and you'll have a later command.

now

The doing now command adds an entry to the "Currently" section by default. It accepts -s section_name to send the new entry straight to a non-default section. It also accepts --back=AMOUNT to let you specify a start date in the past using natural language. For example, doing now --back=25m Working on doing docs or doing now --back="yesterday 3:30pm" "I've been doing this for days".

You can finish the last unfinished task when starting a new one using doing now with the -f switch. It will look for the last task not marked @done and add the @done tag with the start time of the new task (either the current time or what you specified with --back).

Examples:

  • doing now Working on project X --- Add a new entry at the current time
  • doing now --section=Projects Working on @projectX --- Add a new entry to a section titled "Projects"
  • doing now --back 30m --- Add a new entry with a backdated start time, indicating you've been working on it for 30 minutes already
  • doing now --back 8am --- Backdate a new entry to a specific time
  • doing now -f Starting the next thing --- Add a new entry at the current time, and add a @done tag to the previous item with the current time as its completion date
  • doing now -f --back 30m Working on something new --- Add a new entry and complete the last entry, but use a timestamp from 30 minutes ago for both.

done/finish

doing done is used to add an entry that you've already completed. Like now, you can specify a section with -s section_name. You can also skip straight to the Archive with -a.

doing done can also backdate entries using natural language with --back 15m or --back "3/15 3pm". That will modify the starting timestamp of the entry. Used on its own, it will set the start date, and the finish date will be the current time. You can also use --took 1h20m or --took 1:20 to set the finish date based on a "natural language" time interval. If --took is used without --back, then the start date is adjusted (--took interval is subtracted) so that the completion date is the current time.

When used with doing done, --back and --took allow time intervals to be accurately counted when entering items after the fact. --took is also available for the doing finish command, but cannot be used in conjunction with --back. (In finish they both set the end date, and neither has priority. --back allows specific days/times, --took uses time intervals.)

Examples:

  • doing done --back 1h The thing I just did --- Add an entry for a completed task that you started an hour ago and just finished
  • doing done --back 1h --took 20m The thing I just finished --- Record an entry you started an hour ago and finished 20 minutes later
  • doing done --took 20m --- Finish the last task but change the finish date so that the total elapsed time is only 20 minutes (if the finish date would be in the future, start date will be adjusted accordingly)

You can also use --at to set a @done date with a natural language string, or use --from "1pm to 2:30pm" to set both a start and end time with natural language.

again

doing again (or doing resume) will duplicate the last @done entry (most recently completed) with a new start date (and without the @done tag). To resume the last entry matching specific tags, use --tag=TAG. You can specify multiple tags by separating with a comma. Multiple tags are combined with 'AND' by default (all tags must exist on the entry to match), but you can use --bool= to set it to 'OR' or 'NOT'. By default the new entry will be added to the same section as the matching entry, but you can specify a section with --in=SECTION.

meanwhile

doing meanwhile is a special command for creating and finishing tasks that may have other entries come before they're complete. When you create an entry with doing meanwhile [entry text], it will automatically complete the last @meanwhile item (dated @done tag) and add the @meanwhile tag to the new item. This allows time tracking on a more general basis, and still lets you keep track of the smaller things you do while working on an overarching project. The meanwhile command accepts --back [time] and will backdate the @done tag and start date of the new task at the same time. Running meanwhile with no arguments will simply complete the last @meanwhile task.

See doing help meanwhile for more options.

Using an editor

All of these commands accept a --editor argument. This opens your command line editor (as defined in the environment variable $EDITOR, or editors->default in your config). Add your entry, save the temp file, and close it. The new entry is added. Anything after the first line is included as a note on the entry.

You can replace doing-formatted dates (YYYY-MM-DD HH:MM) at the beginning of an entry (start date) or in a @done tag using natural language and it will be parsed into a date when you save and exit the editor. Start times must be followed by a pipe (|) with a space on either side of it to be parsed.