Merge branch 'master' of github.com:IvanMalison/dotfiles
This commit is contained in:
commit
b51676c0f6
@ -373,7 +373,8 @@ but provide support for writing custom elisp.
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** request
|
*** request
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package request)
|
(use-package request
|
||||||
|
:defer t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Named Build
|
** Named Build
|
||||||
<<namedbuild>>
|
<<namedbuild>>
|
||||||
@ -812,8 +813,9 @@ A macro for composing functions together to build an interactive command to copy
|
|||||||
** Download a File Into a Buffer
|
** Download a File Into a Buffer
|
||||||
<<downloadfile>>
|
<<downloadfile>>
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun imalison:download-to-buffer (uri)
|
(defun imalirson:download-to-buffer (uri)
|
||||||
(interactive (list (read-string "Enter uri: ")))
|
(interactive (list (read-string "Enter uri: ")))
|
||||||
|
(require 'request)
|
||||||
(request uri
|
(request uri
|
||||||
:parser 'buffer-string
|
:parser 'buffer-string
|
||||||
:success (cl-function
|
:success (cl-function
|
||||||
@ -1475,12 +1477,12 @@ I don't have any use for this now that I use frames mode, but its an interesting
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
** stream
|
** stream
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package stream)
|
(use-package stream
|
||||||
|
:defer t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** tile
|
** tile
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package tile
|
(use-package tile
|
||||||
:after hydra
|
|
||||||
:bind ("C-c t" . imalison:hydra-tile/body)
|
:bind ("C-c t" . imalison:hydra-tile/body)
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
@ -1488,6 +1490,7 @@ I don't have any use for this now that I use frames mode, but its an interesting
|
|||||||
(defvar imalison:wide-tile-strategy tile-wide)
|
(defvar imalison:wide-tile-strategy tile-wide)
|
||||||
(defvar imalison:master-tile-strategy (tile-argument-buffer-fetcher
|
(defvar imalison:master-tile-strategy (tile-argument-buffer-fetcher
|
||||||
:layout tile-master-left))
|
:layout tile-master-left))
|
||||||
|
(require 'hydra)
|
||||||
(defhydra imalison:hydra-tile
|
(defhydra imalison:hydra-tile
|
||||||
nil
|
nil
|
||||||
"tile"
|
"tile"
|
||||||
@ -1698,7 +1701,7 @@ I use helm for almost all emacs completion
|
|||||||
(progn
|
(progn
|
||||||
(use-package helm-org
|
(use-package helm-org
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:defer 1
|
:defer 5
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(setq helm-split-window-default-side 'same)
|
(setq helm-split-window-default-side 'same)
|
||||||
@ -1730,10 +1733,10 @@ I use helm for almost all emacs completion
|
|||||||
(setq helm-ag-always-set-extra-option nil)))
|
(setq helm-ag-always-set-extra-option nil)))
|
||||||
(helm-mode 1)))
|
(helm-mode 1)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
[[(helm split window)][Ensure that helm buffers are started in the window that currently holds the focus]]
|
|
||||||
** helm-projectile
|
** helm-projectile
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package helm-projectile
|
(use-package helm-projectile
|
||||||
|
:defer 1
|
||||||
:commands (helm-projectile-on)
|
:commands (helm-projectile-on)
|
||||||
:bind (:map helm-projectile-projects-map
|
:bind (:map helm-projectile-projects-map
|
||||||
("M-s" . imalison:switch-to-project-and-search)
|
("M-s" . imalison:switch-to-project-and-search)
|
||||||
@ -1754,6 +1757,7 @@ I use helm for almost all emacs completion
|
|||||||
(imalison:do-in-project dir (term-projectile-forward))))
|
(imalison:do-in-project dir (term-projectile-forward))))
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
|
(shut-up (helm-projectile-on))
|
||||||
(helm-delete-action-from-source "Search in Project"
|
(helm-delete-action-from-source "Search in Project"
|
||||||
helm-source-projectile-projects)
|
helm-source-projectile-projects)
|
||||||
(helm-delete-action-from-source "Open term for project"
|
(helm-delete-action-from-source "Open term for project"
|
||||||
@ -1810,7 +1814,6 @@ I use helm for almost all emacs completion
|
|||||||
(setq projectile-enable-caching nil)
|
(setq projectile-enable-caching nil)
|
||||||
(setq projectile-completion-system 'helm)
|
(setq projectile-completion-system 'helm)
|
||||||
(add-to-list 'projectile-globally-ignored-files "Godeps")
|
(add-to-list 'projectile-globally-ignored-files "Godeps")
|
||||||
(shut-up (helm-projectile-on))
|
|
||||||
(diminish 'projectile-mode)
|
(diminish 'projectile-mode)
|
||||||
(bind-key* "C-c p s" 'imalison:do-ag)
|
(bind-key* "C-c p s" 'imalison:do-ag)
|
||||||
(bind-key* "C-c p S" 'imalison:set-options-do-ag)
|
(bind-key* "C-c p S" 'imalison:set-options-do-ag)
|
||||||
@ -2053,10 +2056,10 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
|
|||||||
** align
|
** align
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package align
|
(use-package align
|
||||||
:after hydra
|
|
||||||
:bind ("C-c C-a" . imalison:align-regexp-hydra/body)
|
:bind ("C-c C-a" . imalison:align-regexp-hydra/body)
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
|
(require 'hydra)
|
||||||
(defun imalison:complex-align-regexp ()
|
(defun imalison:complex-align-regexp ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((current-prefix-arg t))
|
(let ((current-prefix-arg t))
|
||||||
@ -2378,6 +2381,7 @@ Reduce indentation for some functions
|
|||||||
**** edebug
|
**** edebug
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package edebug
|
(use-package edebug
|
||||||
|
:defer t
|
||||||
:config
|
:config
|
||||||
(progn (setq edebug-trace t)))
|
(progn (setq edebug-trace t)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
@ -3387,7 +3391,7 @@ alphanumeric characters only."
|
|||||||
**** org-projectile
|
**** org-projectile
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package org-projectile
|
(use-package org-projectile
|
||||||
:demand t
|
:defer t
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(setq org-projectile-projects-file
|
(setq org-projectile-projects-file
|
||||||
@ -3660,6 +3664,7 @@ I've disabled magithub because it causes magit to be super slow
|
|||||||
** git-link
|
** git-link
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package git-link
|
(use-package git-link
|
||||||
|
:defer t
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(setq git-link-use-commit t)))
|
(setq git-link-use-commit t)))
|
||||||
@ -3817,7 +3822,7 @@ in term-mode. This makes term-mode 1000% more useful
|
|||||||
(especially having M-x and C-y available).
|
(especially having M-x and C-y available).
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package term
|
(use-package term
|
||||||
:after helm
|
:demand t
|
||||||
:preface
|
:preface
|
||||||
(progn
|
(progn
|
||||||
(defun imalison:avy-term (arg)
|
(defun imalison:avy-term (arg)
|
||||||
@ -3844,36 +3849,39 @@ in term-mode. This makes term-mode 1000% more useful
|
|||||||
("M-y" . helm-show-kill-ring-for-term))
|
("M-y" . helm-show-kill-ring-for-term))
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(require 'helm)
|
(use-package helm-ring
|
||||||
(require 'helm-ring)
|
:ensure nil
|
||||||
(defvar helm-kill-ring-for-term-actions
|
:defer 1
|
||||||
'(("Yank" . imalison:term-paste)
|
:config
|
||||||
("Delete" . (lambda (_candidate)
|
(progn
|
||||||
(cl-loop for cand in (helm-marked-candidates)
|
(defvar helm-kill-ring-for-term-actions
|
||||||
do (setq kill-ring
|
'(("Yank" . imalison:term-paste)
|
||||||
(delete cand kill-ring)))))))
|
("Delete" . (lambda (_candidate)
|
||||||
(defvar helm-source-kill-ring-for-term
|
(cl-loop for cand in (helm-marked-candidates)
|
||||||
(helm-build-sync-source "Kill Ring"
|
do (setq kill-ring
|
||||||
:init (lambda () (helm-attrset 'last-command last-command))
|
(delete cand kill-ring)))))))
|
||||||
:candidates #'helm-kill-ring-candidates
|
(defvar helm-source-kill-ring-for-term
|
||||||
:filtered-candidate-transformer #'helm-kill-ring-transformer
|
(helm-build-sync-source "Kill Ring"
|
||||||
:action 'helm-kill-ring-for-term-actions
|
:init (lambda () (helm-attrset 'last-command last-command))
|
||||||
:persistent-action 'ignore
|
:candidates #'helm-kill-ring-candidates
|
||||||
:persistent-help "DoNothing"
|
:filtered-candidate-transformer #'helm-kill-ring-transformer
|
||||||
:migemo t
|
:action 'helm-kill-ring-for-term-actions
|
||||||
:multiline t))
|
:persistent-action 'ignore
|
||||||
|
:persistent-help "DoNothing"
|
||||||
|
:migemo t
|
||||||
|
:multiline t))
|
||||||
|
|
||||||
(defun helm-show-kill-ring-for-term ()
|
(defun helm-show-kill-ring-for-term ()
|
||||||
"Preconfigured `helm' for `kill-ring'.
|
"Preconfigured `helm' for `kill-ring'.
|
||||||
It is drop-in replacement of `yank-pop'.
|
It is drop-in replacement of `yank-pop'.
|
||||||
|
|
||||||
First call open the kill-ring browser, next calls move to next line."
|
First call open the kill-ring browser, next calls move to next line."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((enable-recursive-minibuffers t))
|
(let ((enable-recursive-minibuffers t))
|
||||||
(helm :sources helm-source-kill-ring-for-term
|
(helm :sources helm-source-kill-ring-for-term
|
||||||
:buffer "*helm kill ring*"
|
:buffer "*helm kill ring*"
|
||||||
:resume 'noresume
|
:resume 'noresume
|
||||||
:allow-nest t)))
|
:allow-nest t)))))
|
||||||
|
|
||||||
(defun imalison:term-char-mode ()
|
(defun imalison:term-char-mode ()
|
||||||
(interactive)
|
(interactive)
|
||||||
@ -3979,7 +3987,7 @@ First call open the kill-ring browser, next calls move to next line."
|
|||||||
crux-reopen-as-root-mode makes it so that any file owned by root will automatically be opened as the root user.
|
crux-reopen-as-root-mode makes it so that any file owned by root will automatically be opened as the root user.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package crux
|
(use-package crux
|
||||||
:demand t
|
:defer 1
|
||||||
:bind (("C-c C-s" . crux-sudo-edit)
|
:bind (("C-c C-s" . crux-sudo-edit)
|
||||||
("C-c C-r" . crux-eval-and-replace)
|
("C-c C-r" . crux-eval-and-replace)
|
||||||
("C-c o" . crux-open-with))
|
("C-c o" . crux-open-with))
|
||||||
@ -3994,8 +4002,7 @@ crux-reopen-as-root-mode makes it so that any file owned by root will automatica
|
|||||||
** helm-systemd
|
** helm-systemd
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package helm-systemd
|
(use-package helm-systemd
|
||||||
:after helm
|
:commands helm-systemd)
|
||||||
:demand t)
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** aurel
|
** aurel
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
@ -4058,6 +4065,7 @@ crux-reopen-as-root-mode makes it so that any file owned by root will automatica
|
|||||||
** anzu
|
** anzu
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package anzu
|
(use-package anzu
|
||||||
|
:defer 3
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(global-anzu-mode +1)
|
(global-anzu-mode +1)
|
||||||
@ -4162,6 +4170,7 @@ I had to disable this mode because something that it does messes with coding set
|
|||||||
** recentf
|
** recentf
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package recentf
|
(use-package recentf
|
||||||
|
:defer 1
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(setq recentf-max-saved-items 1000
|
(setq recentf-max-saved-items 1000
|
||||||
@ -4717,7 +4726,7 @@ Ensure all themes that I use are installed:
|
|||||||
** all-the-icons
|
** all-the-icons
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package all-the-icons
|
(use-package all-the-icons
|
||||||
:demand t)
|
:defer 5)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** spaceline
|
** spaceline
|
||||||
*** Disable sRGB colorspace to make powerline separators work
|
*** Disable sRGB colorspace to make powerline separators work
|
||||||
|
@ -26,33 +26,35 @@
|
|||||||
|
|
||||||
;; Without this, org can behave very strangely
|
;; Without this, org can behave very strangely
|
||||||
(use-package org
|
(use-package org
|
||||||
|
:defer t
|
||||||
:init
|
:init
|
||||||
;; Taken from https://github.com/raxod502/radian/blob/master/radian-emacs/radian-org.el
|
(progn
|
||||||
(defun radian--org-git-version ()
|
;; Taken from https://github.com/raxod502/radian/blob/master/radian-emacs/radian-org.el
|
||||||
"Return the abbreviated SHA for the Org Git repo."
|
(defun radian--org-git-version ()
|
||||||
(let ((default-directory (concat user-emacs-directory
|
"Return the abbreviated SHA for the Org Git repo."
|
||||||
"straight/repos/org/")))
|
(let ((default-directory (concat user-emacs-directory
|
||||||
(if (executable-find "git")
|
"straight/repos/org/")))
|
||||||
(with-temp-buffer
|
(if (executable-find "git")
|
||||||
;; Returns the shortest prefix of the SHA for HEAD that is
|
(with-temp-buffer
|
||||||
;; unique, down to a minimum of 4 characters (see
|
;; Returns the shortest prefix of the SHA for HEAD that is
|
||||||
;; git-rev-parse(1)).
|
;; unique, down to a minimum of 4 characters (see
|
||||||
(call-process "git" nil '(t nil) nil
|
;; git-rev-parse(1)).
|
||||||
"rev-parse" "--short" "HEAD")
|
(call-process "git" nil '(t nil) nil
|
||||||
(if (> (buffer-size) 0)
|
"rev-parse" "--short" "HEAD")
|
||||||
(string-trim (buffer-string))
|
(if (> (buffer-size) 0)
|
||||||
;; This shouldn't happen, unless somehow Org is not
|
(string-trim (buffer-string))
|
||||||
;; actually a Git repo.
|
;; This shouldn't happen, unless somehow Org is not
|
||||||
"revision unknown"))
|
;; actually a Git repo.
|
||||||
;; This also shouldn't happen, because how would you have
|
"revision unknown"))
|
||||||
;; gotten Org in the first place, then? But the real world
|
;; This also shouldn't happen, because how would you have
|
||||||
;; sucks and we have to account for stuff like this.
|
;; gotten Org in the first place, then? But the real world
|
||||||
"git not available")))
|
;; sucks and we have to account for stuff like this.
|
||||||
(defalias #'org-git-version #'radian--org-git-version)
|
"git not available")))
|
||||||
(defun org-release () "N/A")
|
(defalias #'org-git-version #'radian--org-git-version)
|
||||||
(provide 'org-version)
|
(defun org-release () "N/A")
|
||||||
(with-eval-after-load 'org
|
(provide 'org-version)
|
||||||
(defalias #'org-git-version #'radian--org-git-version)))
|
(with-eval-after-load 'org
|
||||||
|
(defalias #'org-git-version #'radian--org-git-version))))
|
||||||
|
|
||||||
(let ((debug-on-error t))
|
(let ((debug-on-error t))
|
||||||
(org-babel-load-file
|
(org-babel-load-file
|
||||||
|
Loading…
Reference in New Issue
Block a user