diff --git a/.emacs b/.emacs index 0fa2a9e..701ee70 100644 --- a/.emacs +++ b/.emacs @@ -1,4 +1,4 @@ -;; Toms Emacs Config - portable - version ("20181220.01") -*-emacs-lisp-*- +;; Toms Emacs Config - portable - version ("20181222.01") -*-emacs-lisp-*- ;; * Introduction ;; This is my emacs config, it is more than twenty years old. It @@ -745,6 +745,9 @@ ;; 20181220.01 ;; - added org table move cells functions +;; 20181222.01 +;; - removed duplicate key bindings, added via comment + ;; ** TODO ;; - check helpful https://github.com/wilfred/helpful @@ -772,7 +775,7 @@ ;; My emacs config has a version (consisting of a timestamp with a ;; 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 "20181220.01") +(defvar tvd-emacs-version "20181222.01") ;; -------------------------------------------------------------------------------- @@ -4284,13 +4287,7 @@ intended to be #'> to support reverse sorting." (copy-region-as-kill (point-min) (point-max)))) ;; Move single cells using C-M-up C-M-down C-M-left C-M-right -(add-hook 'org-mode-hook - '(lambda () - (local-set-key [C-M-up] (quote org-table-move-single-cell-up)) - (local-set-key [C-M-down] (quote org-table-move-single-cell-down)) - (local-set-key [C-M-left] (quote org-table-move-single-cell-left)) - (local-set-key [C-M-right] (quote org-table-move-single-cell-right)))) - +;; [[https://cs.gmu.edu/~kauffman/software/org-table-move-single-cell.el][via Kauffmann]] (defun org-table-swap-cells (i1 j1 i2 j2) "Swap two cells" (let ((c1 (org-table-get i1 j1)) diff --git a/emacs.html b/emacs.html index b26b045..f96a370 100644 --- a/emacs.html +++ b/emacs.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +-Toms Emacs Config - portable - version ("20181210.01") -*-emacs-lisp-*- +Toms Emacs Config - portable - version ("20181222.01") -*-emacs-lisp-*-
-This is my emacs config, it is more than twenty years old. It @@ -493,11 +493,11 @@ outshine-to-html, written by myself, see below.
20160420.03: @@ -1800,13 +1800,41 @@ all magit buffers and restores window setup 20181210.01
+20181212.01 +
++20181212.02 +
++20181220.01 +
++20181222.01 +
+Snippets which maybe of use in the future
(with-current-buffer (get-buffer "scratch") @@ -1842,8 +1870,8 @@ Snippets which maybe of use in the future
My emacs config has a version (consisting of a timestamp with a @@ -1851,7 +1879,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 "20181210.01") +(defvar tvd-emacs-version "20181222.01")
FIXME: complete @@ -1922,8 +1950,8 @@ all modes and extensions are located here
better visibility of cursor in console sessions @@ -1957,8 +1985,8 @@ better visibility of cursor in console sessions
I save backup files in a central location below the init dir, that @@ -2029,8 +2057,8 @@ This is system specific and only matches special host names.
make backspace work in console sessions @@ -2043,8 +2071,8 @@ make backspace work in console sessions
I prefer a bare bones emacs window without any distractions, so turn them off. @@ -2060,8 +2088,8 @@ I prefer a bare bones emacs window without any distractions, so turn them off.
(setq initial-scratch-message "") @@ -2074,8 +2102,8 @@ I prefer a bare bones emacs window without any distractions, so turn them off.
y is shorter than yes and less error prone. @@ -2088,8 +2116,8 @@ y is shorter than yes and less error prone.
very useful to know current column @@ -2102,8 +2130,8 @@ very useful to know current column
this can be seen in xmobar @@ -2117,8 +2145,8 @@ this can be seen in xmobar
(setq require-final-newline t) @@ -2128,8 +2156,8 @@ this can be seen in xmobar
where to look for extensions: @@ -2157,8 +2185,8 @@ modules
Used here and there below, loaded as early as possible @@ -2170,8 +2198,8 @@ Used here and there below, loaded as early as possible
handy function to recompile all lisp files @@ -2186,8 +2214,8 @@ handy function to recompile all lisp files
I use those bindings everywhere (firefox, terminal, etc), and in @@ -2213,11 +2241,11 @@ emacs as well.
Very practical: resize windows easily. @@ -2234,8 +2262,8 @@ hit C-c C-r then use cursor keys to resize, <ret> to finish
(require 'windmove) @@ -2246,8 +2274,8 @@ hit C-c C-r then use cursor keys to resize, <ret> to finish
The key M-o has different functions depending on context: @@ -2379,8 +2407,8 @@ Use only in X11 emacs - setting M-O inside console causes <up> and
(defun tvd-quarter-windows () @@ -2398,8 +2426,8 @@ Use only in X11 emacs - setting M-O inside console causes <up> and
(winner-mode 1) @@ -2414,8 +2442,8 @@ keybindings: C-c right - winner-redo
F5 == reload file if it has been modified by another process, shift @@ -2440,8 +2468,8 @@ because Xmonad
I use spaces everywhere but Makefiles. If I encounter TABs I @@ -2481,8 +2509,8 @@ Use normal tabs in makefiles
M-x q r <ret> is short enough for me, no need for key bindings for @@ -2513,8 +2541,8 @@ those
point stays while scrolling @@ -2567,8 +2595,8 @@ I'm grown up!
(define-key global-map [C-down-mouse-2] 'imenu) @@ -2578,8 +2606,8 @@ I'm grown up!
Related: @@ -2646,8 +2674,8 @@ marked region automatically copied, also on win
are you from the past? @@ -2660,8 +2688,8 @@ are you from the past?
Complete filenames case insensitive and ignore certain files during completion.
@@ -2691,8 +2719,8 @@ via
-
Do I really need those anymore? Added ca 1999…
@@ -2722,8 +2750,8 @@ do NOT ask to save abbrevs on exit
I dont need it all the time and only for experimentation, so lets
@@ -2765,8 +2793,8 @@ only use melpa on demand
narrowed fringe background
@@ -2779,11 +2807,11 @@ narrowed fringe background
Sometimes I need a text mode scratch buffer while scratch is
@@ -2799,8 +2827,8 @@ this never gets deleted, but cleaned instead.
use autoscratch otherwise
@@ -2832,8 +2860,8 @@ use autoscratch otherwise
I also like to be scratch buffers persistent with
@@ -2855,8 +2883,8 @@ I also like to be scratch buffers persistent with
via abo abo
@@ -2877,13 +2905,13 @@ I think this is a recenter calculation bug.
(global-set-key (kbd "C-s") 'isearch-forward-regexp)
@@ -2925,8 +2953,8 @@ I think this is a recenter calculation bug.
via emacswiki
@@ -3003,13 +3031,13 @@ more help with: describe-function occur-mode
I stole this somewhere, as far as I remember, emacswiki, however, I
@@ -3033,8 +3061,8 @@ always had F7 for goto-line
Sometimes when sitting in a very dark enviroment, my usual light
@@ -3077,8 +3105,8 @@ fast
Go to the beginning/end of a line, hit it twice in a row to go to
@@ -3142,8 +3170,8 @@ This is the most natural use for those keys
by Jens Heunemann: jump to percent position into current buffer
@@ -3164,8 +3192,8 @@ by Jens Heunemann: jump to percent position into current buffer
There's not a lot about vi[m] I like, but jumping with % to a
@@ -3205,8 +3233,8 @@ only useful in programming modes
Mark a region, then use M-up|down to move it around
@@ -3305,8 +3333,8 @@ code from
-
via stackoverflow
@@ -3328,8 +3356,8 @@ via stackoverflow
Simulate the # function of vi, marks the symbol at point, C-s then
@@ -3373,8 +3401,8 @@ via ergomacs
Kinda screen reader for the poor. I use this sometimes with info
@@ -3400,8 +3428,8 @@ left+right margin on demand (but nothing else)
this is just a shortcut for:
@@ -3430,8 +3458,8 @@ idea via:
-
I just create a new read-only buffer and copy the contents of the
@@ -3480,8 +3508,8 @@ a file is not maintained via VC anyway.
From time to time I get annoyed by the many dozen buffers
@@ -3514,8 +3542,8 @@ setup accidentally.
Remove TABs, leading and trailing spaces, re-indent a buffer.
@@ -3545,8 +3573,8 @@ via whattheemacs.d
converts:
@@ -3590,8 +3618,8 @@ used in dired buffers to cleanup filenames by german windows users.
Add newline and jump to indent from wherever I am in the current
@@ -3634,8 +3662,8 @@ disabled, interferes with modes.
There's not much use for the mouse in emacs, but this gimick is
@@ -3665,8 +3693,8 @@ via stackoverflow
via stackoverflow
@@ -3702,8 +3730,8 @@ usage samples below.
Try to eval 'fn, catch errors, if any but make it possible for
@@ -3725,8 +3753,8 @@ emacs to continue undisturbed, used with SMEX, see below.
align-regexp is already a very usefull tool, however, sometimes I
@@ -3776,8 +3804,8 @@ wrappers to make this easier.
Some helper functions I use here and there.
@@ -3816,14 +3844,14 @@ Some helper functions I use here and there.
Not much configured for python, I'm happy with the defaults as it seems :)
@@ -3867,8 +3895,8 @@ Not much configured for python, I'm happy with the defaults as it seems :)
I am a perl addict. I love it, therefore, emacs must be prepared
@@ -4015,8 +4043,8 @@ and hook them into cperl
13.11.2018: disabled in exchange for smartparens, which see
@@ -4057,8 +4085,8 @@ I use paredit in lisp a lot, and I'm mostly happy with the defaults.
I'm trying to migrate to smart-parens, since it supports all of
@@ -4278,8 +4306,8 @@ I use my own lisp comment tool until sp#942 is fixed
I use ETAGS for some projects. With etags I can easily jump to the
@@ -4356,11 +4384,11 @@ some handy aliases
Used for XML and the likes.
@@ -4387,8 +4415,8 @@ Used for XML and the likes.
Web development is shit. Tech involved is a mess, and in most cases
@@ -4482,8 +4510,8 @@ convert a text list into a html list.
Written by myself many years ago, but I'm still using it daily to
@@ -4501,8 +4529,8 @@ view and prepare cisco configs.
I rarely use markdown, but sometimes I stumble upon such a file and
@@ -4538,8 +4566,8 @@ parens and quotes constraints check on save
I LOVE POD! POD is the documentation format of perl and there's a
@@ -4673,8 +4701,8 @@ pod mode config
conf-mode annoyingly overwrites the global keybinding C-c C-c with
@@ -4695,10 +4723,10 @@ configs. Applies for derivates as well.
config-general-mode (also on Melpa).
I use TAB for completion AND tab and outshine. Also, the mode
enables electric indent automatically, but I disabled it for
@@ -4867,8 +4895,8 @@ for config-general-mode (which inherits from conf-mode).
the shortest mode ever, via emacswiki.
@@ -4891,10 +4919,10 @@ the shortest mode ever, vi
One of the best modes I ever discovered. Press C-= multiple times
@@ -4954,8 +4982,8 @@ related to ER:
For a long time this stuff was located here in my emacs config. As
@@ -5058,8 +5086,8 @@ it appears as NNN,NN.
I use change-inner with a prefix key and some wrappers around
@@ -5181,8 +5209,8 @@ typing the prefix key twice calls the real change-inner
This one is great as well, I use it to toggle flags and such stuff
@@ -5238,8 +5266,8 @@ short command anymore, so C-t would be free now, wouldn't it?
same as word-wrap but without the fringe which I hate the most!
@@ -5261,8 +5289,8 @@ overwritten by visual-line-mode above for specifics
Delete stuff fast. Press the key multiple times - delete more
@@ -5280,8 +5308,8 @@ things. Inspired by expand-region. Written by myself.
extracted from debian package emacs-goodies-el-35.2+nmu1, since
@@ -5298,8 +5326,8 @@ the current buffer, however it looks.
Edit all occurences of something at once. Great for re-factoring.
@@ -5340,11 +5368,11 @@ behavior, so, I modify it myself using defadvice.
I am a hardcore bash user, but from time to time eshell is good
@@ -5624,8 +5652,8 @@ no need for less or more, this is emacs, isn't it?
General configuration for all things elisp.
@@ -5861,8 +5889,8 @@ opens a new frame with all those buffers already opened and pinned.
el2markdown is a module which
@@ -5886,8 +5914,8 @@ README.md. Take care though: it doesn't convert the META section.
Edit remote files, one of the best things in emacs. I use it every day heavily.
@@ -5916,8 +5944,8 @@ see also backup section
I use org mode to take notes mostly at work. I also track projects
@@ -6233,8 +6261,8 @@ always use the latest docs
I use org mode for along time now, primarily at work, but did not
@@ -6477,7 +6505,8 @@ Configuration and key bindings for org agenda (same as in the hydra)
I'm so used to lovely org mode tables, I need them everywhere!
@@ -6823,14 +6852,78 @@ via setq spc " ")))
(delete-trailing-whitespace)
(copy-region-as-kill (point-min) (point-max))))
+
+
+Move single cells using C-M-up C-M-down C-M-left C-M-right
+via Kauffmann
+
+actual org table config
+
Making presentations within emacs with org mode is cool as well.
@@ -7035,8 +7132,8 @@ Will be inserted as first help slide in a slide show
I maintain my emacs config with outshine mode. It works a lot like
@@ -7216,8 +7313,8 @@ posting online, which makes it way easier to read.
I use the very same cycle style as in org mode: when on a heading,
@@ -7315,8 +7412,8 @@ orange fringe when narrowed
I use narrowing quite frequently, so here are some enhancements.
@@ -7356,8 +7453,8 @@ via
-
I use ansi term for inferior shells only.
@@ -7473,8 +7570,8 @@ finally the inferior REPLs:
adds hook for .pp files
@@ -7488,8 +7585,8 @@ adds hook for .pp files
my own emacs screen reader, very handy to read docs on the road.
@@ -7505,8 +7602,8 @@ my own emacs screen reader, very handy to read docs on the road.
see macro-math
@@ -7529,8 +7626,8 @@ mark something and hit C-x C-0 (which is a reminder to C-x C-= w/o the shift)
I'm learing CL with slime, start with M-x slime.
@@ -7563,8 +7660,8 @@ INSTALL: (see:
-
emacs provides 4 ways to calculate:
@@ -7746,8 +7843,8 @@ or, inferior perl calc: M-x icalc, see above
help: emacswiki macro tricks.
@@ -7960,8 +8057,8 @@ but only load if in use
Emacs has a builtin browser, which is not too bad.
@@ -8029,8 +8126,8 @@ hides menus and distractions! Update emacs.
experimental: do things on save buffer etc.
@@ -8039,8 +8136,8 @@ Source: firestarter
built-in, used by many interactive major modes
@@ -8088,8 +8185,8 @@ we need to kill tablist's binding in order to have ours run (see below)
I even customize help windows! … at least a little :)
@@ -8119,8 +8216,8 @@ I even customize help windows! … at least a little :)
suggest mode is a great
@@ -8170,8 +8267,8 @@ I use my own clearing function, since suggest doesn't provide this
source on github
@@ -8200,8 +8297,8 @@ The mode is a work-in-progress…
-
Not much to say about Magit
@@ -8296,8 +8393,8 @@ Not much to say about Magit
I use dired for two things: from inside magit as a convenient way
@@ -8315,7 +8412,7 @@ tune this as well.
Fuco1s dired-hacks is a
place to find the really cool stuff, I mostly use the filters.
@@ -8357,7 +8454,7 @@ place to find the really cool stuff, I mostly use the filters.
This sort function by Xah Lee
is easy to use and does what it should, great!, However, I added some -desc
@@ -8387,7 +8484,7 @@ sister sorts for reverse sorting.
via bin chen:
make git commands available from dired buffer, which can be used in
@@ -8444,7 +8541,7 @@ called with "hydras".
FIXME: not yet customized to fit my own config
Force ediff to use 1 frame (the current) and not open a new frame
@@ -8663,8 +8760,8 @@ Usage: emacs -diff file1 file2
https://oremacs.com/2015/01/26/occur-dwim/
@@ -8739,8 +8836,8 @@ Usage: emacs -diff file1 file2
brightness wrappers
@@ -8827,8 +8924,8 @@ brightness wrappers
workspace configuration, like desktops. Seems to be a good implementation, w/o save though
@@ -8920,11 +9017,11 @@ There's also some face config, see defcustom at end of file!
display matching braces
@@ -8945,8 +9042,8 @@ display matching braces
Absolutely needed!
@@ -8961,8 +9058,8 @@ Absolutely needed!
Better undo, with redo support.
@@ -9005,8 +9102,8 @@ M-_ catched by Xmonad
This is really cool and I don't know how I could ever live without it.
@@ -9029,8 +9126,8 @@ fails @win, so wrap it
test, replace isearch-forward-regexp first only.
@@ -9046,8 +9143,8 @@ dir: ivy/
display current function - if any - in mode line
@@ -9062,8 +9159,8 @@ display current function - if any - in mode line
You know the file you edited yesterday had "kri" in its name, but
@@ -9177,8 +9274,8 @@ exclude some auto generated files
There are other completion enhancement packages available like ivy
@@ -9320,8 +9417,8 @@ by howardism: [re]open non-writable file with sudo
So the next time I start emacs and open a file I were editing
@@ -9342,8 +9439,8 @@ before.
I'm not using it a lot, sometimes I tune the background color though.
@@ -9372,8 +9469,8 @@ cool ones: doremi-buffers, doremi-all-faces-fg+ [s, h]
not a mode, but however: higlight TABs in certain modes
@@ -9396,8 +9493,8 @@ not a mode, but however: higlight TABs in certain modes
when active use n and p to browse, <ret> to select, it's the same
@@ -9415,8 +9512,8 @@ as <M-y> and I never really use it…
Very handy, jump to last change[s].
@@ -9433,8 +9530,8 @@ Very handy, jump to last change[s].
I use the builtin bookmark feature quite a lot and am happy with
@@ -9466,8 +9563,8 @@ I use the same aliases as in apparix for bash (since I'm used to them)
One of the best unobstrusive modes for key help ever. Just start
@@ -9487,8 +9584,8 @@ press from there along with the associated functions.
iBuffer is a great interactive buffer management tool included with
@@ -9698,8 +9795,8 @@ override ibuffer M-o binding
overwrites printing default menu, access via menu File => Print
@@ -9744,8 +9841,8 @@ via
-
Source: beacon mode
@@ -9775,8 +9872,8 @@ editing position.
I just append the current version of my emacs config and leave out
@@ -9844,13 +9941,13 @@ custom modeline
Font color config, must always be the last thing so all hook faces are loaded.
@@ -9922,8 +10019,8 @@ unless we're on windoze
If I ever use custom-group to customize a mode, then I create a
@@ -9944,8 +10041,8 @@ here. So, in normal times this should be empty, but needs to exist.
Finally, this message is being displayed. If this isn't the case I
@@ -9962,7 +10059,7 @@ know easily that something went wrong.
3.26 abbreviations
+3.26 abbreviations
3.27 meaningful names for buffers with the same name
+3.27 meaningful names for buffers with the same name
3.28 packages
+3.28 packages
3.29 My own global variables
+3.29 My own global variables
3.30 More scratch space
+3.30 More scratch space
3.30.1 Text scratch
+3.30.1 Text scratch
3.30.2 Autoscratch
+3.30.2 Autoscratch
3.30.3 Persistent Scratch
+3.30.3 Persistent Scratch
3.31 Recenter config
+3.31 Recenter config
4 Global Key Bindings
+4 Global Key Bindings
4.1 c-h != delete
+4.1 c-h != delete
(keyboard-translate ?\C-h ?\C-?)
@@ -2894,8 +2922,8 @@ I think this is a recenter calculation bug.
4.2 general keys (re-)mappings
+4.2 general keys (re-)mappings
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
5 Productivity Functions
+5 Productivity Functions
5.1 goto line with tmp line numbers
+5.1 goto line with tmp line numbers
5.2 invert fore- and background
+5.2 invert fore- and background
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
5.4 percent function
+5.4 percent function
5.5 Simulate vi's % (percent) function
+5.5 Simulate vi's % (percent) function
5.6 Move region
+5.6 Move region
5.7 comment-uncomment region with one key binding
+5.7 comment-uncomment region with one key binding
5.8 search for symbol at point
+5.8 search for symbol at point
5.9 Window Margin
+5.9 Window Margin
5.10 Fill and justify a paragraph
+5.10 Fill and justify a paragraph
5.11 Make a read-only copy of the current buffer
+5.11 Make a read-only copy of the current buffer
5.12 Cleanup, close all windows and kill all buffers
+5.12 Cleanup, close all windows and kill all buffers
5.13 Cleanup current buffer
+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
5.15 Better newline(s)
+5.15 Better newline(s)
5.16 Mouse Rectangle
+5.16 Mouse Rectangle
5.17 DOS <=> UNIX conversion helpers
+5.17 DOS <=> UNIX conversion helpers
(defun dos2unix ()
@@ -3683,8 +3711,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
5.19 helper to catch load errors
+5.19 helper to catch load errors
5.20 Alignment Wrappers
+5.20 Alignment Wrappers
5.21 String Helpers
+5.21 String Helpers
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)
@@ -3838,8 +3866,8 @@ Some helper functions I use here and there.
6.1.2 python mode
+6.1.2 python mode
6.1.3 cperl mode
+6.1.3 cperl mode
6.1.4 Paredit for lisp only
+6.1.4 Paredit for lisp only
6.1.5 Smart Parens
+6.1.5 Smart Parens
6.1.6 ETAGS
+6.1.6 ETAGS
6.2 Text Modes
+6.2 Text Modes
6.2.1 sgml
+6.2.1 sgml
6.2.2 web-mode (JS, HTML, CSS combined)
+6.2.2 web-mode (JS, HTML, CSS combined)
6.2.3 Cisco Mode
+6.2.3 Cisco Mode
6.2.4 Markdown
+6.2.4 Markdown
6.2.5 POD mode
+6.2.5 POD mode
6.2.6 conf-mode
+6.2.6 conf-mode
6.2.7 Config::General mode
+6.2.7 Config::General mode
(defun config-general-completion-at-point ()
"Complete word at point using hippie-expand, if not on a comment."
@@ -4817,7 +4845,7 @@ Bugreport: http://d
6.2.8 Xmodmap Mode
+6.2.8 Xmodmap Mode
6.2.9 MMM Mode
+6.2.9 MMM Mode
(add-to-list 'load-path (concat tvd-lisp-dir "/mmm-mode"))
@@ -4913,7 +4941,7 @@ see doc for class definition in var 'mmm-classes-alist
(mmm-add-classes
'((html-pod
@@ -4931,11 +4959,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
6.3.2 Mark, Copy, Yank Things
+6.3.2 Mark, Copy, Yank Things
6.3.3 change-inner
+6.3.3 change-inner
6.3.4 Rotate text
+6.3.4 Rotate text
6.3.5 Word wrapping
+6.3.5 Word wrapping
6.3.6 Viking Mode
+6.3.6 Viking Mode
6.3.7 HTMLize
+6.3.7 HTMLize
6.3.8 iEdit (inline edit multiple searches)
+6.3.8 iEdit (inline edit multiple searches)
6.4 Interactives
+6.4 Interactives
6.4.1 eShell stuff, or if interactive stuff is needed, use ansi-term
+6.4.1 eShell stuff, or if interactive stuff is needed, use ansi-term
6.4.2 Emacs LISP interactive
+6.4.2 Emacs LISP interactive
6.4.3 el2markdown
+6.4.3 el2markdown
6.4.4 tramp mode
+6.4.4 tramp mode
6.4.5 org mode
+6.4.5 org mode
6.4.6 org agenda mode
+6.4.6 org agenda mode
(add-hook 'org-agenda-mode-hook '(lambda () (progn
(setq org-agenda-follow-mode t
org-log-into-drawer t
- org-agenda-entry-text-mode t)
+ org-agenda-entry-text-mode t
+ org-agenda-sorting-strategy '(priority-down timestamp-down))
(local-set-key (kbd "n") 'tvd-org-agenda-capture)
(local-set-key (kbd "o") 'tvd-org-agenda-solitair)
(local-set-key (kbd "a") 'tvd-org-agenda-edit-entry)
@@ -6495,8 +6524,8 @@ Configuration and key bindings for org agenda (same as in the hydra)
6.4.7 org table mode
+6.4.7 org table mode
(defun org-table-swap-cells (i1 j1 i2 j2)
+ "Swap two cells"
+ (let ((c1 (org-table-get i1 j1))
+ (c2 (org-table-get i2 j2)))
+ (org-table-put i1 j1 c2)
+ (org-table-put i2 j2 c1)
+ (org-table-align)))
-(with-eval-after-load "org"
+(defun org-table-move-single-cell (direction)
+ "Move the current cell in a cardinal direction according to the
+ parameter symbol: 'up 'down 'left 'right. Swaps contents of
+ adjacent cell with current one."
+ (unless (org-at-table-p)
+ (error "No table at point"))
+ (let ((di 0) (dj 0))
+ (cond ((equal direction 'up) (setq di -1))
+ ((equal direction 'down) (setq di +1))
+ ((equal direction 'left) (setq dj -1))
+ ((equal direction 'right) (setq dj +1))
+ (t (error "Not a valid direction, must be up down left right")))
+ (let* ((i1 (org-table-current-line))
+ (j1 (org-table-current-column))
+ (i2 (+ i1 di))
+ (j2 (+ j1 dj)))
+ (org-table-swap-cells i1 j1 i2 j2)
+ (org-table-goto-line i2)
+ (org-table-goto-column j2))))
+
+(defun org-table-move-single-cell-up ()
+ "Move a single cell up in a table; swap with anything in target cell"
+ (interactive)
+ (org-table-move-single-cell 'up))
+
+(defun org-table-move-single-cell-down ()
+ "Move a single cell down in a table; swap with anything in target cell"
+ (interactive)
+ (org-table-move-single-cell 'down))
+
+(defun org-table-move-single-cell-left ()
+ "Move a single cell left in a table; swap with anything in target cell"
+ (interactive)
+ (org-table-move-single-cell 'left))
+
+(defun org-table-move-single-cell-right ()
+ "Move a single cell right in a table; swap with anything in target cell"
+ (interactive)
+ (org-table-move-single-cell 'right))
+
+(with-eval-after-load "org"
(add-hook 'org-mode-hook
(lambda ()
(local-set-key (kbd "C-c t l") 'tvd-copy-org-table-col)
(local-set-key (kbd "C-c t r") 'tvd-copy-org-table-row)
- (local-set-key (kbd "C-c t c") 'tvd-copy-org-table-cell))))
+ (local-set-key (kbd "C-c t c") 'tvd-copy-org-table-cell)
+ (local-set-key (kbd "C-M-<left>") 'org-table-move-single-cell-left)
+ (local-set-key (kbd "C-M-<right>") 'org-table-move-single-cell-right)
+ (local-set-key (kbd "C-M-<up>") 'org-table-move-single-cell-up)
+ (local-set-key (kbd "C-M-<down>") 'org-table-move-single-cell-down))))
6.4.8 org mode slideshows
+6.4.8 org mode slideshows
6.4.9 outshine mode
+6.4.9 outshine mode
6.4.10 outline mode
+6.4.10 outline mode
6.4.11 narrowing (no mode but fits here)
+6.4.11 narrowing (no mode but fits here)
6.4.12 ANSI-TERM (inferior shells/interpreters and REPLs)
+6.4.12 ANSI-TERM (inferior shells/interpreters and REPLs)
6.4.13 Puppet
+6.4.13 Puppet
6.4.14 Novel Mode - Screen Reader
+6.4.14 Novel Mode - Screen Reader
6.4.15 Macro Math
+6.4.15 Macro Math
6.4.16 Common-Lisp (SLIME)
+6.4.16 Common-Lisp (SLIME)
6.4.17 INFO Mode
+6.4.17 INFO Mode
(require 'info)
@@ -7695,8 +7792,8 @@ from examples, I love this one!, replaces the ? buffer
6.4.18 calc et al.
+6.4.18 calc et al.
6.4.19 MACROs
+6.4.19 MACROs
6.4.20 EWW browser stuff
+6.4.20 EWW browser stuff
6.4.21 Firestarter
+6.4.21 Firestarter
6.4.22 Tabulated List Mode
+6.4.22 Tabulated List Mode
6.4.23 Help Mode
+6.4.23 Help Mode
6.4.24 Suggest Mode
+6.4.24 Suggest Mode
6.4.25 Followcursor Mode
+6.4.25 Followcursor Mode
6.4.26 Magit
+6.4.26 Magit
6.4.27 Dired
+6.4.27 Dired
6.4.28 Ediff Config
+6.4.28 Ediff Config
6.4.29 Projectile
+6.4.29 Projectile
(require 'projectile)
@@ -8714,8 +8811,8 @@ Usage: emacs -diff file1 file2
6.4.30 Occur
+6.4.30 Occur
6.4.31 Window Hydra
+6.4.31 Window Hydra
6.4.32 Eyebrowse Workspaces
+6.4.32 Eyebrowse Workspaces
6.5 Emacs Interface
+6.5 Emacs Interface
6.5.1 Parens
+6.5.1 Parens
6.5.2 highlight todo keywords (such as FIXME)
+6.5.2 highlight todo keywords (such as FIXME)
6.5.3 UNDO Tree Mode
+6.5.3 UNDO Tree Mode
6.5.4 Smarter M-x Mode (smex)
+6.5.4 Smarter M-x Mode (smex)
6.5.5 Smarter Search
+6.5.5 Smarter Search
6.5.6 Which Func
+6.5.6 Which Func
6.5.7 Show current-line in the Fringe
+6.5.7 Show current-line in the Fringe
(require 'fringe-current-line)
@@ -9082,8 +9179,8 @@ also change the color (matching the mode line
6.5.8 Recent Files
+6.5.8 Recent Files
6.5.9 IDO mode
+6.5.9 IDO mode
6.5.10 Save cursor position
+6.5.10 Save cursor position
6.5.11 DoReMi experimentation
+6.5.11 DoReMi experimentation
6.5.12 Hightligt TABs
+6.5.12 Hightligt TABs
6.5.13 Browse kill-ring
+6.5.13 Browse kill-ring
6.5.14 goto-last-change
+6.5.14 goto-last-change
6.5.15 Bookmarks
+6.5.15 Bookmarks
6.5.16 which-key
+6.5.16 which-key
6.5.17 iBuffer mode
+6.5.17 iBuffer mode
6.5.18 Printing
+6.5.18 Printing
6.5.19 Beacon mode (pointer blink)
+6.5.19 Beacon mode (pointer blink)
6.6 mode-line setup (must be the last mode)
+6.6 mode-line setup (must be the last mode)
7 Emacs Autoconfig / Customizegroup stuff
+7 Emacs Autoconfig / Customizegroup stuff
7.1 font faces
+7.1 font faces
7.2 variables
+7.2 variables
7.3 done
+7.3 done