SiteMap Search ElispArea HowTo Glossary RecentChanges News Problems Suggestions

ShadyTrees

Difference between revision 8 and current revision

Summary: Rollback to 2008-09-05 00:16 UTC

No diff available.

Order

(Originally from The Dark Balloon) This builds on the work of others:

    ;; File names in title bars with a twist: Replace HOME with ~ while
    ;; still working with Emacs' / and HOME's \. And it works for
    ;; Windows-style HOMEs.
    (setq frame-title-format 
          '(:eval 
            (if buffer-file-name
                (replace-regexp-in-string
                 "\\\\" "/"
                 (replace-regexp-in-string 
                  (regexp-quote (getenv "HOME")) "~"
                  (convert-standard-filename buffer-file-name)))
              (buffer-name))))

As a Windows user with ClipDiary installed:

    ;; Damn it, stop messing with my clipboard.
    (global-set-key "\C-c\C-d" 'delete-region)
    (add-hook 'minibuffer-setup-hook
              '(lambda ()
                 (define-key minibuffer-local-map "\C-c\C-d"
                   '(lambda ()
                      "Delete everything in minibuffer"
                      (interactive)
                      (delete-minibuffer-contents)))))

global-set-keys

(Originally from The Dark Balloon) Instead of countless global-set-key calls, use this:

    (defun global-set-keys (alist) nil
      (mapcar (lambda (a) nil
                (setcar a (read-kbd-macro (car a)))
                (apply 'global-set-key a)) alist))

An example of how it works:

    (global-set-keys
     '(
       ("<f7>" markdown)
       ("<f9>" svn-status)
       ("C-c C-d" delete-region)
       ("C-c C-f" auto-fill-mode)
       ("C-x C-k" (lambda () (interactive) (kill-buffer nil)))
       ("C-z" nil)
       ("M-d" delete-word)
       ("C-c C-b" electric-buffer-list)
       ("C-c C-r" xsteve-ido-choose-from-recentf)
       ("C-c C-m" make-directory)
       ("C-c C-<return>" unfill-paragraph)
       ("C-?" redo)
       ("C-<backspace>" backward-delete-word)
       ("M-x" ido-execute)
       ))

Addenda

Welcome to the wiki! (this is a homepage right?) --PierreGaston

Yes, absolutely. Thanks for the category tag. --ShadyTrees

Category