V2 - Case insensitive completion and backlinks not working as expected


I’m trying the Org-roam V2.

While testing my notes, I’ve noticed two things that are not working:

  • Case insensitive search after inserting [[; the search works if I write the title as is,
  • Backlinks buffer is weird (screenshot attached) and there are no links to the files.

How can I fix this?

Edit: by disabling packages one by one, found that it was conflicting with the emacs-dashboard package, which I disabled for now.

For your insensitive search issue, two suggestions:

  • Try variable completion-ignore-case
  • Raise GitHub issue on defcustom org-roam-completion-ignore-case
    Your issue indicates it’s not working on v2 now. It’s either still to be implemented or to be deprecated.

For your second issue of org-roam-buffer, it looks to me that you have all the elements to be displayed; however, they are displayed in the wrong order. It looks to me the same problem as this one on Slack


  • Ask Milan what he might have done to solve it; he didn’t come back to Slack
  • Add more description how others might reproduce it on their end
    I don’t have the same issue, so have no idea. You would really need to provide a step-by-step description and your environment (e.g. Doom, Spacemacs, what commit of v2 you are on, etc.).

Thank you for your reply!

I’m running Windows 10 - Emacs 27.2 and using my own custom settings. I use Straight package manager and set it up to use the v2 branch from Github.

I’ve ran the migration.el script to convert my notes from v1 to v2.

This is my complete settings for org-roam:

 '(org-roam :type git :host github :repo "org-roam/org-roam" :branch "v2"))

;; Recommendation for Windows users for performance
(setq org-roam-db-update-method 'immediate)

;; Set the org-roam directory
(setq org-roam-directory "D:/orgmode")
(setq org-roam-index-file "D:/orgmode/index.org")

;; Ignore case when auto completing
(setq org-roam-completion-ignore-case t)

(require 'org-roam)
(add-hook 'after-init-hook 'org-roam-mode)

;; Add the auto-completion backend to company backends
(add-to-list 'company-backends 'company-capf)

Not sure what you are expecting by sharing your config.

For the insensitive issue, try to see if my suggestions work. For the org-roam-buffer order issue, it looks like the cause is in the other parts of your config. I would turn off everything else and see if I could locate it.

Other than these suggestions, I don’t think I can do much else. I’m on vacation with no laptop.

Thank you for your help. I found that it was a conflict with the emacs-dashboard package. For now I disabled the dashboard but I wonder if anyone else has the same conflict.

1 Like

I don’t know if my desire is the same as the OP’s, but, I would like org-roam-node-find’s search over nodes to be case-insensitive. Right now, I have a node called “Attention Is All You Need”, and when I just tried to find it by typing “Attention is”, I got no matches, no matter the value of completion-ignore-case.

I guess what I want is something stronger than what is controlled by that variable – I want the case of what I type to also be ignored.

You might respond, then why don’t you always just type in lower case? Which is a reasonable response, but, I also have this use case in mind: when I copy and paste text from somewhere, and there are the titles of research papers in the text, I would like to be able to select the text of the paper’s title and call org-roam-node-find on it, to see whether I already have a node for that paper or not, and that paper’s title’s cases may or may not match the case of the target node.

Was that example clear enough?

completion-ignore-case variable seems to work as you would like it to on my end.

The actual title of the note is “Case Insensitive”, and my search string is “cAse iNSen” as you can see in the screen shot.

Does this correctly capture what you would like to achieve?

Yes! Here’s what happens when I try that ezgif.com-gif-maker

I wonder why this seems to work differently on your configuration than it does on mine…

Two possibilities. Your completion framework and completion-styles.

The latter is less likely because before I changed completion-ignore-case to t it was case sensitive.

For completion frameowork, I use Vertico, so it’s very close to bare-bone completion.
For completion-styles, Orderless does most of the work; it is set to the value as follows: (basic orderless partial-completion).

OK I’m using Helm. Here’s (a rectangular cut from) the backtrace when I’m at the org-roam-node-find prompt:

Debugger entered--Lisp error: (quit)                       
  read-from-minibuffer(#("Node: " 0 6 (face helm-minibuffer
  helm-read-from-minibuffer("Node: " nil nil noresume (keym
  helm-internal((((nomark) (name . "org-roam-node-find") (i
  apply(helm-internal ((((nomark) (name . "org-roam-node-fi
  helm((((nomark) (name . "org-roam-node-find") (init #f(co
  apply(helm ((((nomark) (name . "org-roam-node-find") (ini
  helm(:sources (((nomark) (name . "org-roam-node-find") (i
  helm-comp-read("Node: " #f(compiled-function (string pred
  helm-completing-read-default-1("Node: " #f(compiled-funct
  helm-completing-read-default-handler("Node: " #f(compiled
  helm--completing-read-default("Node: " #f(compiled-functi
  apply(helm--completing-read-default ("Node: " #f(compiled
  #f(advice-wrapper :override completing-read-default helm-
  completing-read("Node: " #f(compiled-function (string pre
  org-roam-node-read(nil nil)                              
  call-interactively(org-roam-node-find nil nil)           

The value of completion-styles in my Emacs is (basic partial-completion emacs22 helm).

So I guess the next thing for me to do will be to investigate how those completions work, and see if there’s another completion that I would like to use over the ones in the existing list. Thanks!

did you manage to solve this issue?
I also see that the find-node command is case sensitive, while I don’t want it to be.
I am running also on doom.

Hi Roi, no, I have not figured this out yet. In fact I mention this as something I am still bothered by in my Emacs Conf presentation coming up in around two hours: EmacsConf - 2021 - talks - One effective CS grad student workflow

Good luck in the talk!
I hope that we find a solution for this!

Is this behavior the result of helm-case-fold-search being set to smart?

pattern “foo” match “foo” and “Foo”
pattern “Foo” match only "Foo

It’s a 2012 exchange but I read it as helm’s general behavior even when you are searching within minibuffer. I don’t use it so I can’t investigate any further…

1 Like

Wow… that’s it!! Nice googling @nobiot, thank you! :slight_smile:

1 Like

What value should it be set to?

For what I wanted, true case folding of both search strings and match strings, i set helm-case-fold-search to t, and everything worked as advertised.

Thanks. So that’s the way for Helm :slight_smile:

1 Like

@roi.holtzman just pinging you. There is a solution if you are using Helm.

1 Like