The git-log -L option traces the evolution of the line range given by “<start>,<end>” and it is not really convenient to use from the command line. Fortunately when the magit-file-mode is active in an emacs buffer, you can select a region and use C-c M-g l to show which commits modified it.
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:
Backporting with magit
Ceph uses GF-Complete stable branch (v1). Modifications required by Ceph were proposed to the master branch. While waiting for the corresponding pull request to be reviewed, a temporary branch (v1-ceph) was created in the Ceph name space for immediate use. The changes have been accepted in master, they are to be backported to v1
Continue reading “Backporting with magit”
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”