Commit 6d092b7b6310
Changed files (15)
.emacs.d
elpa
diminish-20170419.1036
exec-path-from-shell-20170508.4
.emacs.d/config/visual-config.el
@@ -0,0 +1,59 @@
+
+(use-package dashboard
+ :ensure t
+ :diminish dashboard-mode
+ :config
+ (setq dashboard-banner-logo-title "Welcome to Emacs, Vincent !"
+ dashboard-startup-banner (expand-file-name "images/okumura_rin_4_by_naruto_lover16-d4ktg50.png" user-emacs-directory))
+ (dashboard-setup-startup-hook))
+
+(use-package doom-themes
+ :ensure t
+ :config
+ (setq doom-themes-enable-bolt t)
+ (setq doom-themes-enable-italic t)
+ (load-theme 'doom-one t))
+
+(use-package solaire-mode
+ :ensure t
+ :config
+ (setq solaire-mode-remap-modeline nil)
+ (add-hook 'after-change-major-mode-hook #'turn-on-solaire-mode)
+ (add-hook 'after-revert-hook #'turn-on-solaire-mode)
+ (add-hook 'minibuffer-setup-hook #'solaire-mode-in-minibuffer)
+ (add-hook 'ediff-prepare-buffer-hook #'solaire-mode)
+ (advice-add #'persp-load-state-from-file :after #'solaire-mode-restore-persp-mode-buffers))
+
+(line-number-mode 1)
+(column-number-mode 1)
+(global-hl-line-mode 1)
+
+(setq font-lock-maximum-decoration 2)
+
+(setq-default indicate-buffer-boundaries 'left)
+(setq-default indicate-empty-lines +1)
+
+(defun vde/byte-recompile ()
+ (interactive)
+ (byte-recompile-directory user-emacs-directory 0)
+ (byte-recompile-directory (expand-file-name "lisp" user-emacs-directory) 0)
+ (byte-recompile-directory (expand-file-name "config" user-emacs-directory) 0)
+ (byte-recompile-directory (expand-file-name "lisp/use-package" user-emacs-directory) 0))
+
+(defvar vde/fixed-font-family
+ (cond ((x-list-fonts "Ubuntu Mono") "Ubuntu Mono-14")
+ ((x-list-fonts "Hasklig") "Hasklig-14")
+ ((x-list-fonts "Consolas") "Consolas-14"))
+ "Fixed width font based on what is install")
+
+(set-frame-font vde/fixed-font-family)
+(set-face-attribute 'default nil :font vde/fixed-font-family :height 110)
+(set-face-font 'default vde/fixed-font-family)
+
+(line-number-mode t)
+(column-number-mode t)
+
+(global-linum-mode -1)
+(add-hook 'prog-mode-hook (lambda () (linum-mode t)))
+
+(provide 'visual-config)
.emacs.d/config/visual-config.elc
Binary file
.emacs.d/config/visual-config.org
@@ -0,0 +1,131 @@
+#+TITLE: Visual configuration ๐
+
+Let's customize some graphical element, like dashboard, mode-line, and stuff
+
+* Dashboard :CANCELLED:
+
+The default Emacs splash-screen is not that useful. A useful
+splash-screen would display some recent files opened, bookmaks,
+projects and org-agenda items. Luckily, there is already a project
+that does that, [[https://github.com/rakanalh/emacs-dashboard][emacs-dashboard]].
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+ (use-package dashboard
+ :ensure t
+ :config
+ (setq dashboard-banner-logo-title "Welcome to Emacs, Vincent !"
+ dashboard-startup-banner (expand-file-name "images/okumura_rin_4_by_naruto_lover16-d4ktg50.png" user-emacs-directory))
+ (dashboard-setup-startup-hook))
+#+END_SRC
+
+* Theme
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+ (use-package doom-themes
+ :ensure t
+ :config
+ (setq doom-themes-enable-bolt t)
+ (setq doom-themes-enable-italic t)
+ (load-theme 'doom-one t))
+#+END_SRC
+
+A good companion to =doom-one= theme is [[https://github.com/hlissner/emacs-solaire-mode][solaire-mode]]. It helps
+visually distinguish file-visiting from other types of windows (like
+popups or sidebars).
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+ (use-package solaire-mode
+ :ensure t
+ :config
+ (setq solaire-mode-remap-modeline nil)
+ (add-hook 'after-change-major-mode-hook #'turn-on-solaire-mode)
+ (add-hook 'after-revert-hook #'turn-on-solaire-mode)
+ (add-hook 'minibuffer-setup-hook #'solaire-mode-in-minibuffer)
+ (add-hook 'ediff-prepare-buffer-hook #'solaire-mode)
+ (advice-add #'persp-load-state-from-file :after #'solaire-mode-restore-persp-mode-buffers))
+#+END_SRC
+* Lines and columns
+
+We want to see somewhere the column and line number, and also
+highlight the current line to see it easily.
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+ (line-number-mode 1)
+ (column-number-mode 1)
+ (global-hl-line-mode 1)
+#+END_SRC
+
+* Syntax highlighting
+
+Depending on the files opened and the syntax highlighting enabled,
+~font-lock-mode~ can be slow, we try to limit that, to keep Emacs
+reactive.
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+ (setq font-lock-maximum-decoration 2)
+#+END_SRC
+
+* Fringe decorations
+
+[[http://www.emacswiki.org/emacs/TheFringe][The fringe]] is the vertical region at the right and left of the
+buffer. Emacs lets you customize it of course.
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+ (setq-default indicate-buffer-boundaries 'left)
+ (setq-default indicate-empty-lines +1)
+#+END_SRC
+
+* Byte-compiles =.emacs.d= folder
+
+Let's also define a quick function to byte-compile files under
+=.emacs.d= folder to speed things up.
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+ (defun vde/byte-recompile ()
+ (interactive)
+ (byte-recompile-directory user-emacs-directory 0)
+ (byte-recompile-directory (expand-file-name "lisp" user-emacs-directory) 0)
+ (byte-recompile-directory (expand-file-name "config" user-emacs-directory) 0)
+ (byte-recompile-directory (expand-file-name "lisp/use-package" user-emacs-directory) 0))
+#+END_SRC
+
+* Fonts
+
+Depending on the machine used I might not have the correct font
+installed or another one renders better. I am a long-time fan of
+=Ubuntu Mono= fonts but some fonts are starting to interesting me,
+mainly =[[https://github.com/tonsky/FiraCode][Fira]]= and =[[https://github.com/i-tu/Hasklig][Hasklig]]= which do symbol ligatures.
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+ (defvar vde/fixed-font-family
+ (cond ((x-list-fonts "Ubuntu Mono") "Ubuntu Mono-14")
+ ((x-list-fonts "Hasklig") "Hasklig-14")
+ ((x-list-fonts "Consolas") "Consolas-14"))
+ "Fixed width font based on what is install")
+
+ (set-frame-font vde/fixed-font-family)
+ (set-face-attribute 'default nil :font vde/fixed-font-family :height 110)
+ (set-face-font 'default vde/fixed-font-family)
+#+END_SRC
+
+Let's write some emojis to see how they look ๐ ๐ ๐ โจ โ
๐ฒ.
+
+* Line numbers
+
+Enable line-number and column number mode (in the mode line) but also
+add linum on programming modes (feel safe to enable on those but not
+on other file that could be too big).
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+ (line-number-mode t)
+ (column-number-mode t)
+
+ (global-linum-mode -1)
+ (add-hook 'prog-mode-hook (lambda () (linum-mode t)))
+#+END_SRC
+
+* Provide configuration
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+(provide 'visual-config)
+#+END_SRC
.emacs.d/elpa/diminish-20170419.1036/diminish-autoloads.el
@@ -0,0 +1,57 @@
+;;; diminish-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
+
+;;;### (autoloads nil "diminish" "diminish.el" (22966 57819 613917
+;;;;;; 224000))
+;;; Generated autoloads from diminish.el
+
+(autoload 'diminish "diminish" "\
+Diminish mode-line display of minor mode MODE to TO-WHAT (default \"\").
+
+Interactively, enter (with completion) the name of any minor mode, followed
+on the next line by what you want it diminished to (default empty string).
+The response to neither prompt should be quoted. However, in Lisp code,
+both args must be quoted, the first as a symbol, the second as a string,
+as in (diminish 'jiggle-mode \" Jgl\").
+
+The mode-line displays of minor modes usually begin with a space, so
+the modes' names appear as separate words on the mode line. However, if
+you're having problems with a cramped mode line, you may choose to use single
+letters for some modes, without leading spaces. Capitalizing them works
+best; if you then diminish some mode to \"X\" but have abbrev-mode enabled as
+well, you'll get a display like \"AbbrevX\". This function prepends a space
+to TO-WHAT if it's > 1 char long & doesn't already begin with a space.
+
+\(fn MODE &optional TO-WHAT)" t nil)
+
+(autoload 'diminish-undo "diminish" "\
+Restore mode-line display of diminished mode MODE to its minor-mode value.
+Do nothing if the arg is a minor mode that hasn't been diminished.
+
+Interactively, enter (with completion) the name of any diminished mode (a
+mode that was formerly a minor mode on which you invoked \\[diminish]).
+To restore all diminished modes to minor status, answer `diminished-modes'.
+The response to the prompt shouldn't be quoted. However, in Lisp code,
+the arg must be quoted as a symbol, as in (diminish-undo 'diminished-modes).
+
+\(fn MODE)" t nil)
+
+(autoload 'diminished-modes "diminish" "\
+Echo all active diminished or minor modes as if they were minor.
+The display goes in the echo area; if it's too long even for that,
+you can see the whole thing in the *Messages* buffer.
+This doesn't change the status of any modes; it just lets you see
+what diminished modes would be on the mode-line if they were still minor.
+
+\(fn)" t nil)
+
+;;;***
+
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; End:
+;;; diminish-autoloads.el ends here
.emacs.d/elpa/diminish-20170419.1036/diminish-pkg.el
@@ -0,0 +1,2 @@
+;;; -*- no-byte-compile: t -*-
+(define-package "diminish" "20170419.1036" "Diminished modes are minor modes with no modeline display" 'nil :commit "d5c61a14e1a5590a65f83c099a5bd42fcadff24d" :url "https://github.com/myrjola/diminish.el" :keywords '("extensions" "diminish" "minor" "codeprose"))
.emacs.d/elpa/diminish-20170419.1036/diminish.el
@@ -0,0 +1,294 @@
+;;; diminish.el --- Diminished modes are minor modes with no modeline display
+
+;; Copyright (C) 1998 Free Software Foundation, Inc.
+
+;; Author: Will Mengarini <seldon@eskimo.com>
+;; Maintainer: Martin Yrjรถlรค <martin.yrjola@gmail.com>
+;; URL: <https://github.com/myrjola/diminish.el>
+;; Package-Version: 20170419.1036
+;; Created: Th 19 Feb 98
+;; Version: 0.45
+;; Keywords: extensions, diminish, minor, codeprose
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License along with
+;; this program; see the file LICENSE. If not, write to the write to the Free
+;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; Minor modes each put a word on the mode line to signify that they're
+;; active. This can cause other displays, such as % of file that point is
+;; at, to run off the right side of the screen. For some minor modes, such
+;; as mouse-avoidance-mode, the display is a waste of space, since users
+;; typically set the mode in their .emacs & never change it. For other
+;; modes, such as my jiggle-mode, it's a waste because there's already a
+;; visual indication of whether the mode is in effect.
+
+;; A diminished mode is a minor mode that has had its mode line
+;; display diminished, usually to nothing, although diminishing to a
+;; shorter word or a single letter is also supported. This package
+;; implements diminished modes.
+
+;; You can use this package either interactively or from your .emacs file.
+;; In either case, first you'll need to copy this file to a directory that
+;; appears in your load-path. `load-path' is the name of a variable that
+;; contains a list of directories Emacs searches for files to load.
+;; To prepend another directory to load-path, put a line like
+;; (add-to-list 'load-path "c:/My_Directory") in your .emacs file.
+
+;; To create diminished modes interactively, type
+;; M-x load-library
+;; to get a prompt like
+;; Load library:
+;; and respond `diminish' (unquoted). Then type
+;; M-x diminish
+;; to get a prompt like
+;; Diminish what minor mode:
+;; and respond with the name of some minor mode, like mouse-avoidance-mode.
+;; You'll then get this prompt:
+;; To what mode-line display:
+;; Respond by just hitting <Enter> if you want the name of the mode
+;; completely removed from the mode line. If you prefer, you can abbreviate
+;; the name. If your abbreviation is 2 characters or more, such as "Av",
+;; it'll be displayed as a separate word on the mode line, just like minor
+;; modes' names. If it's a single character, such as "V", it'll be scrunched
+;; up against the previous word, so for example if the undiminished mode line
+;; display had been "Abbrev Fill Avoid", it would become "Abbrev FillV".
+;; Multiple single-letter diminished modes will all be scrunched together.
+;; The display of undiminished modes will not be affected.
+
+;; To find out what the mode line would look like if all diminished modes
+;; were still minor, type M-x diminished-modes. This displays in the echo
+;; area the complete list of minor or diminished modes now active, but
+;; displays them all as minor. They remain diminished on the mode line.
+
+;; To convert a diminished mode back to a minor mode, type M-x diminish-undo
+;; to get a prompt like
+;; Restore what diminished mode:
+;; Respond with the name of some diminished mode. To convert all
+;; diminished modes back to minor modes, respond to that prompt
+;; with `diminished-modes' (unquoted, & note the hyphen).
+
+;; When you're responding to the prompts for mode names, you can use
+;; completion to avoid extra typing; for example, m o u SPC SPC SPC
+;; is usually enough to specify mouse-avoidance-mode. Mode names
+;; typically end in "-mode", but for historical reasons
+;; auto-fill-mode is named by "auto-fill-function".
+
+;; To create diminished modes noninteractively in your .emacs file, put
+;; code like
+;; (require 'diminish)
+;; (diminish 'abbrev-mode "Abv")
+;; (diminish 'jiggle-mode)
+;; (diminish 'mouse-avoidance-mode "M")
+;; near the end of your .emacs file. It should be near the end so that any
+;; minor modes your .emacs loads will already have been loaded by the time
+;; they're to be converted to diminished modes.
+
+;; To diminish a major mode, (setq mode-name "whatever") in the mode hook.
+
+;;; Epigraph:
+
+;; "The quality of our thoughts is bordered on all sides
+;; by our facility with language."
+;; --J. Michael Straczynski
+
+;;; Code:
+
+(eval-when-compile (require 'cl))
+
+(defvar diminish-must-not-copy-minor-mode-alist nil
+ "Non-nil means loading diminish.el won't (copy-alist minor-mode-alist).
+Normally `minor-mode-alist' is setq to that copy on loading diminish because
+at least one of its cons cells, that for abbrev-mode, is read-only (see
+ELisp Info on \"pure storage\"). If you setq this variable to t & then
+try to diminish abbrev-mode under GNU Emacs 19.34, you'll get the error
+message \"Attempt to modify read-only object\".")
+
+(or diminish-must-not-copy-minor-mode-alist
+ (callf copy-alist minor-mode-alist))
+
+(defvar diminished-mode-alist nil
+ "The original `minor-mode-alist' value of all (diminish)ed modes.")
+
+(defvar diminish-history-symbols nil
+ "Command history for symbols of diminished modes.")
+
+(defvar diminish-history-names nil
+ "Command history for names of diminished modes.")
+
+;; When we diminish a mode, we are saying we want it to continue doing its
+;; work for us, but we no longer want to be reminded of it. It becomes a
+;; night worker, like a janitor; it becomes an invisible man; it remains a
+;; component, perhaps an important one, sometimes an indispensable one, of
+;; the mechanism that maintains the day-people's world, but its place in
+;; their thoughts is diminished, usually to nothing. As we grow old we
+;; diminish more and more such thoughts, such people, usually to nothing.
+
+;; "The wise man knows that to keep under is to endure." The diminished
+;; often come to value their invisibility. We speak--speak--of "the strong
+;; silent type", but only as a superficiality; a stereotype in a movie,
+;; perhaps, but even if an acquaintance, necessarily, by hypothesis, a
+;; distant one. The strong silent type is actually a process. It begins
+;; with introspection, continues with judgment, and is shaped by the
+;; discovery that these judgments are impractical to share; there is no
+;; appetite for the wisdom of the self-critical among the creatures of
+;; material appetite who dominate our world. Their dominance's Darwinian
+;; implications reinforce the self-doubt that is the germ of higher wisdom.
+;; The thoughtful contemplate the evolutionary triumph of the predator.
+;; Gnostics deny the cosmos could be so evil; this must all be a prank; the
+;; thoughtful remain silent, invisible, self-diminished, and discover,
+;; perhaps at first in surprise, the freedom they thus gain, and grow strong.
+
+;;;###autoload
+(defun diminish (mode &optional to-what)
+ "Diminish mode-line display of minor mode MODE to TO-WHAT (default \"\").
+
+Interactively, enter (with completion) the name of any minor mode, followed
+on the next line by what you want it diminished to (default empty string).
+The response to neither prompt should be quoted. However, in Lisp code,
+both args must be quoted, the first as a symbol, the second as a string,
+as in (diminish 'jiggle-mode \" Jgl\").
+
+The mode-line displays of minor modes usually begin with a space, so
+the modes' names appear as separate words on the mode line. However, if
+you're having problems with a cramped mode line, you may choose to use single
+letters for some modes, without leading spaces. Capitalizing them works
+best; if you then diminish some mode to \"X\" but have abbrev-mode enabled as
+well, you'll get a display like \"AbbrevX\". This function prepends a space
+to TO-WHAT if it's > 1 char long & doesn't already begin with a space."
+ (interactive (list (read (completing-read
+ "Diminish what minor mode: "
+ (mapcar (lambda (x) (list (symbol-name (car x))))
+ minor-mode-alist)
+ nil t nil 'diminish-history-symbols))
+ (read-from-minibuffer
+ "To what mode-line display: "
+ nil nil nil 'diminish-history-names)))
+ (let ((minor (assq mode minor-mode-alist)))
+ (when minor
+ (progn (callf or to-what "")
+ (when (and (stringp to-what)
+ (> (length to-what) 1))
+ (or (= (string-to-char to-what) ?\ )
+ (callf2 concat " " to-what)))
+ (or (assq mode diminished-mode-alist)
+ (push (copy-sequence minor) diminished-mode-alist))
+ (setcdr minor (list to-what))))))
+
+;; But an image comes to me, vivid in its unreality, of a loon alone on his
+;; forest lake, shrieking his soul out into a canopy of stars. Alone this
+;; afternoon in my warm city apartment, I can feel the bite of his night air,
+;; and smell his conifers. In him there is no acceptance of diminishment.
+
+;; "I have a benevolent habit of pouring out myself to everybody,
+;; and would even pay for a listener, and I am afraid
+;; that the Athenians may think me too talkative."
+;; --Socrates, in the /Euthyphro/
+
+;; I remember a news story about a retired plumber who had somehow managed to
+;; steal a military tank. He rode it down city streets, rode over a parked
+;; car--no one was hurt--rode onto a freeway, that concrete symbol of the
+;; American spirit, or so we fancy it, shouting "Plumber Bob! Plumber Bob!".
+;; He was shot dead by police.
+
+;;;###autoload
+(defun diminish-undo (mode)
+ "Restore mode-line display of diminished mode MODE to its minor-mode value.
+Do nothing if the arg is a minor mode that hasn't been diminished.
+
+Interactively, enter (with completion) the name of any diminished mode (a
+mode that was formerly a minor mode on which you invoked \\[diminish]).
+To restore all diminished modes to minor status, answer `diminished-modes'.
+The response to the prompt shouldn't be quoted. However, in Lisp code,
+the arg must be quoted as a symbol, as in (diminish-undo 'diminished-modes)."
+ (interactive
+ (list (read (completing-read
+ "Restore what diminished mode: "
+ (cons (list "diminished-modes")
+ (mapcar (lambda (x) (list (symbol-name (car x))))
+ diminished-mode-alist))
+ nil t nil 'diminish-history-symbols))))
+ (if (eq mode 'diminished-modes)
+ (let ((diminished-modes diminished-mode-alist))
+ (while diminished-modes
+ (diminish-undo (caar diminished-modes))
+ (callf cdr diminished-modes)))
+ (let ((minor (assq mode minor-mode-alist))
+ (diminished (assq mode diminished-mode-alist)))
+ (or minor
+ (error "%S is not currently registered as a minor mode" mode))
+ (when diminished
+ (setcdr minor (cdr diminished))))))
+
+;; Plumber Bob was not from Seattle, my grey city, for rainy Seattle is a
+;; city of interiors, a city of the self-diminished. When I moved here one
+;; sunny June I was delighted to find that ducks and geese were common in
+;; the streets. But I hoped to find a loon or two, and all I found were
+;; ducks and geese. I wondered about this; I wondered why there were no
+;; loons in Seattle; but my confusion resulted from my ignorance of the
+;; psychology of rain, which is to say my ignorance of diminished modes.
+;; What I needed, and lacked, was a way to discover they were there.
+
+;;;###autoload
+(defun diminished-modes ()
+ "Echo all active diminished or minor modes as if they were minor.
+The display goes in the echo area; if it's too long even for that,
+you can see the whole thing in the *Messages* buffer.
+This doesn't change the status of any modes; it just lets you see
+what diminished modes would be on the mode-line if they were still minor."
+ (interactive)
+ (let ((minor-modes minor-mode-alist)
+ message)
+ (while minor-modes
+ (when (symbol-value (caar minor-modes))
+ ;; This minor mode is active in this buffer
+ (let* ((mode-pair (car minor-modes))
+ (mode (car mode-pair))
+ (minor-pair (or (assq mode diminished-mode-alist) mode-pair))
+ (minor-name (cadr minor-pair)))
+ (when (symbolp minor-name)
+ ;; This minor mode uses symbol indirection in the cdr
+ (let ((symbols-seen (list minor-name)))
+ (while (and (symbolp (callf symbol-value minor-name))
+ (not (memq minor-name symbols-seen)))
+ (push minor-name symbols-seen))))
+ (push minor-name message)))
+ (callf cdr minor-modes))
+ (setq message (mapconcat 'identity (nreverse message) ""))
+ (when (= (string-to-char message) ?\ )
+ (callf substring message 1))
+ (message "%s" message)))
+
+;; A human mind is a Black Forest of diminished modes. Some are dangerous;
+;; most of the mind of an intimate is a secret stranger, and these diminished
+;; modes are rendered more unpredictable by their long isolation from the
+;; corrective influence of interaction with reality. The student of history
+;; learns that this description applies to whole societies as well. In some
+;; ways the self-diminished are better able to discern the night worker.
+;; They are rendered safer by their heightened awareness of others'
+;; diminished modes, and more congenial by the spare blandness of their own
+;; mode lines. To some people rain is truly depressing, but others it just
+;; makes pensive, and, forcing them indoors where they may not have the
+;; luxury of solitude, teaches them to self-diminish. That was what I had
+;; not understood when I was searching for loons among the ducks and geese.
+;; Loons come to Seattle all the time, but the ones that like it learn to be
+;; silent, learn to self-diminish, and take on the colors of ducks and geese.
+;; Now, here a dozen years, I can recognize them everywhere, standing quietly
+;; in line with the ducks and geese at the espresso counter, gazing placidly
+;; out on the world through loon-red eyes, thinking secret thoughts.
+
+(provide 'diminish)
+
+;;; diminish.el ends here
.emacs.d/elpa/diminish-20170419.1036/diminish.elc
Binary file
.emacs.d/elpa/exec-path-from-shell-20170508.4/exec-path-from-shell-autoloads.el
@@ -0,0 +1,44 @@
+;;; exec-path-from-shell-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
+
+;;;### (autoloads nil "exec-path-from-shell" "exec-path-from-shell.el"
+;;;;;; (22966 56208 696591 848000))
+;;; Generated autoloads from exec-path-from-shell.el
+
+(autoload 'exec-path-from-shell-copy-envs "exec-path-from-shell" "\
+Set the environment variables with NAMES from the user's shell.
+
+As a special case, if the variable is $PATH, then `exec-path' and
+`eshell-path-env' are also set appropriately. The result is an alist,
+as described by `exec-path-from-shell-getenvs'.
+
+\(fn NAMES)" nil nil)
+
+(autoload 'exec-path-from-shell-copy-env "exec-path-from-shell" "\
+Set the environment variable $NAME from the user's shell.
+
+As a special case, if the variable is $PATH, then `exec-path' and
+`eshell-path-env' are also set appropriately. Return the value
+of the environment variable.
+
+\(fn NAME)" t nil)
+
+(autoload 'exec-path-from-shell-initialize "exec-path-from-shell" "\
+Initialize environment from the user's shell.
+
+The values of all the environment variables named in
+`exec-path-from-shell-variables' are set from the corresponding
+values used in the user's shell.
+
+\(fn)" t nil)
+
+;;;***
+
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; End:
+;;; exec-path-from-shell-autoloads.el ends here
.emacs.d/elpa/exec-path-from-shell-20170508.4/exec-path-from-shell-pkg.el
@@ -0,0 +1,2 @@
+;;; -*- no-byte-compile: t -*-
+(define-package "exec-path-from-shell" "20170508.4" "Get environment variables such as $PATH from the shell" 'nil :commit "5e355fbc50913d1ffe48bf86df0bcecd8b369ffb" :url "https://github.com/purcell/exec-path-from-shell" :keywords '("environment"))
.emacs.d/elpa/exec-path-from-shell-20170508.4/exec-path-from-shell.el
@@ -0,0 +1,270 @@
+;;; exec-path-from-shell.el --- Get environment variables such as $PATH from the shell
+
+;; Copyright (C) 2012-2014 Steve Purcell
+
+;; Author: Steve Purcell <steve@sanityinc.com>
+;; Keywords: environment
+;; URL: https://github.com/purcell/exec-path-from-shell
+;; Package-Version: 20170508.4
+;; Package-X-Original-Version: 0
+
+;; This file is not part of GNU Emacs.
+
+;; This file is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This file is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this file. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; On OS X (and perhaps elsewhere) the $PATH environment variable and
+;; `exec-path' used by a windowed Emacs instance will usually be the
+;; system-wide default path, rather than that seen in a terminal
+;; window.
+
+;; This library allows the user to set Emacs' `exec-path' and $PATH
+;; from the shell path, so that `shell-command', `compile' and the
+;; like work as expected.
+
+;; It also allows other environment variables to be retrieved from the
+;; shell, so that Emacs will see the same values you get in a terminal.
+
+;; If you use a non-POSIX-standard shell like "tcsh" or "fish", your
+;; shell will be asked to execute "sh" as a subshell in order to print
+;; out the variables in a format which can be reliably parsed. "sh"
+;; must be a POSIX-compliant shell in this case.
+
+;; Note that shell variables which have not been exported as
+;; environment variables (e.g. using the "export" keyword) may not be
+;; visible to `exec-path-from-shell'.
+
+;; Installation:
+
+;; ELPA packages are available on Marmalade and MELPA. Alternatively,
+;; place this file on a directory in your `load-path', and explicitly
+;; require it.
+
+;; Usage:
+;;
+;; (require 'exec-path-from-shell) ;; if not using the ELPA package
+;; (exec-path-from-shell-initialize)
+;;
+;; Customize `exec-path-from-shell-variables' to modify the list of
+;; variables imported.
+;;
+;; If you use your Emacs config on other platforms, you can instead
+;; make initialization conditional as follows:
+;;
+;; (when (memq window-system '(mac ns))
+;; (exec-path-from-shell-initialize))
+;;
+;; Alternatively, you can use `exec-path-from-shell-copy-envs' or
+;; `exec-path-from-shell-copy-env' directly, e.g.
+;;
+;; (exec-path-from-shell-copy-env "PYTHONPATH")
+
+;;; Code:
+
+(defgroup exec-path-from-shell nil
+ "Make Emacs use shell-defined values for $PATH etc."
+ :prefix "exec-path-from-shell-"
+ :group 'environment)
+
+(defcustom exec-path-from-shell-variables
+ '("PATH" "MANPATH")
+ "List of environment variables which are copied from the shell."
+ :type '(repeat (string :tag "Environment variable"))
+ :group 'exec-path-from-shell)
+
+(defcustom exec-path-from-shell-check-startup-files t
+ "If non-nil, warn if variables are being set in the wrong shell startup files.
+Environment variables should be set in .profile or .zshenv rather than
+.bashrc or .zshrc."
+ :type 'boolean
+ :group 'exec-path-from-shell)
+
+(defcustom exec-path-from-shell-shell-name nil
+ "If non-nil, use this shell executable.
+Otherwise, use either `shell-file-name' (if set), or the value of
+the SHELL environment variable."
+ :type '(choice
+ (file :tag "Shell executable")
+ (const :tag "Use `shell-file-name' or $SHELL" nil))
+ :group 'exec-path-from-shell)
+
+(defvar exec-path-from-shell-debug nil
+ "Display debug info when non-nil.")
+
+(defun exec-path-from-shell--double-quote (s)
+ "Double-quote S, escaping any double-quotes already contained in it."
+ (concat "\"" (replace-regexp-in-string "\"" "\\\\\"" s) "\""))
+
+(defun exec-path-from-shell--shell ()
+ "Return the shell to use.
+See documentation for `exec-path-from-shell-shell-name'."
+ (or
+ exec-path-from-shell-shell-name
+ shell-file-name
+ (getenv "SHELL")
+ (error "SHELL environment variable is unset")))
+
+(defcustom exec-path-from-shell-arguments
+ (if (string-match-p "t?csh$" (exec-path-from-shell--shell))
+ (list "-d")
+ (list "-l" "-i"))
+ "Additional arguments to pass to the shell.
+
+The default value denotes an interactive login shell."
+ :type '(repeat (string :tag "Shell argument"))
+ :group 'exec-path-from-shell)
+
+(defun exec-path-from-shell--debug (msg &rest args)
+ "Print MSG and ARGS like `message', but only if debug output is enabled."
+ (when exec-path-from-shell-debug
+ (apply 'message msg args)))
+
+(defun exec-path-from-shell--standard-shell-p (shell)
+ "Return non-nil iff the shell supports the standard ${VAR-default} syntax."
+ (not (string-match "\\(fish\\|t?csh\\)$" shell)))
+
+(defun exec-path-from-shell-printf (str &optional args)
+ "Return the result of printing STR in the user's shell.
+
+Executes the shell as interactive login shell.
+
+STR is inserted literally in a single-quoted argument to printf,
+and may therefore contain backslashed escape sequences understood
+by printf.
+
+ARGS is an optional list of args which will be inserted by printf
+in place of any % placeholders in STR. ARGS are not automatically
+shell-escaped, so they may contain $ etc."
+ (let* ((printf-bin (or (executable-find "printf") "printf"))
+ (printf-command
+ (concat printf-bin
+ " '__RESULT\\000" str "\\000__RESULT' "
+ (mapconcat #'exec-path-from-shell--double-quote args " ")))
+ (shell (exec-path-from-shell--shell))
+ (shell-args (append exec-path-from-shell-arguments
+ (list "-c"
+ (if (exec-path-from-shell--standard-shell-p shell)
+ printf-command
+ (concat "sh -c " (shell-quote-argument printf-command)))))))
+ (with-temp-buffer
+ (exec-path-from-shell--debug "Invoking shell %s with args %S" shell shell-args)
+ (let ((exit-code (apply #'call-process shell nil t nil shell-args)))
+ (exec-path-from-shell--debug "Shell printed: %S" (buffer-string))
+ (unless (zerop exit-code)
+ (error "Non-zero exit code from shell %s invoked with args %S. Output was:\n%S"
+ shell shell-args (buffer-string))))
+ (goto-char (point-min))
+ (if (re-search-forward "__RESULT\0\\(.*\\)\0__RESULT" nil t)
+ (match-string 1)
+ (error "Expected printf output from shell, but got: %S" (buffer-string))))))
+
+(defun exec-path-from-shell-getenvs (names)
+ "Get the environment variables with NAMES from the user's shell.
+
+Execute the shell according to `exec-path-from-shell-arguments'.
+The result is a list of (NAME . VALUE) pairs."
+ (let* ((random-default (md5 (format "%s%s%s" (emacs-pid) (random) (current-time))))
+ (dollar-names (mapcar (lambda (n) (format "${%s-%s}" n random-default)) names))
+ (values (split-string (exec-path-from-shell-printf
+ (mapconcat #'identity (make-list (length names) "%s") "\\000")
+ dollar-names) "\0")))
+ (let (result)
+ (while names
+ (prog1
+ (let ((value (car values)))
+ (push (cons (car names)
+ (unless (string-equal random-default value)
+ value))
+ result))
+ (setq values (cdr values)
+ names (cdr names))))
+ result)))
+
+(defun exec-path-from-shell-getenv (name)
+ "Get the environment variable NAME from the user's shell.
+
+Execute the shell as interactive login shell, have it output the
+variable of NAME and return this output as string."
+ (cdr (assoc name (exec-path-from-shell-getenvs (list name)))))
+
+(defun exec-path-from-shell-setenv (name value)
+ "Set the value of environment var NAME to VALUE.
+Additionally, if NAME is \"PATH\" then also set corresponding
+variables such as `exec-path'."
+ (setenv name value)
+ (when (string-equal "PATH" name)
+ (setq eshell-path-env value
+ exec-path (append (parse-colon-path value) (list exec-directory)))))
+
+;;;###autoload
+(defun exec-path-from-shell-copy-envs (names)
+ "Set the environment variables with NAMES from the user's shell.
+
+As a special case, if the variable is $PATH, then `exec-path' and
+`eshell-path-env' are also set appropriately. The result is an alist,
+as described by `exec-path-from-shell-getenvs'."
+ (let ((pairs (exec-path-from-shell-getenvs names)))
+ (when exec-path-from-shell-check-startup-files
+ (exec-path-from-shell--maybe-warn-about-startup-files pairs))
+ (mapc (lambda (pair)
+ (exec-path-from-shell-setenv (car pair) (cdr pair)))
+ pairs)))
+
+(defun exec-path-from-shell--maybe-warn-about-startup-files (pairs)
+ "Warn the user if the value of PAIRS seems to depend on interactive shell startup files."
+ (let ((without-minus-i (remove "-i" exec-path-from-shell-arguments)))
+ ;; If the user is using "-i", we warn them if it is necessary.
+ (unless (eq exec-path-from-shell-arguments without-minus-i)
+ (let* ((exec-path-from-shell-arguments without-minus-i)
+ (alt-pairs (exec-path-from-shell-getenvs (mapcar 'car pairs)))
+ different)
+ (dolist (pair pairs)
+ (unless (equal pair (assoc (car pair) alt-pairs))
+ (push (car pair) different)))
+ (when different
+ (message "You appear to be setting environment variables %S in your .bashrc or .zshrc: those files are only read by interactive shells, so you should instead set environment variables in startup files like .profile, .bash_profile or .zshenv. Refer to your shell's man page for more info. Customize `exec-path-from-shell-arguments' to remove \"-i\" when done, or disable `exec-path-from-shell-check-startup-files' to disable this message." different))))))
+
+;;;###autoload
+(defun exec-path-from-shell-copy-env (name)
+ "Set the environment variable $NAME from the user's shell.
+
+As a special case, if the variable is $PATH, then `exec-path' and
+`eshell-path-env' are also set appropriately. Return the value
+of the environment variable."
+ (interactive "sCopy value of which environment variable from shell? ")
+ (cdar (exec-path-from-shell-copy-envs (list name))))
+
+;;;###autoload
+(defun exec-path-from-shell-initialize ()
+ "Initialize environment from the user's shell.
+
+The values of all the environment variables named in
+`exec-path-from-shell-variables' are set from the corresponding
+values used in the user's shell."
+ (interactive)
+ (exec-path-from-shell-copy-envs exec-path-from-shell-variables))
+
+
+(provide 'exec-path-from-shell)
+
+;; Local Variables:
+;; coding: utf-8
+;; indent-tabs-mode: nil
+;; mangle-whitespace: t
+;; require-final-newline: t
+;; checkdoc-minor-mode: t
+;; End:
+
+;;; exec-path-from-shell.el ends here
.emacs.d/elpa/exec-path-from-shell-20170508.4/exec-path-from-shell.elc
Binary file
.emacs.d/emacs.org
@@ -134,6 +134,15 @@
(setq load-prefer-newer t)
#+END_SRC
+Let's also use [[https://github.com/myrjola/diminish.el][diminish.el]]. =use-package= provides built-in support
+for diminish. If it's installed, using =:diminish= will remove/hide
+the mode from the modeline.
+
+#+BEGIN_SRC emacs-lisp :tangle init.el
+ (use-package diminish
+ :ensure t)
+#+END_SRC
+
** Setup auto-compile
Automatically compile emacs-lisp libraries. This guarantee that Emacs never loads outdated byte code files.
@@ -203,103 +212,43 @@
(setq echo-keystrokes 0.1)
#+END_SRC
+** Shell environment variables
+
+Let's share most of the shell environment variables with Emacs.
+
+#+BEGIN_SRC emacs-lisp :tangle init.el
+ (use-package exec-path-from-shell
+ :ensure t
+ :config
+ (setq exec-path-from-shell-arguments (list "-l"))
+ (setq exec-path-from-shell-check-startup-files nil)
+ (add-to-list 'exec-path-from-shell-variables "SHELL")
+ (add-to-list 'exec-path-from-shell-variables "GOPATH")
+ (add-to-list 'exec-path-from-shell-variables "ENVIRONMENT_SETUP_DONE")
+ (add-to-list 'exec-path-from-shell-variables "PYTHONPATH")
+ (exec-path-from-shell-initialize))
+#+END_SRC
+
+** Fill Setup
+
+Get rid of nags about requiring setences to end with two spaces.
+
+#+BEGIN_SRC emacs-lisp :tangle init.el9
+ (setq sentence-end-double-space nil)
+#+END_SRC
+
+Set the default fill-column
+
+#+BEGIN_SRC emacs-lisp :tangle init.el
+ (setq-default fill-column 80)
+#+END_SRC
* Load configurations
It is now time to load other configuration.
#+BEGIN_SRC emacs-lisp :tangle init.el
;; (require 'evil-config)
+ (use-package visual-config)
(use-package org-config)
#+END_SRC
-* Visual ๐
-
-Let's customize some graphical element, like dashboard, mode-line, and stuff
-
-** Dashboard
-
-The default Emacs splash-screen is not that useful. A useful
-splash-screen would display some recent files opened, bookmaks,
-projects and org-agenda items. Luckily, there is already a project
-that does that, [[https://github.com/rakanalh/emacs-dashboard][emacs-dashboard]].
-
-#+BEGIN_SRC emacs-lisp :tangle init.el
- (use-package dashboard
- :ensure t
- :diminish dashboard-mode
- :config
- (setq dashboard-banner-logo-title "Welcome to Emacs, Vincent !"
- dashboard-startup-banner (expand-file-name "images/okumura_rin_4_by_naruto_lover16-d4ktg50.png" user-emacs-directory))
- (dashboard-setup-startup-hook))
-#+END_SRC
-
-** Theme
-
-#+BEGIN_SRC emacs-lisp :tangle init.el
- (use-package doom-themes
- :ensure t
- :config
- (setq doom-themes-enable-bolt t)
- (setq doom-themes-enable-italic t)
- (load-theme 'doom-one t))
-#+END_SRC
-
-A good companion to =doom-one= theme is [[https://github.com/hlissner/emacs-solaire-mode][solaire-mode]]. It helps
-visually distinguish file-visiting from other types of windows (like
-popups or sidebars).
-
-#+BEGIN_SRC emacs-lisp :tangle init.el
- (use-package solaire-mode
- :ensure t
- :config
- (setq solaire-mode-remap-modeline nil)
- (add-hook 'after-change-major-mode-hook #'turn-on-solaire-mode)
- (add-hook 'after-revert-hook #'turn-on-solaire-mode)
- (add-hook 'minibuffer-setup-hook #'solaire-mode-in-minibuffer)
- (add-hook 'ediff-prepare-buffer-hook #'solaire-mode)
- (advice-add #'persp-load-state-from-file :after #'solaire-mode-restore-persp-mode-buffers))
-#+END_SRC
-** Lines and columns
-
-We want to see somewhere the column and line number, and also
-highlight the current line to see it easily.
-
-#+BEGIN_SRC emacs-lisp :tangle init.el
- (line-number-mode 1)
- (column-number-mode 1)
- (global-hl-line-mode 1)
-#+END_SRC
-
-** Syntax highlighting
-
-Depending on the files opened and the syntax highlighting enabled,
-~font-lock-mode~ can be slow, we try to limit that, to keep Emacs
-reactive.
-
-#+BEGIN_SRC emacs-lisp :tangle init.el
- (setq font-lock-maximum-decoration 2)
-#+END_SRC
-
-** Fringe decorations
-
-[[http://www.emacswiki.org/emacs/TheFringe][The fringe]] is the vertical region at the right and left of the
-buffer. Emacs lets you customize it of course.
-
-#+BEGIN_SRC emacs-lisp :tangle init.el
- (setq-default indicate-buffer-boundaries 'left)
- (setq-default indicate-empty-lines +1)
-#+END_SRC
-
-** Byte-compiles =.emacs.d= folder
-
-Let's also define a quick function to byte-compile files under
-=.emacs.d= folder to speed things up.
-
-#+BEGIN_SRC emacs-lisp :tangle init.el
- (defun vde/byte-recompile ()
- (interactive)
- (byte-recompile-directory user-emacs-directory 0)
- (byte-recompile-directory (expand-file-name "lisp" user-emacs-directory) 0)
- (byte-recompile-directory (expand-file-name "config" user-emacs-directory) 0)
- (byte-recompile-directory (expand-file-name "lisp/use-package" user-emacs-directory) 0))
-#+END_SRC
.emacs.d/init.el
@@ -43,6 +43,11 @@
(setq load-prefer-newer t)
+(use-package diminish
+ :ensure t)
+(use-package delight
+ :ensure t)
+
(use-package auto-compile
:ensure t
:config
@@ -72,46 +77,33 @@
(setq echo-keystrokes 0.1)
+(use-package exec-path-from-shell
+ :ensure t
+ :config
+ (setq exec-path-from-shell-arguments (list "-l"))
+ (setq exec-path-from-shell-check-startup-files nil)
+ (add-to-list 'exec-path-from-shell-variables "SHELL")
+ (add-to-list 'exec-path-from-shell-variables "GOPATH")
+ (add-to-list 'exec-path-from-shell-variables "ENVIRONMENT_SETUP_DONE")
+ (add-to-list 'exec-path-from-shell-variables "PYTHONPATH")
+ (exec-path-from-shell-initialize))
+
+(setq-default fill-column 80)
+
;; (require 'evil-config)
+(use-package visual-config)
(use-package org-config)
-
-(use-package dashboard
- :ensure t
- :diminish dashboard-mode
- :config
- (setq dashboard-banner-logo-title "Welcome to Emacs, Vincent !"
- dashboard-startup-banner (expand-file-name "images/okumura_rin_4_by_naruto_lover16-d4ktg50.png" user-emacs-directory))
- (dashboard-setup-startup-hook))
-
-(use-package doom-themes
- :ensure t
- :config
- (setq doom-themes-enable-bolt t)
- (setq doom-themes-enable-italic t)
- (load-theme 'doom-one t))
-
-(use-package solaire-mode
- :ensure t
- :config
- (setq solaire-mode-remap-modeline nil)
- (add-hook 'after-change-major-mode-hook #'turn-on-solaire-mode)
- (add-hook 'after-revert-hook #'turn-on-solaire-mode)
- (add-hook 'minibuffer-setup-hook #'solaire-mode-in-minibuffer)
- (add-hook 'ediff-prepare-buffer-hook #'solaire-mode)
- (advice-add #'persp-load-state-from-file :after #'solaire-mode-restore-persp-mode-buffers))
-
-(line-number-mode 1)
-(column-number-mode 1)
-(global-hl-line-mode 1)
-
-(setq font-lock-maximum-decoration 2)
-
-(setq-default indicate-buffer-boundaries 'left)
-(setq-default indicate-empty-lines +1)
-
-(defun vde/byte-recompile ()
- (interactive)
- (byte-recompile-directory user-emacs-directory 0)
- (byte-recompile-directory (expand-file-name "lisp" user-emacs-directory) 0)
- (byte-recompile-directory (expand-file-name "config" user-emacs-directory) 0)
- (byte-recompile-directory (expand-file-name "lisp/use-package" user-emacs-directory) 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.
+ '(package-selected-packages
+ (quote
+ (delight diminish solaire-mode htmlize exec-path-from-shell doom-themes dashboard auto-compile))))
+(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.
+ )
.emacs.d/init.el9
@@ -0,0 +1,2 @@
+
+(setq sentence-end-double-space nil)
.emacs.d/init.elc
Binary file