Skip to content

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Bin committed Dec 24, 2023
1 parent fbc3772 commit 0aba69c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
11 changes: 8 additions & 3 deletions lisp/init-essential.el
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,18 @@ If OTHER-SOURCE is 2, get keyword from `kill-ring'."
;; better performance
(setq show-paren-delay 0.5))

;; Make emacs know ssh-agent
;; @see https://emacs.stackexchange.com/questions/17866/magit-how-to-use-systems-ssh-agent-and-dont-ask-for-password
;; {{ Make emacs know ssh-agent
(my-run-with-idle-timer 2
(lambda ()
(setq exec-path-from-shell-check-startup-files nil)
;; @see https://github.com/purcell/exec-path-from-shell/issues/75
(exec-path-from-shell-initialize)
;; @see https://emacs.stackexchange.com/questions/17866/magit-how-to-use-systems-ssh-agent-and-dont-ask-for-password
(exec-path-from-shell-copy-env "SSH_AGENT_PID")
(exec-path-from-shell-copy-env "SSH_AUTH_SOCK")))
(exec-path-from-shell-copy-env "SSH_AUTH_SOCK")
(exec-path-from-shell-copy-env "GPG_AGENT_INFO")))

;; }}

(provide 'init-essential)
;;; init-essential.el ends here
10 changes: 0 additions & 10 deletions lisp/init-misc.el
Original file line number Diff line number Diff line change
Expand Up @@ -1023,16 +1023,6 @@ might be bad."
;; (pdf-loader-install))
;; ;; }}

;; {{ exe path
(with-eval-after-load 'exec-path-from-shell
(dolist (var '("SSH_AUTH_SOCK" "SSH_AGENT_PID" "GPG_AGENT_INFO"))
(push var exec-path-from-shell-variables)))

(when (and window-system (memq window-system '(mac ns)))
;; @see https://github.com/purcell/exec-path-from-shell/issues/75
;; I don't use those exec path anyway.
(my-run-with-idle-timer 4 #'exec-path-from-shell-initialize))
;; }}

;; {{ markdown
(defun markdown-mode-hook-setup ()
Expand Down

0 comments on commit 0aba69c

Please sign in to comment.