Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Only one tag showing in interface. #289

Open
theherk opened this issue Apr 12, 2023 · 12 comments
Open

[BUG] Only one tag showing in interface. #289

theherk opened this issue Apr 12, 2023 · 12 comments
Labels
bug Something isn't working

Comments

@theherk
Copy link

theherk commented Apr 12, 2023

Describe the bug
Only the first tag listed in filetags is shown in the interface.

To Reproduce
Which specific things did you do which lead to said bug? E.g. what did you click, which commands did you call, etc.

  1. Create a file with more than one. ex. #+filetags: :aws:ecs:
  2. Open in UI

Expected behavior
Show all tags in pill bar.

Screenshots
Screenshot 2023-04-12 at 12 45 45
Screenshot 2023-04-12 at 12 46 22

What browser were you using?
Firefox and Safari

@theherk theherk added the bug Something isn't working label Apr 12, 2023
@SkippityPaps
Copy link

I'm experiencing the same behavior.
org-roam-ui package version is 20221105.1040

@vberezhnev
Copy link

Same...
org-roam-ui -- 20221105.1040
emacs -- 29.0.92

@vberezhnev
Copy link

OK, man. Just downgrade your Emacs version from 29 to 28.
That's solved my problem.

@bmp
Copy link

bmp commented Sep 5, 2023

Same issue Emacs 29.1, I unfortunately can't downgrade to 28. Is there any other workaround for this?

@garid3000
Copy link

Having same issue on:
Version: Emacs 29.1
OS: arch
Hopefully it'll fixed on Emacs-29.1 soon

@tabroughton
Copy link

tabroughton commented Sep 25, 2023

I believe this is a bug with the way org-roam initilises/uses the sqlite-builtin db connector, the issue with tags happens in the org-roam-ui--get-nodes function of org-roam-ui.el. When setting the value of org-roam-database-connector to 'sqlite-builtin the function within the query that concatenates tags does not work. To fix this, customise the value for org-roam-database-connector to 'sqlite.

The issue is that the group-concat function is not working and only returns a single result rather than a concatenated set.

(defun org-roam-ui--get-nodes ()
  "."
  (org-roam-db-query [:select [id
                                file
                                title
                                level
                                pos
                                olp
                                properties
                                (funcall group-concat tag
                                         (emacsql-escape-raw \, ))]
                       :as tags
                       :from nodes
                       :left-join tags
                       :on (= id node_id)
                       :group :by id]))

I have also tested this query by writing the sql as a string and passing that into org-roam-db-query with the same results.

I do not believe the issue is within emacs-sqllite or emacs-sqlite-builtin packages though as I have used both of them directly and the (funcall group-concat tag (emacsql-escape-raw \, )) part of the query returns concatenated tags. The sql statement will only return a single tag (not concatenation) only when the the org-roam db connector is set to `'sqlite-builtin' and the query is run via org-roam. I shall raise this bug there and link to this issue.

@calharding
Copy link

calharding commented Oct 25, 2023

Having the same issue in Emacs 29.1 (via Doom) on OpenBSD 7.4.

Any filtering operations attempted on a node with multiple tags will only work on the first listed tag.

In other words, if the tag line looks like #+filetags: :tag1:tag2:, then any attempt in org-roam-ui to filter out nodes tagged with tag1 works, but trying to filter by tag2 does not.

IOW, only the first tag is recognised.

@yarikus
Copy link

yarikus commented Nov 28, 2023

I understand the cause of the bug is known. Any chance it'll be fixed soon?

@yarikus
Copy link

yarikus commented Nov 28, 2023

Same issue Emacs 29.1, I unfortunately can't downgrade to 28. Is there any other workaround for this?

I found a temporary solution - switched the connector to sqlite.

(org-roam-database-connector 'sqlite)

@bmp
Copy link

bmp commented Nov 30, 2023

Same issue Emacs 29.1, I unfortunately can't downgrade to 28. Is there any other workaround for this?

I found a temporary solution - switched the connector to sqlite.

(org-roam-database-connector 'sqlite)

This works for me too, I did the following,

(setq org-roam-database-connector 'sqlite)

@rickalex21
Copy link

Same problem here, changing to sqlite as @yarikus mentioned works. Thanks.

The problem I was having as others may have experienced is not all tags are
appearing when using Add tag to tag allowlist and entering code.

For example this will show pandoc linked to code.

#+TITLE: Pandoc
#+FILETAGS: :code:pandoc:

This will not work, only code will show up but pandoc node will not:

#+TITLE: Pandoc
#+FILETAGS: :pandoc:code:

@fislysandi
Copy link

fislysandi commented Apr 9, 2024

when switching to the SQLite now it makes org roam sync $A LOT$ longer than usual every time that i sync.

so ill just stick towards built-in until its fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants