Fix dashboard display

This commit is contained in:
Howard Abrams 2022-11-24 23:16:34 -08:00
parent 023b8d3063
commit 9d43b58efa
2 changed files with 11 additions and 1 deletions

View file

@ -211,7 +211,6 @@ The =dashboard= project hooks to [[help:emacs-startup-hook][emacs-startup-hook]]
(/ 3)
(* 2))))
(split-window-right width)
(other-window 1)
(cheatsheet-show)
(ha-show-learn-this)))
#+end_src

View file

@ -336,6 +336,16 @@ Lets make some test examples:
(should (stringp (first parms)))
(should (bufferp (second parms))))))
#+end_src
** Setting Variables
To set a variable in Eshell, you use good ol =setq=, but that would create global variables. We can make a version for Eshell, that makes buffer-local variables.
#+begin_src emacs-lisp
(defun eshell/set (&rest args)
"Creates a buffer local variables."
(dolist (arg-pair (seq-partition args 2))
(seq-let (var val) arg-pair
(let ((var-sym (make-symbol var)))
(set (make-local-variable var-sym) val)))))
#+end_src
** Less and More
While I can type =find-file=, I often use =e= as an alias for =emacsclient= in Terminals, so lets do something similar for =eshell=:
Also note that we can take advantage of the =eshell-fn-on-files= function to expand the [[help:find-file][find-file]] (which takes one argument), to open more than one file at one time.
@ -1261,6 +1271,7 @@ The basis for distinguishing a shell is its /parent location/. Before starting =
(height (/ (window-total-height) 3))
(default-directory parent))
(split-window-vertically (- height))
(other-window 1)
(setq eshell-buffer-name (format "*eshell: %s*" name))
(eshell)))
#+end_src