gnome3 / libnotify notification for org-mode appointments

Org mode appointments

can be notified 12 minutes before with libnotify

by adding the following to the .emacs:

; Desktop notifications
(setq alert-default-style 'libnotify)
(setq appt-disp-window-function (lambda (min-to-app new-time appt-msg)
                                                         (alert appt-msg)))
(setq appt-delete-window-function (lambda ()))
; Rebuild the reminders everytime the agenda is displayed
(add-hook 'org-agenda-finalize-hook (lambda () (org-agenda-to-appt t)))
; Run once when Emacs starts
(org-agenda-to-appt t)
; Activate appointments so we get notifications
(appt-activate t)

Continue reading “gnome3 / libnotify notification for org-mode appointments”

Global shortcuts for emacs org-mode on Ubuntu

Let say F7 is bound, in emacs, to the org-clock-out function of Org Mode as a shortcut to quickly stop the current clock accumulating the time spent on a given task.

(global-set-key (kbd "<f7>") 'org-clock-out)

F7 can be sent to the emacs window via the command line with

xdotool search --name 'emacs@fold' key F7

If emacs needs to be displayed to the user (in case it was iconified or on another desktop), the windowactivate command can be added:

xdotool search --name 'emacs@fold' windowactivate key F7

On Ubuntu 14.04 this command can be bound to the F7 regardless of which window has focus, via the shortcuts tab of the keyboard section of System Settings as shown below:

tip to review a large patch with magit and ediff

When reviewing a large changeset with magit, it can be difficult to separate meaningfull changes from purely syntactic substitutions. Using ediff to navigate the patch highlights the words changed between two lines instead of just showing a line removed and another added.

In the above screenshot the oid change to oid.hobj is a syntactic change where the new block after oid.generation != ghobject_t::NO_GEN deserves more attention.
Continue reading “tip to review a large patch with magit and ediff”