esy-publish-notes-source-directory))
(buffer (find-file-noselect file))
(titles (with-current-buffer buffer
- (org-collect-keywords '("TITLE"))))
- (title (car (alist-get "TITLE" titles nil nil #'string=))))
- (concat "Notes about " title))))
+ (org-collect-keywords '("TITLE" "SUBTITLE"))))
+ (title (car (alist-get "TITLE" titles nil nil #'string=)))
+ (subtitle (car (alist-get "SUBTITLE" titles nil nil #'string=))))
+ (concat "Notes about " title " (" subtitle ")"))))
,description))))
(defun esy-publish--note-titles ()
subtitle)))))
(title (completing-read "Note: "
title-name-alist
- nil 'confirm nil
+ nil 'confirm (when (use-region-p)
+ (buffer-substring-no-properties
+ (use-region-beginning)
+ (use-region-end)))
'esy-publish-notes-completion-history))
(name (or (alist-get title
title-name-alist
#+TITLE: Emacs
-#+SUBTITLE: The advanced, extensible, customizable, self-documenting editor
+#+SUBTITLE: this free software text OS thingy here
#+DESCRIPTION: Eshel Yaron's notes about Emacs
#+KEYWORDS: notes, emacs
#+DATE: 2023-04-12
* References in published posts
#+BEGIN: links-to-note :dir "/Users/eshelyaron/checkouts/esy-publish/source/posts"
+- [[file:../posts/2023-04-01-take-on-recursion.org][Take on Recursion]] :: My take on a recursive Elisp function for accumulating a list while walking up an AST
+- [[file:../posts/2023-04-08-making-shell-scripts-executable-just-in-time.org][Making Shell Scripts Executable Just-in-Time]] :: A different take on adding exec permissions to shell script in Emacs
+- [[file:../posts/2023-04-11-optimizing-project-selection-in-emacs.org][Optimizing Project Selection in Emacs]] :: Leveraging a new Emacs customization option to streamline project selection
#+END:
* References in other notes
@@html:<div class="metadata">@@Created on [{{{date}}}], last updated [{{{modification-time(%Y-%m-%d, t)}}}]@@html:</div>@@
-Over at [[https://takeonrules.com]], Jeremy Friesen has [[https://takeonrules.com/2023/03/25/using-built-in-emacs-29-tree-sitter-package-to-get-qualified-ruby-function-name/][a couple of]] [[https://takeonrules.com/2023/03/25/using-built-in-emacs-29-tree-sitter-package-to-get-qualified-ruby-function-name/][recent posts]]
-about an Emacs command he wrote for grabbing the qualified name of the function
-at point in Ruby files.
+Over at [[https://takeonrules.com][Take on Rules]], [[note:jeremy-friesen][Jeremy Friesen]] has [[https://takeonrules.com/2023/03/25/using-built-in-emacs-29-tree-sitter-package-to-get-qualified-ruby-function-name/][a couple of]] [[https://takeonrules.com/2023/03/25/using-built-in-emacs-29-tree-sitter-package-to-get-qualified-ruby-function-name/][recent posts]]
+about an [[note:emacs][Emacs]] command he wrote for grabbing the qualified name of the
+function at point in Ruby files.
I don't know much about Ruby, but the way he implemented this command caught my
attention because he's relying on the new =treesit= package from Emacs 29 to
@@html:<div class="metadata">@@Created on [{{{date}}}], last updated [{{{modification-time(%Y-%m-%d, t)}}}]@@html:</div>@@
-Yesterday, a colleague of mine shared [[https://twitter.com/minchoi/status/1643215812298260480][a tweet]] in our =#random= Slack
+Yesterday, a colleague of mine shared [[https://twitter.com/minchoi/status/1643215812298260480][a tweet]] in our =#random= [[note:slack][Slack]]
channel about [[https://gitlab.com/min.choi/selfhealing-gitlab-ci/][a new AI-powered plugin for GitLab CI]] that supposedly
makes your code /self-healing/.
course, to test it I need to run it, and that requires giving the
newly created shell script /executable permissions/.
-In Emacs, there are quite a few ways one can go about making their
+In [[note:emacs][Emacs]], there are quite a few ways one can go about making their
script executable. You can, for instance, do ~M-! M-n chmod +x RET~,
but if you ask me that's too much typing for such a common task!
Worse, it's not very /Emacsy/ either. Instead, the way I've been
-doing this for a long time was jumping to Dired with ~C-x C-j~, and
+doing this for a long time was jumping to [[note:dired][Dired]] with ~C-x C-j~, and
immediately typing ~M +x RET~ to make the file executable. That works
well and doesn't require me to type ~chmod~, but it still takes some
typing and--crucially--it forces me to switch to Dired, when I really
@@html:<div class="metadata">@@Created on [{{{date}}}], last updated [{{{modification-time(%Y-%m-%d, t)}}}]@@html:</div>@@
-Emacs has a brand new user option for customizing the interface used
+[[note:emacs][Emacs]] has a brand new user option for customizing the interface used
for project selection, e.g. when switching from one project to
another. I always considered the way Emacs handles project selection
a bit awkward, so I was glad to see this addition. The new
* Project Prompting
-Yesterday [2023-04-10], Spencer Baugh [[https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62759][submitted an Emacs patch]] adding a new user
+Yesterday [2023-04-10], [[note:spencer-baugh][Spencer Baugh]] [[https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62759][submitted an Emacs patch]] adding a new user
option to =project.el=, [[info:emacs#Projects][Emacs's bulit-in project isolation package]].
The new user option, ~project-prompter~, determines how Emacs prompts for