diff --git a/.emacs b/.emacs index 8a43941..cfb3b88 100644 --- a/.emacs +++ b/.emacs @@ -642,6 +642,7 @@ ;; 20181004.01 ;; - added projectile and config ;; - added hydra and config (for org tables and projectile) +;; - finished org table hydra ;; ** TODO @@ -3639,6 +3640,25 @@ intended to be #'> to support reverse sorting." (delete-region beg end) (org-table-align))) +(defun tvd-del-org-table-row () + "Delete a table row's contents" + (interactive) + (org-beginning-of-line 1) + (kill-line) + (org-table-insert-row nil)) + +(defun tvd-del-org-table-col () + "Delete a table column's contents, keep heading as is" + (interactive) + (let ((head (org-table-get 1 nil))) + (org-table-delete-column) + (re-search-forward "|") + (org-table-insert-column) + (org-table-goto-col-beginning) + (insert head) + (org-table-align)) + ) + ;; Sometimes I need to copy whole columns too: ;; via [[https://emacs.stackexchange.com/questions/28270/how-to-select-and-copy-a-column-of-an-org-table-without-rectangle-selection][stackoverflow]] @@ -3706,14 +3726,14 @@ intended to be #'> to support reverse sorting." " ^Sort by^ ^Transform to^ ^Copy/Del what^ ^Modify^ ^Outside Org^ ^^^^^^^^---------------------------------------------------------------------------------------------------------- -_sa_: alphanumeric _tc_: CSV _cl_: Copy Column _cd_: Delete Column _ot_: Table to Org Mode -_sA_: -alphanumeric _te_: Excel _cc_: Copy Cell _ci_: Insert Column _oe_: Enable Org-Tbl Mode -_si_: ip _tl_: Latex _dd_: Delete Cell _rd_: Delete Row -_sI_: -ip _th_: HTML _dc_: Delete Column _ri_: Insert Row -_sn_: numeric _tt_: Tab _dr_: Delete Row _li_: Insert Line -_sN_: -numeric _ta_: Aligned ^^ _tr_: Transpose Table -_st_: time -_sT_: -time ^^ ^^ ^^ _q_: Cancel +_sa_: alphanumeric _tc_: CSV _cl_: Copy Column _ic_: Insert Column _ot_: Table to Org Mode +_sA_: -alphanumeric _te_: Excel _cc_: Copy Cell _ir_: Insert Row _oe_: Enable Org-Tbl Mode +_si_: ip _tl_: Latex ^^ _il_: Insert Line +_sI_: -ip _th_: HTML _dd_: Delete Cell _tr_: Transpose Table +_sn_: numeric _tt_: Tab _dc_: Delete Column +_sN_: -numeric _ta_: Aligned _dr_: Delete Row +_st_: time ^^ _kr_: Kill Row +_sT_: -time ^^ _kc_: Kill Column ^^ _q_: Cancel " @@ -3736,14 +3756,14 @@ _sT_: -time ^^ ^^ ^^ ("cl" org-table-copy-col ) ("cc" tvd-copy-org-table-cell) ("dd" org-table-blank-field) - ("dr" nil) - ("dc" nil) + ("dr" tvd-del-org-table-row) + ("dc" tvd-del-org-table-col) + ("kc" org-table-delete-column) + ("kr" org-table-kill-row) - ("cd" org-table-delete-column) - ("ci" org-table-insert-column) - ("rd" org-table-kill-row) - ("ri" org-table-insert-row) - ("li" org-table-hline-and-move) + ("ic" org-table-insert-column) + ("ir" org-table-insert-row) + ("il" org-table-hline-and-move) ("tr" org-table-transpose-table-at-point) ("ot" tablify ) @@ -3753,6 +3773,7 @@ _sT_: -time ^^ ^^ ^^ ;; allow me to insert org tables everywhere on request (defalias 'table 'hydra-org-tables/body) +(defalias 't 'hydra-org-tables/body) (global-set-key (kbd "C-c t") 'hydra-org-tables/body) ;; *** org mode slideshows diff --git a/emacs.html b/emacs.html index 8c44c03..d5d5581 100644 --- a/emacs.html +++ b/emacs.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -232,207 +232,209 @@ for the JavaScript code in this tag.

Table of Contents

-Toms Emacs Config - portable - version (20181001.01) -*-emacs-lisp-*- +Toms Emacs Config - portable - version (20181004.01) -*-emacs-lisp-*-

-
-

1 Introduction

+
+

1 Introduction

This is my emacs config, it is more than twenty years old. It @@ -486,11 +488,11 @@ outshine-to-html, written by myself, see below.

-
-

2 Config Log, Trivia, Notes, Changes

+
+

2 Config Log, Trivia, Notes, Changes

-
-

2.1 Changelog

+
+

2.1 Changelog

20160420.03: @@ -1606,18 +1608,28 @@ didn't know about it before

-20181001.01 +20181004.01

    -
  • fixed magit log dates
  • +
  • added projectile and config
  • +
  • added hydra and config (for org tables and projectile)
  • +
  • finished org table hydra
-
-

2.2 TODO

+
+

2.2 TODO

    +
  • check dired hydra
  • +
  • complete org table hydra
  • +
+ +

+Old +

+
-
-

2.3 Parking Lot / Snippets

+
+

2.3 Parking Lot / Snippets

Snippets which maybe of use in the future

-
-

2.3.1 buffer-local hook

+
+

2.3.1 buffer-local hook

