I use C-c a m to search for a tag, but the search is case-sensitive. By example if I enter gnuplot, only section B will be found

* section A     :Gnuplot:

* section B     :gnuplot:

Question: is it possible to do a case-insensitive tag search?

I know that:

  • I can do a tag search C-c a m with "gnuplot|Gnuplot"
  • I can do a "Search for keywords" using C-c a s which is case-insensitive, but this is a full text search (not only restricted to tags)

I would like to know if it is possible to do a "true" case-insensitive tag search (to catch "GnuPloT" too by example)

  • There might be a better way, but you can probably add a custom agenda search that does the same thing as C-c a m except that you (let ((case-fold-search t)) ....) around it. – NickD Jul 29 '20 at 15:06
  • @NickD thanks. However I fear I misunderstood your suggestion. Is it (let ((case-fold-search t)) (org-tags-view nil "gnuPLot")) ? This did not work in my case. – Picaud Vincent Jul 29 '20 at 15:19
  • 1
    That's what I was suggesting: sorry it didn't work. – NickD Jul 29 '20 at 23:25
  • 2
    I think this is the line that would need to be changed, i.e., from (while (let (case-fold-search) to (while (let (case-fold-search t) as suggested (in part) by @NickD above: code.orgmode.org/bzg/org-mode/src/master/lisp/org.el#L11331 – lawlist Jul 29 '20 at 23:39
  • 1
    It should be (while (let ((case-fold-search t)) ...) but even then I don't get the tags in a case insensitive way. Either I'm doing something wrong or there is more that needs to be done. – NickD Jul 30 '20 at 0:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.