The daemon feature of Emacs is great. But when should the daemon be started?
At one time I used an '@reboot' line in my crontab. But when you want to use things like Tramp mode (for editing files on remote servers transparently), you very quickly wish that emacs could talk to your ssh-agent.
So if you accept that you will be running a desktop environment (not always true), you can add the daemon to your equivalent of "...
Today I improved the function I was using to toggle full screen in GNU Emacs.
(defun toggle-fullscreen (&optional f) (interactive) (let ((current-value (frame-parameter nil 'fullscreen))) (set-frame-parameter nil 'fullscreen (if (equal 'fullboth current-value) (if (boundp 'old-fullscreen) old-fullscreen nil) (progn (setq old-fullscreen current-value) 'fullboth))))) (global-set-key [f11] 'toggle-fullscreen) The previous function would always restore the frame to "normal" state, even if Emacs was previously maximized. This one makes it behave more like, say, Epiphany or Totem....
Flymake is an emacs minor mode that runs a syntax check tool over source files as you write them, on the fly. Essentially it calls the compiler for the relevant language and then parses the warnings.
Because this is so obviously useful, I have it turned on by default in .emacs: ; Highlight syntax errors (require 'flymake) (add-hook 'find-file-hook 'flymake-find-file-hook) Recall also that I use emacs to view page source in Epiphany....
It turns out to be possible to persuade emacs and epiphany to play nicely together. Opening URLs in Epiphany from Emacs Sometimes Emacs presents you with clickable hyperlinks (in info documentation, perhaps).
To customize the browser in which these are opened, I am using the following in .emacs:
(setq browse-url-browser-function 'browse-url-generic browse-url-generic-program "gnome-open") There are also specific epiphany-related functions, but I'm using the default gnome program for the moment....
My attempt to learn to use emacs continues. Today's discovery: I can enable emacs-like keybindings in GTK text fields (well, Readline-like) - this includes form fields in Epiphany.
I have remapped C-w to backward-kill-word, to be more like Readline. I'm working up to writing some lisp to make common tasks easier... like writing blog entries, perhaps. I'll need to synchronize my .emacs files somehow... but I need to make more of an effort to use emacs over vim at work....
Three weeks ago I swapped capslock and Ctrl on all my usual systems, much to the chagrin of Daniel when he foolishly tried to use my keyboard. I'm now quite happy with the positioning of Ctrl - it was surprisingly easy to get used to.
It is not a coincidence that this is Tip #1 on various lists of ways to use emacs more effectively. I find myself wanting to ditch vim… perhaps this is just asking for a holy war....