Skip to content

Reload Page Automatically #144

Open
Open
@SidharthArya

Description

@SidharthArya

I am using this code to change the filters in the org roam server. But the change is not being reflected in the page right away. It needs to be explicitely reloaded. Is there a way to update the filter automatically in the page, or reload the page as soon as the update is made.

(setq org-roam-server-tags "")
(defun my-org-roam-server-tags()
  "Process org-roam-server-tags"
  (interactive)
  (let* (
         (tags (read-string "Tags: " org-roam-server-tags))
         (tags-temp (cdr (split-string tags "\ [\+]")))
         (plus (mapcar (lambda(a) (string-trim (car (split-string a "\ [\-]")))) tags-temp))
         (tags-temp (cdr (split-string tags "\ [\-]")))
         (minus (mapcar (lambda(a) (string-trim (car (split-string a "\ [\+]")))) tags-temp)))

    (setq org-roam-server-default-include-filters (json-encode (mapcar (lambda (tag) (list (cons 'id tag ) (cons 'parent "tags"))) plus)))
    (setq org-roam-server-default-exclude-filters (json-encode (mapcar (lambda (tag) (list (cons 'id tag ) (cons 'parent "tags"))) minus)))
    (setq org-roam-server-tags tags)
         ))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions