Skip to content

Commit

Permalink
remove dependencies on s and dash
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Feb 25, 2024
1 parent a14e36c commit 43ea635
Showing 1 changed file with 33 additions and 23 deletions.
56 changes: 33 additions & 23 deletions scimax-editmarks.org
Original file line number Diff line number Diff line change
Expand Up @@ -441,19 +441,19 @@ this is it is not feasible to have a key without a value."
(push this-word s)
;; word is not a :keyword
(when s
(setq tempstr (s-join " " (reverse s)))
(setq tempstr (string-join (reverse s) " "))
(if (string= tempstr (format "%s" (string-to-number tempstr)))
(push (string-to-number tempstr) sexp)
(push tempstr sexp)))
(setq s '())
(push (intern this-word) sexp)))
;; make sure we get the last s...
(when s
(setq tempstr (s-join " " (reverse s)))
(setq tempstr (string-join (reverse s) " "))
(if (string= tempstr (format "%s" (string-to-number tempstr)))
(push (string-to-number tempstr) sexp)
(push tempstr sexp)))
(-flatten (reverse sexp))))
(flatten-list (reverse sexp))))


(defun sem-editmark-plist ()
Expand Down Expand Up @@ -647,17 +647,19 @@ For LaTeX, I rely on https://ctan.org/pkg/todonotes?lang=en for comments and tas
(lambda (s)
(format "@@latex:\\noindent\\protect\\bgroup\\markoverwith{\\textcolor{blue}{\\rule[-0.5ex]{4pt}{1.4pt}}}\\ULon{%s}@@"
s))
(s-split "\n" (buffer-substring-no-properties (car content-bounds)
(cdr content-bounds)))
(string-split (buffer-substring-no-properties (car content-bounds)
(cdr content-bounds))
"\n")
"@@latex:\\\\@@\n")))
((eq 'html backend)
(cl--set-buffer-substring
(car bounds) (cdr bounds)
(mapconcat
(lambda (s)
(format "@@html:<span style=\"color: blue\">%s</span>@@" s))
(s-split "\n" (buffer-substring-no-properties (car content-bounds)
(cdr content-bounds)))
(string-split (buffer-substring-no-properties (car content-bounds)
(cdr content-bounds))
"\n")
"@@html:<br>@@"))))))


Expand All @@ -673,17 +675,19 @@ For LaTeX, I rely on https://ctan.org/pkg/todonotes?lang=en for comments and tas
(lambda (s)
(format "@@latex:\\noindent\\protect\\bgroup\\markoverwith{\\textcolor{red}{\\rule[-0.5ex]{4pt}{1.4pt}}}\\ULon{%s}@@"
s))
(s-split "\n" (buffer-substring-no-properties (car content-bounds)
(cdr content-bounds)))
(string-split (buffer-substring-no-properties (car content-bounds)
(cdr content-bounds))
"\n")
"@@latex:\\\\@@\n")))
((eq 'html backend)
(cl--set-buffer-substring
(car bounds) (cdr bounds)
(mapconcat
(lambda (s)
(format "@@html:<span style=\"color: red\">%s</span>@@" s))
(s-split "\n" (buffer-substring-no-properties (car content-bounds)
(cdr content-bounds)))
(string-split (buffer-substring-no-properties (car content-bounds)
(cdr content-bounds))
"\n")
"@@html:<br>@@"))))))


Expand All @@ -698,19 +702,21 @@ For LaTeX, I rely on https://ctan.org/pkg/todonotes?lang=en for comments and tas
(mapconcat
(lambda (s)
(format "@@latex:%s@@" s))
(s-split "\n" (format "\\todo{%s}"
(string-split (format "\\todo{%s}"
(buffer-substring-no-properties
(car content-bounds)
(cdr content-bounds))))
(cdr content-bounds)))
"\n")
"@@latex:\\\\@@\n")))
((eq 'html backend)
(cl--set-buffer-substring
(car bounds) (cdr bounds)
(mapconcat
(lambda (s)
(format "@@html:<span style=\"color: orange\">%s</span>@@" s))
(s-split "\n" (buffer-substring-no-properties (car content-bounds)
(cdr content-bounds)))
(string-split (buffer-substring-no-properties (car content-bounds)
(cdr content-bounds))
"\n")
"@@html:<br>@@"))))))


Expand All @@ -725,19 +731,21 @@ For LaTeX, I rely on https://ctan.org/pkg/todonotes?lang=en for comments and tas
(mapconcat
(lambda (s)
(format "@@latex:%s@@" s))
(s-split "\n" (format "\\todo[color=green!40]{TASK: %s}"
(string-split (format "\\todo[color=green!40]{TASK: %s}"
(buffer-substring-no-properties
(car content-bounds)
(cdr content-bounds))))
(cdr content-bounds)))
"\n")
"@@latex:\\\\@@\n")))
((eq 'html backend)
(cl--set-buffer-substring
(car bounds) (cdr bounds)
(mapconcat
(lambda (s)
(format "@@html:<span style=\"color: purple\">%s</span>@@" s))
(s-split "\n" (buffer-substring-no-properties (car content-bounds)
(cdr content-bounds)))
(string-split (buffer-substring-no-properties (car content-bounds)
(cdr content-bounds))
"\n")
"@@html:<br>@@"))))))


Expand Down Expand Up @@ -786,9 +794,10 @@ we go with the font color."
(mapconcat
(lambda (s)
(format "@@latex:%s@@" s))
(s-split "\n" (buffer-substring-no-properties
(string-split (buffer-substring-no-properties
(car content-bounds)
(cdr content-bounds)))
(cdr content-bounds))
"\n")
"@@latex:\\\\@@\n")
"@@latex: }}@@")))

Expand All @@ -801,8 +810,9 @@ we go with the font color."
fg-hex
bg-hex
s))
(s-split "\n" (buffer-substring-no-properties (car content-bounds)
(cdr content-bounds)))
(string-split (buffer-substring-no-properties (car content-bounds)
(cdr content-bounds))
"\n")
"@@html:<br>@@"))))))
#+END_SRC

Expand Down

0 comments on commit 43ea635

Please sign in to comment.