Move sudo to myrmi/sudo-current-buffer

It's a new function, use the custom prefix to make that clear.
This commit is contained in:
Laurens Miers 2024-09-24 21:00:23 +02:00
parent 29f8a2b08b
commit 7c39432564

View file

@ -161,21 +161,6 @@ Display number of matches:
Reference that might be interesting for later:
https://endlessparentheses.com/leave-the-cursor-at-start-of-match-after-isearch.html
** Sudo file
#+begin_src emacs-lisp
(defun sudo ()
"Use TRAMP to `sudo' the current buffer."
(interactive)
(when buffer-file-name
(find-alternate-file
(concat "/sudo:root@localhost:"
buffer-file-name)
)
)
)
#+end_src
** Abbrev
#+begin_src emacs-lisp
@ -866,6 +851,22 @@ Preserve indentation in SRC blocks
* Custom
** Sudo current buffer
#+BEGIN_SRC emacs-lisp
(defun myrmi/sudo-current-buffer ()
"Use TRAMP to `sudo' the current buffer."
(interactive)
(when buffer-file-name
(find-alternate-file
(concat "/sudo:root@localhost:"
buffer-file-name)
)
)
)
#+END_SRC
** Save symbol at point
#+BEGIN_SRC emacs-lisp