Amanokami Kai

RSS

IBEmacs: Scheduling

Introduction

The next step to preparing your Emacs for an IB (or just school in general) life is scheduling. You need a method to keep track of your events and tasks. Now your friends probably use myHomework or some app of that sort, but of course Emacs is the best.

There are two steps to scheduling in Emacs: capturing tasks/events and displaying/checking them. For capturing there are the manual and the org-capture methods, and for displaying/checking there are the manual, org-agenda, and emacs-calfw methods.

I have used all these methods before (that's why I'm not covering the Diary method, because I've never used it), and right now I have settled for org-capture and emacs-calfw. These methods are from my experience and I am presenting their existence to you.

Before I start, here's a useful little piece of code:

(setq org-todo-keywords
            '((sequence "TODO(t)" "|" "DONE(d)" "ABORTED(a)"))
            )
          

So that you don't indefinitely have TODO or have an unjust DONE on a task. :)

Manual method (capturing + displaying)

The manual method is the easiest so we'll start with that, plus this method is the basis for the other methods as well.

Naturally, we'll be using org-mode for everything, because that's how Emacs people roll. The most basic method (and the method that I started off with) is just a simple org file. Make a file and put it wherever you want (I put mine in my school work directory, namely ~/school/11-12/schedule-org), and just have two main headings with "Old dates" and "Current dates". If you remember from my previous post on home directory organization I have two files holding my biweekly school schedule, so I have a function that inserts that into my buffer and changes the weekday names into date numbers. Then, I just use org-mode's task checklist functionality to add and keep track of events. Here is an example:

#+BEGIN_SRC ascii

Current dates

Sep 17 (wed)

Phys [2/2]

  • DONE Pendulum lab
  • DONE Make data matricies

Econ

ToK [1/1]

  • DONE Watch "Being There" by Peter Seller

Eng [1/1]

  • DONE Find three texts enhanced by images

Spn [2/2]

  • DONE Download classroom doc
  • DONE Worksheet

Math

#+END_SRC

Normally there would be all the days of the week with all the classes, so if I keep this buffer open all the time it doubles as a day schedule so I know what class I have next. Also I would have to keep all the subheadings that have tasks in them tabbed open all the time so that I can actually see them. The main disadvantage of this is that keeping all those dates with long-term tasks open takes up lots of vertical screen space, and that you have to keep track of your tasks manually and it's hard to see how much time you have left for each one.

org-capture

This is the easiest way (that I am aware of) of capturing tasks. First you set your org-capture-templates:

(setq org-capture-templates
            '(("t" "Task" entry (file+headline "/home/paul374/school/11-12/schedule.org" "Tasks")
            "* TODO %?\n %i\n")
            ("e" "Event" entry (file+headline "/home/paul374/school/11-12/schedule.org" "Events")
            "* %t %? %i\n")))
          

And bind org-capture to a key (the second line is not org-capture; I'll explain it):

(global-set-key (kbd "C-c c") 'org-capture)
            (global-set-key (kbd "C-c \"") 'org-ctrl-c-ctrl-c)
          

Thus, all I have to to is C-c c, then choose either t for a task (ie. homework or assignments) or e for an event (eg. tests, festivals, etc), and populate it with similar content to an entry in the manual method, and then C-c C-c to save!

The C-c " definition that I have there is to allow me to easily add tags to my captured content, since C-c C-c is usually tag but during capture that key finishes the capturing.

The only disadvantage that I can see with this method is that it clutters up your schedule file. All of your events are under the Event heading and all your tasks are under the Task heading, so when you are viewing or editing the file it'll just be a long, disorganized (technically chronological order of assignment) list of events and tasks. On the other hand, since we're going to use better methods of viewing your TODOs anyway, this isn't an issue. Yay!

Displaying TODOs

org-agenda

Org Agenda is a nice way of displaying all your tasks that you have for a given week. I think you can change the view to month or day, but the point is that the view is linear. I preferred (note that the original manual method is also linear) a linear "calendar" back in the day. You can do a keybinding and easily view all your tasks (for me it was <f6> then a) that you have to do for this week! Here's a sample:

Week-agenda (W10):
              Monday      7 March 2016 W10
              schedule:    1030 CAS Exit Interview                                     :cas:
              Tuesday     8 March 2016
              schedule:   Deadline:   DONE Physics question                           :phys:
              schedule:   Deadline:   DONE Econ draft                                 :econ:
              Wednesday   9 March 2016
              schedule:   Deadline:   DONE English read                                :eng:
              schedule:    Chem test                                                  :chem:
              Thursday   10 March 2016
              schedule:   Deadline:   DONE Econ final                                 :econ:
              Friday     11 March 2016
              schedule:   Deadline:   DONE Math corrections                           :math:
              Saturday   12 March 2016
              Sunday     13 March 2016
            

Before you can use it you have to set the org-agenda files:

(setq org-agenda-files '("/home/paul374/school/11-12/"))
              (setq org-default-notes-file "/home/paul374/school/11-12/schedule.org")
            

Then you can do keybindings:

(global-set-key (kbd "<f6>") 'org-agenda)
            

This method can work with both the manual and org-capture method of capturing, but since you're using this to view it you might as well use org-capture.

The main disadvantage of this method is that although it's nice and linear, it's a bit difficult to see how many weeks you have left to do a task, and it's hard to grasp what's going on in the next week.

emacs-calfw

So obviously the best method of displaying everything is in a calender... but the built-in calendar is puny and you can't see anything besides the dates, plus it only reads from Diary files but all our entries are in an org-file! So we just need a calendar that can display all our tasks and events in it. Simple!

I found emacs-calfw while browsing GitHub, and it solved all my problems. It can take input from org (and a bunch of other things too!), and it displays everything nicely in a calendar, which can switch between day, week, two week, and monthly view, and it resizes itself depending on the frame size! You can view details of the entries and change the mark (TODO/DONE), and it's just really really cool.

To get it, git clone https://github.com/kiwanami/emacs-calfw , add it to your path, and require it:

(add-to-list 'load-path "/home/paul374/.emacs.d/elisp/emacs-calfw")
              (require 'calfw-org)
            

Of course, keybindings are nice:

(global-set-key (kbd "<f8>") 'cfw:open-org-calendar)
            

And voilà!

I recommend reading the GitHub page for more information, since I was satisfied with the default settings.

Conclusion

For scheduling in Emacs, I definitely recommend org-capture for capturing and emacs-calfw for displaying your schedule. It's very similar to a handheld diary, where there is a calendar of entries and later there is a weekly view with details.

The manual methods may be good for starting out or if you're still learning org, and then it's a very simple jump to org agenda, though it would be advisable to switch to the other methods later.

On the other hand, it's your Emacs, not mine. This is what I found best and what I recommend.

Have fun!

Extra

I'm hoping to post at least two times a week, not on specific days but just two times a week. Maybe one about IBEmacs and one on a tutorial or cool stuff that I'm learning...? Who knows.

Also I'm going to be posting my notes online soon. Maybe.

And Disqus works! Yay! I'm liking this new blog. It makes my site more lively.


2016-03-13 Paul Elder

Comments

comments powered by Disqus