From c9e5cf57604f61168933b16b2817458314783438 Mon Sep 17 00:00:00 2001 From: j4nk Date: Sat, 30 Mar 2024 21:59:25 -0400 Subject: [PATCH] Fixed having to manually enter in the dash lib load path --- blog/feed.xml | 2 +- md4tj.el | 9 +++++---- test_file.html | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/blog/feed.xml b/blog/feed.xml index 701e152..a8feadd 100644 --- a/blog/feed.xml +++ b/blog/feed.xml @@ -1,4 +1,4 @@ -RSS Testhttp://example.comAn example blog for testing RSS capability of md4tj.en-USTue, 10 Jun 2003 04:00:00 GMTeditor@example.comwebmaster@example.comhttps://www.rssboard.org/rss-specificationmd4tj-rss.elSat, 30 Mar 2024 21:40:13 GMTBlog Post 2https://example.com/blog/blogpost2.htmlhttps://example.com/blog/blogpost2.html +RSS Testhttp://example.comAn example blog for testing RSS capability of md4tj.en-USTue, 10 Jun 2003 04:00:00 GMTeditor@example.comwebmaster@example.comhttps://www.rssboard.org/rss-specificationmd4tj-rss.elSat, 30 Mar 2024 21:59:21 GMTBlog Post 2https://example.com/blog/blogpost2.htmlhttps://example.com/blog/blogpost2.html <br> diff --git a/md4tj.el b/md4tj.el index 3b0764b..0ebcb92 100644 --- a/md4tj.el +++ b/md4tj.el @@ -6,10 +6,11 @@ (require 'cl-lib) (require 'subr-x) -;; Change this line to wherever dash.el is on the building system -;; Can't use (require) because load-path is set in .emacs -;;(load-file "~/.emacs.d/elpa/dash-20230415.2324/dash.el") -(load-file "~/.emacs.d/elpa/dash-20240103.1301/dash.el") + +;; Add the dash directory to the load-path, since running emacs in batch mode does not define the +;; load-path +(add-to-list 'load-path (concat "~/.emacs.d/elpa/" (nth 0 (cl-remove-if-not (lambda (x) (string-match "dash-.*" x)) (directory-files "~/.emacs.d/elpa"))))) +(require 'dash) ;; and then require it ;; Basic utilities for subsequent stuff (defun md4tj-util-getline () diff --git a/test_file.html b/test_file.html index e5d8766..3032f70 100644 --- a/test_file.html +++ b/test_file.html @@ -77,7 +77,7 @@ int main() {

This is a div that has monospace text.

-

Last updated: Sun 31 Mar 2024 01:40 UTC

+

Last updated: Sun 31 Mar 2024 01:59 UTC