Skip to content

Commit

Permalink
replace old emacsql code with new org-db sqlite
Browse files Browse the repository at this point in the history
  • Loading branch information
jkitchin committed Mar 19, 2024
1 parent 9b53c77 commit 2ef0599
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ A candidate is a list of (link function)."
(defun @-hashtags ()
"Get a list of candidate hashtags you have used before."
(let* ((tip (looking-at-hashtag))
(hashtag-data (emacsql org-db [:select [hashtag file-hashtags:begin files:filename]
:from hashtags
:left :join file-hashtags :on (= hashtags:rowid file-hashtags:hashtag-id)
:inner :join files
:on (= files:rowid file-hashtags:filename-id)])))
(hashtag-data (with-org-db
(sqlite-select org-db "select hashtag, file_hashtags.begin, files.filename
from hashtags
left join file_hashtags on hashtags.rowid = file_hashtags.hashtag_id
inner join files on files.rowid = file_hashtags.filename_id"))))
(-uniq (cl-loop for (hashtag begin fname) in hashtag-data
collect (concat "#" hashtag)))))

Expand Down

0 comments on commit 2ef0599

Please sign in to comment.