]> git.eshelyaron.com Git - esy-publish.git/commitdiff
Update some notes
authorEshel Yaron <me@eshelyaron.com>
Sun, 16 Apr 2023 18:34:02 +0000 (21:34 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 16 Apr 2023 18:34:02 +0000 (21:34 +0300)
esy-publish.el
source/notes/emacs.org
source/posts/2023-04-01-take-on-recursion.org
source/posts/2023-04-05-the-self-healing-code-fallacy.org
source/posts/2023-04-08-making-shell-scripts-executable-just-in-time.org
source/posts/2023-04-11-optimizing-project-selection-in-emacs.org

index 8c78904757a3bf0f90e47f9020a331ac3ff25bcd..742f1abfcfff42da34fd8fd5e9a2d001c2487a99 100644 (file)
                                                      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
index 06fe759b6872a1ff8e53cc4997ab33212aa839d5..0f241f3c72a798e710eb84aec9cf39e04e6de26e 100644 (file)
@@ -1,5 +1,5 @@
 #+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
@@ -10,6 +10,9 @@ free/libre text editor".
 
 * 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
index fd6d419d029529e153a561cbaaf4d46f1f9bbce2..b7e14e493c68c9db6c474cead2149b2b8d9dd6bb 100644 (file)
@@ -6,9 +6,9 @@
 
 @@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
index e651d1b9d812a1cf6fb1dac1771a0b85c2d691cc..450b210bf58d26fb0691f55f35926e9146d42c61 100644 (file)
@@ -6,7 +6,7 @@
 
 @@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/.
 
index fa0618d64325891275c885f8b763d61bf7243038..0ff25017648f139915b08b39659ac35505073b3c 100644 (file)
@@ -19,11 +19,11 @@ one-liner and format it nicely, and at some point also test it.  Of
 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
index 71690dd022ee8fc23f38a980afd1e273d46589cb..a3f2d57253fa122fec2360b4a1342d71a6d7d7f4 100644 (file)
@@ -6,7 +6,7 @@
 
 @@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
@@ -16,7 +16,7 @@ behave just right.
 
 * 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