pinwheel: Make sure e can open files when started

This commit is contained in:
Alexander Heldt
2023-11-12 14:26:53 +01:00
parent ea4c10c703
commit c623fe2c09
2 changed files with 11 additions and 5 deletions

View File

@@ -63,8 +63,14 @@
*** Disable startup messages *** Disable startup messages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq inhibit-startup-message t) (setq inhibit-startup-message t)
(setq initial-buffer-choice t)
(setq initial-scratch-message nil) (setq initial-scratch-message nil)
(setq initial-buffer-choice
(lambda ()
(if (buffer-file-name)
(current-buffer)
(scratch-buffer)
)))
#+END_SRC #+END_SRC
*** Don't resize gui when setting new font *** Don't resize gui when setting new font
... it affecs startup time ... it affecs startup time

View File

@@ -11,11 +11,11 @@ let
}; };
e = pkgs.writeShellScriptBin "e" '' e = pkgs.writeShellScriptBin "e" ''
${emacs}/bin/emacs -nw ${emacs}/bin/emacs -nw $@
''; '';
ec = pkgs.writeShellScriptBin "ec" '' ec = pkgs.writeShellScriptBin "ec" ''
${emacs}/bin/emacsclient -t -c -a= ${emacs}/bin/emacsclient -t -c -a= $@
''; '';
in in
{ {
@@ -23,8 +23,8 @@ in
home-manager.users.alex = { home-manager.users.alex = {
home.sessionVariables = { home.sessionVariables = {
EDITOR = "${e}/bin/e"; EDITOR = "${e}/bin/e $@";
VISUAL = "${e}/bin/e"; VISUAL = "${e}/bin/e $@";
}; };
home.packages = [ home.packages = [