diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2021-10-07 16:27:09 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2021-10-07 16:27:09 +0100 |
commit | 9536a47cc12d4515aa3dc33b2fc508912111743c (patch) | |
tree | ddc38e1b91935b2bf14f4d80ef2852f20cc5f8bc | |
parent | 878e223bac13cb3849b4a45c5f2ee836ab053a67 (diff) |
Big update with all the latest config
Diffstat (limited to '')
-rw-r--r-- | bookmarks | 28 | ||||
-rw-r--r-- | configuration.el | 367 | ||||
-rw-r--r-- | configuration.org | 698 | ||||
-rw-r--r-- | custom-settings.el | 127 | ||||
-rw-r--r-- | eww-bookmarks | 2 | ||||
-rw-r--r-- | init.el | 52 | ||||
-rw-r--r-- | init.el-bak | 7 | ||||
-rw-r--r-- | init.el-old | 633 | ||||
-rw-r--r-- | org-clock-save.el | 4 | ||||
-rw-r--r-- | orgsettings.el | 201 | ||||
-rw-r--r-- | projectile-bookmarks.eld | 1 |
11 files changed, 55 insertions, 2065 deletions
@@ -1,20 +1,20 @@ -;;;; Emacs Bookmark Format Version 1 ;;;; -*- coding: utf-8 -*- +;;;; Emacs Bookmark Format Version 1 ;;;; -*- coding: utf-8 -*- ;;; This format is meant to be slightly human-readable; ;;; nevertheless, you probably don't want to edit it. ;;; -*- End Of Bookmark File Format Version Stamp -*- (("org-capture-last-stored-marker" - (filename . "~/Nextcloud/org/todo.org") - (front-context-string . "** TODO Read lat") - (rear-context-string . " Personal Tasks\n") - (position . 1001)) + (filename . "~/org/cal.org") + (front-context-string . "***** TODO Remov") + (rear-context-string . "ue 08:30-11:00>\n") + (position . 1167)) ("org-refile-last-stored" - (filename . "~/Nextcloud/org/todo.org") - (front-context-string . "** TODO Read lat") - (rear-context-string . " Personal Tasks\n") - (position . 1001)) + (filename . "~/org/cal.org") + (front-context-string . "***** TODO Remov") + (rear-context-string . "ue 08:30-11:00>\n") + (position . 1167)) ("org-capture-last-stored" - (filename . "~/Nextcloud/org/dft.org") - (front-context-string . "***** Email to V") - (rear-context-string . "-01-16 Thursday\n") - (position . 89817)) -)
\ No newline at end of file + (filename . "~/org/work.org") + (front-context-string . "* TODO Check out") + (rear-context-string) + (position . 1)) +) diff --git a/configuration.el b/configuration.el deleted file mode 100644 index 675d12d..0000000 --- a/configuration.el +++ /dev/null @@ -1,367 +0,0 @@ -(require 'package) - -(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") - ("marmalade" . "https://marmalade-repo.org/packages/") - ("melpa" . "https://melpa.org/packages/") - ("org" . "https://orgmode.org/elpa/"))) - -(defvar my-packages '( - auto-complete - blacken - browse-kill-ring - darktooth-theme - elpy - elfeed - elfeed-goodies - evil - evil-escape - evil-leader - evil-mc - evil-numbers - evil-surround - flycheck - flycheck-flow - helm - go-mode - impatient-mode - ledger-mode - lsp-mode - lsp-ui - magit - markdown-mode - pdf-tools - projectile - py-autopep8 - org - rainbow-mode - web-mode - which-key - )) - -(dolist (p my-packages) - (unless (package-installed-p p) - (package-refresh-contents) - (package-install p)) - (add-to-list 'package-selected-packages p)) - -(setq savehist-file "~/.emacs.d/savehist") -(savehist-mode +1) -(setq savehist-save-minibuffer-history +1) -(setq savehist-additional-vriables - '(kill-ring - search-ring - regexp-search-ring)) - -(scroll-bar-mode -1) -(tool-bar-mode -1) -(tooltip-mode -1) -(menu-bar-mode -1) -(add-to-list 'default-frame-alist '(font . "Hack-14")) -(load-theme 'manoj-dark) - -(if (string< emacs-version - "26.3") - (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")) - -(setq gc-cons-threshold 20000000) - -(setq make-backup-files nil) - -(setq backup-directory-alist - `((".*" . ,temporary-file-directory))) -(setq auto-save-file-name-transforms - `((".*" ,temporary-file-directory t))) - -(setq vc-follow-symlinks t) - -(setq sentence-end-double-space nil) - -(setq confirm-kill-emacs 'y-or-n-p) - -(put 'dired-find-alternate-file 'disabled nil) - -(setq-default dired-listing-switches "-alh") - -(setq dired-recursive-copies 'always) - -(require 'dired) -(define-key dired-mode-map (kbd "/") 'dired-narrow-fuzzy) - -(fset 'yes-or-no-p 'y-or-n-p) - -(global-auto-revert-mode t) - -(defun zoom-in () - (interactive) - (let ((x (+ (face-attribute 'default :height) - 10))) - (set-face-attribute 'default nil :height x))) - -(defun zoom-out () - (interactive) - (let ((x (- (face-attribute 'default :height) - 10))) - (set-face-attribute 'default nil :height x))) - -(define-key global-map (kbd "C-1") 'zoom-in) -(define-key global-map (kbd "C-0") 'zoom-out) - -(setq inhibit-splash-screen t) -(setq inhibit-startup-message t) - -(display-time-mode t) - -(tool-bar-mode 0) - -(add-hook 'org-mode-hook 'auto-fill-mode) - -(put 'narrow-to-region 'disabled nil) - -(scroll-bar-mode -1) - -(setq save-place-file "~/.emacs.d/saveplace") -(setq-default save-place t) -(require 'saveplace) - -(exec-path-from-shell-initialize) - -(when (fboundp 'windmove-default-keybindings) - (windmove-default-keybindings)) - -(when (fboundp 'winner-mode) - (winner-mode 1)) - -(setq visible-bell t) - -(setq ange-ftp-try-passive-mode t) - -(add-hook 'eww-mode-hook 'scroll-lock-mode) - -(setq custom-file "~/.emacs.d/custom-settings.el") -(load custom-file t) - -(ac-config-default) - -(setq-default tab-width 2) - -(setq-default tab-width 2 indent-tabs-mode nil) - -(setq-default indent-tabs-mode nil) - -(setq js-indent-level 2) -(setq coffee-tab-width 2) -(setq python-indent 2) -(setq css-indent-offset 2) -(add-hook 'sh-mode-hook - (lambda () - (setq sh-basic-offset 2 - sh-indentation 2))) -(setq web-mode-markup-indent-offset 2) - -(add-hook 'after-init-hook #'global-flycheck-mode) - -(setq comment-tags-keymap-prefix (kbd "C-c t")) -(with-eval-after-load "comment-tags" - (setq comment-tags-keyword-faces - `(;; A concrete TODO with actionable steps - ("TODO" . ,(list :weight 'bold :foreground "#DF5427")) - ;; A non-concrete TODO. We only know something is broken/amiss. - ("FIXME" . ,(list :weight 'bold :foreground "#DF5427")) - ;; Works, but is a code smell (quick fix). Might break down the line. - ("HACK" . ,(list :weight 'bold :foreground "#DF5427")) - ;; Assumption that needs to be verified. - ("CHECK" . ,(list :weight 'bold :foreground "#CC6437")) - ;; Use to highlight a regular, but especially important, comment. - ("NOTE" . ,(list :weight 'bold :foreground "#1FDA9A")) - ;; Use to highlight a regular, but especially important, comment. - ("INFO" . ,(list :weight 'bold :foreground "#1FDA9A")))) - (setq comment-tags-comment-start-only t - comment-tags-require-colon t - comment-tags-case-sensitive t - comment-tags-show-faces t - comment-tags-lighter nil)) -(add-hook 'prog-mode-hook 'comment-tags-mode) - -(define-key global-map (kbd "RET") 'newline-and-indent) - -(show-paren-mode t) - -(add-hook 'before-save-hook '(lambda() - (when (not (or (derived-mode-p 'markdown-mode))) - (delete-trailing-whitespace)))) - -(add-hook 'prog-mode-hook #'hs-minor-mode) - -(add-hook 'prog-mode-hook '(lambda () - (if (version<= emacs-version "26.0.50") - (linum-mode) - (display-line-numbers-mode)))) - -(elpy-enable) -;;(setq elpy-rpc-python-command "~/.virtualenvs/elpy-rpc/bin/python3") - -(require 'py-autopep8) -(add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save) - -(setq python-shell-interpreter "ptipython" - python-shell-interpreter-args "console --simple-prompt" - python-shell-prompt-detect-failure-warning nil) -(add-to-list 'python-shell-completion-native-disabled-interpreters - "ptipython") - -(when (require 'flycheck nil t) - (setq elpy-modules (delq 'elpy-module-flymake elpy-modules)) - (add-hook 'elpy-mode-hook 'flycheck-mode)) - -(require 'lsp-mode) -(add-to-list 'auto-mode-alist '("\\.go\\'" . go-mode)) -(add-hook 'go-mode-hook 'lsp-deferred) -(require 'go-autocomplete) -(require 'auto-complete-config) -(ac-config-default) - -(global-set-key "\C-cl" 'org-store-link) -(global-set-key "\C-ca" 'org-agenda) -(global-set-key "\C-cb" 'org-iswitchb) -(global-set-key "\C-cc" 'org-capture) - -(setq calendar-date-style "european") - -;; use fast selection -(setq org-use-fast-todo-selection t) - -;; switch state without normal processing -(setq org-treat-S-cursor-todo-selection-as-state-change nil) - -;; basic agenda stuff -(setq org-sort-agenda-notime-is-late nil) -(setq org-directory "~/Nextcloud/org") -(setq org-agenda-files '("~/Nextcloud/org")) -(setq org-default-notes-file (concat org-directory "/refile.org")) -(setq diary-file "~/Nextcloud/org/diary") -(setq org-agenda-include-diary t) -(setq org-agenda-skip-deadline-if-done t) -(setq org-reverse-note-order t) -(setq org-sort-agenda-notime-is-late nil) - -(setq org-archive-location "~/Nextcloud/org/archive.org::* From %s") - -(setq org-refile-targets (quote ((nil :maxlevel . 9) - (org-agenda-files :maxlevel . 9)))) - -(setq org-agenda-custom-commands - '(("N" "Agenda and NEXT TODOs" ((agenda "") (todo "NEXT"))) - ("y" "Agenda and All TODOS" ((agenda "") (alltodo "") )) - ("w" "Agenda and WAITING" ((agenda "") (todo "WAITING"))) - ("p" "Agenda and PROJECTs" ((agenda "") (todo "PROJECT"))))) - -(define-key global-map "\C-cc" 'org-capture) -(setq org-default-notes-file "~/Nextcloud/org/refile.org") -(setq org-capture-templates - (quote (("t" "Todo" entry (file "~/Nextcloud/org/todo.org") - "* TODO %?") - ("j" "Journal" entry (file+datetree "~/Nextcloud/org/journal.org") - "* %?\nEntered on %U\n %i\n %a") - ("e" "Emacs Tip" entry (file+headline "~/Nextcloud/org/emacs-tips.org" "Emacs Tips") - "* %?\n %i\n %a")))) - -(setq org-todo-keywords - (quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)") - (sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" "CANCELLED(c@/!)" "PHONE" "MEETING" "PROJECT")))) - -(setq org-todo-keyword-faces - (quote (("TODO" :foreground "red" :weight bold) - ("NEXT" :foreground "blue" :weight bold) - ("DONE" :foreground "forest green" :weight bold) - ("WAITING" :foreground "orange" :weight bold) - ("HOLD" :foreground "magenta" :weight bold) - ("CANCELLED" :foreground "forest green" :weight bold) - ("MEETING" :foreground "forest green" :weight bold) - ("PROJECT" :foreground "OrangeRed2" :weight bold) - ("PHONE" :foreground "forest green" :weight bold)))) - -;; tag stuff automatically dependent on a change of state -(setq org-todo-state-tags-triggers - (quote (("CANCELLED" ("CANCELLED" . t)) - ("WAITING" ("WAITING" . t)) - ("HOLD" ("WAITING") ("HOLD" . t)) - (done ("WAITING") ("HOLD")) - ("TODO" ("WAITING") ("CANCELLED") ("HOLD")) - ("NEXT" ("WAITING") ("CANCELLED") ("HOLD")) - ("DONE" ("WAITING") ("CANCELLED") ("HOLD"))))) - -(setq org-priority-faces - '((?A . (:foreground "#CC0000" :background "#FFE3E3")) - (?B . (:foreground "#64992C" :background "#EBF4DD")) - (?C . (:foreground "#64992C" :background "#FFFFFF")))) - -(setq org-ellipsis "...") - -(require 'helm-config) -(global-set-key (kbd "C-x b") 'helm-mini) -(global-set-key (kbd "M-x") 'helm-M-x) -(global-set-key (kbd "M-y") 'helm-show-kill-ring) -(global-set-key (kbd "C-c h") 'helm-command-prefix) -(global-unset-key (kbd "C-x c")) -(setq helm-M-x-fuzzy-match t) -(setq helm-buffers-fuzzy-matching t) -(setq helm-recentf-fuzzy-match t) -(setq helm-move-to-line-cycle-in-source t) -(setq helm-scroll-amount 5) -(setq helm-ff-file-name-history-use-recentf t) - -(evil-mode 0) -;; Enable "M-x" in evil mode -(global-set-key (kbd "M-x") 'execute-extended-command) - -(global-evil-leader-mode) -(evil-leader/set-leader ",") -(evil-leader/set-key - "w" 'basic-save-buffer - "s" 'flyspell-buffer - "b" 'evil-buffer - "q" 'evil-quit) - -(require 'evil-surround) -(global-evil-surround-mode 1) - -(global-evil-mc-mode 0) - -(define-key evil-normal-state-map (kbd "{") 'evil-next-buffer) -(define-key evil-normal-state-map (kbd "}") 'evil-prev-buffer) - -(global-set-key (kbd "C-=") 'evil-numbers/inc-at-pt) -(global-set-key (kbd "C--") 'evil-numbers/dec-at-pt) -(define-key evil-normal-state-map (kbd "C-=") 'evil-numbers/inc-at-pt) -(define-key evil-normal-state-map (kbd "C--") 'evil-numbers/dec-at-pt) - -(define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line) -(define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line) - -(define-key evil-insert-state-map (kbd "C-v") 'evil-visual-paste) - -(mapc (lambda (mode) - (evil-set-initial-state mode 'emacs)) '(elfeed-show-mode - elfeed-search-mode - forge-pullreq-list-mode - forge-topic-list-mode - dired-mode - help-mode - info - tide-references-mode - image-dired-mode - image-dired-thumbnail-mode - eww-mode)) - -(define-key evil-normal-state-map (kbd "M-.") nil) -(define-key evil-normal-state-map (kbd "M-,") nil) - -(setq-default evil-escape-delay 0.2) -(setq-default evil-escape-key-sequence "jk") -(evil-escape-mode) - -(add-hook 'org-mode-hook 'which-key-mode) -(add-hook 'cider-mode-hook 'which-key-mode) - -(setq which-key-allow-evil-operators t) -(setq which-key-show-operator-state-maps t) diff --git a/configuration.org b/configuration.org deleted file mode 100644 index 6c0effa..0000000 --- a/configuration.org +++ /dev/null @@ -1,698 +0,0 @@ -;; Configuration for Emacs - -* Installation - -*Dependencies* - -Emacs dependencies/libraries are managed via the internal [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html#Packages][package -management system]]. To initially install packages, open -=~/.emacs.d/init.el=, refresh your package list with =M-x -package-refresh-contents= and install everything using =M-x -eval-buffer=. -* Dependency management -** Define package repositories(archives) - -#+BEGIN_SRC emacs-lisp - (require 'package) - - (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") - ("marmalade" . "https://marmalade-repo.org/packages/") - ("melpa" . "https://melpa.org/packages/") - ("org" . "https://orgmode.org/elpa/"))) -#+END_SRC - -** Define packages that are to be installed -List all used third-party packages. Most will be configured further -down in this file, some are used with the default configuration. -#+BEGIN_SRC emacs-lisp - - (defvar my-packages '( - auto-complete - blacken - browse-kill-ring - darktooth-theme - elpy - elfeed - elfeed-goodies - evil - evil-escape - evil-leader - evil-mc - evil-numbers - evil-surround - flycheck - flycheck-flow - helm - go-mode - impatient-mode - ledger-mode - lsp-mode - lsp-ui - magit - markdown-mode - pdf-tools - projectile - py-autopep8 - org - rainbow-mode - web-mode - which-key - )) -#+END_SRC -** Install packages -#+BEGIN_SRC emacs-lisp - (dolist (p my-packages) - (unless (package-installed-p p) - (package-refresh-contents) - (package-install p)) - (add-to-list 'package-selected-packages p)) -#+END_SRC -* Basics -** History -#+BEGIN_SRC emacs-lisp -(setq savehist-file "~/.emacs.d/savehist") -(savehist-mode +1) -(setq savehist-save-minibuffer-history +1) -(setq savehist-additional-vriables - '(kill-ring - search-ring - regexp-search-ring)) -#+END_SRC -** GUI -#+BEGIN_SRC emacs-lisp - (scroll-bar-mode -1) - (tool-bar-mode -1) - (tooltip-mode -1) - (menu-bar-mode -1) - (add-to-list 'default-frame-alist '(font . "Hack-14")) - (load-theme 'manoj-dark) -#+END_SRC -** Gnu Elpa TLS Fix -Emacs 26.1 (for example in Debian Buster) requests the GNU Elpa repo -with the wrong TLS version - which makes the request fail. This is a -manual patch for older versions of Emacs. It's fixed from 26.3 and -above upstream. -#+BEGIN_SRC emacs-lisp - (if (string< emacs-version - "26.3") - (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")) -#+END_SRC -** Gargabe Collection - -Allow 20MB of memory (instead of 0.76MB) before calling garbage -collection. This means GC runs less often, which speeds up some -operations. - -#+BEGIN_SRC emacs-lisp - (setq gc-cons-threshold 20000000) -#+END_SRC -** Do not create backup files -#+BEGIN_SRC emacs-lisp - (setq make-backup-files nil) -#+END_SRC -** Auto-Save in =/tmp= -Store backups and auto-saved files in =TEMPORARY-FILE-DIRECTORY= (which -defaults to /tmp on Unix), instead of in the same directory as the -file. -#+BEGIN_SRC emacs-lisp - (setq backup-directory-alist - `((".*" . ,temporary-file-directory))) - (setq auto-save-file-name-transforms - `((".*" ,temporary-file-directory t))) -#+END_SRC -** Always follow symlinks - When opening a file, always follow symlinks. -#+BEGIN_SRC emacs-lisp - (setq vc-follow-symlinks t) -#+END_SRC -** Sentences have one space after a period -Don't assume that sentences should have two spaces after -periods. -#+BEGIN_SRC emacs-lisp - (setq sentence-end-double-space nil) -#+END_SRC -** Confirm before closing Emacs -#+BEGIN_SRC emacs-lisp - (setq confirm-kill-emacs 'y-or-n-p) -#+END_SRC -** =dired-mode= -Ability to use =a= to visit a new directory or file in =dired= instead -of using =RET=. =RET= works just fine, but it will create a new buffer -for /every/ interaction whereas =a= reuses the current buffer. -#+BEGIN_SRC emacs-lisp - (put 'dired-find-alternate-file 'disabled nil) -#+END_SRC - -Human readable units -#+BEGIN_SRC emacs-lisp - (setq-default dired-listing-switches "-alh") -#+END_SRC - -On =C=, recursively copy by default - -#+BEGIN_SRC emacs-lisp -(setq dired-recursive-copies 'always) -#+END_SRC - -*** =dired-narrow= - -=dired-narrow= of the [[https://github.com/Fuco1/dired-hacks][dired-hacks]] repository allows to dynamically -narrow a dired buffer down to contents of interest. A demo can be seen -[[http://pragmaticemacs.com/emacs/dynamically-filter-directory-listing-with-dired-narrow/][on this blog post]]. - -#+BEGIN_SRC emacs-lisp - (require 'dired) - (define-key dired-mode-map (kbd "/") 'dired-narrow-fuzzy) -#+END_SRC - -Commands: - - - =/= starts fuzzy matching - - Use the dired buffer as usual - - =g= to go back to the complete file listing -** Ask =y/n= instead of =yes/no= - This is a favorable shorthand. -#+BEGIN_SRC emacs-lisp - (fset 'yes-or-no-p 'y-or-n-p) -#+END_SRC -** Auto revert files on change -When something changes a file, automatically refresh the -buffer containing that file so they can't get out of sync. - -#+BEGIN_SRC emacs-lisp -(global-auto-revert-mode t) -#+END_SRC -** Shortcut for changing font-size -#+BEGIN_SRC emacs-lisp - (defun zoom-in () - (interactive) - (let ((x (+ (face-attribute 'default :height) - 10))) - (set-face-attribute 'default nil :height x))) - - (defun zoom-out () - (interactive) - (let ((x (- (face-attribute 'default :height) - 10))) - (set-face-attribute 'default nil :height x))) - - (define-key global-map (kbd "C-1") 'zoom-in) - (define-key global-map (kbd "C-0") 'zoom-out) -#+END_SRC -** Disable startup message - -#+BEGIN_SRC emacs-lisp - (setq inhibit-splash-screen t) - (setq inhibit-startup-message t) -#+END_SRC -** Display the current time -#+BEGIN_SRC emacs-lisp - (display-time-mode t) -#+END_SRC -** Do not display GUI Toolbar - -#+BEGIN_SRC emacs-lisp - (tool-bar-mode 0) -#+END_SRC -** Automatic Line Breaks - -Do not enable automatic line breaks for all text-mode based hooks, -because several text-modes (markdown, mails) enjoy the pain of long -lines. So here, I only add whitelisted modes sparingly. The other -modes have a =visual-clean= configuration which makes the text look -nice locally, at least. - -#+BEGIN_SRC emacs-lisp - (add-hook 'org-mode-hook 'auto-fill-mode) -#+END_SRC -** Enable Narrow To Region - -Enable narrow-to-region (C-x n n / C-x n w). This is disabled by -default to not confuse beginners. - -#+BEGIN_SRC emacs-lisp - (put 'narrow-to-region 'disabled nil) -#+END_SRC -** Disable scroll bars -#+BEGIN_SRC emacs-lisp -(scroll-bar-mode -1) -#+END_SRC -** Remember the cursor position of files when reopening them -#+BEGIN_SRC emacs-lisp - (setq save-place-file "~/.emacs.d/saveplace") - (setq-default save-place t) - (require 'saveplace) -#+END_SRC -** Set $MANPATH, $PATH and exec-path from shell even when started from GUI helpers like =dmenu= or =Spotlight= - -#+BEGIN_SRC emacs-lisp - - (exec-path-from-shell-initialize) - -#+END_SRC -** =windmove= - -Windmove is built into Emacs. It lets you move point from window to -window using Shift and the arrow keys. This is easier to type than -‘C-x o’ when there are multiple windows open. - -#+BEGIN_SRC emacs-lisp - -(when (fboundp 'windmove-default-keybindings) - (windmove-default-keybindings)) - -#+END_SRC -** =winner-mode= - -Allows to 'undo' (and 'redo') changes in the window configuration with -the key commands ‘C-c left’ and ‘C-c right’. - -#+BEGIN_SRC emacs-lisp - (when (fboundp 'winner-mode) - (winner-mode 1)) -#+END_SRC - -Getting from many windows to one window is easy: 'C-x 1' will do it. -But getting back to a delicate WindowConfiguration is difficult. This -is where Winner Mode comes in: With it, going back to a previous -session is easy. -** Bell - Do not ring the system bell, but show a visible feedback. -#+BEGIN_SRC emacs-lisp -(setq visible-bell t) -#+END_SRC -** AngeFtp -Try to use passive mode for FTP. - -Note: Some firewalls might not allow standard active mode. However: -Some FTP Servers might not allow passive mode. So if there's problems -when connecting to an FTP, try to revert to active mode. -#+BEGIN_SRC emacs-lisp -(setq ange-ftp-try-passive-mode t) -#+END_SRC -** eww - When entering eww, use cursors to scroll without changing point. -#+BEGIN_SRC emacs-lisp - (add-hook 'eww-mode-hook 'scroll-lock-mode) -#+END_SRC -** Custom-File -#+BEGIN_SRC emacs-lisp -(setq custom-file "~/.emacs.d/custom-settings.el") -(load custom-file t) -#+END_SRC -** Add guix packages to load-path -* Programming -** General -*** Auto Complete -https://github.com/auto-complete/auto-complete - -Basic Configuration -#+BEGIN_SRC emacs-lisp - (ac-config-default) -#+END_SRC -*** Tabs -Set tab width to 2 for all buffers - -#+BEGIN_SRC emacs-lisp - (setq-default tab-width 2) -#+END_SRC - -Use 2 spaces instead of a tab. - -#+BEGIN_SRC emacs-lisp - (setq-default tab-width 2 indent-tabs-mode nil) -#+END_SRC - -Indentation cannot insert tabs. - -#+BEGIN_SRC emacs-lisp - (setq-default indent-tabs-mode nil) -#+END_SRC - -Use 2 spaces instead of tabs for programming languages. - -#+BEGIN_SRC emacs-lisp - (setq js-indent-level 2) - (setq coffee-tab-width 2) - (setq python-indent 2) - (setq css-indent-offset 2) - (add-hook 'sh-mode-hook - (lambda () - (setq sh-basic-offset 2 - sh-indentation 2))) - (setq web-mode-markup-indent-offset 2) -#+END_SRC -*** Syntax Checking - -http://www.flycheck.org/ - -Enable global on the fly syntax checking through =flycheck=. - -#+BEGIN_SRC emacs-lisp - (add-hook 'after-init-hook #'global-flycheck-mode) -#+END_SRC -*** Manage TODO/FIXME/XXX comments - -https://github.com/vincekd/comment-tags - -=comment-tags= highlights and lists comment tags such as 'TODO', 'FIXME', 'XXX'. - -Commands (prefixed by =C-c t=): - - - =b= to list tags in current buffer (comment-tags-list-tags-buffer). - - =a= to list tags in all buffers (comment-tags-list-tags-buffers). - - =s= to jump to tag in current buffer by a word or phrase using reading-completion (comment-tags-find-tags-buffer). - - =n= to jump to next tag from point (comment-tags-next-tag). - - =p= to jump to previous tag from point (comment-tags-previous-tag). - -#+BEGIN_SRC emacs-lisp - (setq comment-tags-keymap-prefix (kbd "C-c t")) - (with-eval-after-load "comment-tags" - (setq comment-tags-keyword-faces - `(;; A concrete TODO with actionable steps - ("TODO" . ,(list :weight 'bold :foreground "#DF5427")) - ;; A non-concrete TODO. We only know something is broken/amiss. - ("FIXME" . ,(list :weight 'bold :foreground "#DF5427")) - ;; Works, but is a code smell (quick fix). Might break down the line. - ("HACK" . ,(list :weight 'bold :foreground "#DF5427")) - ;; Assumption that needs to be verified. - ("CHECK" . ,(list :weight 'bold :foreground "#CC6437")) - ;; Use to highlight a regular, but especially important, comment. - ("NOTE" . ,(list :weight 'bold :foreground "#1FDA9A")) - ;; Use to highlight a regular, but especially important, comment. - ("INFO" . ,(list :weight 'bold :foreground "#1FDA9A")))) - (setq comment-tags-comment-start-only t - comment-tags-require-colon t - comment-tags-case-sensitive t - comment-tags-show-faces t - comment-tags-lighter nil)) - (add-hook 'prog-mode-hook 'comment-tags-mode) -#+END_SRC -*** Auto-indent with the Return key -#+BEGIN_SRC emacs-lisp - (define-key global-map (kbd "RET") 'newline-and-indent) -#+END_SRC -*** Highlight matching parenthesis -#+BEGIN_SRC emacs-lisp - (show-paren-mode t) -#+END_SRC -*** Delete trailing whitespace -Delete trailing whitespace in all modes. _Except_ when editing -Markdown, because it uses [[http://daringfireball.net/projects/markdown/syntax#p][two trailing blanks]] as a signal to create a -line break. -#+BEGIN_SRC emacs-lisp - (add-hook 'before-save-hook '(lambda() - (when (not (or (derived-mode-p 'markdown-mode))) - (delete-trailing-whitespace)))) -#+END_SRC -*** Code Folding -Enable code folding for programming modes. -- =zc=: Fold -- =za=: Unfold -- =zR=: Unfold everything -#+BEGIN_SRC emacs-lisp -(add-hook 'prog-mode-hook #'hs-minor-mode) -#+END_SRC -*** Line numbers -Enable =linum-mode= for programming modes. For newer versions of -Emacs, use =display-line-numbers-mode=, because it's _much_ faster. - -#+BEGIN_SRC emacs-lisp - (add-hook 'prog-mode-hook '(lambda () - (if (version<= emacs-version "26.0.50") - (linum-mode) - (display-line-numbers-mode)))) -#+END_SRC -** Python -*** Basics -#+BEGIN_SRC emacs-lisp - -(elpy-enable) -;;(setq elpy-rpc-python-command "~/.virtualenvs/elpy-rpc/bin/python3") - -(require 'py-autopep8) -(add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save) - -(setq python-shell-interpreter "ptipython" - python-shell-interpreter-args "console --simple-prompt" - python-shell-prompt-detect-failure-warning nil) -(add-to-list 'python-shell-completion-native-disabled-interpreters - "ptipython") - -(when (require 'flycheck nil t) - (setq elpy-modules (delq 'elpy-module-flymake elpy-modules)) - (add-hook 'elpy-mode-hook 'flycheck-mode)) -#+END_SRC -** Go -*** Basics -#+BEGIN_SRC emacs-lisp -(require 'lsp-mode) -(add-to-list 'auto-mode-alist '("\\.go\\'" . go-mode)) -(add-hook 'go-mode-hook 'lsp-deferred) -(require 'go-autocomplete) -(require 'auto-complete-config) -(ac-config-default) -#+END_SRC -* org -** General Config -#+BEGIN_SRC emacs-lisp -(global-set-key "\C-cl" 'org-store-link) -(global-set-key "\C-ca" 'org-agenda) -(global-set-key "\C-cb" 'org-iswitchb) -(global-set-key "\C-cc" 'org-capture) - -(setq calendar-date-style "european") - -;; use fast selection -(setq org-use-fast-todo-selection t) - -;; switch state without normal processing -(setq org-treat-S-cursor-todo-selection-as-state-change nil) -#+END_SRC -** Agenda -#+BEGIN_SRC emacs-lisp -;; basic agenda stuff -(setq org-sort-agenda-notime-is-late nil) -(setq org-directory "~/Nextcloud/org") -(setq org-agenda-files '("~/Nextcloud/org")) -(setq org-default-notes-file (concat org-directory "/refile.org")) -(setq diary-file "~/Nextcloud/org/diary") -(setq org-agenda-include-diary t) -(setq org-agenda-skip-deadline-if-done t) -(setq org-reverse-note-order t) -(setq org-sort-agenda-notime-is-late nil) - -(setq org-archive-location "~/Nextcloud/org/archive.org::* From %s") - -(setq org-refile-targets (quote ((nil :maxlevel . 9) - (org-agenda-files :maxlevel . 9)))) - -(setq org-agenda-custom-commands - '(("N" "Agenda and NEXT TODOs" ((agenda "") (todo "NEXT"))) - ("y" "Agenda and All TODOS" ((agenda "") (alltodo "") )) - ("w" "Agenda and WAITING" ((agenda "") (todo "WAITING"))) - ("p" "Agenda and PROJECTs" ((agenda "") (todo "PROJECT"))))) -#+END_SRC -** Capture -#+BEGIN_SRC emacs-lisp -(define-key global-map "\C-cc" 'org-capture) -(setq org-default-notes-file "~/Nextcloud/org/refile.org") -(setq org-capture-templates - (quote (("t" "Todo" entry (file "~/Nextcloud/org/todo.org") - "* TODO %?") - ("j" "Journal" entry (file+datetree "~/Nextcloud/org/journal.org") - "* %?\nEntered on %U\n %i\n %a") - ("e" "Emacs Tip" entry (file+headline "~/Nextcloud/org/emacs-tips.org" "Emacs Tips") - "* %?\n %i\n %a")))) -#+END_SRC -** Tags and faces -#+BEGIN_SRC emacs-lisp -(setq org-todo-keywords - (quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)") - (sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" "CANCELLED(c@/!)" "PHONE" "MEETING" "PROJECT")))) - -(setq org-todo-keyword-faces - (quote (("TODO" :foreground "red" :weight bold) - ("NEXT" :foreground "blue" :weight bold) - ("DONE" :foreground "forest green" :weight bold) - ("WAITING" :foreground "orange" :weight bold) - ("HOLD" :foreground "magenta" :weight bold) - ("CANCELLED" :foreground "forest green" :weight bold) - ("MEETING" :foreground "forest green" :weight bold) - ("PROJECT" :foreground "OrangeRed2" :weight bold) - ("PHONE" :foreground "forest green" :weight bold)))) - -;; tag stuff automatically dependent on a change of state -(setq org-todo-state-tags-triggers - (quote (("CANCELLED" ("CANCELLED" . t)) - ("WAITING" ("WAITING" . t)) - ("HOLD" ("WAITING") ("HOLD" . t)) - (done ("WAITING") ("HOLD")) - ("TODO" ("WAITING") ("CANCELLED") ("HOLD")) - ("NEXT" ("WAITING") ("CANCELLED") ("HOLD")) - ("DONE" ("WAITING") ("CANCELLED") ("HOLD"))))) - -(setq org-priority-faces - '((?A . (:foreground "#CC0000" :background "#FFE3E3")) - (?B . (:foreground "#64992C" :background "#EBF4DD")) - (?C . (:foreground "#64992C" :background "#FFFFFF")))) - -(setq org-ellipsis "...") -#+END_SRC - - - -;; custom commands on agenda buffer -#+END_SRC -* Helm -#+BEGIN_SRC emacs-lisp -(require 'helm-config) -(global-set-key (kbd "C-x b") 'helm-mini) -(global-set-key (kbd "M-x") 'helm-M-x) -(global-set-key (kbd "M-y") 'helm-show-kill-ring) -(global-set-key (kbd "C-c h") 'helm-command-prefix) -(global-unset-key (kbd "C-x c")) -(setq helm-M-x-fuzzy-match t) -(setq helm-buffers-fuzzy-matching t) -(setq helm-recentf-fuzzy-match t) -(setq helm-move-to-line-cycle-in-source t) -(setq helm-scroll-amount 5) -(setq helm-ff-file-name-history-use-recentf t) -#+END_SRC -* Search / Completion -* =evil-mode= -Evil is an extensible Vim layer for Emacs. - -This combines the best of both worlds: VIM being a great text-editor -with modal editing through semantic commands and Emacs being a LISP -REPL. -** Enable Evil -#+BEGIN_SRC emacs-lisp - (evil-mode 0) - ;; Enable "M-x" in evil mode - (global-set-key (kbd "M-x") 'execute-extended-command) -#+END_SRC - -** Leader Mode Config - -#+BEGIN_SRC emacs-lisp - (global-evil-leader-mode) - (evil-leader/set-leader ",") - (evil-leader/set-key - "w" 'basic-save-buffer - "s" 'flyspell-buffer - "b" 'evil-buffer - "q" 'evil-quit) -#+END_SRC - -** Evil Surround, emulating tpope's =surround.vim= - -#+BEGIN_SRC emacs-lisp - (require 'evil-surround) - (global-evil-surround-mode 1) -#+END_SRC - -** Multiple Cursors -https://github.com/gabesoft/evil-mc - -=evil-mc= provides multiple cursors functionality for Emacs when used -with =evil-mode=. - -=C-n / C-p= are used for creating cursors, and =M-n / M-p= are used -for cycling through cursors. The commands that create cursors wrap -around; but, the ones that cycle them do not. To skip creating a -cursor forward use =C-t= or =grn= and backward =grp=. Finally use -=gru= to remove all cursors. - -*** Enable =evil-mc= for all buffers - -#+BEGIN_SRC emacs-lisp -(global-evil-mc-mode 0) -#+END_SRC - -** Fast switching between buffers -#+BEGIN_SRC emacs-lisp - (define-key evil-normal-state-map (kbd "{") 'evil-next-buffer) - (define-key evil-normal-state-map (kbd "}") 'evil-prev-buffer) -#+END_SRC - -** Increment / Decrement numbers - -#+BEGIN_SRC emacs-lisp - (global-set-key (kbd "C-=") 'evil-numbers/inc-at-pt) - (global-set-key (kbd "C--") 'evil-numbers/dec-at-pt) - (define-key evil-normal-state-map (kbd "C-=") 'evil-numbers/inc-at-pt) - (define-key evil-normal-state-map (kbd "C--") 'evil-numbers/dec-at-pt) -#+END_SRC - -** Use =j/k= for browsing wrapped lines -#+BEGIN_SRC emacs-lisp - (define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line) - (define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line) -#+END_SRC - -** Paste in Visual Mode - -#+BEGIN_SRC emacs-lisp - (define-key evil-insert-state-map (kbd "C-v") 'evil-visual-paste) - -#+END_SRC - -** Disable =evil-mode= for some modes - Since Emacs is a multi-purpose LISP REPL, there are many modes that - are not primarily (or not at all) centered about text-manipulation. - For those, it is reasonable to disable =evil-mode=, because it will - bring nothing to the table, but might just shadow some keyboard - shortcuts. -#+BEGIN_SRC emacs-lisp - (mapc (lambda (mode) - (evil-set-initial-state mode 'emacs)) '(elfeed-show-mode - elfeed-search-mode - forge-pullreq-list-mode - forge-topic-list-mode - dired-mode - help-mode - info - tide-references-mode - image-dired-mode - image-dired-thumbnail-mode - eww-mode)) -#+END_SRC -** Unbind M-. and M- in =evil-mode= -=M-.= and =M-,= are popular keybindings for "jump to definition" and -"back". =evil-mode= by default binds those to rather rarely used -functions =evil-repeat-pop-next= and =xref-pop-marker-stack=, for some reason. - -#+BEGIN_SRC emacs-lisp - (define-key evil-normal-state-map (kbd "M-.") nil) - (define-key evil-normal-state-map (kbd "M-,") nil) -#+END_SRC -** =evil-escape= -https://github.com/syl20bnr/evil-escape - -Escape from insert state and everything else. - -#+BEGIN_SRC emacs-lisp - (setq-default evil-escape-delay 0.2) - (setq-default evil-escape-key-sequence "jk") - (evil-escape-mode) -#+END_SRC - -This results in the same feature-set like this vim keybinding: -#+BEGIN_SRC vim -"Remap ESC to jk -:imap jk <esc> -#+END_SRC -* Which Key - =which-key= displays available keybindings in a popup. -#+BEGIN_SRC emacs-lisp - (add-hook 'org-mode-hook 'which-key-mode) - (add-hook 'cider-mode-hook 'which-key-mode) -#+END_SRC - -Use =which-key= to show VIM shortcuts, too. - -#+BEGIN_SRC emacs-lisp -(setq which-key-allow-evil-operators t) -(setq which-key-show-operator-state-maps t) -#+END_SRC diff --git a/custom-settings.el b/custom-settings.el deleted file mode 100644 index 03e6212..0000000 --- a/custom-settings.el +++ /dev/null @@ -1,127 +0,0 @@ -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; 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. - '(TeX-after-compilation-finished-functions (quote TeX-revert-document-buffer) t) - '(TeX-auto-save t t) - '(TeX-master nil t) - '(TeX-parse-self t t) - '(TeX-view-program-list (quote (("pdf-tools" "TeX-pdf-tools-sync-view"))) t) - '(TeX-view-program-selection (quote ((output-pdf "pdf-tools"))) t) - '(ansi-color-faces-vector - [default default default italic underline success warning error]) - '(ansi-color-names-vector - ["black" "red3" "ForestGreen" "yellow3" "blue" "magenta3" "DeepSkyBlue" "gray50"]) - '(auto-package-update-delete-old-versions t) - '(auto-package-update-hide-results t) - '(auto-package-update-interval 7) - '(auto-package-update-prompt-before-update t) - '(auto-revert-verbose nil) - '(company-begin-commands (quote (self-insert-command))) - '(company-global-modes (quote (not shell-mode eaf-mode))) - '(company-idle-delay 0.1) - '(company-minimum-prefix-length 1) - '(company-quickhelp-color-background "#4F4F4F") - '(company-quickhelp-color-foreground "#DCDCCC") - '(company-require-match (quote never)) - '(company-show-numbers t) - '(company-tooltip-align-annotations t) - '(custom-enabled-themes (quote (wheatgrass))) - '(custom-safe-themes - (quote - ("a22f40b63f9bc0a69ebc8ba4fbc6b452a4e3f84b80590ba0a92b4ff599e53ad0" "bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476" "947190b4f17f78c39b0ab1ea95b1e6097cc9202d55c73a702395fc817f899393" "8f97d5ec8a774485296e366fdde6ff5589cf9e319a584b845b6f7fa788c9fa9a" default))) - '(delete-by-moving-to-trash t) - '(dired-dwim-target t) - '(dired-recursive-copies (quote always)) - '(dired-recursive-deletes (quote always)) - '(fci-rule-color "#383838") - '(global-auto-revert-non-file-buffers t) - '(helm-completion-style (quote emacs)) - '(hl-todo-keyword-faces - (quote - (("TODO" . "#dc752f") - ("NEXT" . "#dc752f") - ("THEM" . "#2d9574") - ("PROG" . "#4f97d7") - ("OKAY" . "#4f97d7") - ("DONT" . "#f2241f") - ("FAIL" . "#f2241f") - ("DONE" . "#86dc2f") - ("NOTE" . "#b1951d") - ("KLUDGE" . "#b1951d") - ("HACK" . "#b1951d") - ("TEMP" . "#b1951d") - ("FIXME" . "#dc752f") - ("XXX+" . "#dc752f") - ("\\?\\?\\?+" . "#dc752f")))) - '(ivy-count-format "【%d/%d】") - '(ivy-height 10) - '(ivy-magic-slash-non-match-action (quote ivy-magic-slash-non-match-create)) - '(ivy-on-del-error-function nil) - '(ivy-use-virtual-buffers t) - '(ivy-wrap t) - '(ledger-clear-whole-transactions t t) - '(lsp-ui-doc-border "wheat") - '(lsp-ui-doc-enable t) - '(lsp-ui-doc-header t) - '(lsp-ui-doc-include-signature t) - '(lsp-ui-doc-position (quote top)) - '(lsp-ui-sideline-enable nil) - '(lsp-ui-sideline-ignore-duplicate t) - '(lsp-ui-sideline-show-code-actions nil) - '(nrepl-message-colors - (quote - ("#CC9393" "#DFAF8F" "#F0DFAF" "#7F9F7F" "#BFEBBF" "#93E0E3" "#94BFF3" "#DC8CC3"))) - '(org-modules - (quote - (ol-bbdb ol-bibtex ol-docview ol-eww ol-gnus org-habit ol-info ol-irc ol-mhe ol-rmail ol-w3m))) - '(org-sort-agenda-notime-is-late nil) - '(package-selected-packages - (quote - (org-edit-latex auctex dired-x gotest company-irony beacon-mode python-pytest password-store csv-mode expand-region org-gcal lsp-python-ms ace-window discover-my-major popup-kill-ring amx gnu-elpa-keyring-update auto-package-update monokai-theme color-theme-monokai color-theme-sanityinc-tomorrow dracula-theme evil-mode yasnippet-snippets highlight-symbol rainbow-delimiters git-gutter Ivy org-caldav which-key-mode org-plus-contrib use-package ac-cider magit blacken py-autopep8 flycheck elpy yasnippet company-lsp company lsp-ui go-autocomplete lsp-mode go-mode markdown-mode gruvbox-theme helm org cider slime evil))) - '(pdf-view-midnight-colors (quote ("#fdf4c1" . "#282828"))) - '(pos-tip-background-color "#36473A") - '(pos-tip-foreground-color "#FFFFC8") - '(projectile-globally-ignored-directories - (quote - (".idea" ".ensime_cache" ".eunit" ".git" ".hg" ".fslckout" "_FOSSIL_" ".bzr" "_darcs" ".tox" ".svn" ".stack-work" ".env"))) - '(recentf-auto-cleanup "05:00am") - '(recentf-exclude - (quote - ((expand-file-name package-user-dir) - ".cache" ".cask" ".elfeed" "bookmarks" "cache" "ido.*" "persp-confs" "recentf" "undo-tree-hist" "url" "COMMIT_EDITMSG\\'"))) - '(recentf-mode t) - '(setq "05:00am" t) - '(vc-annotate-background "#2B2B2B") - '(vc-annotate-color-map - (quote - ((20 . "#BC8383") - (40 . "#CC9393") - (60 . "#DFAF8F") - (80 . "#D0BF8F") - (100 . "#E0CF9F") - (120 . "#F0DFAF") - (140 . "#5F7F5F") - (160 . "#7F9F7F") - (180 . "#8FB28F") - (200 . "#9FC59F") - (220 . "#AFD8AF") - (240 . "#BFEBBF") - (260 . "#93E0E3") - (280 . "#6CA0A3") - (300 . "#7CB8BB") - (320 . "#8CD0D3") - (340 . "#94BFF3") - (360 . "#DC8CC3")))) - '(vc-annotate-very-old-color "#DC8CC3") - '(winner-boring-buffers - (quote - ("*Completions*" "*Compile-Log*" "*inferior-lisp*" "*Fuzzy Completions*" "*Apropos*" "*Help*" "*cvs*" "*Buffer List*" "*Ibuffer*" "*esh command on file*")))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; 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. - '(lsp-ui-doc-background ((t (:background nil)))) - '(lsp-ui-doc-header ((t (:inherit (font-lock-string-face italic)))))) diff --git a/eww-bookmarks b/eww-bookmarks deleted file mode 100644 index f21367d..0000000 --- a/eww-bookmarks +++ /dev/null @@ -1,2 +0,0 @@ -;; Auto-generated file; don't edit -((:url "https://www.supermemo.com/en/archives1990-2015/articles/20rules" :title "SuperMemo.com" :time "Mon Jan 13 08:54:03 2020")) @@ -141,27 +141,31 @@ (add-hook 'prog-mode-hook 'rainbow-delimiters-mode)) ;; EVIL -(use-package evil - :init - :config - (setq evil-respect-visual-line-mode t) - (evil-mode 1)) +;; (use-package evil +;; :init +;; :config +;; (setq evil-respect-visual-line-mode t) +;; (evil-mode 1)) -;; which-key - for nice menu +;; ;; which-key - for nice menu +;; (use-package which-key +;; :config +;; (which-key-mode) +;; ) + +;; which-key (use-package which-key :config - (which-key-mode) - ) + (which-key-mode)) ;; org mode! (use-package org - :hook (org-agenda-mode) :config - (define-key org-mode-agenda-map "j") (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cb" 'org-iswitchb) (global-set-key "\C-cc" 'org-capture) + (add-to-list 'org-modules 'org-habit) (setq org-clock-persist 'history) (org-clock-persistence-insinuate) (setq org-sort-agenda-notime-is-late nil) @@ -190,6 +194,7 @@ (setq org-habit-graph-column 35) (setq org-log-done-with-time 'note) (setq org-sort-agenda-notime-is-late nil) + (setq org-columns-default-format "%50ITEM(Task) %10CLOCKSUM %25TIMESTAMP_IA") (setq org-archive-location "~/org/archive.org::* From %s") @@ -205,9 +210,12 @@ (define-key global-map "\C-cc" 'org-capture) (setq org-capture-templates (quote (("t" "Templates for Tasks") - ("tp" "Task Personal Single Action" entry (file+headline "~/org/home.org" "Single Actions") + ("tp" "Task Personal TODO" entry (file+headline "~/org/home.org" "Single Actions") "** TODO %?" :prepend t) + ("tp" "Task Personal NEXT" entry (file+headline "~/org/home.org" "Single Actions") + "** NEXT %?" + :prepend t) ("tw" "Task Work" entry (file "~/org/work.org") "* TODO %?" :prepend t) @@ -242,7 +250,7 @@ (setq org-todo-keyword-faces (quote (("TODO" :foreground "red" :weight bold) - ("NEXT" :foreground "blue" :weight bold) + ("NEXT" :foreground "cyan" :weight bold) ("DONE" :foreground "forest green" :weight bold) ("WAITING" :foreground "orange" :weight bold) ("HOLD" :foreground "magenta" :weight bold) @@ -353,13 +361,31 @@ (use-package magit :bind ("C-x g" . magit-status)) + +;; helm +(require 'helm-config) +(global-set-key (kbd "M-x") #'helm-M-x) +(global-set-key (kbd "C-x r b") #'helm-filtered-bookmarks) +(global-set-key (kbd "C-x C-f") #'helm-find-files) +;; The default "C-x c" is quite close to "C-x C-c", which quits Emacs. +;; Changed to "C-c h". Note: We must set "C-c h" globally, because we +;; cannot change `helm-command-prefix-key' once `helm-config' is loaded. +(global-set-key (kbd "C-c h") 'helm-command-prefix) +(global-unset-key (kbd "C-x c")) +(helm-mode 1) + + +;; ledger mode +(autoload 'ledger-mode "ledger-mode" "A major mode for Ledger" t) +(add-to-list 'auto-mode-alist '("\\.ledger%" . ledger-mode)) + (custom-set-variables ;; custom-set-variables was added by Custom. ;; 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. '(package-selected-packages - '(magit elfeed-org which-key use-package rainbow-delimiters paredit evil counsel))) + '(helm auto-package-update ledger-mode magit elfeed-org which-key use-package rainbow-delimiters paredit evil counsel))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/init.el-bak b/init.el-bak deleted file mode 100644 index b368a93..0000000 --- a/init.el-bak +++ /dev/null @@ -1,7 +0,0 @@ -(when (>= emacs-major-version 24) - (require 'package) - (add-to-list - 'package-archives - '("melpa" . "http://melpa.org/packages/") - t) - (package-initialise)) diff --git a/init.el-old b/init.el-old deleted file mode 100644 index 4d541e5..0000000 --- a/init.el-old +++ /dev/null @@ -1,633 +0,0 @@ -;;; Package --- Summary - -;;; Commentary: - -;;; Code: -(package-initialize) - -;; Make sure `emacs-leuven.el' is in your `load-path'. -;;(add-to-list 'load-path "/home/lemon/code/github/emacs-leuven") -;;(setq leuven-elpa-ignored-packages '(git-commit-mode)) - -;; get zz, zt from vim etc in emacs - from http://www.emacswiki.org/emacs/RecenterLikeVi -(defun line-to-top-of-window () - "Shift current line to the top of the window- i.e. zt in Vim" - (interactive) - (set-window-start (selected-window) (point)) -) - -(defun line-to-bottom-of-window () - "Shift current line to the botom of the window- i.e. zb in Vim" - (interactive) - (line-to-top-of-window) - (scroll-down (- (window-height) 3)) -) - -(defun ctrl-e-in-vi (n) - (interactive "p") - (scroll-up n)) - -(defun ctrl-y-in-vi (n) - (interactive "p") - (scroll-down n)) - -(global-set-key "\M-n" 'ctrl-e-in-vi) -(global-set-key "\M-p" 'ctrl-y-in-vi) -(global-set-key "\C-x\C-a\C-a" 'line-to-top-of-window) -(global-set-key "\C-x\C-r" 'line-to-bottom-of-window) - - ;; Treat undo history as a tree. - (with-eval-after-load "undo-tree-autoloads" - - ;; Enable Global-Undo-Tree mode. - (global-undo-tree-mode 1)) - - (with-eval-after-load "undo-tree" - - (with-eval-after-load "diminish-autoloads" - (diminish 'undo-tree-mode)) - - ;; Display times relative to current time in visualizer. - (setq undo-tree-visualizer-relative-timestamps t) - - ;; Display time-stamps by default in undo-tree visualizer. - (setq undo-tree-visualizer-timestamps t) ; Toggle time-stamps display using `t'. - - ;; Display diff by default in undo-tree visualizer. - (setq undo-tree-visualizer-diff t) ; Toggle the diff display using `d'. - - (define-key undo-tree-map (kbd "C-/") nil) - - ;; (defalias 'redo 'undo-tree-redo) - (global-set-key (kbd "C-S-z") #'undo-tree-redo) - (global-set-key (kbd "<S-f11>") #'undo-tree-redo)) - - -;; Require it as normal. -;;(require 'emacs-leuven) -(load-file "/home/lemon/code/github/emacs-leuven/org-custom-agenda-views.el") - - -;; enable znc (which is sitting on bobbins server 46.101.17.241) -(require 'znc) - -(defun email-buffer () - "Send region as the body of an email." - (interactive) - (let ((content (buffer-string))) - (compose-mail) - (message-goto-body) - (insert content) - (message-goto-to))) - -;;let's switch off global highlight mode - this doesn't switch it off! -(global-hl-line-mode 0) - -;;line number mode-line -(line-number-mode 1) - -;;switch off company mode -(company-mode) - -;;set cursor colour -(set-cursor-color "#ffffff") -(setq-default cursor-type 'box) - -(setq custom-file "~/.emacs.d/lisp/emacs-custom.el") -(load custom-file) - -;; delete region with a keystroke -(global-set-key (kbd "M-a") 'delete-region) - -;; enable encryption of files -;; to enable in org mode, include # -*- mode:org; epa-file-encrypt-to: ("me@mydomain.com") -*- as first line of file -;; where email is id of key. When you open, you'll need your passphrase, and when you save it will encrypt automatically -;; the org file should be saved with a .gpg suffix. -(require 'epa-file) -(epa-file-enable) - -(when (>= emacs-major-version 24) - (require 'package) - (add-to-list - 'package-archives - '("melpa" . "http://melpa.org/packages/") - t) - (package-initialize)) - -(setq ad-redefinition-action 'accept) - - -;; Place your settings here, which can override the settings of Emacs-Leuven. - -;; I needed this to sort out a bad bug when emacs -;; was hanging whilst I tried to launch emacs - fixed on 29 October by -;; checking out https://github.com/emacs-helm/helm/issues/1000 -;; (setq tramp-ssh-controlmaster-options -;; (concat -;; "-o ControlMaster=auto" -;; "-o ControlPath='tramp.%%C -o ControlPersist=no")) - -;; ledger-mode -(autoload 'ledger-mode "ledger-mode" "A major mode for Ledger" t) -(add-to-list 'load-path - (expand-file-name "/path/to/ledger/source/lisp/")) -(add-to-list 'auto-mode-alist '("\\.ledger$" . ledger-mode)) -(setq ledger-reconcile-default-commodity "£") - -;; add my own lisp directory to .emacs.d -(add-to-list 'load-path "~/.emacs.d/lisp") - -;; load org settings -(load "orgsettings.el") - -;; load mu4e settings -(load "mu4esettings.el") - -;; for displaying emoji? -;; Symbola is a font I installed on the Debian system on 8 November 2015 -(emoji-fontset-enable "Symbola") - -;; CLOJURE STUFF (from https://github.com/flyingmachine/emacs-for-clojure/blob/master/customizations/elisp-editing.el) -;; Automatically load paredit when editing a lisp file -;; More at http://www.emacswiki.org/emacs/ParEdit -(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t) -(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode) -(add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode) -(add-hook 'ielm-mode-hook #'enable-paredit-mode) -(add-hook 'lisp-mode-hook #'enable-paredit-mode) -(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode) -(add-hook 'scheme-mode-hook #'enable-paredit-mode) - - -;;;; -;; Clojure (from https://github.com/flyingmachine/emacs-for-clojure/blob/master/customizations/setup-clojure.el) -;; To the next ;;END -;;;; - -;; Enable paredit for Clojure -(add-hook 'clojure-mode-hook 'enable-paredit-mode) - -;; This is useful for working with camel-case tokens, like names of -;; Java classes (e.g. JavaClassName) -(add-hook 'clojure-mode-hook 'subword-mode) - -;; A little more syntax highlighting -(require 'clojure-mode-extra-font-locking) - -;; syntax hilighting for midje -(add-hook 'clojure-mode-hook - (lambda () - (setq inferior-lisp-program "lein repl") - (font-lock-add-keywords - nil - '(("(\\(facts?\\)" - (1 font-lock-keyword-face)) - ("(\\(background?\\)" - (1 font-lock-keyword-face)))) - (define-clojure-indent (fact 1)) - (define-clojure-indent (facts 1)))) - -;;;; -;; Cider -;;;; - -;; provides minibuffer documentation for the code you're typing into the repl -(add-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode) - -;; go right to the REPL buffer when it's finished connecting -(setq cider-repl-pop-to-buffer-on-connect t) - -;; When there's a cider error, show its buffer and switch to it -(setq cider-show-error-buffer t) -(setq cider-auto-select-error-buffer t) - -;; Where to store the cider history. -(setq cider-repl-history-file "~/.emacs.d/cider-history") - -;; Wrap when navigating history. -(setq cider-repl-wrap-history t) - -;; enable paredit in your REPL -(add-hook 'cider-repl-mode-hook 'paredit-mode) - -;; Use clojure mode for other extensions -(add-to-list 'auto-mode-alist '("\\.edn$" . clojure-mode)) -(add-to-list 'auto-mode-alist '("\\.boot$" . clojure-mode)) -(add-to-list 'auto-mode-alist '("\\.cljs.*$" . clojure-mode)) -(add-to-list 'auto-mode-alist '("lein-env" . enh-ruby-mode)) - - -;; key bindings -;; these help me out with the way I usually develop web apps -(defun cider-start-http-server () - (interactive) - (cider-load-current-buffer) - (let ((ns (cider-current-ns))) - (cider-repl-set-ns ns) - (cider-interactive-eval (format "(println '(def server (%s/start))) (println 'server)" ns)) - (cider-interactive-eval (format "(def server (%s/start)) (println server)" ns)))) - - -(defun cider-refresh () - (interactive) - (cider-interactive-eval (format "(user/reset)"))) - -(defun cider-user-ns () - (interactive) - (cider-repl-set-ns "user")) - -(eval-after-load 'cider - '(progn - (define-key clojure-mode-map (kbd "C-c C-v") 'cider-start-http-server) - (define-key clojure-mode-map (kbd "C-M-r") 'cider-refresh) - (define-key clojure-mode-map (kbd "C-c u") 'cider-user-ns) - (define-key cider-mode-map (kbd "C-c u") 'cider-user-ns))) - -;; eldoc-mode shows documentation in the minibuffer when writing code -;; http://www.emacswiki.org/emacs/ElDoc -(add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode) -(add-hook 'lisp-interaction-mode-hook 'turn-on-eldoc-mode) -(add-hook 'ielm-mode-hook 'turn-on-eldoc-mode) - -;;END OF LOTS OF CLOJURE CONFIG -;; -;; -;; -;; - -;; JAVASCRIPT and COFFEESCRIPT STUFF (from https://github.com/flyingmachine/emacs-for-clojure/blob/master/customizations/setup-js.el) -;; javascript / html -(add-to-list 'auto-mode-alist '("\\.js$" . js-mode)) -(add-hook 'js-mode-hook 'subword-mode) -(add-hook 'html-mode-hook 'subword-mode) -(setq js-indent-level 2) -(eval-after-load "sgml-mode" - '(progn - (require 'tagedit) - (tagedit-add-paredit-like-keybindings) - (add-hook 'html-mode-hook (lambda () (tagedit-mode 1))))) - - -;; coffeescript -(add-to-list 'auto-mode-alist '("\\.coffee.erb$" . coffee-mode)) -(add-hook 'coffee-mode-hook 'subword-mode) -(add-hook 'coffee-mode-hook 'highlight-indentation-current-column-mode) -(add-hook 'coffee-mode-hook - (defun coffee-mode-newline-and-indent () - (define-key coffee-mode-map "\C-j" 'coffee-newline-and-indent) - (setq coffee-cleanup-whitespace nil))) - - -;; END OF JAVASCRIPT AND COFFEESCRIPT STUFF -;; -;; -;; - -;; SHELL INTEGRATION STUFF (from https://github.com/flyingmachine/emacs-for-clojure/blob/master/customizations/shell-integration.el#L1) -;; Sets up exec-path-from shell -;; https://github.com/purcell/exec-path-from-shell -(when (memq window-system '(mac ns)) - (exec-path-from-shell-initialize) - (exec-path-from-shell-copy-envs - '("PATH"))) -;; END - -;; SWITCH OFF CURSOR BLINKING -(blink-cursor-mode 0) - - -;; trying to disable the mouse click which is infuriating me - this doesn't work. Further investigation needed -(global-unset-key [down-mouse-1]) - - - -;; calendar proper Monday start -(setq calendar-week-start-day 1) - -;; autopair -(require 'autopair) - -;; deft -(require 'deft) -(setq deft-directory "~/ownCloud/Textnotes") -(setq deft-use-filename-as-title t) -;; (setq deft-extension "txt") ; if I want default new files to be org files -;; (setq deft-text-mode 'org-mode) ; use org-mode to view the razzers - -;; alternative setup of deft to allow for deft seeing all file extensions from -;; http://emacs.stackexchange.com/questions/3429/how-to-support-multiple-extensions-in-deft -(setq deft-extension "") -(defvar deft-default-extension "txt") -(defun my/deft-default-extension (orig-func &rest args) - (let ((deft-extension deft-default-extension)) - (apply orig-func args))) -(advice-add 'deft-new-file :around #'my/deft-default-extension) - -;; give us a system clipboard -(setq x-select-enable-clipboard t) - -;; I don't want to type yes or no -(defalias 'yes-or-no-p 'y-or-n-p) - -;;gnus sorting the summary buffer and putting the date in the headline -(setq gnus-summary-line-format "%U%d%R%z%I%(%[%4L: %-23,23f%]%) %s\n") -(setq gnus-thread-sort-functions - '(gnus-thread-sort-by-most-recent-date)) -;; how the group buffer looks -(setq gnus-group-line-format "%M%S%p%P%5y:%B%(%g%)\n") - -;; guide-key config - SWITCHED OFF -(require 'guide-key) -(setq guide-key/guide-key-sequence '("C-x r" "C-x 4" "C-c")) -(guide-key-mode 1) ; Enable guide-key-mode - -;; enable flycheck by default (on the fly linting) -;; SWITCH IT OFF FOR A BIT: (add-hook 'after-init-hook #'global-flycheck-mode) - -;; python stuff - go this from a big pacman update on 18 Dec -(autoload 'python-mode "python-mode.el" "Python mode." t) -(setq auto-mode-alist (append '(("/.*\.py\'" . python-mode)) auto-mode-alist)) - -;; TRAMP stuff -;; using sshx as default as it works better than ssh -(setq tramp-default-method "sshx") - -;; use iPython as the python interpreter in emacs -(setq - python-shell-interpreter "ipython" - python-shell-interpreter-args "" - python-shell-prompt-regexp "In \\[[0-9]+\\]: " - python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: " - python-shell-completion-setup-code - "from IPython.core.completerlib import module_completion" - python-shell-completion-module-string-code - "';'.join(module_completion('''%s'''))\n" - python-shell-completion-string-code - "';'.join(get_ipython().Completer.all_completions('''%s'''))\n") - -;; virtualenv config -(require 'virtualenvwrapper) -(venv-initialize-interactive-shells) ;; if you want interactive shell support -(venv-initialize-eshell) ;; if you want eshell support -(setq venv-location "/home/lemon/.envs") - -;; set my virtualenv dir for helm-pydoc -(setq helm-virtualenv ".envs") - -;;w3m config -(require 'w3m) - (setq browse-url-browser-function 'w3m-browse-url) - (autoload 'w3m-browse-url "w3m" "Ask a WWW browser to show a URL." t) - ;; optional keyboard short-cut -(global-set-key "\C-xm" 'browse-url-at-point) - -;; my keybind to open a link in an external browser -(define-key w3m-mode-map (kbd "\C-c B") 'w3m-external-view-this-url) - -;; open the current document in external browser -(define-key w3m-mode-map (kbd "\C-c b") 'w3m-external-view-current-url) - -;;change w3m user-agent to android -(setq w3m-user-agent "Mozilla/5.0 (Linux; U; Android 2.3.3; zh-tw; HTC_Pyramid Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.") - -;;quick access reddit -(defun reddit (reddit) - "Opens the REDDIT in w3m-new-session" - (interactive (list - (read-string "Enter the reddit (default: emacs): " nil nil "emacs" nil))) - (browse-url (format "http://m.reddit.com/r/%s" reddit))) - -;; wrap tags in HTML from http://ergoemacs.org/emacs/emacs_html_insert_tags.html -(defun wrap-html-tag (tagName) - "Add a tag to beginning and ending of current word or text selection." - (interactive "sEnter tag name: ") - (let (p1 p2 inputText) - (if (use-region-p) - (progn - (setq p1 (region-beginning) ) - (setq p2 (region-end) ) - ) - (let ((bds (bounds-of-thing-at-point 'symbol))) - (setq p1 (car bds) ) - (setq p2 (cdr bds) ) ) ) - - (goto-char p2) - (insert "</" tagName ">") - (goto-char p1) - (insert "<" tagName ">") - )) - - -;;Use AUCTex -(load "auctex.el" nil t t) -;;(load "preview-latex.el" nil t t) -(setq TeX-auto-save t) -(setq TeX-parse-self t) -(setq-default TeX-master nil) -(setq TeX-PDF-mode t); PDF mode (rather than DVI-mode) - - -;; make sure calendar is using European date format, not the fucking American one -(setq calendar-date-style (quote european)) - -;; global visual line mode -(global-visual-line-mode 1) - -;; mouse avoidance -(mouse-avoidance-mode 'banish) - -;; column numbering -(column-number-mode 1) - -;; paren mode -(show-paren-mode 1) - -;; use recentf to open recent files (from http://www.masteringemacs.org/article/find-files-faster-recent-files-package) -(require 'recentf) - -;; get rid of `find-file-read-only' and replace it with something -;; more useful. -;;(global-set-key (kbd "C-x C-r") 'ido-recentf-open) - -;; enable recent files mode. -(recentf-mode t) - -; 50 files ought to be enough. -(setq recentf-max-saved-items 50) - -;;(defun ido-recentf-open () -;; "Use `ido-completing-read' to \\[find-file] a recent file" -;; (interactive) -;; (if (find-file (ido-completing-read "Find recent file: " recentf-list)) -;; (message "Opening file...") -;; (message "Aborting"))) - -;; fix scrolling -(setq mouse-wheel-follow-mouse 't) -(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) - -;; browser shit - ovrriding what's up there for now -(setq browse-url-browser-function 'browse-url-generic) -(setq browse-url-generic-program "uzbl-browser") - -;; save tonnes of history -(setq savehist-file "~/.emacs.d/savehist") -(savehist-mode +1) -(setq savehist-save-minibuffer-history +1) -(setq savehist-additional-vriables - '(kill-ring - search-ring - regexp-search-ring)) - -;; markdown mode - bits from http://www.wisdomandwonder.com/wordpress/wp-content/uploads/2014/03/C3F.html -(autoload 'markdown-mode "markdown-mode" - "Major mode for editing Markdown files" t) -(add-to-list 'auto-mode-alist '("README\\.md\\.markdown\\'" . gfm-mode)) - -;; stash backups somewhere more convenient (from https://github.com/correl/dotfiles/blob/master/.emacs.d/emacs.org) -(setq backup-directory-alist '(("." . "~/.emacs.d/backups"))) - -;; save lots of backups (from https://github.com/correl/dotfiles/blob/master/.emacs.d/emacs.org) -(setq delete-old-versions -1) -(setq version-control t) -(setq vc-make-backup-files t) -(setq auto-save-file-name-transforms '((".*" "~/.emacs.d/auto-save-list/" t))) - -;; if we want line numbers and syntax highlighting from http://www.wisdomandwonder.com/wordpress/wp-content/uploads/2014/03/C3F.html -;; (global-linum-mode 1) -(global-font-lock-mode 1) - -;; use SOLARIZED -;;(load-theme 'solarized-dark t) - -;; other themes -;; (load-theme 'misterioso t) -(load-theme 'tango-dark t) - -;; save history of minibuffer commands -(savehist-mode 1) - - - -;; evil mode is here -;; getting good shit from http://juanjoalvarez.net/es/detail/2014/sep/19/vim-emacsevil-chaotic-migration-guide/ -;; (require 'evil) -;; (evil-mode 1) -;; (setq evil-emacs-state-cursor '("red" box)) -;; (setq evil-normal-state-cursor '("green" box)) -;; (setq evil-visual-state-cursor '("orange" box)) -;; (setq evil-insert-state-cursor '("red" bar)) -;; (setq evil-replace-state-cursor '("red" bar)) -;; (setq evil-operator-state-cursor '("red" hollow)) - -;; my keybindings -(global-set-key (kbd "C-c u") 'browse-url) - - -;; START HELM STUFF (IT IS INSTALLED IN ~/code/github-code -;; [Facultative] Only if you have installed async. -(add-to-list 'load-path "/home/lemon/code/github/helm") -(add-to-list 'load-path "/home/lemon/code/github/emacs-async") -(require 'helm-config) -(helm-mode 1) - -;; The default "C-x c" is quite close to "C-x C-c", which quits Emacs. -;; Changed to "C-c h". Note: We must set "C-c h" globally, because we -;; cannot change `helm-command-prefix-key' once `helm-config' is loaded. -(global-set-key (kbd "C-c h") 'helm-command-prefix) -(global-unset-key (kbd "C-x c")) -;; (define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) ; rebind tab to run persistent action -;; (define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) ; make TAB works in terminal -;; (define-key helm-map (kbd "C-z") 'helm-select-action) ; list actions using C-z - -(when (executable-find "curl") - (setq helm-google-suggest-use-curl-p t)) - -(setq helm-split-window-in-side-p t ; open helm buffer inside current window, not occupy whole other window - helm-buffers-fuzzy-matching t ; fuzzy matching buffer names when non--nil - helm-move-to-line-cycle-in-source t ; move to end or beginning of source when reaching top or bottom of source. - helm-ff-search-library-in-sexp t ; search for library in `require' and `declare-function' sexp. - helm-scroll-amount 8 ; scroll 8 lines other window using M-<next>/M-<prior> - helm-ff-file-name-history-use-recentf t) - -(global-set-key (kbd "M-x") 'helm-M-x) -(global-set-key (kbd "C-x b") 'helm-mini) -(global-set-key (kbd "C-x C-f") 'helm-find-files) - -;; use ack-grep when grepping in shit (following a C-x-C-f) -(when (executable-find "ack-grep") - (setq helm-grep-default-command "ack-grep -Hn --no-group --no-color %e %p %f" - helm-grep-default-recurse-command "ack-grep -H --no-group --no-color %e %p %f")) -;; extra shit in code -(semantic-mode 1) -;; find man page of shit at point -(add-to-list 'helm-sources-using-default-as-input 'helm-source-man-pages) -;; fucking awsome occur shit in helm -(global-set-key (kbd "C-c h o") 'helm-occur) - - -;; make sure you can delete selected region -(delete-selection-mode 1) - -;; powerline for emacs -(require 'powerline) -(powerline-vim-theme) - -;; enable buffers to auto-update when file on disk changes -(global-auto-revert-mode t) - -(require 'ace-jump-mode) - (define-key global-map (kbd "C-c SPC") 'ace-jump-mode) - -;; -;; enable a more powerful jump back function from ace jump mode -;; -(autoload - 'ace-jump-mode-pop-mark - "ace-jump-mode" - "Ace jump back:-)" - t) -(eval-after-load "ace-jump-mode" - '(ace-jump-mode-enable-mark-sync)) -(define-key global-map (kbd "C-x SPC") 'ace-jump-mode-pop-mark) - -;; ace search -(ace-isearch-mode +1) -(global-ace-isearch-mode +1) - -;; use Projectile - currently not using it -(projectile-global-mode) - - -;; END OF HELM STUFF - -;; python Jedi! -(add-hook 'python-mode-hook 'jedi:setup) -(setq jedi:complete-on-dot t) ; optional -;;(add-to-list 'ac-sources 'ac-source-jedi-direct) - - - -;; config for mutt to use emacs (from emacs wikie mutt in emacs) -(server-start) -(add-to-list 'auto-mode-alist '("/mutt" . mail-mode)) - -;; get rid of annoying buffer key -(global-unset-key "\C-x\C-b") - -;; Start with ido mode by default -(require 'ido) -(setq ido-enable-flex-matching t) -(setq ido-everywhere t) -(setq ido-create-new-buffer 'always) -(setq ido-file-extensions-order '(".org" ".txt" ".py" ".emacs" ".xml" ".html" ".el" ".ini" ".cfg" ".cnf")) -(ido-mode 1) - -;; Get rid of the menu bar and toolbar and scroll bar -(menu-bar-mode -1) -(tool-bar-mode -1) -(scroll-bar-mode -1) - -;; start to scratch -(setq inhibit-startup-screen +1) -(put 'narrow-to-region 'disabled nil) diff --git a/org-clock-save.el b/org-clock-save.el index 6429b1e..bd9fdd9 100644 --- a/org-clock-save.el +++ b/org-clock-save.el @@ -1,2 +1,2 @@ -;; org-clock-save.el - x201 at <2020-01-18 Sat 11:36> -(setq org-clock-stored-history '(("/home/lemon/Nextcloud/org/habits.org" . 755))) +;; org-clock-save.el - x220 at <2021-10-07 Thu 16:11> +(setq org-clock-stored-history '(("/home/lemon/org/habits.org" . 368) ("/home/lemon/org/work.org" . 1422) ("/home/lemon/org/work.org" . 1) ("/home/lemon/org/work.org" . 452) ("/home/lemon/org/home.org" . 2204))) diff --git a/orgsettings.el b/orgsettings.el deleted file mode 100644 index 51efcb8..0000000 --- a/orgsettings.el +++ /dev/null @@ -1,201 +0,0 @@ -;;; package --- Summary - -;;; Commentary: -;; Putting org settings into its separate file. - -;;; Code: -(require 'org) - -;; remove tags from the agenda view -(setq org-agenda-remove-tags t) - -;; START indented -(setq org-startup-indented t) - -;; START folded -(setq org-startup-folded t) - -;; START hidden asterisks -(setq org-hide-leading-stars t) - -;; basic agenda stuff -(setq org-directory "~/Nextcloud/org") -(setq org-agenda-files "~/Nextcloud/org/agenda-files.org") -(setq org-default-notes-file (concat org-directory "/refile.org")) -(setq diary-file "~/Nextcloud/org/emacs-diary") -;; set day view as default -(setq org-agenda-span 'day) - -(define-key global-map "\C-cl" 'org-store-link) -(define-key global-map "\C-ca" 'org-agenda) -(setq org-log-done 'time) -(setq org-agenda-include-diary t) -(setq org-return-follows-link t) ;; not working! use C-c C-o instead - that is from org and it works - - -;; enable python for Org-babel (doing source code stuff in org mode) - (org-babel-do-load-languages - 'org-babel-load-languages - '((emacs-lisp . nil) - (python . t))) - -;; Enable state logging enable for the TODO state in org mode i.e. the "!" part - (setq org-todo-keywords - (quote - ((sequence "TODO(t!)" "NEXT(n!)" "READ(r!)" "WRITE(o!)" "FIXME(f!)" "BUG(b!)" "|" "DONE(d!)") - (sequence "WAITING(w@/!)" "SOMEDAY(s@/!)" "|" "CANCELLED(c@/!)")))) - -;; Capture shit -(define-key global-map "\C-cc" 'org-capture) -(setq org-default-notes-file "~/Nextcloud/org/refile.org") -(setq org-capture-templates - (quote (("z" "Todo" entry (file "~/Nextcloud/org/todo.org") - "* TODO %?") - ("o" "On-call log" entry (file "~/Nextcloud/org/oncall-logs.org") - "* TODO %? :oncall:\nDetails of alert: \nEntered on %U\n") - ("j" "Journal" entry (file+datetree "~/Nextcloud/org/journal.org") - "* %?\nEntered on %U\n %i\n %a") - ("e" "Emacs Tip" entry (file+headline "~/Nextcloud/org/emacs-tips.org" "Emacs Tips") - "* %?\n %i\n %a") - ("r" "RAM TODO/FIXME/BUG" entry (file+headline "~/Nextcloud/org/ram.org" "Tasks") - "* %?\n%a")))) - - -;; test for colourising TODO tags -(setq org-tag-faces - (quote (("code" :foreground "green yellow") - ("read" :foreground "orange") - ("urgent" :foreground "red" :background "white" :underline t) - ("laptop" :foreground "orange") - ("home" :foreground "orchid") - ("work" :foreground "tomaton" :underline t) - ("ram" :foreground "orange red") - ("brainstorm" :foreground "aquamarine") - ("research" :foreground "mint cream") - ("oncall" :foreground "yellow" :weight bold) - ("repeating" :foreground "pale turquoise") - ("phone" :foreground "hot pink")))) - -;; remap some keys -;; (global-set-key (kbd "<f1>") 'org-agenda) - -;; colourize the headline tags -(setq org-todo-keyword-faces - (quote (("TODO" :foreground "red" :weight bold) - ("NEXT" :foreground "cyan" :weight bold) - ("FIXME" :foreground "yellow" :weight bold) - ("BUG" :foreground "yellow" :weight bold) - ("DONE" :foreground "forest green" :weight bold) - ("READ" :foreground "orange" :weight bold) - ("WRITE" :foreground "magenta" :weight bold) - ("CANCELLED" :foreground "forest green" :weight bold) - ("WAITING" :foreground "MediumOrchid1" :weight bold) - ("SOMEDAY" :foreground "forest green" :weight bold)))) - -;; use fast selection -(setq org-use-fast-todo-selection t) - -;; getting much of this stuff form http://doc.norang.ca/org-mode.html by the way -;; use shift and arrows to change stage a TODO item without logging the change, which is great for fixing mistakes -(setq org-treat-S-cursor-todo-selection-as-state-change nil) - -;; tag stuff automatically dependent on a change of state -(setq org-todo-state-tags-triggers - (quote (("CANCELLED" ("CANCELLED" . t)) - ("WAITING" ("WAITING" . t)) - ("HOLD" ("WAITING") ("HOLD" . t)) - (done ("WAITING") ("HOLD")) - ("TODO" ("WAITING") ("CANCELLED") ("HOLD")) - ("NEXT" ("WAITING") ("CANCELLED") ("HOLD")) - ("DONE" ("WAITING") ("CANCELLED") ("HOLD"))))) - - -;; START ---STUFF PULLED FROM emacs-leuven.el ----START -;; REMOVE THIS SECTION AND LOAD emacs-leuven.el again in init.el -;; if you want to go back to full emacs-leuven config - -;; Settings for time grid for agenda display. -(setq org-agenda-time-grid '((daily remove-match) - "" - (0600 0800 1000 1200 1400 1600 1800 2000 2200))) - -;; String for the current time marker in the agenda. -(setq org-agenda-current-time-string "Right now") - -;; 10.4.3 Sorting structure for the agenda items of a single day. -(setq org-agenda-sorting-strategy ; custom value - '((agenda time-up category-up priority-down effort-down) - (todo category-up priority-down effort-down) - (tags category-up priority-down effort-down) - (search category-up))) - -;; Format string for displaying dates in the daily/weekly agenda -;; and in the timeline. -(setq org-agenda-format-date - (concat ; "\n" - "%Y-%m-%d" " %a " - ;; (make-string (1- (window-width)) (string-to-char "_")))) - (make-string 65 (string-to-char " ")) - "_" - ;; (make-string 1 ?\u25AE) - )) - - ;; Faces for specific Priorities (#A, #B and #C). - (setq org-priority-faces - '((?A . (:foreground "#CC0000" :background "#FFE3E3")) - (?B . (:foreground "#64992C" :background "#EBF4DD")) - (?C . (:foreground "#64992C" :background "#FFFFFF")))) - -;; END ---STUFF PULLED FROM emacs-leuven.el ----END - -(setq org-agenda-custom-commands - (quote (("N" "Agenda and NEXT TODOs" - ((agenda "") - (todo "NEXT"))) - ("y" "Agenda and All TODOS" - ((agenda "") - (alltodo "")))) - -;; BELOW IS A BIGGER EXAMPLE OF THE FUNC ABOVE -;; setting custom views in the agenda ------- learned a lot about elist doing this! -;; (setq org-agenda-custom-commands -;; (quote (("A" "Agenda and All TODOs" -;; ((agenda "") -;; (alltodo ""))) -;; ("N" "Agenda and NEXT TODOs" -;; ((agenda "") -;; (todo "NEXT"))) -;; ("G" "Agenda, NEXT and All TODOs" -;; ((agenda "") -;; (todo "NEXT") -;; (alltodo ""))) -;; ("R" "Agenda and READ TODOs" -;; ((agenda "") -;; (todo "READ"))) -;; ("c" "Code BUG/FIXME" -;; ((agenda "") -;; (todo "BUG") -;; (todo "FIXME"))) -;; ("o" "On-call logs" -;; ((agenda "") -;; (tags "oncall" -;; (quote (org-agenda-overriding-header "On Call Logs"))))) -;; ("r" "RAM stuff" -;; ((agenda "") -;; (tags "ram" -;; (quote (org-agenda-overriding-header "RAM Stuff"))))) -;; ("H" "Agenda and Habits" -;; ((agenda "") -;; (tags-todo "STYLE=\"habit\"" -;; (quote (org-agenda-overriding-header "Habits")))))))) - -;; use a single archive file for org -(setq org-archive-location "~/Nextcloud/org/archive/archive.org::* From %s") - -;; refiling properly (or generally because everything is included) -(setq org-refile-targets (quote ((nil :maxlevel . 9) - (org-agenda-files :maxlevel . 9)))) - -(setq org-ellipsis "...") - -;; END OF ORG MODE STUFF diff --git a/projectile-bookmarks.eld b/projectile-bookmarks.eld deleted file mode 100644 index b91d5d9..0000000 --- a/projectile-bookmarks.eld +++ /dev/null @@ -1 +0,0 @@ -("~/.emacs.d/" "~/code/python/django-test-gcp/")
\ No newline at end of file |