emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/lentic e182a87d69 315/333: Fix broken creation of direc


From: ELPA Syncer
Subject: [elpa] externals/lentic e182a87d69 315/333: Fix broken creation of directory
Date: Tue, 27 Feb 2024 13:00:49 -0500 (EST)

branch: externals/lentic
commit e182a87d6966532a19d5b1e3643e4bbaf3db4f39
Author: Phillip Lord <phillip.lord@russet.org.uk>
Commit: Phillip Lord <phillip.lord@russet.org.uk>

    Fix broken creation of directory
    
    Using the name of the file rather than the name of the directory, which
    was exactly wrong. Slight refactor to make lentic-script--lentic-file-2
    pure.
---
 lentic-script.el           | 12 ++++++++----
 test/lentic-script-test.el |  2 +-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/lentic-script.el b/lentic-script.el
index cd668c5052..d0164f88dd 100644
--- a/lentic-script.el
+++ b/lentic-script.el
@@ -48,7 +48,7 @@
                   (setq lentic-init init)))))
  t)
 
-(defun lentic-script--lentic-file-1 (file)
+(defun lentic-script--lentic-file-2 (file)
   (concat
    lentic-script-temp-location
    (substring
@@ -56,12 +56,15 @@
     1)
    ".org"))
 
-(defun lentic-script-lentic-file ()
+(defun lentic-script--lentic-file-1 (file)
   (let ((l
-         (lentic-script--lentic-file-1 (buffer-file-name))))
-    (make-directory (file-name-nondirectory l) t)
+         (lentic-script--lentic-file-2 file)))
+    (make-directory (file-name-directory l) t)
     l))
 
+(defun lentic-script-lentic-file ()
+  (lentic-script--lentic-file-1 (buffer-file-name)))
+
 ;;;###autoload
 (defun lentic-python-script-init ()
   (lentic-org-python-oset
@@ -97,6 +100,7 @@
    :comment "-- "
    :comment-stop "#\\\+BEGIN_SRC lua"
    :comment-start "#\\\+END_SRC"
+   :case-fold-search nil
    :lentic-file
    (lentic-script-lentic-file)))
 
diff --git a/test/lentic-script-test.el b/test/lentic-script-test.el
index 1a4c089dae..34065d72bf 100644
--- a/test/lentic-script-test.el
+++ b/test/lentic-script-test.el
@@ -33,7 +33,7 @@
   (should
    (assess=
     "/tmp/home/phillord/file.org"
-    (lentic-script--lentic-file-1
+    (lentic-script--lentic-file-2
      "/home/phillord/file.py"))))
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]