这是indexloc提供的服务,不要输入任何密码
Skip to content

Tag-search and tag-insert have zero tags #84

@kchousos

Description

@kchousos

First of all, thank you for this great package. I was looking for a program that imitates The Archive in functionality, and it being an Emacs package was an awesome bonus!

Even though when I first installed the package tag search and insertion worked, now they do not list any tags whatsoever. I can't pinpoint a specific change that relates to the before and after.

Screencast.From.2025-05-31.14-04-26.mp4

My relevant configuration is the following:

(use-package zk
  :init
  (add-hook 'completion-at-point-functions #'zk-completion-at-point 'append)
  (defun zk-new-note-header (title new-id &optional orig-id)
    "Insert header in new notes with args TITLE and NEW-ID.
Optionally use ORIG-ID for backlink."
    (insert (format "# %s %s\n\n#inbox\n\n" new-id title)))
  :custom
  (zk-directory "~/Documents/02 Areas/Slipbox")
  (zk-file-extension "md")
  (zk-id-time-string-format "%Y%m%d%H%M%S")
  (zk-id-regexp "\\([0-9]\\{14\\}\\)")
  :config
  (zk-setup-auto-link-buttons))

(use-package zk-index
  :after zk)
(defvar zk-index-mode-map
  (let ((map (make-sparse-keymap)))
    (define-key map (kbd "n") #'zk-index-next-line)
    (define-key map (kbd "p") #'zk-index-previous-line)
    (define-key map (kbd "v") #'zk-index-view-note)
    (define-key map (kbd "o") #'other-window)
    (define-key map (kbd "f") #'zk-index-focus)
    (define-key map (kbd "s") #'zk-index-search)
    (define-key map (kbd "g") #'zk-index-query-refresh)
    (define-key map (kbd "c") #'zk-index-current-notes)
    (define-key map (kbd "i") #'zk-index-refresh)
    (define-key map (kbd "S") #'zk-index-sort-size)
    (define-key map (kbd "M") #'zk-index-sort-modified)
    (define-key map (kbd "C") #'zk-index-sort-created)
    (define-key map (kbd "RET") #'zk-index-open-note)
    (define-key map (kbd "q") #'delete-window)
    (make-composed-keymap map tabulated-list-mode-map))
  "Keymap for ZK-Index buffer.")

(use-package citar
  :custom
  (citar-bibliography '("~/HDD/Library/References/biblio.bib"))
  (citar-format-reference-function 'citar-citeproc-format-reference)
  (citar-markdown-prompt-for-extra-arguments nil)
  (citar-file-open-functions '(("html" . citar-file-open-external) ("pdf" . citar-file-open-external) (t . find-file)))
  (citar-citeproc-csl-styles-dir "~/HDD/Library/Zotero data/styles/")
  :hook
  (markdown-mode . citar-capf-setup))

(with-eval-after-load 'citar
  (with-eval-after-load 'zk
    (require 'zk-citar)))

(setq citar-notes-source 'zk)

(setq zk-citar-citekey-regexp "^[0-9]+[[:space:]]+L1[[:space:]]+\\(\\S-+\\)[[:space:]]+-.*")
(setq zk-citar-title-template "L1 ${=key=} - ${title}")

I've included my citar config as well because I use the integration between your package and citar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions