diff --git a/hosts/pinwheel/modules/emacs/config.org b/hosts/pinwheel/modules/emacs/config.org index a0a739c..c95f8cb 100644 --- a/hosts/pinwheel/modules/emacs/config.org +++ b/hosts/pinwheel/modules/emacs/config.org @@ -63,8 +63,14 @@ *** Disable startup messages #+BEGIN_SRC emacs-lisp (setq inhibit-startup-message t) - (setq initial-buffer-choice t) (setq initial-scratch-message nil) + + (setq initial-buffer-choice + (lambda () + (if (buffer-file-name) + (current-buffer) + (scratch-buffer) + ))) #+END_SRC *** Don't resize gui when setting new font ... it affecs startup time diff --git a/hosts/pinwheel/modules/emacs/default.nix b/hosts/pinwheel/modules/emacs/default.nix index 48a004d..e0263c3 100644 --- a/hosts/pinwheel/modules/emacs/default.nix +++ b/hosts/pinwheel/modules/emacs/default.nix @@ -11,11 +11,11 @@ let }; e = pkgs.writeShellScriptBin "e" '' - ${emacs}/bin/emacs -nw + ${emacs}/bin/emacs -nw $@ ''; ec = pkgs.writeShellScriptBin "ec" '' - ${emacs}/bin/emacsclient -t -c -a= + ${emacs}/bin/emacsclient -t -c -a= $@ ''; in { @@ -23,8 +23,8 @@ in home-manager.users.alex = { home.sessionVariables = { - EDITOR = "${e}/bin/e"; - VISUAL = "${e}/bin/e"; + EDITOR = "${e}/bin/e $@"; + VISUAL = "${e}/bin/e $@"; }; home.packages = [