X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=emacs.d%2Fconfig.org;h=1ff1bf7246cc9f4ffc8b629e0b50b84aea8b5d8c;hb=5d27ce5c2ec48fd0dc0d1da0375868773df44f6e;hp=b89ed58b826e3ddf19c7ca721c94ac264d00802f;hpb=8447f349d1e8e6b9608051ba3a7bd2038e438d40;p=dotfiles.git diff --git a/emacs.d/config.org b/emacs.d/config.org index b89ed58..1ff1bf7 100644 --- a/emacs.d/config.org +++ b/emacs.d/config.org @@ -1141,6 +1141,14 @@ extend org-mode's easy templates, refer to [[http://coldnew.github.io/coldnew-em *** variable-pitch-mode and fixed-pitch-mode [[https://yoo2080.wordpress.com/2013/05/30/monospace-font-in-tables-and-source-code-blocks-in-org-mode-proportional-font-in-other-parts/][monospace font in tables and source code blocks in org-mode, proportional font in other parts]] #+BEGIN_SRC emacs-lisp :tangle yes :results silent + ;; check if the fonts are available + (unless (find-font (font-spec :name "Ubuntu Mono")) + (warn "Font not found Ubuntu Mono")) + (unless (find-font (font-spec :name "Source Code Pro")) + (warn "Font not found Source Code Pro")) + (unless (find-font (font-spec :name "Source Sans Pro")) + (warn "Font not found Source Sans Pro")) + (set-face-attribute 'variable-pitch nil :font "Source Sans Pro" :height 160) (set-face-attribute 'fixed-pitch nil :font "Source Code Pro" :height (face-attribute 'default :height)) @@ -1250,9 +1258,14 @@ set default eshell history folder (defun sd/eshell-clear-buffer () "Clear eshell buffer" (interactive) - (let ((inhibit-read-only t)) - (erase-buffer) - (eshell-send-input))) + (let ((inhibit-read-only t) + (current-point (- (point-max) (point)))) + (beginning-of-line) + (delete-region (point-min) (point)) + (goto-char (- (point-max) current-point)) + ;; (eshell-send-input) + )) + (add-hook 'eshell-mode-hook (lambda () (local-set-key (kbd "C-l") 'sd/eshell-clear-buffer)))