mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-11 03:33:03 +03:00
feat(emacs): yadm + magit
This commit is contained in:
parent
be475e702c
commit
52618736ca
2 changed files with 43 additions and 1 deletions
|
|
@ -1474,6 +1474,21 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
|
||||||
|
|
||||||
(general-define-key "C-c c" 'my/edit-configuration)
|
(general-define-key "C-c c" 'my/edit-configuration)
|
||||||
;; (general-define-key "C-c C" 'my/edit-exwm-configuration)
|
;; (general-define-key "C-c C" 'my/edit-exwm-configuration)
|
||||||
|
(my-leader-def "cc" 'my/edit-configuration)
|
||||||
|
|
||||||
|
(add-to-list 'tramp-methods
|
||||||
|
'("yadm"
|
||||||
|
(tramp-login-program "yadm")
|
||||||
|
(tramp-login-args (("enter")))
|
||||||
|
(tramp-login-env (("SHELL") ("/bin/sh")))
|
||||||
|
(tramp-remote-shell "/bin/sh")
|
||||||
|
(tramp-remote-shell-args ("-c"))))
|
||||||
|
|
||||||
|
(defun my/yadm-magit ()
|
||||||
|
(interactive)
|
||||||
|
(magit-status "/yadm::"))
|
||||||
|
|
||||||
|
(my-leader-def "cm" 'my/yadm-magit)
|
||||||
|
|
||||||
(defun my/open-yadm-file ()
|
(defun my/open-yadm-file ()
|
||||||
"Open a file managed by yadm"
|
"Open a file managed by yadm"
|
||||||
|
|
@ -1487,6 +1502,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
|
||||||
(shell-command-to-string "yadm ls-files $HOME --full-name") "\n")))))
|
(shell-command-to-string "yadm ls-files $HOME --full-name") "\n")))))
|
||||||
|
|
||||||
(general-define-key "C-c f" 'my/open-yadm-file)
|
(general-define-key "C-c f" 'my/open-yadm-file)
|
||||||
|
(my-leader-def "cf" 'my/open-yadm-file)
|
||||||
|
|
||||||
(use-package notmuch
|
(use-package notmuch
|
||||||
:ensure nil
|
:ensure nil
|
||||||
|
|
|
||||||
28
Emacs.org
28
Emacs.org
|
|
@ -143,6 +143,7 @@ As with other files in the repo, parts prefixed with (OFF) are not used but kept
|
||||||
- [[#documents--markup-languages][Documents & markup languages]]
|
- [[#documents--markup-languages][Documents & markup languages]]
|
||||||
- [[#latex][LaTeX]]
|
- [[#latex][LaTeX]]
|
||||||
- [[#auctex][AUCTeX]]
|
- [[#auctex][AUCTeX]]
|
||||||
|
- [[#bibtex][BibTex]]
|
||||||
- [[#import-sty][Import *.sty]]
|
- [[#import-sty][Import *.sty]]
|
||||||
- [[#markdown][Markdown]]
|
- [[#markdown][Markdown]]
|
||||||
- [[#plantuml][PlantUML]]
|
- [[#plantuml][PlantUML]]
|
||||||
|
|
@ -164,6 +165,7 @@ As with other files in the repo, parts prefixed with (OFF) are not used but kept
|
||||||
- [[#apps--misc][Apps & Misc]]
|
- [[#apps--misc][Apps & Misc]]
|
||||||
- [[#managing-dotfiles][Managing dotfiles]]
|
- [[#managing-dotfiles][Managing dotfiles]]
|
||||||
- [[#open-emacs-config][Open Emacs config]]
|
- [[#open-emacs-config][Open Emacs config]]
|
||||||
|
- [[#open-magit-for-yadm][Open Magit for yadm]]
|
||||||
- [[#open-dotfile][Open dotfile]]
|
- [[#open-dotfile][Open dotfile]]
|
||||||
- [[#notmuch][Notmuch]]
|
- [[#notmuch][Notmuch]]
|
||||||
- [[#google-translate][Google Translate]]
|
- [[#google-translate][Google Translate]]
|
||||||
|
|
@ -183,7 +185,7 @@ A small function to print out the loading time and number of GCs during the load
|
||||||
(time-subtract after-init-time before-init-time)))
|
(time-subtract after-init-time before-init-time)))
|
||||||
gcs-done)))
|
gcs-done)))
|
||||||
|
|
||||||
(setq use-package-verbose t)
|
;; (setq use-package-verbose t)
|
||||||
#+end_src
|
#+end_src
|
||||||
** straight.el
|
** straight.el
|
||||||
Straight.el is my Emacs package manager of choice. Its advantages & disadvantages over other options are listed pretty thoroughly in the README file in the repo.
|
Straight.el is my Emacs package manager of choice. Its advantages & disadvantages over other options are listed pretty thoroughly in the README file in the repo.
|
||||||
|
|
@ -2441,6 +2443,8 @@ Use [[https://github.com/Microsoft/python-language-server][Microsoft Language Se
|
||||||
#+end_src
|
#+end_src
|
||||||
* Apps & Misc
|
* Apps & Misc
|
||||||
** Managing dotfiles
|
** Managing dotfiles
|
||||||
|
A bunch of functions for managing dotfiles with yadm.
|
||||||
|
|
||||||
*** Open Emacs config
|
*** Open Emacs config
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun my/edit-configuration ()
|
(defun my/edit-configuration ()
|
||||||
|
|
@ -2455,6 +2459,27 @@ Use [[https://github.com/Microsoft/python-language-server][Microsoft Language Se
|
||||||
|
|
||||||
(general-define-key "C-c c" 'my/edit-configuration)
|
(general-define-key "C-c c" 'my/edit-configuration)
|
||||||
;; (general-define-key "C-c C" 'my/edit-exwm-configuration)
|
;; (general-define-key "C-c C" 'my/edit-exwm-configuration)
|
||||||
|
(my-leader-def "cc" 'my/edit-configuration)
|
||||||
|
#+end_src
|
||||||
|
*** Open Magit for yadm
|
||||||
|
Idea:
|
||||||
|
|
||||||
|
- [[https://www.reddit.com/r/emacs/comments/gjukb3/yadm_magit/]]
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(add-to-list 'tramp-methods
|
||||||
|
'("yadm"
|
||||||
|
(tramp-login-program "yadm")
|
||||||
|
(tramp-login-args (("enter")))
|
||||||
|
(tramp-login-env (("SHELL") ("/bin/sh")))
|
||||||
|
(tramp-remote-shell "/bin/sh")
|
||||||
|
(tramp-remote-shell-args ("-c"))))
|
||||||
|
|
||||||
|
(defun my/yadm-magit ()
|
||||||
|
(interactive)
|
||||||
|
(magit-status "/yadm::"))
|
||||||
|
|
||||||
|
(my-leader-def "cm" 'my/yadm-magit)
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Open dotfile
|
*** Open dotfile
|
||||||
Open a file managed by yadm.
|
Open a file managed by yadm.
|
||||||
|
|
@ -2472,6 +2497,7 @@ Open a file managed by yadm.
|
||||||
(shell-command-to-string "yadm ls-files $HOME --full-name") "\n")))))
|
(shell-command-to-string "yadm ls-files $HOME --full-name") "\n")))))
|
||||||
|
|
||||||
(general-define-key "C-c f" 'my/open-yadm-file)
|
(general-define-key "C-c f" 'my/open-yadm-file)
|
||||||
|
(my-leader-def "cf" 'my/open-yadm-file)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Notmuch
|
** Notmuch
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue