Skip to content

vlnn/alfred-org-mode-workflow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preface

This is fork of great workflow made by Alexander Gogl. @vlnn just stripped it off most of the extras, fixed a tiny bug, and also did a small reconfiguration. But even though the code is mostly the same, structurally repo got pretty far away from its ancestor. Thus I don’t expect this version to be merged into the original repo. Please pay a visit to the original repo.

What’s this is about

Easily append a todo or a note or so-called inspiration to an org-mode file with a short and convenient command in Alfred. The workflow requires Alfred’s “Powerpack.”

Features

The command appends a second level heading to a user defined .org file and puts all what follows :: into the body of the heading (see figures below).

Type todo to add a todo:

images/todo-capture.png

images/todo-notification.png

Type note to add a note:

images/note-capture.png

images/note-notification.png

The added notes and todos are divided into title and content:

images/result.png

Relative dates (Monday, tuesday, tomorrow, morgen, freitag) in the content part of the entry are converted into orgmode specific date formats <2015-09-11 Fri>.

images/date_replacement-01.png

images/date_replacement-02.png

You can also use relative dates to add a SCHEDULE or DEADLINE by using the following syntax, where S: converts the following date to a SCHEDULE date, and DL: to a DEADLINE. Note: the conversion only works if the pattern (S: or DL:) is followed by a date without a space between the pattern and the date.

~~~ todo Title of the workflow:: S:tomorrow DL:monday ~~~

By default, the date of creation is added to a property car (you can disable it inside Alfred; see Installation below):

images/creation_date.png

Installation and customising variables

This workflow is integration between running emacs server and user input. That’s why there are actually two main running parts:

Alfred side

Double klick on org-mode-capture.alfredworkflow to add it to Alfred’s set of workflows. Then you need to set up the workflow by customising the workflow variables with Alfred’s Configure Workflow... command (see figure below). It is obligatory to set at least the path to your inbox.org files. The non-obligatory variables have sane defaults, but can be customised by your liking: if you prefer -- as a title-content separator, then you can change it as well.

images/user_configuration.png

If you want to recompile the workflow you should be able to do it with `make compile`, which will update/create new org-mode-capture.alfredworflow file, that you may use as shown above.

Emacs side

  1. You should have your emacs server running, meanining if you enter `brew services` to your terminal you can see something like this:
emacs-plus@28 started user  .../LaunchAgents/[email protected]

If you don’t see emacs-plus or other services starting with emacs you have to install it.

  1. Add next magic elisp piece of code into your config.el :
(defun make-orgcapture-frame ()
  "Create a new frame and run org-capture."
  (interactive)
  (make-frame '((name . "remember") (width . 80) (height . 16)
                (top . 400) (left . 300)
                (font . "-apple-Monaco-medium-normal-normal-*-13-*-*-*-m-0-iso10646-1")))

  (select-frame-by-name "remember")
  (org-capture))

This will add a function `make-orgcapture-frame` to your emacs environment, which will be called by the python script, which will be called by Alfred. Don’t worry – it should just work. If not please ping me in issues, and I will document the process of the setup more thoroughly.

Reporting bugs

If you encounter a bug, please enable Alfred’s debugging mode and post the error message.

images/debugging.png

About

An org-mode-capture workflow for Alfred

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.5%
  • Makefile 3.5%