# V2 - Case insensitive completion and backlinks not working as expected

**URL:** <https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701>\
**Category:** Troubleshooting\
**Created:** [June 22, 2021, 9:36am UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701 "2021-06-22T09:36:57Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![FloppyEggplant](https://avatars.discourse-cdn.com/v4/letter/f/f05b48/32.png) [@FloppyEggplant](https://org-roam.discourse.group/u/FloppyEggplant)\
**Post date:** [June 22, 2021, 9:36am UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/1 "2021-06-22T09:36:57Z")

</div>

Hi,

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.

 ![20210622_102721_731_emacs_yqqYCEPR2q](https://global.discourse-cdn.com/free1/uploads/orgroam/original/1X/7727db9f54d039af94724e20c46bb55d8612d06a.png)

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [June 22, 2021, 5:15pm UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/2 "2021-06-22T17:15:29Z")

</div>

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](https://orgroam.slack.com/archives/CV160S8EL/p1622309152016400)

Suggestions:

- 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.).

---

<div class="post-metadata">

**Author:** ![FloppyEggplant](https://avatars.discourse-cdn.com/v4/letter/f/f05b48/32.png) [@FloppyEggplant](https://org-roam.discourse.group/u/FloppyEggplant)\
**Post date:** [June 22, 2021, 5:27pm UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/3 "2021-06-22T17:27:39Z")

</div>

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](https://gist.github.com/jethrokuan/02f41028fb4a6f81787dc420fb99b6e4/) script to convert my notes from `v1` to `v2`.

This is my complete settings for `org-roam`:

```auto
(straight-use-package
 '(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)
(org-roam-setup)
(add-hook 'after-init-hook 'org-roam-mode)

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

```

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [June 22, 2021, 6:23pm UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/4 "2021-06-22T18:23:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FloppyEggplant](https://avatars.discourse-cdn.com/v4/letter/f/f05b48/32.png) [@FloppyEggplant](https://org-roam.discourse.group/u/FloppyEggplant)\
**Post date:** [June 22, 2021, 8:54pm UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/5 "2021-06-22T20:54:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gcoladon](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/gcoladon/32/976_2.png) [@gcoladon](https://org-roam.discourse.group/u/gcoladon)\
**Post date:** [November 7, 2021, 5:09pm UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/6 "2021-11-07T17:09:34Z")

</div>

> [@nobiot](#):
>
> For your insensitive search issue, two suggestions:
> 
> - Try variable completion-ignore-case

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?

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [November 7, 2021, 5:43pm UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/7 "2021-11-07T17:43:20Z")

</div>

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

 ![image](https://global.discourse-cdn.com/free1/uploads/orgroam/original/2X/d/d65aca66fc68b9db68a037339bdd6805a185dd09.png)

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?

---

<div class="post-metadata">

**Author:** ![gcoladon](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/gcoladon/32/976_2.png) [@gcoladon](https://org-roam.discourse.group/u/gcoladon)\
**Post date:** [November 7, 2021, 6:14pm UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/8 "2021-11-07T18:14:34Z")

</div>

Yes! Here’s what happens when I try that ![ezgif.com-gif-maker](https://global.discourse-cdn.com/free1/uploads/orgroam/original/2X/d/d687825d5591eb084f425b672d6d87c308971c7f.gif)

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

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [November 7, 2021, 6:59pm UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/9 "2021-11-07T18:59:27Z")

</div>

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)`.

---

<div class="post-metadata">

**Author:** ![gcoladon](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/gcoladon/32/976_2.png) [@gcoladon](https://org-roam.discourse.group/u/gcoladon)\
**Post date:** [November 7, 2021, 9:56pm UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/10 "2021-11-07T21:56:55Z")

</div>

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

```auto
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)                              
  org-roam-node-find()                                     
  funcall-interactively(org-roam-node-find)                
  call-interactively(org-roam-node-find nil nil)           
  command-execute(org-roam-node-find)                      

```

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!

---

<div class="post-metadata">

**Author:** ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://org-roam.discourse.group/u/roi.holtzman)\
**Post date:** [November 27, 2021, 10:44am UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/11 "2021-11-27T10:44:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gcoladon](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/gcoladon/32/976_2.png) [@gcoladon](https://org-roam.discourse.group/u/gcoladon)\
**Post date:** [November 27, 2021, 4:59pm UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/12 "2021-11-27T16:59:57Z")

</div>

> [@roi.holtzman](#):
>
> did you manage to solve this issue?

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](https://emacsconf.org/2021/talks/cs/)

---

<div class="post-metadata">

**Author:** ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://org-roam.discourse.group/u/roi.holtzman)\
**Post date:** [November 27, 2021, 5:11pm UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/13 "2021-11-27T17:11:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [November 27, 2021, 8:30pm UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/14 "2021-11-27T20:30:34Z")

</div>

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

> <https://github.com/emacs-helm/helm/issues/122#issuecomment-8800749>
>
> From the \[manual\](http://www.gnu.org/software/emacs/manual/html\_node/emacs/Searc…h-Case.html)
> 
> \> Searches in Emacs normally ignore the case of the text they are searching
> \> through, if you specify the text in lower case. Thus, if you specify
> \> searching for ‘foo’, then ‘Foo’ and ‘foo’ also match. Regexps, and in
> \> particular character sets, behave likewise: ‘\[ab\]’ matches ‘a’ or ‘A’ or ‘b’
> \> or ‘B’.
> \> 
> \> An upper-case letter anywhere in the incremental search string makes the search case-sensitive.
> 
> How is this different than the 'smart setting of \`helm-case-fold-search\`?

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…

---

<div class="post-metadata">

**Author:** ![gcoladon](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/gcoladon/32/976_2.png) [@gcoladon](https://org-roam.discourse.group/u/gcoladon)\
**Post date:** [November 28, 2021, 12:49am UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/15 "2021-11-28T00:49:23Z")

</div>

> [@nobiot](#):
>
> Is this behavior the result of helm-case-fold-search being set to smart?

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

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [November 28, 2021, 8:34am UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/16 "2021-11-28T08:34:59Z")

</div>

What value should it be set to?

---

<div class="post-metadata">

**Author:** ![gcoladon](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/gcoladon/32/976_2.png) [@gcoladon](https://org-roam.discourse.group/u/gcoladon)\
**Post date:** [November 28, 2021, 7:19pm UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/17 "2021-11-28T19:19:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [November 28, 2021, 8:24pm UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/18 "2021-11-28T20:24:40Z")

</div>

Thanks. So that’s the way for Helm 🙂

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [November 29, 2021, 9:09am UTC](https://org-roam.discourse.group/t/v2-case-insensitive-completion-and-backlinks-not-working-as-expected/1701/19 "2021-11-29T09:09:34Z")

</div>

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