Updated my personal/work division

Odd, I know, but I run two instances of Emacs ... one for Work and one
for non-Work, and I make the distinction based on the executable ...
Currently emacs-plus@28 is for work, and emacs-plus@29 is for personal work.
This commit is contained in:
Howard Abrams 2022-04-01 11:33:24 -07:00
parent cf7b81c576
commit cc2fb9b988
3 changed files with 4 additions and 30 deletions

View file

@ -22,7 +22,7 @@ This creates [[file:~/.emacs.d/init.el][~/.emacs.d/init.el]] that starts the pro
- [[file:ha-org-clipboard.org][org-clipboard]] :: automatically converting HTML from a clipboard into Org-formatted content.
- [[file:ha-org-journaling.org][org-journaling]] :: for writing journal entries and tasks.
- [[file:ha-org-publishing.org][org-publishing]] :: code for publishing my website, [[http://howardism.org][www.howardism.org]].
- [[file:ha-org-sprint.org][org-sprint]] :: functions for working with the my Org-focused sprint files.
- [[file:ha-org-sprint.org][org-sprint]] :: functions for working with the my Org-focused sprint file
- [[file:ha-remoting.org][remoting]] :: my interface to systems using SSH and Vterm.
- [[file:ha-email.org][email]] :: reading email using =notmuch= in a *Hey* fashion.
- [[file:ha-feed-reader.org][feed-reader]] :: configuration of elfeed as well as my RSS feeds.

View file

@ -167,16 +167,13 @@ Sure the Emacs application will almost always have the =server-start= going, how
#+BEGIN_SRC emacs-lisp
(defun ha-emacs-for-work? ()
"Return non-nil when the Emacs application's location matches as one for work.
Currently, this is the `emacs-plus' app that I have built with
Currently, this is the `emacs-plus@28' app that I have built with
the native-comp model, but I reserve the right to change this."
(and (f-dir? "~/work")
(->> Info-default-directory-list
(first)
(s-split "/")
(--filter (s-starts-with? "emacs-plus" it))
(first))))
(string-match "emacs-plus@28" exec-directory)))
#+END_SRC
And now start the server with an appropriate tag name:
#+BEGIN_SRC emacs-lisp
(if (not (ha-emacs-for-work?))
(setq server-name "personal")

View file

@ -189,29 +189,6 @@ currently clocked-in org-mode task."
(org-capture nil "f"))
#+END_SRC
* External Interface
** Emacs Server Control
Sure the Emacs application will almost always have the =server-start= going, however, I need to control it just a bit (because I often have two instances running on some of my machines). What /defines/ the Emacs instance for work changes ... often:
#+BEGIN_SRC emacs-lisp
(defun ha-emacs-for-work? ()
"Return non-nil when the Emacs application's location matches as one for work.
Currently, this is the `emacs-plus' app that I have built with
the native-comp model, but I reserve the right to change this."
(->> Info-default-directory-list
(first)
(s-split "/")
(--filter (s-starts-with? "emacs-plus" it))
(first)))
#+END_SRC
#+BEGIN_SRC emacs-lisp
(if (ha-emacs-for-work?)
(setq server-name "work")
(setq server-name "personal"))
(server-start)
#+END_SRC
* External Capturing
If we put something on the clipboard using =xclip= or something, and then
perhaps =emacsclient= could call this function to put those contents into clocked in task.