emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Case insensitivity of simple [[links]]


From: Rudolf Adamkovič
Subject: Re: Case insensitivity of simple [[links]]
Date: Thu, 19 Oct 2023 12:30:49 +0200

Ihor Radchenko <yantar92@posteo.net> writes:

>>> Note that there is generally no guarantee that [[name]] link will be
>>> exported as "name" by any particular backend. Your workaround with
>>> num:nil is just a workaround that may or may not work in future.
>>
>> I did not know this is considered a workaround!  I have always thought
>> this is how Org is specified to work (as in tests).

Actually, dang!  I spoke too soon.  While links now work consistently
before and after exports, their description matches the destination
heading, not the source link.  But if we case-fold now, it would make a
lot more sense to match the case of the source link, as it enables one
to link [[capitalized heading]]s.  Otherwise, we case-fold with no
significant benefits, as far as I can see.

Without also fixing this part, my problem with Org remains. :(

>> [...] call to 'org-toggle-link-display' does nothing.

> It does nothing because it is one of the options that must be set before
> Org mode is loaded. Resolving buffer-local variables happens after the
> major mode is loaded.

I have noticed that 'org-use-extra-keys', for example, is documented as
"must set it before loading Org", but there is nothing similar in the
'org-link-descriptive' docstring.  So perhaps this is a bug, not a
feature?

Upon a quick look, 'org-toggle-link-display' does exactly two things:

  1. (setq org-link-descriptive (not org-link-descriptive)) and
  2. (org-link-descriptive-ensure),

where 'org-link-descriptive-ensure' wraps exactly one expression:

  (org-fold-core-set-folding-spec-property
     (car org-link--link-folding-spec)
     :visible (not org-link-descriptive))

Could Org execute this expression after loading a document, given the
buffer-local value of 'org-link-descriptive' necessitates it?

Rudy
-- 
"It is far better to have a question that can't be answered than an answer that
can't be questioned."
--- Carl Sagan

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]