# HG changeset patch # User Richard Westhaver # Date 1723501955 14400 # Node ID 0552341ac1961b576be246b89333328ecbf4687d # Parent 7efdeaebaf22cb098628a1d4255023776330d1ab refactor org-id stuff to ulang, pkgbuild notes diff -r 7efdeaebaf22 -r 0552341ac196 emacs/default.el --- a/emacs/default.el Mon Aug 12 16:18:47 2024 -0400 +++ b/emacs/default.el Mon Aug 12 18:32:35 2024 -0400 @@ -1084,8 +1084,8 @@ (setq switch-to-buffer-obey-display-actions t) (add-to-list 'display-buffer-alist '("^\\*Dictionary\\*" display-buffer-in-side-window - (side . left) - (window-width . 50))) + (side . right))) + ;;; Skel (add-to-load-path user-emacs-lib-directory) diff -r 7efdeaebaf22 -r 0552341ac196 emacs/lib/publish.el --- a/emacs/lib/publish.el Mon Aug 12 16:18:47 2024 -0400 +++ b/emacs/lib/publish.el Mon Aug 12 18:32:35 2024 -0400 @@ -107,40 +107,6 @@ :html-preamble ,html-nav :html-postamble ,html-foot))) -(defun org-custom-id-get (&optional pom create prefix) - "Get the CUSTOM_ID property of the entry at point-or-marker POM. - If POM is nil, refer to the entry at point. If the entry does - not have an CUSTOM_ID, the function returns nil. However, when - CREATE is non nil, create a CUSTOM_ID if none is present - already. PREFIX will be passed through to `org-id-new'. In any - case, the CUSTOM_ID of the entry is returned." - (interactive) -(org-with-point-at pom - (let ((id (org-entry-get nil "CUSTOM_ID")) - ;; use CUSTOM_ID for links - (org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)) - (cond - ((and id (stringp id) (string-match "\\S-" id)) - id) - (create - (setq id (org-id-new prefix)) - (org-entry-put pom "CUSTOM_ID" id) - (org-id-add-location id (buffer-file-name (buffer-base-buffer))) - id))))) - -;;;###autoload -(defun org-id-add-to-headlines-in-file () - "Add ID properties to all headlines in the - current file which do not already have one." - (interactive) - (org-map-entries (lambda () (org-id-get (point) 'create)))) - -(defun org-custom-id-add-to-headlines-in-file () - "Add CUSTOM_ID properties to all headlines in the - current file which do not already have one." - (interactive) - (org-map-entries (lambda () (org-custom-id-get (point) 'create)))) - ;;;###autoload (defun publish (&optional sitemap static force async) "publish `rwest-io' content. diff -r 7efdeaebaf22 -r 0552341ac196 emacs/lib/ulang.el --- a/emacs/lib/ulang.el Mon Aug 12 16:18:47 2024 -0400 +++ b/emacs/lib/ulang.el Mon Aug 12 18:32:35 2024 -0400 @@ -67,6 +67,49 @@ ("packy" . "https://packy.compiler.company/%s") ("yt" . "https://youtube.com/watch?v=%s"))) +;;; IDs +(defun org-custom-id-get (&optional pom create prefix) + "Get the CUSTOM_ID property of the entry at point-or-marker POM. + If POM is nil, refer to the entry at point. If the entry does + not have an CUSTOM_ID, the function returns nil. However, when + CREATE is non nil, create a CUSTOM_ID if none is present + already. PREFIX will be passed through to `org-id-new'. In any + case, the CUSTOM_ID of the entry is returned." + (interactive) +(org-with-point-at pom + (let ((id (org-entry-get nil "CUSTOM_ID")) + ;; use CUSTOM_ID for links + (org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)) + (cond + ((and id (stringp id) (string-match "\\S-" id)) + id) + (create + (setq id (org-id-new prefix)) + (org-entry-put pom "CUSTOM_ID" id) + (org-id-add-location id (buffer-file-name (buffer-base-buffer))) + id))))) + +;;;###autoload +(defun org-id-add-to-headlines-in-file () + "Add ID properties to all headlines in the + current file which do not already have one." + (interactive) + (org-map-entries (lambda () (org-id-get (point) 'create)))) + +(defun org-custom-id-add-to-headlines-in-file () + "Add CUSTOM_ID properties to all headlines in the + current file which do not already have one." + (interactive) + (org-map-entries (lambda () (org-custom-id-get (point) 'create)))) + +(defun org-id-add-to-headlines-in-agenda-files () + (interactive) + (with-temp-buffer + (dolist (f org-agenda-files) + (find-file f) + (org-id-add-to-headlines-in-file) + (save-buffer)))) + (message "Initialized ULANG.") (provide 'ulang) diff -r 7efdeaebaf22 -r 0552341ac196 lisp/lib/packy/pkgbuild.lisp --- a/lisp/lib/packy/pkgbuild.lisp Mon Aug 12 16:18:47 2024 -0400 +++ b/lisp/lib/packy/pkgbuild.lisp Mon Aug 12 18:32:35 2024 -0400 @@ -22,3 +22,13 @@ (defmethod check-package ((self pkgbuild))) (defmethod package-version ((self pkgbuild))) (defmethod pack ((self pkgbuild))) + +;;; Hooks + +;; pre_install, post_install + +;; pre_upgrade, post_upgrade + +;; pre_remove, post_remove + +;;; Meta-packages