emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Rudolf Adamkovič" <salutis@me.com>
To: emacs-orgmode@gnu.org
Subject: Make fuzzy links practical
Date: Sat, 19 Nov 2022 12:37:46 +0100	[thread overview]
Message-ID: <m2o7t3w4xh.fsf@me.com> (raw)

Hello everyone!

Given a fuzzy link [[word]], Org by default searches for a headline "*
word".  If no such headline exists, Org asks the user if they wish to
create one.  Then, the user can also set

`org-link-search-must-match-exact-headline'

to nil, in which case, Org will search the buffer for a case-folded
"word", such as "word" or "Word".

I find this *almost* practical because, in the Org world, we normally
write headlines in either sentence case or title case, with the first
word capitalized.  But currently, if I have the text

> * Aneuploid
>
> An [[organism]] with a [[chromosomal abnormality]] regarding the
> number of [[chromosome]]s.  Includes [[monosomic]] and [[trisomic]]
> individuals.

the target headlines must appear in lowercase, such as

* chromosomal abnormality

instead in the common form

* Chromosomal abnormality

Based on my research, it seems that Org has changed how fuzzy links
match headlines, case sensitively or insensitively, multiple times.

To make fuzzy links more practical, we have more options, including:

1. case-fold headlines by default, optimizing for the common use case
2. add `'case-fold' to `org-link-search-must-match-exact-headline'
3. obey `case-fold-search' option set by the user

What do you folks think?

Rudy
-- 
"Thinking is a momentary dismissal of irrelevancies."
-- Richard Buckminster Fuller, 1969

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia


             reply	other threads:[~2022-11-19 11:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-19 11:37 Rudolf Adamkovič [this message]
2022-11-20  5:33 ` Make fuzzy links practical Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2o7t3w4xh.fsf@me.com \
    --to=salutis@me.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).