Re: Make fuzzy links practical

2022-11-19 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

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

Can you recall the relevant commits/ML threads?

> 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?

Sounds reasonable.
But we need to study why case sensitivity has been flipped in the past.
Also, I am wondering how all this work on export.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Make fuzzy links practical

2022-11-19 Thread Rudolf Adamkovič
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č  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia