Fixed publishing bug.
This commit is contained in:
parent
2778151656
commit
9a6d555b71
2 changed files with 31 additions and 27 deletions
|
@ -149,8 +149,8 @@ Hopefully, this will tie me over while I transition.
|
||||||
I actually run two instances of Emacs on some systems, where one instance has all my work-related projects, perspectives, and packages installed (like LSP), and my personal instance has other packages running (like IRC and Mail). I need a function that can make that distinction, and based on that, it will set =server-start= appropriately, so that =emacsclient= can call into the correct one.
|
I actually run two instances of Emacs on some systems, where one instance has all my work-related projects, perspectives, and packages installed (like LSP), and my personal instance has other packages running (like IRC and Mail). I need a function that can make that distinction, and based on that, it will set =server-start= appropriately, so that =emacsclient= can call into the correct one.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun ha-emacs-for-work? ()
|
(defun ha-emacs-for-work? ()
|
||||||
"Return non-nil when the Emacs application's location matches as one for work.
|
"Return non-nil when the Emacs instance is for work.
|
||||||
Based on initially running the app with a `FOR_WORK' environment variable."
|
Matches based on a `FOR_WORK' environment variable."
|
||||||
(and (f-dir? "~/work")
|
(and (f-dir? "~/work")
|
||||||
(getenv "FOR_WORK")))
|
(getenv "FOR_WORK")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -222,8 +222,10 @@ The list of /hamacs/ org-formatted files stored in =ha-hamacs-files= is selectiv
|
||||||
With this function, we can test/debug/reload any individual file, via:
|
With this function, we can test/debug/reload any individual file, via:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun ha-hamacs-load (file)
|
(defun ha-hamacs-load (file)
|
||||||
"Load or reload an org-mode FILE containing literate Emacs configuration code."
|
"Load or reload an org-mode FILE containing literate
|
||||||
(interactive (list (completing-read "Org file: " (ha-hamacs-files :all))))
|
Emacs configuration code."
|
||||||
|
(interactive (list (completing-read "Org file: "
|
||||||
|
(ha-hamacs-files :all))))
|
||||||
(let ((full-file (f-join hamacs-source-dir file)))
|
(let ((full-file (f-join hamacs-source-dir file)))
|
||||||
(when (f-exists? full-file)
|
(when (f-exists? full-file)
|
||||||
(ignore-errors
|
(ignore-errors
|
||||||
|
@ -233,8 +235,10 @@ With this function, we can test/debug/reload any individual file, via:
|
||||||
And the ability to edit the file:
|
And the ability to edit the file:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun ha-hamacs-find-file (file)
|
(defun ha-hamacs-find-file (file)
|
||||||
"Call `find-file' on relative org-mode FILE containing literate Emacs configuration code."
|
"Call `find-file' on relative org-mode FILE containing
|
||||||
(interactive (list (completing-read "Org file: " (ha-hamacs-files :all))))
|
literate Emacs configuration code."
|
||||||
|
(interactive (list (completing-read "Org file: "
|
||||||
|
(ha-hamacs-files :all))))
|
||||||
(let ((full-file (f-join hamacs-source-dir file)))
|
(let ((full-file (f-join hamacs-source-dir file)))
|
||||||
(find-file full-file)))
|
(find-file full-file)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -242,12 +246,15 @@ And the ability to edit the file:
|
||||||
And this similar function, will /tangle/ one of my files. Notice that in order to increase the speed of the tangling process (and not wanting to pollute a project perspective), I use a /temporary buffer/ instead of =find-file=.
|
And this similar function, will /tangle/ one of my files. Notice that in order to increase the speed of the tangling process (and not wanting to pollute a project perspective), I use a /temporary buffer/ instead of =find-file=.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun ha-hamacs-tangle (file)
|
(defun ha-hamacs-tangle (file)
|
||||||
"Tangle an org-mode FILE containing literate Emacs configuration code."
|
"Tangle an org-mode FILE containing literate Emacs
|
||||||
(interactive (list (completing-read "Org file: " (ha-hamacs-files :all))))
|
configuration code."
|
||||||
|
(interactive (list (completing-read "Org file: "
|
||||||
|
(ha-hamacs-files :all))))
|
||||||
(let ((full-file (f-join hamacs-source-dir file))
|
(let ((full-file (f-join hamacs-source-dir file))
|
||||||
(target (file-name-concat "~/emacs.d/elisp"
|
(target (file-name-concat "~/emacs.d/elisp"
|
||||||
(concat (file-name-sans-extension file) ".el"))))
|
(concat (file-name-sans-extension file)
|
||||||
|
".el"))))
|
||||||
(when (f-exists? full-file)
|
(when (f-exists? full-file)
|
||||||
(ignore-errors
|
(ignore-errors
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
|
|
|
@ -313,19 +313,15 @@ Using =rsync= to keep published files in sync with my website:
|
||||||
(cdr)))
|
(cdr)))
|
||||||
(parent (plist-get conf :publishing-directory))
|
(parent (plist-get conf :publishing-directory))
|
||||||
(combos (cond
|
(combos (cond
|
||||||
((equal project "blog-content")
|
((s-starts-with? "blog" project)
|
||||||
'("Technical" "howardism"
|
'("Technical" "howardism"
|
||||||
"Personal" "howardism"
|
"Personal" "howardism"
|
||||||
"index.html" "howardism"
|
"index.html" "howardism"
|
||||||
"about-me.html" "howardabrams"))
|
"about-me.html" "howardabrams"))
|
||||||
((equal project "blog-static") "howardism")
|
((s-starts-with? "tech" project)
|
||||||
((equal project "blog-rss") "howardism")
|
'("" "howardabrams"))
|
||||||
((equal project "tech-notes") "howardabrams/technical")
|
((s-starts-with? "hamacs" project) '("" "howardabrams"))
|
||||||
((equal project "tech-notes-static") "howardabrams/technical")
|
((s-starts-with? "airbnb" project) '("" "howardabrams")))))
|
||||||
((equal project "hamacs") "howardabrams/hamacs")
|
|
||||||
((equal project "hamacs-static") "howardabrams/hamacs")
|
|
||||||
((equal project "airbnb") "howardabrams/airbnb")
|
|
||||||
((equal project "airbnb-static") "howardabrams/airbnb"))))
|
|
||||||
;; (dolist (tuple (seq-partition combos 2))
|
;; (dolist (tuple (seq-partition combos 2))
|
||||||
;; (seq-let (src dest) tuple
|
;; (seq-let (src dest) tuple
|
||||||
;; (format "rsync -az %s/%s %s:%s" parent src host dest)))
|
;; (format "rsync -az %s/%s %s:%s" parent src host dest)))
|
||||||
|
@ -333,6 +329,7 @@ Using =rsync= to keep published files in sync with my website:
|
||||||
(seq-map (lambda (tuple) (seq-let (src dest) tuple
|
(seq-map (lambda (tuple) (seq-let (src dest) tuple
|
||||||
(format "rsync -avz %s%s %s:%s" parent src host dest))))
|
(format "rsync -avz %s%s %s:%s" parent src host dest))))
|
||||||
(s-join "; ")
|
(s-join "; ")
|
||||||
|
(message)
|
||||||
(async-shell-command))))
|
(async-shell-command))))
|
||||||
#+end_src
|
#+end_src
|
||||||
* Keybindings
|
* Keybindings
|
||||||
|
|
Loading…
Reference in a new issue