summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
Diffstat (limited to 'tag-emacs')
-rw-r--r--tag-emacs/emacs.d/init.org33
1 files changed, 24 insertions, 9 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index c65d5eb..2c86143 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -681,7 +681,7 @@ that I can sudo on remote machines
                                                    (not (let ((method (file-remote-p name 'method)))
                                                           (when (stringp method)
                                                             (member method '("su" "sudo")))))))
-                    tramp-shell-prompt-pattern "\\(?:^\\|
\\)[^#$%>\n]*#?[#$%>›] *\\(\\[[0-9;]*[a-zA-Z] *\\)*")
+                    tramp-shell-prompt-pattern "\\(?:^\\|
\\)[^]#$%>\n]*#?[]#$%>❯›] *\\(\\[[0-9;]*[a-zA-Z] *\\)*")
               (add-to-list 'tramp-default-proxies-alist '(nil "\\`root\\'" (concat "/" tramp-default-method ":%h:")))
               (add-to-list 'tramp-default-proxies-alist `(,(regexp-quote (system-name)) nil nil))
               (add-to-list 'tramp-default-proxies-alist '("localhost" nil nil))
@@ -2306,14 +2306,15 @@ Avy is a really nice way to move around files, like ace-jump-mode, but
 somehow I prefer it.
 
 #+BEGIN_SRC emacs-lisp
-(use-package avy
-  :bind* (("M-g g" . avy-goto-line)
-          ("M-g M-g" . avy-goto-line)
-          ("C-|" . avy-goto-line)
-          ("C-c SPC" . avy-goto-char-timer))
-  :config (progn
-            (avy-setup-default)
-            (setq avy-all-windows nil)))
+  (use-package avy
+    :bind* (("M-g g" . avy-goto-line)
+            ("M-g M-g" . avy-goto-line)
+            ("C-|" . avy-goto-line)
+            ("C-c SPC" . avy-goto-char-timer))
+    :config (progn
+              (avy-setup-default)
+              (setq avy-all-windows nil
+                    avy-keys '(?a ?r ?s ?t ?d ?h ?n ?e ?i ?\;))))
 #+END_SRC
 
 ** goto-chg
@@ -2461,6 +2462,20 @@ the =org=-document after changes.
     :commands (async-start)
     :defer 2)
 
+  (defun tangle-init-sync ()
+    (interactive)
+    (when (string-suffix-p "init.org" (buffer-file-name))
+      (message "Tangling init")
+      ;; Avoid running hooks when tangling.
+      (let ((prog-mode-hook nil)
+            (dest (concat user-emacs-directory "init.el")))
+        (require 'ob-tangle)
+        (org-babel-tangle-file (buffer-file-name) dest)
+        (if (byte-compile-file dest)
+            dest
+          (with-current-buffer byte-compile-log-buffer
+            (buffer-string))))))
+
   (defun tangle-init ()
     "If the current buffer is 'init.org' the code-blocks are
       tangled, and the tangled file is compiled."