|
|
|
@@ -1,10 +1,33 @@
|
|
|
|
|
# -*- mode: org; -*-
|
|
|
|
|
I suggest you read this document at [[http://ivanmalison.github.io/dotfiles/]] or,
|
|
|
|
|
of course, in emacs, as the internal links that follow are unlikely to work
|
|
|
|
|
anywhere else (including, for example, at https://github.com/IvanMalison/dotfiles).
|
|
|
|
|
* About
|
|
|
|
|
This is my emacs configuration in literate form. It aspires to be like the
|
|
|
|
|
incredibly well commented literate configurations of [[http://pages.sachachua.com/.emacs.d/Sacha.html][Sacha Chua]] and [[http://doc.rix.si/cce/cce.html][Ryan Rix]],
|
|
|
|
|
but I haven't quite gotten around to polishing it to the point that those two
|
|
|
|
|
have. Still, there are definitely a few sections of which I am quite proud, and that
|
|
|
|
|
others may find to be useful.
|
|
|
|
|
This is my emacs configuration in literate form. It aspires to be
|
|
|
|
|
like the incredibly well commented literate configurations of [[http://pages.sachachua.com/.emacs.d/Sacha.html][Sacha Chua]] and
|
|
|
|
|
[[http://doc.rix.si/cce/cce.html][Ryan Rix]], but I haven't quite gotten around to polishing it to the point that
|
|
|
|
|
those two have. Still, there are definitely a few sections of which I am quite
|
|
|
|
|
proud, and that others may find to be useful.
|
|
|
|
|
** Highlights
|
|
|
|
|
These sections are the ones that have the most potential to be interesting to
|
|
|
|
|
others:
|
|
|
|
|
*** [[Functions][My functions section]]
|
|
|
|
|
...has a bunch of generally useful functions:
|
|
|
|
|
+ [[downloadfile][Download a file into a buffer]] (curl straight into a file)
|
|
|
|
|
+ [[editscript][Edit a script on $PATH]]
|
|
|
|
|
+ [[namedbuild][Named Build of Builder Macros]] and [[composemacros][A Compose Supporting Macros]]
|
|
|
|
|
*** Configuration of My Own Packages
|
|
|
|
|
- [[term-projectile][term-projectile]] and [[term-manager][term-manager]]
|
|
|
|
|
- [[org-projectile][org-projectile]]
|
|
|
|
|
- [[multi-line][multi-line]]
|
|
|
|
|
- [[github-search][github-search]]
|
|
|
|
|
- [[flimenu][flimenu]]
|
|
|
|
|
*** [[programminglanguages][Programming Language Configurations]]
|
|
|
|
|
My programming language major mode configurations can all be found [[programminglanguages][here]].
|
|
|
|
|
*** [[org][org-mode]]
|
|
|
|
|
My [[org][org-mode]] configuration is pretty comprehensive, but not super well commented.
|
|
|
|
|
|
|
|
|
|
* HTML Headers
|
|
|
|
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="http://www.pirilampo.org/styles/readtheorg/css/htmlize.css"/>
|
|
|
|
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="http://www.pirilampo.org/styles/readtheorg/css/readtheorg.css"/>
|
|
|
|
|
|
|
|
|
@@ -362,8 +385,8 @@ This is disabled for now until I figure out what to do with emit.
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package request)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** Macros
|
|
|
|
|
*** Named Build
|
|
|
|
|
** Named Build
|
|
|
|
|
<<namedbuild>>
|
|
|
|
|
imalison:named-build provides a way to invoke a macro in such a way
|
|
|
|
|
that the lambda that it produces is given a name.
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
@@ -394,7 +417,7 @@ new macro name and the -fn suffix.
|
|
|
|
|
`(imalison:named-builder-builder
|
|
|
|
|
,name ,(intern (concat (symbol-name name) "-fn"))))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Emacs Version Predicate
|
|
|
|
|
** Emacs Version Predicate
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defmacro imalison:emacs-version-predicate-fn (major-version minor-version)
|
|
|
|
|
`(lambda ()
|
|
|
|
@@ -407,8 +430,9 @@ new macro name and the -fn suffix.
|
|
|
|
|
|
|
|
|
|
(imalison:named-builder imalison:emacs-version-predicate)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Compose Functions
|
|
|
|
|
**** A version supporting macros
|
|
|
|
|
** Compose Functions
|
|
|
|
|
*** A version supporting macros
|
|
|
|
|
<<composemacros>>
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defun imalison:help-function-arglist (fn)
|
|
|
|
|
(let ((result (help-function-arglist fn)))
|
|
|
|
@@ -450,7 +474,7 @@ new macro name and the -fn suffix.
|
|
|
|
|
(imalison:named-builder imalison:compose)
|
|
|
|
|
(imalison:named-builder imalison:compose-macro)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
**** Arbitrary arguments at every step
|
|
|
|
|
*** Arbitrary arguments at every step
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defun imalison:make-list (thing)
|
|
|
|
|
(if (listp thing)
|
|
|
|
@@ -469,7 +493,7 @@ new macro name and the -fn suffix.
|
|
|
|
|
`(apply ,(car funcs)
|
|
|
|
|
(imalison:make-list (imalison:compose-with-apply-helper ,(cdr funcs))))))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
**** Simpler unary version
|
|
|
|
|
*** Simpler unary version
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defmacro imalison:compose-unary (&rest funcs)
|
|
|
|
|
"Build a new function with NAME that is the composition of FUNCS."
|
|
|
|
@@ -482,16 +506,16 @@ new macro name and the -fn suffix.
|
|
|
|
|
'arg
|
|
|
|
|
`(funcall ,(car funcs) (imalison:compose-helper-unary ,(cdr funcs)))))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Make Interactive
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
** Make Interactive
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defmacro imalison:make-interactive-fn (function)
|
|
|
|
|
`(lambda (&rest args)
|
|
|
|
|
(interactive)
|
|
|
|
|
(apply ,function args)))
|
|
|
|
|
|
|
|
|
|
(imalison:named-builder imalison:make-interactive)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Advice Add Around Builder
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** Advice Add Around Builder
|
|
|
|
|
For composing functions with an apply so that they can be used with
|
|
|
|
|
the ~:around~ keyword of advice-add.
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
@@ -501,11 +525,11 @@ the ~:around~ keyword of advice-add.
|
|
|
|
|
|
|
|
|
|
(imalison:named-builder imalison:advice-add-around-builder)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
**** Kill New
|
|
|
|
|
*** Kill New
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(imalison:advice-add-around-builder imalison:kill-new-around kill-new)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Let Around
|
|
|
|
|
** Let Around
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defmacro imalison:let-around-fn (orig-func &rest forms)
|
|
|
|
|
(let* ((orig-interactive-form (interactive-form orig-func))
|
|
|
|
@@ -520,18 +544,18 @@ the ~:around~ keyword of advice-add.
|
|
|
|
|
|
|
|
|
|
(imalison:named-builder imalison:let-around)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Let Around Advice
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
** Let Around Advice
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defmacro imalison:let-advise-around-fn (&rest forms)
|
|
|
|
|
`(lambda (orig-func &rest args)
|
|
|
|
|
(let ,forms
|
|
|
|
|
(apply orig-func args))))
|
|
|
|
|
|
|
|
|
|
(imalison:named-builder imalison:let-advise-around)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Compose Around Builder
|
|
|
|
|
For composing functions with an apply so that they can be used with the ~:around~ keyword of advice-add.
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** Compose Around Builder
|
|
|
|
|
For composing functions with an apply so that they can be used with the ~:around~ keyword of advice-add.
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
;; TODO/XXX: Isn't this just apply? why doesn't apply work here
|
|
|
|
|
(defun imalison:around-identity (fn &rest args)
|
|
|
|
|
(apply fn args))
|
|
|
|
@@ -540,8 +564,8 @@ the ~:around~ keyword of advice-add.
|
|
|
|
|
`(imalison:compose-fn ,@functions imalison:around-identity))
|
|
|
|
|
|
|
|
|
|
(imalison:named-builder imalison:compose-around-builder)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Measure Time
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** Measure Time
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defmacro imalison:measure-time (&rest body)
|
|
|
|
|
"Measure and return the running time of the code block."
|
|
|
|
@@ -732,6 +756,7 @@ A macro for composing functions together to build an interactive command to copy
|
|
|
|
|
(perform-replace "\\n" "\n" nil nil delimited nil nil beg end nil)))))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** Download a File Into a Buffer
|
|
|
|
|
<<downloadfile>>
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defun imalison:download-to-buffer (uri)
|
|
|
|
|
(interactive (list (read-string "Enter uri: ")))
|
|
|
|
@@ -755,6 +780,9 @@ A macro for composing functions together to build an interactive command to copy
|
|
|
|
|
(intern (mapconcat 'imalison:maybe-symbol-name args "")))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** Edit a script on PATH
|
|
|
|
|
<<editscript>> Note that you'll need to make sure that emacs properly inherits
|
|
|
|
|
the path variable for this work. Check out my [[exec-path-from-shell]] config for
|
|
|
|
|
details.
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defun imalison:get-executables-at-path (filepath)
|
|
|
|
|
(when (and (file-exists-p filepath) (f-directory? filepath))
|
|
|
|
@@ -797,6 +825,47 @@ A macro for composing functions together to build an interactive command to copy
|
|
|
|
|
(when (executable-find "copyq")
|
|
|
|
|
(run-with-idle-timer 10 nil 'imalison:copyq-sync))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** helm-zsh-history
|
|
|
|
|
This was stolen from https://github.com/jwiegley/dot-emacs
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defvar helm-c-source-zsh-history
|
|
|
|
|
'((name . "Zsh History")
|
|
|
|
|
(candidates . helm-c-zsh-history-set-candidates)
|
|
|
|
|
(action . (("Execute Command" . helm-c-zsh-history-action)))
|
|
|
|
|
(volatile)
|
|
|
|
|
(requires-pattern . 3)
|
|
|
|
|
(delayed)))
|
|
|
|
|
|
|
|
|
|
(defun helm-c-zsh-history-set-candidates (&optional request-prefix)
|
|
|
|
|
(let ((pattern (replace-regexp-in-string
|
|
|
|
|
" " ".*"
|
|
|
|
|
(or (and request-prefix
|
|
|
|
|
(concat request-prefix
|
|
|
|
|
" " helm-pattern))
|
|
|
|
|
helm-pattern))))
|
|
|
|
|
(with-current-buffer (find-file-noselect "~/.zsh_history" t t)
|
|
|
|
|
(auto-revert-mode -1)
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(loop for pos = (re-search-backward pattern nil t)
|
|
|
|
|
while pos
|
|
|
|
|
collect (replace-regexp-in-string
|
|
|
|
|
"\\`:.+?;" ""
|
|
|
|
|
(buffer-substring (line-beginning-position)
|
|
|
|
|
(line-end-position)))))))
|
|
|
|
|
|
|
|
|
|
(defun helm-c-zsh-history-action (candidate)
|
|
|
|
|
(imalison:named-compile candidate))
|
|
|
|
|
|
|
|
|
|
(defun helm-command-from-zsh ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(require 'helm)
|
|
|
|
|
(helm-other-buffer 'helm-c-source-zsh-history "*helm zsh history*"))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Use projectile as default directory
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(imalison:let-around imalison:projectile-helm-command-from-zsh helm-command-from-zsh
|
|
|
|
|
(default-directory (projectile-project-root)))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** Other
|
|
|
|
|
The stuff in this section is pretty crusty. I don't think its used anywhere, but
|
|
|
|
|
I keep it around just in case I need it.
|
|
|
|
@@ -999,6 +1068,20 @@ Set the default fill-column
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(setq-default fill-column 80)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** Show Trailing Whitespace
|
|
|
|
|
Trailing whitespace is really messy and annoying, which makes this a must-have
|
|
|
|
|
in my opinion. It's kind of crazy how often you will encounter serious codebases
|
|
|
|
|
with random whitespace ALL over the place.
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(setq-default show-trailing-whitespace t)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Disable
|
|
|
|
|
Unfortunately, this setting can get annoying in a lot of modes, which is why I
|
|
|
|
|
use this hook to disable it in those modes
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defun imalison:disable-show-trailing-whitespace ()
|
|
|
|
|
(setq show-trailing-whitespace nil))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** Encoding
|
|
|
|
|
UTF-8 everywhere
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
@@ -1226,6 +1309,10 @@ proced is an top like utility that runs inside of emacs. The following sets auto
|
|
|
|
|
:config
|
|
|
|
|
(beacon-mode 1))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** iregister
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package iregister)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** discover-my-major
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package discover-my-major)
|
|
|
|
@@ -1302,7 +1389,7 @@ https://github.com/alpaker/Fill-Column-Indicator/issues/21 for more details
|
|
|
|
|
:config
|
|
|
|
|
(progn
|
|
|
|
|
(defhydra imalison:hydra-font-resize
|
|
|
|
|
nil
|
|
|
|
|
nil
|
|
|
|
|
"Resize Font"
|
|
|
|
|
("-" imalison:font-size-decr "Decrease")
|
|
|
|
|
("d" imalison:font-size-decr "Decrease")
|
|
|
|
@@ -1331,7 +1418,7 @@ https://github.com/alpaker/Fill-Column-Indicator/issues/21 for more details
|
|
|
|
|
(imalison:named-compile "glide up"))
|
|
|
|
|
|
|
|
|
|
(defhydra imalison:compile nil "Compile"
|
|
|
|
|
("s" helm-command-from-zsh "Select a command from shell history")
|
|
|
|
|
("s" imalison:projectile-helm-command-from-zsh "Select a command from shell history")
|
|
|
|
|
("c" imalison:named-compile "Enter Custom Command")
|
|
|
|
|
("t" imalison:make-test "Test")
|
|
|
|
|
("u" imalison:glide-up "Update Dependencies"))))
|
|
|
|
@@ -1599,42 +1686,6 @@ I use helm for almost all emacs completion
|
|
|
|
|
(use-package jump-char
|
|
|
|
|
:bind (("C-;" . jump-char-forward)))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** helm-zsh-history
|
|
|
|
|
This was stolen from https://github.com/jwiegley/dot-emacs
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defvar helm-c-source-zsh-history
|
|
|
|
|
'((name . "Zsh History")
|
|
|
|
|
(candidates . helm-c-zsh-history-set-candidates)
|
|
|
|
|
(action . (("Execute Command" . helm-c-zsh-history-action)))
|
|
|
|
|
(volatile)
|
|
|
|
|
(requires-pattern . 3)
|
|
|
|
|
(delayed)))
|
|
|
|
|
|
|
|
|
|
(defun helm-c-zsh-history-set-candidates (&optional request-prefix)
|
|
|
|
|
(let ((pattern (replace-regexp-in-string
|
|
|
|
|
" " ".*"
|
|
|
|
|
(or (and request-prefix
|
|
|
|
|
(concat request-prefix
|
|
|
|
|
" " helm-pattern))
|
|
|
|
|
helm-pattern))))
|
|
|
|
|
(with-current-buffer (find-file-noselect "~/.zsh_history" t t)
|
|
|
|
|
(auto-revert-mode -1)
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(loop for pos = (re-search-backward pattern nil t)
|
|
|
|
|
while pos
|
|
|
|
|
collect (replace-regexp-in-string
|
|
|
|
|
"\\`:.+?;" ""
|
|
|
|
|
(buffer-substring (line-beginning-position)
|
|
|
|
|
(line-end-position)))))))
|
|
|
|
|
|
|
|
|
|
(defun helm-c-zsh-history-action (candidate)
|
|
|
|
|
(imalison:named-compile candidate))
|
|
|
|
|
|
|
|
|
|
(defun helm-command-from-zsh ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(require 'helm)
|
|
|
|
|
(helm-other-buffer 'helm-c-source-zsh-history "*helm zsh history*"))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** flimenu
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(imalison:use-package flimenu
|
|
|
|
@@ -1810,6 +1861,7 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
|
|
|
|
|
|
|
|
|
|
(add-to-list 'org-show-context-detail '(magit-goto . lineage))
|
|
|
|
|
(advice-add 'magit-diff-visit-file :after 'imalison:after-magit-visit-file)
|
|
|
|
|
(add-hook 'magit-popup-mode-hook 'imalison:disable-show-trailing-whitespace)
|
|
|
|
|
(use-package magit-filenotify
|
|
|
|
|
;; Seems like OSX does not support filenotify.
|
|
|
|
|
:disabled t
|
|
|
|
@@ -1945,6 +1997,7 @@ modeline and with excessive http requests to github.
|
|
|
|
|
#+END_SRC
|
|
|
|
|
* Major Modes
|
|
|
|
|
** Programming
|
|
|
|
|
<<programminglanguages>>
|
|
|
|
|
*** python
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package python
|
|
|
|
@@ -2593,7 +2646,8 @@ Intero seems to be causing hangs, so it has been disabled
|
|
|
|
|
(defvar-setq org-mobile-directory "~/Dropbox/Apps/MobileOrg")
|
|
|
|
|
|
|
|
|
|
(setq org-goto-interface 'outline-path-completion
|
|
|
|
|
org-goto-max-level 10)
|
|
|
|
|
org-goto-max-level 10
|
|
|
|
|
org-export-headline-levels 5)
|
|
|
|
|
(add-hook 'org-mode-hook 'imalison:disable-linum-mode)
|
|
|
|
|
(add-hook 'org-mode-hook (lambda () (setq org-todo-key-trigger t)))
|
|
|
|
|
(add-hook 'org-agenda-mode-hook 'imalison:disable-linum-mode)
|
|
|
|
@@ -3007,6 +3061,56 @@ background of code to whatever theme I'm using's background"
|
|
|
|
|
|
|
|
|
|
(add-hook 'org-export-before-processing-hook 'imalison:org-inline-css-hook)))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
**** Use my own default naming scheme for org-headings
|
|
|
|
|
First we define a function that will generate a sanitized version of the heading
|
|
|
|
|
as its link target.
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defun imalison:org-get-raw-value (item)
|
|
|
|
|
(when (listp item)
|
|
|
|
|
(let* ((property-list (cadr item)))
|
|
|
|
|
(when property-list (plist-get property-list :raw-value)))))
|
|
|
|
|
|
|
|
|
|
(defun imalison:sanitize-name (name)
|
|
|
|
|
(replace-regexp-in-string "[^[:alpha:]]" "" (s-downcase name)))
|
|
|
|
|
|
|
|
|
|
(defun imalison:generate-name (datum cache)
|
|
|
|
|
(let ((raw-value (imalison:org-get-raw-value datum)))
|
|
|
|
|
(if raw-value
|
|
|
|
|
(imalison:sanitize-name raw-value)
|
|
|
|
|
;; This is the default implementation from org
|
|
|
|
|
(let ((type (org-element-type datum)))
|
|
|
|
|
(format "org%s%d"
|
|
|
|
|
(if type
|
|
|
|
|
(replace-regexp-in-string "-" "" (symbol-name type))
|
|
|
|
|
"secondarystring")
|
|
|
|
|
(incf (gethash type cache 0)))))))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
|
This function replaces the default naming scheme with a call to
|
|
|
|
|
~imalison:generate-name~, and uses a slightly different uniquify approach.
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defun org-export-get-reference (datum info)
|
|
|
|
|
"Return a unique reference for DATUM, as a string.
|
|
|
|
|
DATUM is either an element or an object. INFO is the current
|
|
|
|
|
export state, as a plist. Returned reference consists of
|
|
|
|
|
alphanumeric characters only."
|
|
|
|
|
(let ((type (org-element-type datum))
|
|
|
|
|
(cache (or (plist-get info :internal-references)
|
|
|
|
|
(let ((h (make-hash-table :test #'eq)))
|
|
|
|
|
(plist-put info :internal-references h)
|
|
|
|
|
h)))
|
|
|
|
|
(reverse-cache (or (plist-get info :taken-internal-references)
|
|
|
|
|
(let ((h (make-hash-table :test 'equal)))
|
|
|
|
|
(plist-put info :taken-internal-references h)
|
|
|
|
|
h))))
|
|
|
|
|
(or (gethash datum cache)
|
|
|
|
|
(let* ((name (imalison:generate-name datum cache))
|
|
|
|
|
(number (+ 1 (gethash name reverse-cache -1)))
|
|
|
|
|
(new-name (format "%s%s" name (if (< 0 number) number ""))))
|
|
|
|
|
(puthash name number reverse-cache)
|
|
|
|
|
(puthash datum new-name cache)
|
|
|
|
|
new-name))))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
**** org-projectile
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(imalison:use-package org-projectile
|
|
|
|
@@ -3240,6 +3344,7 @@ emr (emacs refactor) provides support for refactoring in many programming langua
|
|
|
|
|
(progn
|
|
|
|
|
(define-key term-raw-map (kbd "C-h") help-map)
|
|
|
|
|
(add-hook 'term-mode-hook 'imalison:disable-linum-mode)
|
|
|
|
|
(add-hook 'term-mode-hook 'imalison:disable-show-trailing-whitespace)
|
|
|
|
|
(setq term-buffer-maximum-size 0)))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** term-manager
|
|
|
|
@@ -3343,6 +3448,10 @@ crux-reopen-as-root-mode makes it so that any file owned by root will automatica
|
|
|
|
|
(progn
|
|
|
|
|
(crux-reopen-as-root-mode)))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** kde-connect
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package kdeconnect)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
* Chat
|
|
|
|
|
** erc
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
@@ -4117,6 +4226,15 @@ Ensure all themes that I use are installed:
|
|
|
|
|
;; 'spaceline-gh-notifier and 'imalison:muni disabled for now
|
|
|
|
|
(spaceline-spacemacs-theme)))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** page-break-lines
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package page-break-lines
|
|
|
|
|
:defer 1
|
|
|
|
|
:diminish (page-break-lines-mode)
|
|
|
|
|
:config
|
|
|
|
|
(progn
|
|
|
|
|
(global-page-break-lines-mode +1)))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** helm-themes
|
|
|
|
|
helm-themes provides an easy way to switch between emacs-themes.
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|