(with-current-buffer (get-buffer "scratch") @@ -1652,8 +1664,8 @@ Snippets which maybe of use in the future

-
-

2.4 .emacs config version

+
+

2.4 .emacs config version

My emacs config has a version (consisting of a timestamp with a @@ -1661,7 +1673,7 @@ serial), which I display in the mode line. So I can clearly see, if I'm using an outdated config somewhere.

-
(defvar tvd-emacs-version "20181001.01")
+
(defvar tvd-emacs-version "20181004.01")
 
@@ -1670,11 +1682,11 @@ I'm using an outdated config somewhere.
-
-

3 System Specifics

+
+

3 System Specifics

-
-

3.1 Global init file+dir vars, portable

+
+

3.1 Global init file+dir vars, portable

  • added dev function which opens a new development frame
  • @@ -1712,8 +1724,8 @@ all modes and extensions are located here
-
-

3.2 Shortcut Mode - mode specific help about my own customizations

+
+

3.2 Shortcut Mode - mode specific help about my own customizations

FIXME: complete @@ -1724,7 +1736,7 @@ all modes and extensions are located here (add-to-list 'shortcut-alist '(mode . help))) (defun shortcut () - (interactive) + (interactive) (message (cdr (assoc major-mode 'shortcut-alist))))

@@ -1732,8 +1744,8 @@ all modes and extensions are located here
-
-

3.3 Fontlock-mode - use syntax highlighting on graphical displays

+
+

3.3 Fontlock-mode - use syntax highlighting on graphical displays

look: emacswiki @@ -1750,8 +1762,8 @@ look: emacswiki


-
-

3.4 line-cursor in console

+
+

3.4 line-cursor in console

better visibility of cursor in console sessions @@ -1767,8 +1779,8 @@ better visibility of cursor in console sessions


-
-

3.5 Backup Config

+
+

3.5 Backup Config

I save backup files in a central location below the init dir, that @@ -1839,8 +1851,8 @@ This is system specific and only matches special host names.


-
-

3.6 console backspace fix

+
+

3.6 console backspace fix

make backspace work in console sessions @@ -1853,8 +1865,8 @@ make backspace work in console sessions


-
-

3.7 hide menu- and tool-bar

+
+

3.7 hide menu- and tool-bar

I prefer a bare bones emacs window without any distractions, so turn them off. @@ -1870,8 +1882,8 @@ I prefer a bare bones emacs window without any distractions, so turn them off.


-
-

3.8 stay silent on startup

+
+

3.8 stay silent on startup

(setq initial-scratch-message "")
@@ -1884,8 +1896,8 @@ I prefer a bare bones emacs window without any distractions, so turn them off.
 
-
-

3.9 y means yes

+
+

3.9 y means yes

y is shorter than yes and less error prone. @@ -1898,8 +1910,8 @@ y is shorter than yes and less error prone.


-
-

3.10 show col in modeline

+
+

3.10 show col in modeline

very useful to know current column @@ -1912,8 +1924,8 @@ very useful to know current column


-
-

3.11 file or buffer in title

+
+

3.11 file or buffer in title

this can be seen in xmobar @@ -1927,8 +1939,8 @@ this can be seen in xmobar


-
-

3.12 avoid invalid files

+
+

3.12 avoid invalid files

(setq require-final-newline t)
@@ -1938,8 +1950,8 @@ this can be seen in xmobar
 
-
-

3.13 prepare load-path

+
+

3.13 prepare load-path

where to look for extensions: @@ -1967,15 +1979,15 @@ modules


-
-

3.14 byte-compile all of them, if needed

+
+

3.14 byte-compile all of them, if needed

handy function to recompile all lisp files

(defun recompile-el()
-  (interactive)
+  (interactive)
   (byte-recompile-directory tvd-lisp-dir 0))
 
@@ -1983,8 +1995,8 @@ handy function to recompile all lisp files
-
-

3.15 increase fontsize with ctrl-+ and ctrl--

+
+

3.15 increase fontsize with ctrl-+ and ctrl--

I use those bindings everywhere (firefox, terminal, etc), and in @@ -1994,12 +2006,12 @@ emacs as well.

(defun tvd-global-font-size-bigger ()
   "Make font size larger."
-  (interactive)
+  (interactive)
   (text-scale-increase 0.5))
 
 (defun tvd-global-font-size-smaller ()
   "Change font size back to original."
-  (interactive)
+  (interactive)
   (text-scale-increase -0.5))
 
 (global-set-key (kbd "C-+")             'tvd-global-font-size-bigger) ; Schrift groesser
@@ -2010,11 +2022,11 @@ emacs as well.
 
-
-

3.16 WINDOW management stuff

+
+

3.16 WINDOW management stuff

-
-

3.16.1 resize windows by keyboard

+
+

3.16.1 resize windows by keyboard

Very practical: resize windows easily. @@ -2031,8 +2043,8 @@ hit C-c C-r then use cursor keys to resize, <ret> to finish

-
-

3.16.2 switch windows with MS-WINDOWS key

+
+

3.16.2 switch windows with MS-WINDOWS key

(require 'windmove)
@@ -2043,8 +2055,8 @@ hit C-c C-r then use cursor keys to resize, <ret> to finish
 
-
-

3.16.3 M-o switch window or buffer

+
+

3.16.3 M-o switch window or buffer

via mbork @@ -2060,7 +2072,7 @@ and it only works with the 2 most recent visited buffers.

(defun other-window-or-switch-buffer ()
   "Call `other-window' if more than one window is visible, switch
 to next buffer otherwise."
-  (interactive)
+  (interactive)
   (if (one-window-p)
       (switch-to-buffer nil)
     (other-window 1)))
@@ -2086,7 +2098,7 @@ exchange left with right buffer (or up and down), love it.
 
(defun flip-windows ()
   "Rotate your windows"
-  (interactive)
+  (interactive)
   (cond ((not (> (count-windows)1))
          (message "You can't rotate a single window!"))
         (t
@@ -2122,12 +2134,12 @@ Use only in  X11 emacs - setting M-O inside console  causes <up> and
 
-
-

3.16.4 Split window to 4 parts

+
+

3.16.4 Split window to 4 parts

(defun tvd-quarter-windows ()
-  (interactive)
+  (interactive)
   (split-window-vertically)
   (split-window-horizontally)
   (windmove-down)
@@ -2141,8 +2153,8 @@ Use only in  X11 emacs - setting M-O inside console  causes <up> and
 
-
-

3.16.5 Remember and Restore Window Configurations - winner mode

+
+

3.16.5 Remember and Restore Window Configurations - winner mode

(winner-mode 1)
@@ -2157,8 +2169,8 @@ keybindings: C-c right   - winner-redo
 
-
-

3.17 re-read a modified buffer

+
+

3.17 re-read a modified buffer

F5 == reload file if it has been modified by another process, shift @@ -2171,7 +2183,7 @@ because Xmonad file and not requesting for confirmation. When the current buffer is modified, the command refuses to revert it, unless you specify the optional argument: force-reverting to true." - (interactive "P") + (interactive "P") ;;(message "force-reverting value is %s" force-reverting) (if (or force-reverting (not (buffer-modified-p))) (revert-buffer :ignore-auto :noconfirm) @@ -2183,8 +2195,8 @@ because Xmonad


-
-

3.18 global TAB/Indent config

+
+

3.18 global TAB/Indent config

I use spaces everywhere but Makefiles. If I encounter TABs I @@ -2197,17 +2209,17 @@ files, I block them.

-
(setq-default indent-tabs-mode nil)
-(setq-default tab-width 4)
+
(setq-default indent-tabs-mode nil)
+(setq-default tab-width 4)
 (setq indent-line-function 'insert-tab)
-(setq tab-stop-list (quote (4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120)))
+(setq tab-stop-list (quote (4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120)))
 (setq tab-always-indent 'complete) ; /FIXME/: doesnt work in cperl-mode
 (setq show-trailing-whitespace t)
 
 (defun indent-buffer ()
   ;; Author: Mathias Creutz
   "Re-Indent every line in the current buffer."
-  (interactive)
+  (interactive)
   (indent-region (point-min) (point-max) nil))
 
@@ -2216,7 +2228,7 @@ files, I block them. Use normal tabs in makefiles

-
(add-hook 'makefile-mode-hook '(lambda() (setq indent-tabs-mode t)))
+
(add-hook 'makefile-mode-hook '(lambda() (setq indent-tabs-mode t)))
 
@@ -2224,8 +2236,8 @@ Use normal tabs in makefiles
-
-

3.19 handy aliases

+
+

3.19 handy aliases

M-x q r <ret> is short enough for me, no need for key bindings for @@ -2256,8 +2268,8 @@ those


-
-

3.20 various settings

+
+

3.20 various settings

point stays while scrolling @@ -2271,7 +2283,7 @@ point stays while scrolling no comment margins

-
(setq-default comment-column 0)
+
(setq-default comment-column 0)
 
@@ -2310,8 +2322,8 @@ I'm grown up!
-
-

3.21 load imenu

+
+

3.21 load imenu

(define-key global-map [C-down-mouse-2] 'imenu)
@@ -2321,8 +2333,8 @@ I'm grown up!
 
-
-

3.22 copy/paste Config

+
+

3.22 copy/paste Config

Related: @@ -2389,8 +2401,8 @@ marked region automatically copied, also on win


-
-

3.23 use more mem

+
+

3.23 use more mem

are you from the past? @@ -2403,8 +2415,8 @@ are you from the past?


-
-

3.24 better file name completion

+
+

3.24 better file name completion

Complete filenames case insensitive and ignore certain files during completion. @@ -2434,8 +2446,8 @@ via -

3.25 abbreviations

+
+

3.25 abbreviations

Do I really need those anymore? Added ca 1999… @@ -2465,8 +2477,8 @@ do NOT ask to save abbrevs on exit

-
-

3.26 meaningful names for buffers with the same name

+
-
-

3.27 packages

+
+

3.27 packages

I dont need it all the time and only for experimentation, so lets @@ -2493,7 +2505,7 @@ only use melpa on demand

(defun toggle-melpa()
-  (interactive)
+  (interactive)
   (require 'package)
   (add-to-list 'package-archives
                '("melpa" . "http://melpa.org/packages/"))
@@ -2508,8 +2520,8 @@ only use melpa on demand
 
-
-

3.28 My own global variables

+
+

3.28 My own global variables

narrowed fringe background @@ -2522,11 +2534,11 @@ narrowed fringe background


-
-

3.29 More scratch space

+
+

3.29 More scratch space

-
-

3.29.1 Text scratch

+
+

3.29.1 Text scratch

Sometimes I need a text mode scratch buffer while scratch is @@ -2542,8 +2554,8 @@ this never gets deleted, but cleaned instead.

-
-

3.29.2 Autoscratch

+
+

3.29.2 Autoscratch

use autoscratch otherwise @@ -2574,8 +2586,8 @@ use autoscratch otherwise

-
-

3.29.3 Persistent Scratch

+
+

3.29.3 Persistent Scratch

I also like to be scratch buffers persistent with @@ -2597,8 +2609,8 @@ I also like to be scratch buffers persistent with

-
-

3.30 Recenter config

+
+

3.30 Recenter config

via abo abo @@ -2619,13 +2631,13 @@ I think this is a recenter calculation bug.

-
-

4 Global Key Bindings

+
+

4 Global Key Bindings


-
-

4.1 c-h != delete

+
+

4.1 c-h != delete

(keyboard-translate ?\C-h ?\C-?)
@@ -2636,8 +2648,8 @@ I think this is a recenter calculation bug.
 
-
-

4.2 general keys (re-)mappings

+
+

4.2 general keys (re-)mappings

(global-set-key (kbd "C-s") 'isearch-forward-regexp) @@ -2667,8 +2679,8 @@ I think this is a recenter calculation bug.


-
-

4.3 display a list of my own global key bindings and aliases

+
+

4.3 display a list of my own global key bindings and aliases

via emacswiki @@ -2683,7 +2695,7 @@ more help with: describe-function occur-mode

(defun occur-mode-clean-buffer ()
   "Removes all commentary from the *Occur* buffer, leaving the
  unadorned lines."
-  (interactive)
+  (interactive)
   (if (get-buffer "*Occur*")
       (save-excursion
         (set-buffer (get-buffer "*Occur*"))
@@ -2699,7 +2711,7 @@ more help with: describe-function occur-mode
     (message "There is no buffer named \"*Occur*\".")))
 
 (defun show-definition(REGEX)
-  (interactive)
+  (interactive)
   (let ((dotemacs-loaded nil)
         (occur-b "*Occur*")
         (occur-c ""))
@@ -2729,11 +2741,11 @@ more help with: describe-function occur-mode
         (kill-buffer ".emacs"))))
 
 (defun show-keys()
-  (interactive)
+  (interactive)
   (show-definition "^(global-set-key"))
 
 (defun show-aliases()
-  (interactive)
+  (interactive)
   (show-definition "^(defalias"))
 
 (defalias 'sk        'show-keys)
@@ -2745,13 +2757,13 @@ more help with: describe-function occur-mode
 
-
-

5 Productivity Functions

+
+

5 Productivity Functions


-
-

5.1 goto line with tmp line numbers

+
+

5.1 goto line with tmp line numbers

I stole this somewhere, as far as I remember, emacswiki, however, I @@ -2761,7 +2773,7 @@ always had F7 for goto-line

(defun goto-line-with-feedback ()
   "Show line numbers temporarily, while prompting for the line number input"
-  (interactive)
+  (interactive)
   (unwind-protect
       (progn
         (linum-mode 1)
@@ -2775,8 +2787,8 @@ always had F7 for goto-line
 
-
-

5.2 invert fore- and background

+
+

5.2 invert fore- and background

Sometimes when sitting in a very dark enviroment, my usual light @@ -2799,7 +2811,7 @@ invert everything, reverse it when called again

(defun tvd-invert()
   "invert fg-bg"
-  (interactive)
+  (interactive)
   (invert-face 'default)
   (invert-face 'mode-line)
   (set-face-attribute 'fringe nil :inverse-video tvd-invert-state)
@@ -2819,8 +2831,8 @@ fast
 
-
-

5.3 Some useful bindings for Home and End keys Hit the key once to

+
+

5.3 Some useful bindings for Home and End keys Hit the key once to

Go to the beginning/end of a line, hit it twice in a row to go to @@ -2837,7 +2849,7 @@ Uses a function of viking-mode to establish key repeats, see below. "Go to beginning of line/window/buffer. First hitting key goes to beginning of line, second in a row goes to beginning of window, third in a row goes to beginning of buffer." - (interactive) + (interactive) (let* ((key-times (viking-last-key-repeats))) (cond ((eq key-times 3) @@ -2854,7 +2866,7 @@ Uses a function of viking-mode to establish key repeats, see below. "Go to end of line/window/buffer. First hitting key goes to end of line, second in a row goes to end of window, third in a row goes to end of buffer." - (interactive) + (interactive) (let* ((key-times (viking-last-key-repeats))) (cond ((eq key-times 3) @@ -2884,8 +2896,8 @@ This is the most natural use for those keys


-
-

5.4 percent function

+
+

5.4 percent function

by Jens Heunemann: jump to percent position into current buffer @@ -2893,7 +2905,7 @@ by Jens Heunemann: jump to percent position into current buffer

(defun goto-percent (p) ;goto Prozentwert (0-100): F8
-  (interactive "nProzent: ")
+  (interactive "nProzent: ")
   (if (> (point-max) 80000)
       (goto-char (* (/ (point-max) 100) p)) ;Ueberlauf vermeiden: (max/100)*p
     (goto-char (/ (* p (point-max)) 100))) ;Rundungsfehler verm.: (max*p)/100
@@ -2906,8 +2918,8 @@ by Jens Heunemann: jump to percent position into current buffer
 
-
-

5.5 Simulate vi's % function

+
+

5.5 Simulate vi's % function

There's not a lot about vi[m] I like, but jumping with % to a @@ -2927,7 +2939,7 @@ just insert a literal ?%. Only make sense if bound to %.

(defun jump-paren-match-or-insert-percent (arg)
   "Go to  the matching  parenthesis if on  parenthesis. Otherwise
 insert %. Mimics vi style of % jumping to matching brace."
-  (interactive "p")
+  (interactive "p")
   (cond ((looking-at "\\s\(\\|\{\\|\\[") (forward-list 1) (backward-char 1))
         ((looking-at "\\s\)\\|\}\\|\\]") (forward-char 1) (backward-list 1))
         (t (insert "%"))))
@@ -2939,8 +2951,8 @@ just insert a literal ?%. Only make sense if bound to %.
 
-
-

5.6 Move region

+
+

5.6 Move region

Mark a region, then use M-up|down to move it around @@ -3018,7 +3030,7 @@ code from defun move-lines-up (n) "Moves the current line or, if region is actives, the lines surrounding region, up by N lines, or 1 line if N is nil." - (interactive "p") + (interactive "p") (if (eq n nil) (setq n 1)) (move-lines--internal (- n))) @@ -3026,7 +3038,7 @@ code from defun move-lines-down (n) "Moves the current line or, if region is actives, the lines surrounding region, down by N lines, or 1 line if N is nil." - (interactive "p") + (interactive "p") (if (eq n nil) (setq n 1)) (move-lines--internal n)) @@ -3039,8 +3051,8 @@ code from -

5.7 comment-uncomment region with one key binding

+
+

5.7 comment-uncomment region with one key binding

via stackoverflow @@ -3048,7 +3060,7 @@ via stackoverflow

(defun comment-or-uncomment-region-or-line ()
   "Comments or uncomments the region or the current line if there's no active region."
-  (interactive)
+  (interactive)
   (let (beg end)
     (if (region-active-p)
         (setq beg (region-beginning) end (region-end))
@@ -3062,8 +3074,8 @@ via stackoverflow
 
-
-

5.8 search for symbol at point

+
+

5.8 search for symbol at point

Simulate the # function of vi, marks the symbol at point, C-s then @@ -3080,7 +3092,7 @@ via ergomacs 'word' here is A to Z, a to z, and hyphen and underline, independent of syntax table. URL `[[http://ergoemacs.org/emacs/modernization_isearch.html'][ergomacs]] Version 2015-04-09" - (interactive) + (interactive) (let ( xahp1 xahp2 ) (if (use-region-p) (progn @@ -3107,8 +3119,8 @@ via ergomacs


-
-

5.9 Window Margin

+
+

5.9 Window Margin

Kinda screen reader for the poor. I use this sometimes with info @@ -3122,7 +3134,7 @@ left+right margin on demand (but nothing else)

(defun margin(m)
   "set left and right margins for better readability"
-  (interactive "nEnter Margin (0 to disable) [0-9]+: ")
+  (interactive "nEnter Margin (0 to disable) [0-9]+: ")
   (set-window-margins (car (get-buffer-window-list (current-buffer) nil t)) m m) ;; set immediately
   (setq left-margin-width m) ;; persist until reset
   (setq right-margin-width m)
@@ -3134,8 +3146,8 @@ left+right margin on demand (but nothing else)
 
-
-

5.10 Fill and justify a paragraph

+
+

5.10 Fill and justify a paragraph

this is just a shortcut for: @@ -3149,7 +3161,7 @@ idea via:

(defun tvd-fill-and-justify-or-unfill()
-  (interactive)
+  (interactive)
   (let ((fill-column
          (if (eq last-command 'tvd-fill-and-justify-or-unfill)
              (progn (setq this-command nil)
@@ -3164,8 +3176,8 @@ idea via: 
-

5.11 Make a read-only copy of the current buffer

+
+

5.11 Make a read-only copy of the current buffer

I just create a new read-only buffer and copy the contents of the @@ -3190,7 +3202,7 @@ a file is not maintained via VC anyway. (defun copy-buffer-read-only() "Create a read-only copy of the current buffer" - (interactive) + (interactive) (let ((old-buffer (current-buffer)) (new-buffer-name (get-copy-buffer-name))) (progn @@ -3214,8 +3226,8 @@ a file is not maintained via VC anyway.


-
-

5.12 Cleanup, close all windows and kill all buffers

+
+

5.12 Cleanup, close all windows and kill all buffers

From time to time I get annoyed by the many dozen buffers @@ -3230,7 +3242,7 @@ setup accidentally.

(defun kill-all-buffers ()
   "Kill all buffers, clean up, close all windows"
-  (interactive)
+  (interactive)
   (when (y-or-n-p "Close all windows and kill all buffers?")
     (delete-other-windows)
     (clean-buffer-list)
@@ -3248,8 +3260,8 @@ setup accidentally.
 
-
-

5.13 Cleanup current buffer

+
-
-

5.14 Remove Umlauts and other crab in current buffer

+
+

5.14 Remove Umlauts and other crab in current buffer

converts: @@ -3294,7 +3306,7 @@ used in dired buffers to cleanup filenames by german windows users.

(defun umlaute-weg()
-  (interactive)
+  (interactive)
   (let ((umlaute '((Ü . Ue)
                    (Ä . Ae)
                    (Ö . Oe)
@@ -3324,8 +3336,8 @@ used in dired buffers to cleanup filenames by german windows users.
 
-
-

5.15 Better newline(s)

+
+

5.15 Better newline(s)

-
-

5.16 Mouse Rectangle

+
+

5.16 Mouse Rectangle

There's not much use for the mouse in emacs, but this gimick is @@ -3381,7 +3393,7 @@ via stackoverflow

(defun mouse-start-rectangle (start-event)
-  (interactive "e")
+  (interactive "e")
   (deactivate-mark)
   (mouse-set-point start-event)
   (rectangle-mark-mode +1)
@@ -3399,17 +3411,17 @@ via stackoverflow
 
-
-

5.17 DOS <=> UNIX conversion helpers

+
+

5.17 DOS <=> UNIX conversion helpers

(defun dos2unix ()
-  (interactive)
+  (interactive)
   (set-buffer-file-coding-system 'utf-8-unix)
   (message (format "converted current buffer to %s" buffer-file-coding-system)))
 
 (defun unix2dos ()
-  (interactive)
+  (interactive)
   (set-buffer-file-coding-system 'utf-8-dos)
   (message (format "converted current buffer to %s" buffer-file-coding-system)))
 
@@ -3417,8 +3429,8 @@ via stackoverflow
-
-

5.18 helper do add the same thing to multiple mode hooks

+
+

5.18 helper do add the same thing to multiple mode hooks

via stackoverflow @@ -3436,8 +3448,8 @@ usage samples below.

-
-

5.19 helper to catch load errors

+
+

5.19 helper to catch load errors

Try to eval 'fn, catch errors, if any but make it possible for @@ -3459,8 +3471,8 @@ emacs to continue undisturbed, used with SMEX, see below.


-
-

5.20 Alignment Wrappers

+
+

5.20 Alignment Wrappers

align-regexp is already a very usefull tool, however, sometimes I @@ -3482,7 +3494,7 @@ wrappers to make this easier. col1, col2 col1, col2" - (interactive "MRepeat Align Regex [ ]: ") + (interactive "MRepeat Align Regex [ ]: ") (let ((spc " ") (beg (point-min)) (end (point-max)) @@ -3498,11 +3510,11 @@ wrappers to make this easier. (align-regexp beg end (format areg regex) 1 1 t))) (defun align-repeat-left (regex) - (interactive "MRepeat Left Align Regex [ ]: ") + (interactive "MRepeat Left Align Regex [ ]: ") (align-regexp-repeat regex 'left)) (defun align-repeat-right (regex) - (interactive "MRepeat Left Align Regex [ ]: ") + (interactive "MRepeat Left Align Regex [ ]: ") (align-regexp-repeat regex 'right))

@@ -3510,8 +3522,8 @@ wrappers to make this easier.
-
-

5.21 String Helpers

+
+

5.21 String Helpers

Some helper functions I use here and there. @@ -3522,7 +3534,7 @@ Some helper functions I use here and there. "return a list of keys of alist A" (let ((K ())) (dolist (e A) - (push (car e) K) + (push (car e) K) ) K)) @@ -3540,7 +3552,7 @@ Some helper functions I use here and there. (defun tvd-replace-all (regex replace) "Replace all matches of REGEX with REPLACE in current buffer." - (interactive) + (interactive) (goto-char (point-min)) (while (re-search-forward regex (end-of-line) t) (replace-match replace))) @@ -3550,14 +3562,14 @@ Some helper functions I use here and there.

-
-

6 Modes

+
+

6 Modes

-
-

6.1 Programming Languages

+
+

6.1 Programming Languages

-
-

6.1.1 VALA

+
+

6.1.1 VALA

(autoload 'vala-mode "vala-mode" "Major mode for editing Vala code." t)
@@ -3572,8 +3584,8 @@ Some helper functions I use here and there.
 
-
-

6.1.2 python mode

+
+

6.1.2 python mode

Not much configured for python, I'm happy with the defaults as it seems :) @@ -3584,10 +3596,10 @@ Not much configured for python, I'm happy with the defaults as it seems :) (add-hook 'python-mode-hook - (function + (function (lambda() (local-set-key [delete] 'py-electric-delete) - (setq-default indent-tabs-mode nil) + (setq-default indent-tabs-mode nil) (setq mode-name "PY") (outline-minor-mode 0) ;; turn off outline here. /FIXME/: find out where it's turned on! ))) @@ -3601,8 +3613,8 @@ Not much configured for python, I'm happy with the defaults as it seems :)

-
-

6.1.3 cperl mode

+
+

6.1.3 cperl mode

I am a perl addict. I love it, therefore, emacs must be prepared @@ -3639,13 +3651,13 @@ perl special: run, compile, debug (defun perl-kill () "get rid of hanging perl compile or run buffers" - (interactive) + (interactive) (delete-windows-on perl-run-out-buffer) (kill-buffer perl-run-out-buffer)) (defun perl-run (switches parameters prefix) "execute current perl buffer" - (interactive "sPerl-switches:\nsParameter:\nP") + (interactive "sPerl-switches:\nsParameter:\nP") (let ((file buffer-file-name)) (if (eq prefix nil) (shell-command (concat "perl " switches " " file " " parameters "&")) @@ -3660,7 +3672,7 @@ perl special: run, compile, debug (defun perl-next-error () "jump to next perl run error, if any" - (interactive) + (interactive) (let (line errorfile (window (get-buffer-window (buffer-name))) @@ -3705,7 +3717,7 @@ cperl indent region

(defun own-cperl-indent-region-or-paragraph (start end)
-  (interactive "r")
+  (interactive "r")
   (if mark-active
       (cperl-indent-region start end)
     (save-excursion
@@ -3721,7 +3733,7 @@ and hook them into cperl
 
(add-hook
  'cperl-mode-hook
- (function
+ (function
   (lambda()
     (make-variable-buffer-local 'perl-error-fontified)
     (make-variable-buffer-local 'perl-error-start)
@@ -3749,8 +3761,8 @@ and hook them into cperl
 
-
-

6.1.4 Paredit for lisp only

+
+

6.1.4 Paredit for lisp only

I use paredit in lisp a lot, but are mostly happy with the defaults. @@ -3793,8 +3805,8 @@ sometimes I need to be able to turn it off fast:

-
-

6.1.5 ETAGS

+
+

6.1.5 ETAGS

I use ETAGS for some projects. With etags I can easily jump to the @@ -3822,7 +3834,7 @@ generate TAGS and load it

(defun etags-create (dir-name)
   "Create tags file."
-  (interactive "DDirectory: ")
+  (interactive "DDirectory: ")
   (let* ((ctags "/usr/bin/ctags-exuberant")
          (odir  (directory-file-name dir-name))
          (ofile (concat odir "/TAGS"))
@@ -3847,11 +3859,11 @@ Use ido to list tags, but then select via etags-select (best of both worlds!)
 
(defun etags-find ()
   "Find a tag using ido"
-  (interactive)
+  (interactive)
   (tags-completion-table)
   (let (tag-names)
     (mapatoms (lambda (x)
-                (push (prin1-to-string x t) tag-names))
+                (push (prin1-to-string x t) tag-names))
               tags-completion-table)
     (etags-select-find (ido-completing-read "Tag: " tag-names))))
 
@@ -3871,11 +3883,11 @@ some handy aliases
-
-

6.2 Text Modes

+
+

6.2 Text Modes

-
-

6.2.1 sgml

+
+

6.2.1 sgml

Used for XML and the likes. @@ -3902,8 +3914,8 @@ Used for XML and the likes.

-
-

6.2.2 web-mode (JS, HTML, CSS combined)

+
+

6.2.2 web-mode (JS, HTML, CSS combined)

Web development is shit. Tech involved is a mess, and in most cases @@ -3958,19 +3970,19 @@ some handy html code inserters

(defun html-insert-p()
-  (interactive)
+  (interactive)
   (web-mode-element-wrap "p"))
 
 (defun html-insert-li()
-  (interactive)
+  (interactive)
   (web-mode-element-wrap "li"))
 
 (defun html-insert-ul()
-  (interactive)
+  (interactive)
   (web-mode-element-wrap "ul"))
 
 (defun html-insert-b()
-  (interactive)
+  (interactive)
   (web-mode-element-wrap "b"))
 
@@ -3980,14 +3992,14 @@ convert a text list into a html list.

(defun html-listify (beg end)
-  (interactive "r")
+  (interactive "r")
   (save-excursion
     (let* ((lines (split-string (buffer-substring beg end) "\n" t)))
       (delete-region beg end)
       (insert "<ul>\n")
       (while lines
         (insert "  <li>")
-        (insert (pop lines))
+        (insert (pop lines))
         (insert "</li>\n"))
       (insert "</ul>\n")
       )))
@@ -3997,8 +4009,8 @@ convert a text list into a html list.
 
-
-

6.2.3 Cisco Mode

+
+

6.2.3 Cisco Mode

Written by myself many years ago, but I'm still using it daily to @@ -4016,8 +4028,8 @@ view and prepare cisco configs.

-
-

6.2.4 Markdown

+
+

6.2.4 Markdown

I rarely use markdown, but sometimes I stumble upon such a file and @@ -4053,8 +4065,8 @@ parens and quotes constraints check on save

-
-

6.2.5 POD mode

+
+

6.2.5 POD mode

I LOVE POD! POD is the documentation format of perl and there's a @@ -4086,7 +4098,7 @@ using expand-region: apply pod entity formatting to word at point.

(defun tvd-outline-emphasize(CHAR)
   "expand once if no region and apply emphasize CHAR"
-  (interactive)
+  (interactive)
   (unless (use-region-p)
     (er/expand-region 1))
   (save-excursion
@@ -4097,17 +4109,17 @@ using expand-region: apply pod entity formatting to word at point.
 
 (defun pod-bold()
   "bold text in outline mode"
-  (interactive)
+  (interactive)
   (tvd-outline-emphasize ?B))
 
 (defun pod-italic()
   "italic text in outline mode"
-  (interactive)
+  (interactive)
   (tvd-outline-emphasize ?I))
 
 (defun pod-code()
   "verbatim text in outline mode"
-  (interactive)
+  (interactive)
   (tvd-outline-emphasize ?C))
 
@@ -4188,8 +4200,8 @@ pod mode config
-
-

6.2.6 conf-mode

+
+

6.2.6 conf-mode

conf-mode annoyingly overwrites the global keybinding C-c C-c with @@ -4210,10 +4222,10 @@ configs. Applies for derivates as well.

-
-

6.2.7 Config::General mode

+
+

6.2.7 Config::General mode

-
  1. Config and doc
    +
    1. Config and doc

      config-general-mode (also on Melpa).

      @@ -4232,18 +4244,18 @@ both did not satisfy me. Now (as of 20170625) I solved this mess once and for al
-
  • Convenicence Wrappers
    +
  • Convenicence Wrappers
    (defun config-general-completion-at-point ()
       "Complete word at point using hippie-expand, if not on a comment."
    -  (interactive)
    +  (interactive)
       (when (looking-back "[-%$_a-zA-Z0-9]")
         (unless (eq (get-text-property (point) 'face) 'font-lock-comment-face)
           (hippie-expand nil))))
     
     (defun config-general-do-electric-tab ()
       "Enter a <TAB> or goto current indentation."
    -  (interactive)
    +  (interactive)
       (if (eq (point) (line-end-position))
             (indent-for-tab-command)
           (back-to-indentation)))
    @@ -4253,7 +4265,7 @@ both did not satisfy me. Now (as of 20170625) I solved this mess once and for al
     
     This is just a convenience function, which can be mapped
     to `tab' by the user. .Not in use by default."
    -  (interactive)
    +  (interactive)
       (unless (config-general-completion-at-point)
         (config-general-do-electric-tab)))
     
    @@ -4332,7 +4344,7 @@ Bugreport: http://d
  • -
  • Mode Hook
    +
  • Mode Hook

    I use TAB for completion AND tab and outshine. Also, the mode enables electric indent automatically, but I disabled it for @@ -4357,7 +4369,7 @@ for config-general-mode (which inherits from conf-mode). ;; Inserting a brace or quote automatically inserts the matching pair (electric-pair-mode t) - (setq-local hippie-expand-only-buffers '(config-general-mode)) + (setq-local hippie-expand-only-buffers '(config-general-mode)) ;; configure order of expansion functions (if (version< emacs-version "25.1") @@ -4381,8 +4393,8 @@ for config-general-mode (which inherits from conf-mode).


  • -
    -

    6.2.8 Xmodmap Mode

    +
    +

    6.2.8 Xmodmap Mode

    the shortest mode ever, via emacswiki. @@ -4405,10 +4417,10 @@ the shortest mode ever, vi

    -
    -

    6.2.9 MMM Mode

    +
    +

    6.2.9 MMM Mode

    -
    1. MMM configure:
      +
      1. MMM configure:
        (add-to-list 'load-path (concat tvd-lisp-dir "/mmm-mode"))
         
        @@ -4427,7 +4439,7 @@ see doc for class definition in var 'mmm-classes-alist
         

      2. -
      3. MMM config for POD mode
        +
      4. MMM config for POD mode
        (mmm-add-classes
          '((html-pod
        @@ -4445,11 +4457,11 @@ see doc for class definition in var 'mmm-classes-alist
         
        -
        -

        6.3 Text Manupilation

        +
        +

        6.3 Text Manupilation

        -
        -

        6.3.1 expand-region

        +
        +

        6.3.1 expand-region

        One of the best modes I ever discovered. Press C-= multiple times @@ -4468,8 +4480,8 @@ related to ER:

        -
        -

        6.3.2 Mark, Copy, Yank Things

        +
        +

        6.3.2 Mark, Copy, Yank Things

        For a long time this stuff was located here in my emacs config. As @@ -4532,7 +4544,7 @@ might be something else. (copy-to-register 'c (point-min) (point-max))))) (defun tvd-insert-c-register () - (interactive) + (interactive) (insert-register 'c)) (global-set-key (kbd "C-v") 'tvd-insert-c-register) @@ -4549,7 +4561,7 @@ it appears as NNN,NN.

        (defun tvd-mcyt-copy-euro (&optional arg)
           "Copy  euro  at point  into  kill-ring  and convert  to  german
         punctuation"
        -  (interactive "P")
        +  (interactive "P")
           (mcyt--blink-and-copy-thing 'mcyt-beginning-of-ip 'mcyt-end-of-ip arg)
           (with-temp-buffer
             (yank)
        @@ -4572,8 +4584,8 @@ it appears as NNN,NN.
         
        -
        -

        6.3.3 change-inner

        +
        +

        6.3.3 change-inner

        I use change-inner with a prefix key and some wrappers around @@ -4599,7 +4611,7 @@ first some functions: BEG and END must be executable elisp symbols moving (point). Everything in between will be killed. If INS is non-nil, it will be inserted then." - (interactive) + (interactive) (let ((B nil)) (funcall beg) (setq B (point)) @@ -4610,44 +4622,44 @@ first some functions: (defun tvd-ci-comment () "\"change inner\" a whole comment [block]." - (interactive) + (interactive) (tvd-ci 'mcyt-beginning-of-comment-block 'mcyt-end-of-comment-block (format "%s;# " comment-start))) (defun tvd-ci-quote () "\"change inner\" quoted text." - (interactive) + (interactive) (tvd-ci 'mcyt-beginning-of-quote 'mcyt-end-of-quote)) (defun tvd-ci-word () "\"change inner\" a word (like cw in vi)." - (interactive) + (interactive) (tvd-ci 'mcyt-beginning-of-symbol 'mcyt-end-of-symbol)) (defun tvd-ci-line () "\"change inner\" a whole line." - (interactive) + (interactive) (tvd-ci 'beginning-of-line 'end-of-line)) (defun tvd-ci-paragraph () "\"change inner\" a whole paragraph." - (interactive) + (interactive) (tvd-ci 'backward-paragraph 'forward-paragraph)) (defun tvd-ci-buffer () "\"change inner\" a whole buffer." - (interactive) + (interactive) (tvd-ci 'point-min 'point-max)) (defun tvd-ci-sexp () "\"change inner\" a whole sexp." - (interactive) + (interactive) (er/mark-inside-pairs) (call-interactively 'kill-region)) @@ -4695,8 +4707,8 @@ typing the prefix key twice calls the real change-inner


        -
        -

        6.3.4 Rotate text

        +
        +

        6.3.4 Rotate text

        This one is great as well, I use it to toggle flags and such stuff @@ -4752,8 +4764,8 @@ short command anymore, so C-t would be free now, wouldn't it?

        -
        -

        6.3.5 Word wrapping

        +
        +

        6.3.5 Word wrapping

        same as word-wrap but without the fringe which I hate the most! @@ -4775,8 +4787,8 @@ overwritten by visual-line-mode above for specifics

        -
        -

        6.3.6 Viking Mode

        +
        +

        6.3.6 Viking Mode

        Delete stuff fast. Press the key multiple times - delete more @@ -4794,8 +4806,8 @@ things. Inspired by expand-region. Written by myself.

        -
        -

        6.3.7 HTMLize

        +
        +

        6.3.7 HTMLize

        extracted from debian package emacs-goodies-el-35.2+nmu1, since @@ -4812,8 +4824,8 @@ the current buffer, however it looks.

        -
        -

        6.3.8 iEdit (inline edit multiple searches)

        +
        +

        6.3.8 iEdit (inline edit multiple searches)

        Edit all occurences of something at once. Great for re-factoring. @@ -4854,13 +4866,25 @@ behavior, so, I modify it myself using defadvice.

        -
        -

        6.4 Interactives

        +
        +

        6.4 Interactives

        -
        -

        6.4.1 eShell stuff, or if interactive stuff is needed, use ansi-term

        +
        +

        6.4.1 Hydra

        +Used here and there below +

        +
        +
        (require 'hydra)
        +
        +
        +
        +
        +
        +

        6.4.2 eShell stuff, or if interactive stuff is needed, use ansi-term

        +
        +

        I am a hardcore bash user, but from time to time eshell is good enough. It's great when used remote when only sftp is supported.

        @@ -4886,21 +4910,21 @@ custom prompt, which resembles my bash prompt
        (defun shk-eshell-prompt ()
           (let ((header-bg "Azure"))
             (concat
        -     (with-face "\n")
        -     (with-face (format-time-string
        +     (with-face "\n")
        +     (with-face (format-time-string
                          "[%Y-%m-%d %H:%M] --- ["
                          (current-time)) :background header-bg :foreground "Black")
        -     (with-face (concat (eshell/pwd) "") :background header-bg :foreground "Blue")
        -     (with-face "] --- " :background header-bg :foreground "Black")
        -     (with-face  (or
        +     (with-face (concat (eshell/pwd) "") :background header-bg :foreground "Blue")
        +     (with-face "] --- " :background header-bg :foreground "Black")
        +     (with-face  (or
                           (ignore-errors (format "(%s)" (vc-responsible-backend default-directory)))
                           "") :background header-bg)
        -     (with-face "\n" :background header-bg)
        -     (with-face user-login-name :foreground "blue")
        +     (with-face "\n" :background header-bg)
        +     (with-face user-login-name :foreground "blue")
              "@"
        -     (with-face "localhost" :foreground "blue")
        +     (with-face "localhost" :foreground "blue")
              (if (= (user-uid) 0)
        -         (with-face " #" :foreground "red")
        +         (with-face " #" :foreground "red")
                " $")
              " ")))
         
        @@ -4989,7 +5013,7 @@ exit and restore viking key binding afterwards
         

        (defun eshell/x (&rest args)
        -  (interactive)
        +  (interactive)
           (eshell-life-is-too-much)
           (define-key viking-mode-map (kbd "C-d") 'viking-kill-thing-at-point))
         
        @@ -5002,7 +5026,7 @@ open empty window if no file argument given.
        (defun eshell/emacs (&rest args)
           "Editor commands fired from eshell will be handled by emacs, which already runs anyway."
        -  (interactive)
        +  (interactive)
           (let* ((framesize (frame-width))
                  (winsize (window-body-width)))
             (progn
        @@ -5021,7 +5045,7 @@ open empty window if no file argument given.
         some  shell output  that might  be useful  in the  future, it  also
         copies   the   cleared   stuff   into   a   backup   buffer   named
         *eshell-log-buffer*, just in case."
        -  (interactive)
        +  (interactive)
           (let ((beg (point-min))
                 (end (point-max))
                 (savebuffer "*eshell-log-buffer*")
        @@ -5040,7 +5064,7 @@ open empty window if no file argument given.
           (funcall 'eshell/perldoc (apply 'eshell-flatten-and-stringify args)))
         
         (defun eshell/perldoc (man-args)
        -  (interactive "sPerldoc: ")
        +  (interactive "sPerldoc: ")
           (require 'man)
           (let ((manual-program "perldoc"))
             (man man-args)))
        @@ -5049,7 +5073,7 @@ open empty window if no file argument given.
           "Opens up a new shell in the directory associated with the
         current buffer's file. The eshell is renamed to match that
         directory to make multiple eshell windows easier."
        -  (interactive)
        +  (interactive)
           (let* ((parent (if (buffer-file-name)
                              (file-name-directory (buffer-file-name))
                            default-directory))
        @@ -5070,7 +5094,7 @@ via howardism
         
        (defun eshell-there (host)
           "Opens a shell on a remote host using tramp."
        -  (interactive "sHost: ")
        +  (interactive "sHost: ")
           (let ((default-directory (format "/%s:" host)))
             (eshell host)))
         
        @@ -5138,9 +5162,9 @@ no need for less or more, this is emacs, isn't it?
         
        -
        -

        6.4.2 Emacs LISP interactive

        -
        +
        +

        6.4.3 Emacs LISP interactive

        +

        General configuration for all things elisp.

        @@ -5170,7 +5194,7 @@ REPL where it will be evaluated (defun tvd-send-region-to-repl () "put region or buffer into elisp repl and eval" - (interactive) + (interactive) (let ( ;; fetch region or buffer contents (code (tvd-get-code))) (progn @@ -5190,7 +5214,7 @@ REPL where it will be evaluated (defun tvd-elisp-eval() "just eval region or buffer whatever feasible" - (interactive) + (interactive) (progn (if mark-active (eval-region) @@ -5198,12 +5222,12 @@ REPL where it will be evaluated (defun ff () "Jump to function definition at point." - (interactive) + (interactive) (find-function-other-window (symbol-at-point))) (defun tvd-make-defun-links () "experimental: make function calls clickable, on click, jump to definition of it" - (interactive) + (interactive) (let ((beg 0) (end 0) (fun nil)) @@ -5221,7 +5245,7 @@ REPL where it will be evaluated (defun emacs-change-log (entry) "Add a changelog entry to .emacs Changelog" - (interactive "Menter change log entry: ") + (interactive "Menter change log entry: ") (save-excursion (show-all) (beginning-of-buffer) @@ -5320,7 +5344,7 @@ opens a new frame with all those buffers already opened and pinned.
        (defun dev ()
           "Open a new emacs frame with some development peripheral buffers."
        -  (interactive)
        +  (interactive)
           (let ((F (new-frame)))
             (with-selected-frame F
               (with-current-buffer (get-buffer-create "*Help*")
        @@ -5350,9 +5374,9 @@ opens a new frame with all those buffers already opened and pinned.
         
        -
        -

        6.4.3 el2markdown

        -
        +
        +

        6.4.4 el2markdown

        +

        el2markdown is a module which can be used to convert Commentary sections into markdown files. I use this to @@ -5375,9 +5399,9 @@ README.md. Take care though: it doesn't convert the META section.

        -
        -

        6.4.4 tramp mode

        -
        +
        +

        6.4.5 tramp mode

        +

        Edit remote files, one of the best things in emacs. I use it every day heavily.

        @@ -5404,9 +5428,9 @@ see also backup section
        -
        -

        6.4.5 org mode

        -
        +
        +

        6.4.6 org mode

        +

        I use org mode to take notes mostly at work. I also track projects and TODO lists etc. I do not, however, use agenda or any @@ -5456,29 +5480,29 @@ text formatting made easy, bound to C-c keys locally

        (defun tvd-org-emphasize(CHAR)
           "expand once if no region and apply emphasize CHAR"
        -  (interactive)
        +  (interactive)
           (unless (region-active-p)
             (er/expand-region 1))
           (org-emphasize CHAR))
         
         (defun bold()
           "bold text in org mode"
        -  (interactive)
        +  (interactive)
           (tvd-org-emphasize '42))
         
         (defun italic()
           "italic text in org mode"
        -  (interactive)
        +  (interactive)
           (tvd-org-emphasize '47))
         
         (defun code()
           "verbatim text in org mode"
        -  (interactive)
        +  (interactive)
           (tvd-org-emphasize '126))
         
         (defun underline()
           "underline text in org mode"
        -  (interactive)
        +  (interactive)
           (tvd-org-emphasize '95))
         
        @@ -5490,7 +5514,7 @@ my org-mode specific <C-left> and <C-right>
        (defun tvd-org-left-or-level-up()
           "jump one word to the left if not on a org heading,
         otherwise fold current level and jump one level up."
        -  (interactive)
        +  (interactive)
           (if (and (org-at-heading-p) (looking-at "*"))
               (progn
                 (hide-subtree)
        @@ -5500,7 +5524,7 @@ my org-mode specific <C-left> and <C-right>
         (defun tvd-org-heading-up()
           "If on a heading, fold current heading, jump one level
         up and unfold it, otherwise jump paragraph as usual."
        -  (interactive)
        +  (interactive)
           (if (and (org-at-heading-p) (looking-at "*"))
               (progn
                 (hide-subtree)
        @@ -5511,7 +5535,7 @@ my org-mode specific <C-left> and <C-right>
         (defun tvd-org-heading-down()
           "If on a heading, fold current heading, jump one level
         down and unfold it, otherwise jump paragraph as usual."
        -  (interactive)
        +  (interactive)
           (if (and (org-at-heading-p) (looking-at "*"))
               (progn
                 (hide-subtree)
        @@ -5529,14 +5553,14 @@ org-mode specific config, after load
           '(progn
              (add-hook 'org-mode-hook
                        (lambda ()
        -                 (setq
        +                 (setq
                           org-M-RET-may-split-line nil
                           org-agenda-files (list tvd-org-file)
                           org-agenda-restore-windows-after-quit t
        -                  org-blank-before-new-entry (quote ((heading . auto) (plain-list-item . auto)))
        -                  org-catch-invisible-edits (quote error)
        +                  org-blank-before-new-entry (quote ((heading . auto) (plain-list-item . auto)))
        +                  org-catch-invisible-edits (quote error)
                           org-columns-default-format "%80ITEM %22Timestamp %TODO %TAGS %0PRIORITY"
        -                  org-insert-heading-always-after-current (quote t)
        +                  org-insert-heading-always-after-current (quote t)
                           org-mouse-1-follows-link nil
                           org-remember-store-without-prompt t
                           org-reverse-note-order t
        @@ -5557,7 +5581,7 @@ org-mode specific config, after load
                           org-confirm-babel-evaluate nil)
                                                 ; shortcuts
                          (setq org-speed-commands-user
        -                       (quote (
        +                       (quote (
                                        ("0" . ignore)
                                        ("1" . delete-other-windows)
                                        ("2" . ignore)
        @@ -5646,7 +5670,7 @@ my own keywords, must be set globally, not catched correctly inside hook
         I always want to be able to capture, even if no ORG is running
         

        -
        (global-set-key (kbd "C-n")             (lambda () (interactive) (org-capture)))
        +
        (global-set-key (kbd "C-n")             (lambda () (interactive) (org-capture)))
         
        @@ -5719,9 +5743,9 @@ always use the latest docs
        -
        -

        6.4.6 org table mode

        -
        +
        +

        6.4.7 org table mode

        +

        I'm so used to lovely org mode tables, I need them everywhere!

        @@ -5730,13 +5754,7 @@ I'm so used to lovely org mode tables, I need them everywhere!
        -

        -allow me to insert org tables everywhere on request -

        -
        -
        (defalias 'table     'orgtbl-mode)
        -
        -
        +

        convert CSV region to table @@ -5746,7 +5764,7 @@ convert CSV region to table "Convert a whitespace separated column list into an org mode table and enable orgtbl-mode. You can specify another regex for cell splitting." - (interactive "MConvert [region] to table with regex ([\t\s]+): ") + (interactive "MConvert [region] to table with regex ([\t\s]+): ") (let ((spc "[\t\s]+")) (when (string= regex "") (setq regex spc)) @@ -5765,32 +5783,32 @@ table sorting shortcuts

        (defun sort-table-numeric ()
           "sort org table numerically by current column"
        -  (interactive)
        +  (interactive)
           (org-table-sort-lines nil ?n))
         
         (defun sort-table-numeric-desc ()
           "reverse sort org table numerically by current column"
        -  (interactive)
        +  (interactive)
           (org-table-sort-lines nil ?N))
         
         (defun sort-table-alphanumeric ()
           "sort org table charwise by current column"
        -  (interactive)
        +  (interactive)
           (org-table-sort-lines nil ?a))
         
         (defun sort-table-alphanumeric-desc ()
           "reverse sort org table charwise by current column"
        -  (interactive)
        +  (interactive)
           (org-table-sort-lines nil ?A))
         
         (defun sort-table-time ()
           "sort org table by times by current column"
        -  (interactive)
        +  (interactive)
           (org-table-sort-lines nil ?t))
         
         (defun sort-table-time-desc ()
           "reverse sort org table by times by current column"
        -  (interactive)
        +  (interactive)
           (org-table-sort-lines nil ?T))
         
        @@ -5819,11 +5837,11 @@ naming scheme (compare (split-string ip1 "\\.") (split-string ip2 "\\.")))) (defun sort-table-ip () - (interactive) + (interactive) (org-table-sort-lines nil ?f #'org-sort-remove-invisible #'jcs-ip-lessp)) (defun sort-table-ip-desc () - (interactive) + (interactive) (org-table-sort-lines nil ?F #'org-sort-remove-invisible (lambda (ip1 ip2) (jcs-ip-lessp ip1 ip2 #'>)))) @@ -5851,7 +5869,7 @@ generic table exporter
        (defun tvd-export-org-table (fmt)
           "export an org table using format FMT"
        -  (interactive)
        +  (interactive)
           (let ((efile "/tmp/org-table-export.tmp")
                 (ebuf (format "*table-%s*" fmt)))
             (when (file-exists-p efile)
        @@ -5881,7 +5899,7 @@ format specific exporters
         
         (defun table-to-excel ()
           "export current org table to CSV format suitable for MS Excel."
        -  (interactive)
        +  (interactive)
           ;; quote everything, map temporarily 'org-quote-csv-field
           ;; to my version
           (cl-letf (((symbol-function 'org-quote-csv-field)
        @@ -5890,27 +5908,27 @@ format specific exporters
         
         (defun table-to-csv ()
           "export current org table to CSV format"
        -  (interactive)
        +  (interactive)
           (tvd-export-org-table "csv"))
         
         (defun table-to-latex ()
           "export current org table to LaTeX format"
        -  (interactive)
        +  (interactive)
           (tvd-export-org-table "latex"))
         
         (defun table-to-html ()
           "export current org table to HTML format"
        -  (interactive)
        +  (interactive)
           (tvd-export-org-table "html"))
         
         (defun table-to-csv-tab ()
           "export current org table to CSV format, separated by <tab>"
        -  (interactive)
        +  (interactive)
           (tvd-export-org-table "tsv"))
         
         (defun table-to-aligned ()
           "export current org table to space-aligned columns format"
        -  (interactive)
        +  (interactive)
           (tvd-export-org-table "csv")
           (with-current-buffer "*table-csv*"
             (align-regexp (point-min) (point-max) "\\(\\s-*\\)," 1 1 t)
        @@ -5938,20 +5956,48 @@ In org mode I sometimes want to copy the content of a table cell
         
        (defun tvd-beginning-of-cell (&optional arg)
           "move (point) to the beginning of a org mode table cell"
        -  (interactive)
        +  (interactive)
           (if  (re-search-backward "|" (line-beginning-position) 3 1)
               (forward-char)))
         
         (defun tvd-end-of-cell (&optional arg)
           "move (point) to the end of a org mode table cell"
        -  (interactive)
        +  (interactive)
           (if  (re-search-forward "|" (line-end-position) 3 1)
               (backward-char)))
         
         (defun tvd-copy-org-table-cell(&optional arg)
           "Copy an org mode table cell to the kill ring using MCYT"
        -  (interactive "P")
        +  (interactive "P")
           (mcyt--blink-and-copy-thing 'tvd-beginning-of-cell 'tvd-end-of-cell arg))
        +
        +(defun tvd-del-org-table-cell (&optional arg)
        +  "Delete a cell"
        +  (interactive "P")
        +  (let
        +      ((beg (progn (tvd-beginning-of-cell) (point)))
        +       (end (progn (tvd-end-of-cell) (point))))
        +    (delete-region beg end)
        +    (org-table-align)))
        +
        +(defun tvd-del-org-table-row ()
        +  "Delete a table row's contents"
        +  (interactive)
        +  (org-beginning-of-line 1)
        +  (kill-line)
        +  (org-table-insert-row nil))
        +
        +(defun tvd-del-org-table-col ()
        +  "Delete a table column's contents, keep heading as is"
        +  (interactive)
        +  (let ((head (org-table-get 1 nil)))
        +    (org-table-delete-column)
        +    (re-search-forward "|")
        +    (org-table-insert-column)
        +    (org-table-goto-col-beginning)
        +    (insert head)
        +    (org-table-align))
        +  )
         
        @@ -5963,8 +6009,8 @@ via
        (defun org-table-goto-col-beginning ()
           "Go to beginning of current column and return `point'."
        -  (interactive)
        -  (assert (org-table-p) "Not in org-table.")
        +  (interactive)
        +  (assert (org-table-p) "Not in org-table.")
           (org-table-align)
           (let ((col (org-table-current-column)))
             (goto-char (org-table-begin))
        @@ -5978,8 +6024,8 @@ via defun org-table-goto-col-end ()
           "Goto end of current column and return `point'."
        -  (interactive)
        -  (assert (org-table-p) "Not in org-table.")
        +  (interactive)
        +  (assert (org-table-p) "Not in org-table.")
           (org-table-align)
           (let ((col (org-table-current-column)))
             (goto-char (1- (org-table-end)))
        @@ -5994,14 +6040,14 @@ via defun org-table-select-col ()
           "Select current column."
        -  (interactive)
        +  (interactive)
           (set-mark (org-table-col-beginning))
           (org-table-goto-col-end)
           (rectangle-mark-mode))
         
         (defun org-table-copy-col ()
           "Copy current column."
        -  (interactive)
        +  (interactive)
           (org-table-select-col)
           (sit-for 0.2 t)
           (copy-rectangle-as-kill (org-table-col-beginning) (org-table-col-end)))
        @@ -6010,7 +6056,7 @@ via 'org-mode-hook
                     (lambda ()
                       (local-set-key (kbd "C-c o") 'org-table-copy-col)
        -              (local-set-key (kbd "C-c t") 'tvd-copy-org-table-cell))))
        +              (local-set-key (kbd "C-c c") 'tvd-copy-org-table-cell))))
         
        @@ -6020,7 +6066,7 @@ eval-after-load 'orgtbl doesn't work
        (add-hook 'orgtbl-mode-hook '(lambda ()
                                        (define-key orgtbl-mode-map (kbd "C-c o") 'org-table-copy-col)
        -                               (define-key orgtbl-mode-map (kbd "C-c t") 'tvd-copy-org-table-cell)))
        +                               (define-key orgtbl-mode-map (kbd "C-c c") 'tvd-copy-org-table-cell)))
         
        @@ -6031,12 +6077,77 @@ integers, reals, positives, set via custom
        (setq org-table-number-regexp "^[-+]?\\([0-9]*\\.[0-9]+\\|[0-9]+\\.?[0-9]*\\)$")
         
        + +

        +table hydras, maybe better than aliases?! +

        +
        +
        (defhydra hydra-org-tables (:color blue)
        +  "
        +^Sort by^             ^Transform to^      ^Copy/Del what^       ^Modify^                 ^Outside Org^
        +^^^^^^^^----------------------------------------------------------------------------------------------------------
        +_sa_:  alphanumeric   _tc_: CSV           _cl_: Copy Column     _ic_: Insert Column      _ot_: Table to Org Mode
        +_sA_: -alphanumeric   _te_: Excel         _cc_: Copy Cell       _ir_: Insert Row         _oe_: Enable Org-Tbl Mode
        +_si_:  ip             _tl_: Latex         ^^                    _il_: Insert Line
        +_sI_: -ip             _th_: HTML          _dd_: Delete Cell     _tr_: Transpose Table
        +_sn_:  numeric        _tt_: Tab           _dc_: Delete Column
        +_sN_: -numeric        _ta_: Aligned       _dr_: Delete Row
        +_st_:  time           ^^                  _kr_: Kill Row
        +_sT_: -time           ^^                  _kc_: Kill Column     ^^                       _q_: Cancel
        +
        +
        +"
        +  ("sa" sort-table-alphanumeric )
        +  ("sA" sort-table-alphanumeric-desc)
        +  ("si" sort-table-ip)
        +  ("sI" sort-table-ip-desc )
        +  ("sn" sort-table-numeric )
        +  ("sN" sort-table-numeric-desc )
        +  ("st" sort-table-time )
        +  ("sT" sort-table-time-desc )
        +
        +  ("tc" table-to-csv)
        +  ("te" table-to-excel   )
        +  ("tl" table-to-latex   )
        +  ("th" table-to-html    )
        +  ("tt" table-to-csv-tab )
        +  ("ta" table-to-aligned )
        +
        +  ("cl" org-table-copy-col )
        +  ("cc" tvd-copy-org-table-cell)
        +  ("dd" org-table-blank-field)
        +  ("dr" tvd-del-org-table-row)
        +  ("dc" tvd-del-org-table-col)
        +  ("kc" org-table-delete-column)
        +  ("kr" org-table-kill-row)
        +
        +  ("ic" org-table-insert-column)
        +  ("ir" org-table-insert-row)
        +  ("il" org-table-hline-and-move)
        +  ("tr" org-table-transpose-table-at-point)
        +
        +  ("ot" tablify )
        +  ("oe" orgtbl-mode)
        +
        +  ("q" nil :color red))
        +
        +
        + +

        +allow me to insert org tables everywhere on request +

        +
        +
        (defalias 'table     'hydra-org-tables/body)
        +(defalias 't        'hydra-org-tables/body)
        +(global-set-key (kbd "C-c t") 'hydra-org-tables/body)
        +
        +
        -
        -

        6.4.7 org mode slideshows

        -
        +
        +

        6.4.8 org mode slideshows

        +

        Making presentations within emacs with org mode is cool as well.

        @@ -6053,13 +6164,13 @@ showtime helpers
        (defun slide-return-to-present ()
           "wherever we are, go back to slideshow"
        -  (interactive)
        +  (interactive)
           (switch-to-buffer-other-window "*slide*")
           (delete-other-windows))
         
         (defun slide-split-to-past ()
           "split slide show and show previous buffer next to it"
        -  (interactive)
        +  (interactive)
           (split-window-horizontally)
           (other-window 1)
           (if (get-buffer "*eshell*")
        @@ -6118,7 +6229,7 @@ Will be inserted as first help slide in a slide show
         

        (defun slide-header (prefix)
        -  (interactive "P")
        +  (interactive "P")
           (save-excursion
             (if (eq prefix nil)
                 ()
        @@ -6143,9 +6254,9 @@ Will be inserted as first help slide in a slide show
         
        -
        -

        6.4.8 outshine mode

        -
        +
        +

        6.4.9 outshine mode

        +

        I maintain my emacs config with outshine mode. It works a lot like org mode, but I still have a normal emacs lisp buffer, which I can @@ -6180,7 +6291,7 @@ use this later to jump to those positions with IDO. (defun tvd-outshine-parse-headings () "extract outshine headings of current buffer" - (interactive) + (interactive) (let ((line nil)) (save-excursion (setq tvd-headings ()) @@ -6193,7 +6304,7 @@ use this later to jump to those positions with IDO. (defun tvd-outshine-sparse-tree () "expand outline tree from current position as sparse tree" - (interactive) + (interactive) (let ((done nil) (pos (point)) (tree (list (list (point) 5))) @@ -6212,7 +6323,7 @@ use this later to jump to those positions with IDO. (defun tvd-outshine-jump () "jump to an outshine heading with IDO prompt, update heading list if neccessary." - (interactive) + (interactive) (let ((heading nil)) (if (string= "" outshine-normalized-outline-regexp-base) (call-interactively 'imenu) ;; use imenu outside outshine @@ -6232,7 +6343,7 @@ use this later to jump to those positions with IDO. (defun tvd-outshine-end-of-section () "Jump to the end of an outshine section." - (interactive) + (interactive) (let ((end)) (outline-show-subtree) (save-excursion @@ -6258,7 +6369,7 @@ outshine mode config (inside outline mode) (setq outshine-org-style-global-cycling-at-bob-p t outshine-use-speed-commands t outshine-speed-commands-user - (quote ( + (quote ( ("v" . outshine-narrow-to-subtree) ("q" . widen) ("e" . tvd-outshine-end-of-section)))))))) @@ -6281,7 +6392,7 @@ of outshine.

        (defun outshine-to-org ()
        -  (interactive)
        +  (interactive)
           (outorg-convert-to-org)
           (org-mode))
         
        @@ -6293,7 +6404,7 @@ posting online, which makes it way easier to read.

        (defun outshine-to-html (file)
        -  (interactive
        +  (interactive
            (list
             (read-file-name "HTML output file: "
                             (expand-file-name "~/D/github/dot-emacs")
        @@ -6312,7 +6423,7 @@ posting online, which makes it way easier to read.
         (defun export ()
           "Export .emacs to git, do not use."
           ;; /FIXME/: generate version number, add last changelog to git
        -  (interactive)
        +  (interactive)
           (outshine-to-html "~/D/github/dot-emacs/emacs.html")
           (shell-command "cp ~/.emacs ~/D/github/dot-emacs/")
           (shell-command "cd ~/D/github/dot-emacs && git ci +fixes .emacs emacs.html")
        @@ -6324,9 +6435,9 @@ posting online, which makes it way easier to read.
         
        -
        -

        6.4.9 outline mode

        -
        +
        +

        6.4.10 outline mode

        +

        I use the very same cycle style as in org mode: when on a heading, hide it, jump to next heading on the same level and expand that (or @@ -6343,7 +6454,7 @@ from outline.

        (defun tvd-outline-left-or-level-up()
           "jump one word to the left if not on a heading,
         otherwise fold current level and jump one level up."
        -  (interactive)
        +  (interactive)
           (if (outline-on-heading-p)
               (progn
                 (hide-subtree)
        @@ -6352,7 +6463,7 @@ from outline.
         
         (defun tvd-outline-heading-up()
           "fold current heading, jump one level up and unfold it"
        -  (interactive)
        +  (interactive)
           (if (not (outline-on-heading-p))
               (backward-paragraph)
             (hide-subtree)
        @@ -6361,7 +6472,7 @@ from outline.
         
         (defun tvd-outline-heading-down()
           "fold current heading, jump one level down and unfold it"
        -  (interactive)
        +  (interactive)
           (if (not (outline-on-heading-p))
               (forward-paragraph)
             (hide-subtree)
        @@ -6376,7 +6487,7 @@ unused, see tvd-outshine-jump
         
        (defun tvd-outline-jump (part)
           "Jump interactively to next header containing PART using search."
        -  (interactive "Mjump to: ")
        +  (interactive "Mjump to: ")
           (let ((done nil)
                 (pwd (point)))
             (beginning-of-buffer)
        @@ -6422,9 +6533,9 @@ orange fringe when narrowed
         
        -
        -

        6.4.10 narrowing (no mode but fits here)

        -
        +
        +

        6.4.11 narrowing (no mode but fits here)

        +

        I use narrowing quite frequently, so here are some enhancements.

        @@ -6463,9 +6574,9 @@ via -

        6.4.11 ANSI-TERM (inferior shells/interpreters and REPLs)

        -
        +
        +

        6.4.12 ANSI-TERM (inferior shells/interpreters and REPLs)

        +

        I use ansi term for inferior shells only.

        @@ -6503,7 +6614,7 @@ make C-y work

        (defun tvd-term-paste (&optional string)
        -                      (interactive)
        +                      (interactive)
                               (process-send-string
                                (get-buffer-process (current-buffer))
                                (if string string (current-kill 0))))
        @@ -6522,7 +6633,7 @@ put all term hooks in here
           (define-key term-raw-map (kbd "C-c C-l") 'term-line-mode)
           (define-key term-raw-map (kbd "C-k")
             (lambda ()
        -      (interactive)
        +      (interactive)
               (term-send-raw-string "\C-k")
               (kill-line))))
         (add-hook 'term-mode-hook 'tvd-term-hook)
        @@ -6552,7 +6663,7 @@ finally the inferior REPLs:
         
        (defun iperl ()
           "interactive perl (via perlbrew if exist or global)"
        -  (interactive)
        +  (interactive)
           (let ((perlbrew (expand-file-name "~/perl5/perlbrew/bin/perlbrew")))
             (if (file-exists-p perlbrew)
                 (term-with-args "*perlbrew-de0*" perlbrew "exec" "--" "perl" "-de0")
        @@ -6560,18 +6671,18 @@ finally the inferior REPLs:
         
         (defun iruby ()
           "interactive ruby"
        -  (interactive)
        +  (interactive)
           (term-with-args "*ruby-irb*" "irb"))
         
         (defun ipython ()
           "interactive python"
        -  (interactive)
        +  (interactive)
           (setenv "PYTHONSTARTUP" (expand-file-name "~/.pythonrc"))
           (term-with-args "*python-i*" "python" "-i"))
         
         (defun icalc ()
           "interactive calc"
        -  (interactive)
        +  (interactive)
           (term-with-args "*calc*" (expand-file-name "~/bin/calc")))
         
        @@ -6580,9 +6691,9 @@ finally the inferior REPLs:
        -
        -

        6.4.12 Puppet

        -
        +
        +

        6.4.13 Puppet

        +

        adds hook for .pp files

        @@ -6595,9 +6706,9 @@ adds hook for .pp files
        -
        -

        6.4.13 Novel Mode - Screen Reader

        -
        +
        +

        6.4.14 Novel Mode - Screen Reader

        +

        my own emacs screen reader, very handy to read docs on the road.

        @@ -6612,9 +6723,9 @@ my own emacs screen reader, very handy to read docs on the road.
        -
        -

        6.4.14 Macro Math

        -
        +
        +

        6.4.15 Macro Math

        +

        see macro-math

        @@ -6636,9 +6747,9 @@ mark something and hit C-x C-0 (which is a reminder to C-x C-= w/o the shift)
        -
        -

        6.4.15 Common-Lisp (SLIME)

        -
        +
        +

        6.4.16 Common-Lisp (SLIME)

        +

        I'm learing CL with slime, start with M-x slime.

        @@ -6670,9 +6781,9 @@ INSTALL: (see:
        -

        6.4.16 INFO Mode

        -
        +
        +

        6.4.17 INFO Mode

        +
        (require 'info)
         
        @@ -6683,7 +6794,7 @@ open an info file somewhere outside %infodir% with info-mode

        (defun info-find-file (file)
        -  (interactive "f")
        +  (interactive "f")
           (info-setup file
                       (pop-to-buffer-same-window
                        (format "*info*<%s>"
        @@ -6717,7 +6828,7 @@ contains (interactive) code from 'info-display-manual for manual selection.
         
         If MANUAL not given as argument, ask interactively with completion
         to select from a list of installed manuals."
        -  (interactive
        +  (interactive
            (list
             (progn
               (info-initialize)
        @@ -6735,9 +6846,9 @@ contains (interactive) code from 'info-display-manual for manual selection.
         
        -
        -

        6.4.17 calc et al.

        -
        +
        +

        6.4.18 calc et al.

        +

        emacs provides 4 ways to calculate:

        @@ -6786,9 +6897,9 @@ or, inferior perl calc: M-x icalc, see above
        -
        -

        6.4.18 MACROs

        -
        +
        +

        6.4.19 MACROs

        +

        help: emacswiki macro tricks.

        @@ -6824,7 +6935,7 @@ ignore stuff If the given name is already defined, ask again (and again until unique). If a buffer with the given name exists, kill it (that is, the buffer is there but has not been saved or evaluated yet). Return the name as string." - (interactive) + (interactive) (let ((done nil) (name nil) (mbuf nil) @@ -6842,7 +6953,7 @@ ignore stuff (defun tvd-get-exec-macro-name() "Ask for a macro name to be executed" - (interactive) + (interactive) (let ((macros ()) (N 1) (S nil) @@ -6850,7 +6961,7 @@ ignore stuff (dolist (entry (cdr (assoc tvd-macro-file load-history ))) (setq S (cdr entry)) (setq T (symbol-name S)) - (push (list T N) macros) + (push (list T N) macros) (setq N (1+ N))) (completing-read "enter macro name: " macros nil t nil))) @@ -6862,7 +6973,7 @@ the heart of my elmacro stuff
        (defun tvd-start-or-stop-macro()
           "start macro or stop if started"
        -  (interactive)
        +  (interactive)
           (if (eq defining-kbd-macro nil)
               (progn
                 (elmacro-clear-command-history)
        @@ -6887,7 +6998,7 @@ better than the default function
         If macro defun is known (i.e. because you evaluated the elmacro buffer
         containing the generated defun), it will be executed. Otherwise the
         last kbd-macro will be executed."
        -  (interactive)
        +  (interactive)
           (let ((melm-count 0)
                 (melm-all nil)
                 (melm-abort nil)
        @@ -6959,7 +7070,7 @@ but only load if in use
         
         (defun tvd-macro-store()
           "store current macro to emacs config"
        -  (interactive)
        +  (interactive)
           (copy-region-as-kill (point-min) (point-max))
           (if (not (get-buffer "macros.el"))
               (find-file tvd-macro-file))
        @@ -7000,9 +7111,9 @@ but only load if in use
         
        -
        -

        6.4.19 EWW browser stuff

        -
        +
        +

        6.4.20 EWW browser stuff

        +

        Emacs has a builtin browser, which is not too bad.

        @@ -7018,7 +7129,7 @@ see also: shr-render-[buffer|region] !
        (defun eww-render-current-buffer ()
           "Render HTML in the current buffer with EWW"
        -  (interactive)
        +  (interactive)
           (beginning-of-buffer)
           (eww-display-html 'utf8 (buffer-name)))
         
        @@ -7069,9 +7180,9 @@ hides menus and distractions! Update emacs.
         
        -
        -

        6.4.20 Firestarter

        -
        + -
        -

        6.4.21 Tabulated List Mode

        -
        +
        +

        6.4.22 Tabulated List Mode

        +

        built-in, used by many interactive major modes

        @@ -7112,7 +7223,7 @@ we need to kill tablist's binding in order to have ours run (see below) (define-key tablist-minor-mode-map (kbd "q") 'tvd-close-window) (defun tvd-close-window () - (interactive) + (interactive) (kill-this-buffer) (delete-window)) @@ -7128,9 +7239,9 @@ we need to kill tablist's binding in order to have ours run (see below)
        -
        -

        6.4.22 Help Mode

        -
        +
        +

        6.4.23 Help Mode

        +

        I even customize help windows! … at least a little :)

        @@ -7152,9 +7263,9 @@ I even customize help windows! … at least a little :)
        -
        -

        6.4.23 Suggest Mode

        -
        +
        +

        6.4.24 Suggest Mode

        +

        suggest mode is a great elisp development tool. Execute `M-x suggest' and try it. @@ -7171,7 +7282,7 @@ I use my own clearing function, since suggest doesn't provide this

        (defun tvd-suggest-reload ()
           "Clear suggest buffer and re-paint it."
        -  (interactive)
        +  (interactive)
           (let ((inhibit-read-only t))
             (erase-buffer)
             (suggest--insert-heading suggest--inputs-heading)
        @@ -7185,7 +7296,7 @@ I use my own clearing function, since suggest doesn't provide this
         
         (defun tvd-suggest-jump ()
           "Jump between input and output suggest buffer."
        -  (interactive)
        +  (interactive)
           (forward-line -1)
           (if (eq (line-number-at-pos) 1)
               (suggest--nth-heading 2)
        @@ -7203,9 +7314,9 @@ I use my own clearing function, since suggest doesn't provide this
         
        -
        -

        6.4.24 Followcursor Mode

        -
        +
        +

        6.4.25 Followcursor Mode

        +

        source on github

        @@ -7233,9 +7344,9 @@ The mode is a work-in-progress… -
        -

        6.4.25 Magit

        -
        +
        +

        6.4.26 Magit

        +

        Not much to say about Magit

        @@ -7249,7 +7360,7 @@ Not much to say about Magit (defun tvd-magit-status () "Always call `magit-status' with prefix arg." - (interactive) + (interactive) (let ((current-prefix-arg t)) (call-interactively 'magit-status))) @@ -7271,7 +7382,6 @@ Not much to say about Magit (when (file-exists-p dir) (add-to-list 'magit-repository-directories (cons dir 1)))) (setq magit-completing-read-function 'magit-ido-completing-read) - (setq magit-log-margin '(t "%d-%m-%Y %H:%M" magit-log-margin-width t 18)) ;; navigate magit buffers as I do everywhere else, I do not automatically ;; cycle/decycle though, the magit defaults are absolutely sufficient. (define-key magit-mode-map (kbd "<C-down>") 'magit-section-forward-sibling) @@ -7282,7 +7392,7 @@ Not much to say about Magit ;; works nevertheless. So I disable this specific warning. (defun tvd-ignore-magit-warnings-if-any () - (interactive) + (interactive) (when (get-buffer "*Warnings*") (with-current-buffer "*Warnings*" (goto-char (point-min)) @@ -7303,7 +7413,7 @@ Not much to say about Magit ;; after an exhausting discussion on magit#3139 I use this function ;; to (kind of) switch to another repository from inside magit-status. (defun tvd-switch-magit-repo () - (interactive) + (interactive) (let ((dir (magit-read-repository))) (magit-mode-bury-buffer) (magit-status dir))) @@ -7314,9 +7424,9 @@ Not much to say about Magit
        -
        -

        6.4.26 Dired

        -
        +
        +

        6.4.27 Dired

        +

        I use dired for two things: from inside magit as a convenient way to add or remove files from a repository. Or if I want to rename a @@ -7333,7 +7443,7 @@ tune this as well.

        -
        1. dired-k
          +
          1. dired-k

            dired-k is k for dired/emacs: it colorizes files and directory by age, that is, the older the greyer they get. And it displays flags @@ -7351,7 +7461,7 @@ about the git status of each file, which is really handy.

        2. -
        3. dired-hacks
          +
        4. dired-hacks

          Fuco1s dired-hacks is a place to find the really cool stuff, I mostly use the filters. @@ -7361,7 +7471,7 @@ place to find the really cool stuff, I mostly use the filters. (defun tvd-dired-quit-or-filter-pop (&optional arg) "Remove a filter from the filter stack. If none left, quit the dired buffer." - (interactive "p") + (interactive "p") (if dired-filter-stack (dired-filter-pop arg) (quit-window))) @@ -7371,7 +7481,7 @@ place to find the really cool stuff, I mostly use the filters.

      5. -
      6. dired sort helpers
        +
      7. dired sort helpers

        This sort function by Xah Lee is easy to use and does what it should, great!, However, I added some -desc @@ -7383,7 +7493,7 @@ sister sorts for reverse sorting. Prompt for a choice. URL `http://ergoemacs.org/emacs/dired_sort.html' Version 2015-07-30" - (interactive) + (interactive) (let (sort-by arg) (setq sort-by (ido-completing-read "Sort by:" '( "date" "size" "name" "dir" "date-desc" "size-desc" "name-desc" "dir-desc" ))) (cond @@ -7401,7 +7511,7 @@ sister sorts for reverse sorting.

    -
  • dired git helpers
    +
  • dired git helpers

    via bin chen: make git commands available from dired buffer, which can be used in @@ -7411,7 +7521,7 @@ those rare cases, where my wrappers below don't fit.

    (defun diredext-exec-git-command-in-shell (command &optional arg file-list)
       "Run a shell command git COMMAND  ' on the marked files.  if no
     files marked, always operate on current line in dired-mode"
    -  (interactive
    +  (interactive
        (let ((files (dired-get-marked-files t current-prefix-arg)))
          (list
           ;; Want to give feedback whether this file or marked files are used:
    @@ -7433,7 +7543,7 @@ called with "hydras".
     
    (defun tvd-dired-git-add(&optional arg file-list)
       "Add marked or current file to current repository (stash)."
    -  (interactive
    +  (interactive
         (let ((files (dired-get-marked-files t current-prefix-arg)))
           (list current-prefix-arg files)))
       (dired-do-shell-command "git add -v * " arg file-list)
    @@ -7441,7 +7551,7 @@ called with "hydras".
     
     (defun tvd-dired-git-rm(&optional arg file-list)
       "Remove marked or current file from current repository and filesystem."
    -  (interactive
    +  (interactive
        (let ((files (dired-get-marked-files t current-prefix-arg)))
          (list current-prefix-arg files)))
       (dired-do-shell-command "git rm -rf * " arg file-list)
    @@ -7449,7 +7559,7 @@ called with "hydras".
     
     (defun tvd-dired-git-ungit(&optional arg file-list)
       "Like `tvd-dired-git-rm' but keep the files in the filesystem (unstage)."
    -  (interactive
    +  (interactive
        (let ((files (dired-get-marked-files t current-prefix-arg)))
          (list current-prefix-arg files)))
       (dired-do-shell-command "git rm -rf --cached * " arg file-list)
    @@ -7458,27 +7568,27 @@ called with "hydras".
     
  • -
  • dired navigation
    +
  • dired navigation

    I'm used to jump around with pos1+end

    (defun tvd-dired-begin ()
       "Move point to the first directory in the listing .."
    -  (interactive)
    +  (interactive)
       (goto-char (point-min))
       (dired-next-dirline 2))
     
     (defun tvd-dired-end ()
       "Move point to the last file or directory in the listing."
    -  (interactive)
    +  (interactive)
       (goto-char (point-max))
       (dired-previous-line 1))
     
  • -
  • dired buffer names
    +
  • dired buffer names

    This took me a long time to figure out, but I finally got it: I really hate it how dired names its buffers, it just uses the @@ -7498,7 +7608,7 @@ behavior as a bug, but I doubt many people would agree :) :filter-return '(lambda (buffer) "Modify dired buffer names to this pattern: *dired: full-path*" - (interactive) + (interactive) (with-current-buffer buffer (rename-buffer (format "*dired: %s*" default-directory))) buffer)) @@ -7506,7 +7616,7 @@ behavior as a bug, but I doubt many people would agree :)

  • -
  • dired config and key bindings
    +
  • dired config and key bindings

    and finally put everything together.

    @@ -7518,8 +7628,8 @@ and finally put everything together. ;; when changing directories (define-key dired-mode-map (kbd "RET") 'dired-find-alternate-file) (define-key dired-mode-map (kbd "<C-right>") 'dired-find-alternate-file) - (define-key dired-mode-map (kbd "^") (lambda () (interactive) (find-alternate-file ".."))) - (define-key dired-mode-map (kbd "<C-left>") (lambda () (interactive) (find-alternate-file ".."))) + (define-key dired-mode-map (kbd "^") (lambda () (interactive) (find-alternate-file ".."))) + (define-key dired-mode-map (kbd "<C-left>") (lambda () (interactive) (find-alternate-file ".."))) ;; Xah Lee'S custom sort's (define-key dired-mode-map (kbd "s") 'xah-dired-sort) @@ -7560,13 +7670,72 @@ and finally put everything together. (define-key dired-mode-map (kbd "n") 'dired-create-directory)))
    +
  • +
  • Dired Hydra
    +

    +FIXME: not yet customized to fit my own config +

    +
    +
    (defhydra hydra-dired (:hint nil :color pink)
    +  "
    +_+_ mkdir          _v_iew           _m_ark             _(_ details        _i_nsert-subdir    wdired
    +_C_opy             _O_ view other   _U_nmark all       _)_ omit-mode      _$_ hide-subdir    C-x C-q : edit
    +_D_elete           _o_pen other     _u_nmark           _l_ redisplay      _w_ kill-subdir    C-c C-c : commit
    +_R_ename           _M_ chmod        _t_oggle           _g_ revert buf     _e_ ediff          C-c ESC : abort
    +_Y_ rel symlink    _G_ chgrp        _E_xtension mark   _s_ort             _=_ pdiff
    +_S_ymlink          ^ ^              _F_ind marked      _._ toggle hydra   \\ flyspell
    +_r_sync            ^ ^              ^ ^                ^ ^                _?_ summary
    +_z_ compress-file  _A_ find regexp
    +_Z_ compress       _Q_ repl regexp
    +
    +T - tag prefix
    +"
    +  ("\\" dired-do-ispell)
    +  ("(" dired-hide-details-mode)
    +  (")" dired-omit-mode)
    +  ("+" dired-create-directory)
    +  ("=" diredp-ediff) ;; smart diff
    +  ("?" dired-summary)
    +  ("$" diredp-hide-subdir-nomove)
    +  ("A" dired-do-find-regexp)
    +  ("C" dired-do-copy) ;; Copy all marked files
    +  ("D" dired-do-delete)
    +  ("E" dired-mark-extension)
    +  ("e" dired-ediff-files)
    +  ("F" dired-do-find-marked-files)
    +  ("G" dired-do-chgrp)
    +  ("g" revert-buffer) ;; read all directories again (refresh)
    +  ("i" dired-maybe-insert-subdir)
    +  ("l" dired-do-redisplay) ;; relist the marked or singel directory
    +  ("M" dired-do-chmod)
    +  ("m" dired-mark)
    +  ("O" dired-display-file)
    +  ("o" dired-find-file-other-window)
    +  ("Q" dired-do-find-regexp-and-replace)
    +  ("R" dired-do-rename)
    +  ("r" dired-do-rsynch)
    +  ("S" dired-do-symlink)
    +  ("s" dired-sort-toggle-or-edit)
    +  ("t" dired-toggle-marks)
    +  ("U" dired-unmark-all-marks)
    +  ("u" dired-unmark)
    +  ("v" dired-view-file) ;; q to exit, s to search, = gets line #
    +  ("w" dired-kill-subdir)
    +  ("Y" dired-do-relsymlink)
    +  ("z" diredp-compress-this-file)
    +  ("Z" dired-do-compress)
    +  ("q" nil)
    +  ("." nil :color blue))
    +
    +(define-key dired-mode-map "." 'hydra-dired/body)
    +
    +
  • - -
    -

    6.4.27 Ediff Config

    -
    +
    +

    6.4.28 Ediff Config

    +

    Force ediff to use 1 frame (the current) and not open a new frame for control and help. Also changing the split orientation doesnt @@ -7604,22 +7773,66 @@ Usage: emacs -diff file1 file2

    (defun command-line-diff (switch)
    -  (let ((file1 (pop command-line-args-left))
    -        (file2 (pop command-line-args-left)))
    +  (let ((file1 (pop command-line-args-left))
    +        (file2 (pop command-line-args-left)))
         (ediff file1 file2)))
     (add-to-list 'command-switch-alist '("diff" . command-line-diff))
     
    +
    +
    +
    +
    +

    6.4.29 Projectile

    +
    +
    +
    (require 'projectile)
    +(projectile-mode +1)
    +
    +(defun tvd-dir-to-projectile ()
    +    "drop a .projectile wherever we are"
    +  (interactive)
    +  (with-temp-file ".projectile"
    +    (insert "-.snapshot\n-.git\n-.RCS\n"))
    +  (message (format "Turned %s into projectile project" default-directory)))
    +
    +(defhydra hydra-projectile
    +  ( :color teal
    +    :columns 4)
    +  "Projectile (use C-p for this menu)"
    +  ("s"   projectile-switch-project           "Switch Project")
    +  ("f"   projectile-find-file                "Find File")
    +  ("r"   projectile-recentf                  "Recent Files")
    +  ("b"   projectile-ibuffer                  "Show Project Buffers")
    +
    +  ("g"   projectile-grep                     "Grep")
    +  ("o"   projectile-multi-occur              "Multi Occur")
    +  ("d"   projectile-dired                    "Project Dired")
    +  ("R"   projectile-replace                  "Replace in Project")
    +
    +  ("C"   projectile-invalidate-cache         "Clear Cache")
    +  ("t"   projectile-regenerate-tags          "Regenerate Tags")
    +  ("X"   projectile-cleanup-known-projects   "Cleanup Known Projects")
    +  ("n"   tvd-dir-to-projectile               "Turn current directory into Projectile")
    +
    +  ("c"   projectile-commander                "Commander")
    +  ("k"   projectile-kill-buffers             "Kill Buffers")
    +  ("q"   nil                                 "Cancel" :color blue))
    +
    +(global-set-key (kbd "C-p") 'hydra-projectile/body)
    +(defalias 'p 'hydra-projectile/body)
    +
    +

    -
    -

    6.5 Emacs Interface

    +
    +

    6.5 Emacs Interface

    -
    -

    6.5.1 Parens

    +
    +

    6.5.1 Parens

    display matching braces @@ -7640,8 +7853,8 @@ display matching braces

    -
    -

    6.5.2 highlight todo keywords (such as FIXME)

    +
    +

    6.5.2 highlight todo keywords (such as FIXME)

    Absolutely needed! @@ -7656,8 +7869,8 @@ Absolutely needed!


    -
    -

    6.5.3 UNDO Tree Mode

    +
    +

    6.5.3 UNDO Tree Mode

    Better undo, with redo support. @@ -7700,8 +7913,8 @@ M-_ catched by Xmonad


    -
    -

    6.5.4 Smarter M-x Mode (smex)

    +
    +

    6.5.4 Smarter M-x Mode (smex)

    This is really cool and I don't know how I could ever live without it. @@ -7711,7 +7924,7 @@ This is really cool and I don't know how I could ever live without it. fails @win, so wrap it

    -
    (safe-wrap
    +
    (safe-wrap
      (progn
        (require 'smex)
        (smex-initialize)
    @@ -7724,8 +7937,8 @@ fails @win, so wrap it
     
    -
    -

    6.5.5 Smarter Search

    +
    +

    6.5.5 Smarter Search

    test, replace isearch-forward-regexp first only. @@ -7741,8 +7954,8 @@ dir: ivy/

    -
    -

    6.5.6 Which Func

    +
    +

    6.5.6 Which Func

    display current function - if any - in mode line @@ -7757,8 +7970,8 @@ display current function - if any - in mode line


    -
    -

    6.5.7 Show current-line in the Fringe

    +
    +

    6.5.7 Show current-line in the Fringe

    (require 'fringe-current-line)
    @@ -7777,8 +7990,8 @@ also change the color (matching the mode line
     
    -
    -

    6.5.8 Recent Files

    +
    +

    6.5.8 Recent Files

    You know the file you edited yesterday had "kri" in its name, but @@ -7822,7 +8035,7 @@ modified to exclude already visited files (defun recentf-ido-find-file () "Find a recent file using ido." - (interactive) + (interactive) (let ((file (ido-completing-read "Choose recent file: " (cl-remove-if 'tvd-buffer-exists-p recentf-list) nil t))) @@ -7840,12 +8053,12 @@ recent-files

    (defun undo-kill-buffer (arg)
       "Re-open the last buffer killed.  With ARG, re-open the nth buffer."
    -  (interactive "p")
    +  (interactive "p")
       (let ((recently-killed-list (copy-sequence recentf-list))
             (buffer-files-list
              (delq nil (mapcar (lambda (buf)
                                  (when (buffer-file-name buf)
    -                               (expand-file-name (buffer-file-name buf)))) (buffer-list)))))
    +                               (expand-file-name (buffer-file-name buf)))) (buffer-list)))))
         (mapc
          (lambda (buf-file)
            (setq recently-killed-list
    @@ -7872,8 +8085,8 @@ exclude some auto generated files
     
    -
    -

    6.5.9 IDO mode

    +
    +

    6.5.9 IDO mode

    There are other completion enhancement packages available like ivy @@ -7948,7 +8161,7 @@ from emacs wiki Display ido results vertically, rather than horizontally

    -
    (setq ido-decorations (quote ("\n-> " "" "\n   " "\n   ..." "[" "]"
    +
    (setq ido-decorations (quote ("\n-> " "" "\n   " "\n   ..." "[" "]"
                                   " [No match]" " [Matched]" " [Not readable]"
                                   " [Too big]" " [Confirm]")))
     
    @@ -7972,7 +8185,7 @@ via whattheemacs.d
        (define-key ido-file-completion-map
          (kbd "~")
          (lambda ()
    -       (interactive)
    +       (interactive)
            (if (looking-back "/")
                (insert "~/")
              (call-interactively 'self-insert-command))))
    @@ -7980,7 +8193,7 @@ via whattheemacs.d
        (define-key ido-file-completion-map
          (kbd ":")
          (lambda ()
    -       (interactive)
    +       (interactive)
            (if (looking-back "/")
                (progn
                  (ido-set-current-directory "/ssh:")
    @@ -8015,8 +8228,8 @@ by howardism: [re]open non-writable file with sudo
     
    -
    -

    6.5.10 Save cursor position

    +
    +

    6.5.10 Save cursor position

    So the next time I start emacs and open a file I were editing @@ -8028,7 +8241,7 @@ before.

    (if (version< emacs-version "25.0")
         (progn
           (require 'saveplace)
    -      (setq-default save-place t))
    +      (setq-default save-place t))
       (save-place-mode 1))
     
    @@ -8037,8 +8250,8 @@ before.
    -
    -

    6.5.11 DoReMi experimentation

    +
    +

    6.5.11 DoReMi experimentation

    I'm not using it a lot, sometimes I tune the background color though. @@ -8067,8 +8280,8 @@ cool ones: doremi-buffers, doremi-all-faces-fg+ [s, h]


    -
    -

    6.5.12 Hightligt TABs

    +
    +

    6.5.12 Hightligt TABs

    not a mode, but however: higlight TABs in certain modes @@ -8091,8 +8304,8 @@ not a mode, but however: higlight TABs in certain modes

    -
    -

    6.5.13 Browse kill-ring

    +
    +

    6.5.13 Browse kill-ring

    when active use n and p to browse, <ret> to select, it's the same @@ -8110,8 +8323,8 @@ as <M-y> and I never really use it…

    -
    -

    6.5.14 goto-last-change

    +
    +

    6.5.14 goto-last-change

    Very handy, jump to last change[s]. @@ -8128,8 +8341,8 @@ Very handy, jump to last change[s].

    -
    -

    6.5.15 Bookmarks

    +
    +

    6.5.15 Bookmarks

    I use the builtin bookmark feature quite a lot and am happy with @@ -8161,8 +8374,8 @@ I use the same aliases as in apparix for bash (since I'm used to them)

    -
    -

    6.5.16 which-key

    +
    +

    6.5.16 which-key

    One of the best unobstrusive modes for key help ever. Just start @@ -8182,8 +8395,8 @@ press from there along with the associated functions.

    -
    -

    6.5.17 iBuffer mode

    +
    +

    6.5.17 iBuffer mode

    iBuffer is a great interactive buffer management tool included with @@ -8244,13 +8457,13 @@ with hints from Ogbe et.al. ("Text" (or (mode . text-mode) (filename . "\\.pod$"))) ("LaTeX" (mode . latex-mode)) - ("Interactive" (or + ("Interactive" (or (mode . inferior-python-mode) (mode . slime-repl-mode) (mode . inferior-lisp-mode) (mode . inferior-scheme-mode) (name . "*ielm*"))) - ("Crab" (or + ("Crab" (or (name . "^\\*\\(Help\\|scratch\\|Messages\\)\\*") )) ,tvd-ibuffer-filter-group-name)))) @@ -8271,7 +8484,7 @@ the new advice system soon. (setq ad-return-value (nreverse ad-return-value))) (defun ibuffer-add-dynamic-filter-groups () - (interactive) + (interactive) (dolist (group (ibuffer-vc-generate-filter-groups-by-vc-root)) (add-to-list 'ibuffer-filter-groups group)) (dolist (group (ibuffer-tramp-generate-filter-groups-by-tramp-connection)) @@ -8321,7 +8534,7 @@ buffers to always ignore Use human readable Size column instead of original one

    -
    (define-ibuffer-column size-h
    +
    (define-ibuffer-column size-h
       (:name "Size" :inline t)
       (cond
        ((> (buffer-size) 1000000) (format "%7.1fM" (/ (buffer-size) 1000000.0)))
    @@ -8393,8 +8606,8 @@ override ibuffer M-o binding
     
    -
    -

    6.5.18 Printing

    +
    +

    6.5.18 Printing

    overwrites printing default menu, access via menu File => Print @@ -8424,7 +8637,7 @@ via C-u COMMAND prompts user where to save the Postscript file (which is then converted to PDF at the same location." - (interactive (list (if current-prefix-arg + (interactive (list (if current-prefix-arg (ps-print-preprint 4) (concat (file-name-sans-extension (buffer-file-name)) ".ps")))) @@ -8439,8 +8652,8 @@ via -

    6.5.19 Beacon mode (pointer blink)

    +
    +

    6.5.19 Beacon mode (pointer blink)

    Source: beacon mode @@ -8460,7 +8673,7 @@ editing position. beacon-color 0.3) (add-hook 'beacon-dont-blink-predicates - (lambda () (bound-and-true-p novel-mode))) + (lambda () (bound-and-true-p novel-mode))) (beacon-mode) @@ -8470,8 +8683,8 @@ editing position.

    -
    -

    6.6 mode-line setup (must be the last mode)

    +
    +

    6.6 mode-line setup (must be the last mode)

    I just append the current version of my emacs config and leave out @@ -8483,7 +8696,7 @@ seen even if I have multiple windows open. smaller pos

    -
    (setq-default mode-line-position
    +
    (setq-default mode-line-position
                   '((-3 "%p") (size-indication-mode ("/" (-4 "%I")))
                     " "
                     (line-number-mode
    @@ -8507,7 +8720,7 @@ just a character
     custom modeline
     

    -
    (setq-default mode-line-format
    +
    (setq-default mode-line-format
                   (list
                    "%e"
                    mode-line-front-space
    @@ -8536,13 +8749,13 @@ custom modeline
     
    -
    -

    7 Emacs Autoconfig / Customizegroup stuff

    +
    +

    7 Emacs Autoconfig / Customizegroup stuff


    -
    -

    7.1 font faces

    +
    +

    7.1 font faces

    Font color config, must always be the last thing so all hook faces are loaded. @@ -8622,8 +8835,8 @@ unless we're on windoze


    -
    -

    7.2 variables

    +
    +

    7.2 variables

    If I ever use custom-group to customize a mode, then I create a @@ -8637,14 +8850,14 @@ here. So, in normal times this should be empty, but needs to exist. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(safe-local-variable-values (quote ((ruby-indent-level 4))))) + '(safe-local-variable-values (quote ((ruby-indent-level 4)))))

    -
    -

    7.3 done

    +
    +

    7.3 done

    Finally, this message is being displayed. If this isn't the case I @@ -8661,7 +8874,7 @@ know easily that something went wrong.

    Author: Tom

    -

    Created: 2018-10-01 Mo 21:11

    +

    Created: 2018-10-05 Fr 05:56

    Validate