Browse Source

Deal gracefully with no connection in emacs

- set timeout to 5 secs
- do not load remote agenda files when no connection available
master
Maxime Wack 1 year ago
parent
commit
f57162402a
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      .config/emacs/init.el

+ 5
- 2
.config/emacs/init.el View File

@@ -978,7 +978,8 @@ So we need to define bindings in a hook."
(setq tramp-terminal-type "tramp"
tramp-default-method "ssh"
tramp-encoding-shell "/bin/bash"
tramp-default-remote-shell "/bin/bash"))
tramp-default-remote-shell "/bin/bash"
tramp-connection-timeout 5))

;;;;;; Subword

@@ -1446,7 +1447,9 @@ So we need to define bindings in a hook."
"\.org$"
nil
(lambda (filename) (not (s-contains-p "archive" filename)))))
org-agenda-files (cons "/ssh:android@home:Org/anniv.org" (cons "/ssh:android@home:Org/calendar.org" org-local-agenda-files))
org-agenda-files (if (ignore-errors (file-exists-p "/ssh:android@home:Org/anniv.org"))
(cons "/ssh:android@home:Org/anniv.org" (cons "/ssh:android@home:Org/calendar.org" org-local-agenda-files))
org-local-agenda-files)
org-default-notes-file "~/Projects/org/notes.org"
org-archive-location "::* Archived"
org-attach-method 'mv ; Move Attachments


Loading…
Cancel
Save