emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: links are not highlighted anymore with Org Mode 9.2
@ 2019-01-03 12:18 Daniel Borchmann
  2019-01-03 13:45 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Borchmann @ 2019-01-03 12:18 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 919 bytes --]


Hey,

links in Org Mode 9.2 are not highlighted anymore if no :face keyword is
given in ‘org-link-parameters’.  The reason for this seems to be that
‘org-activate-links’ uses the following code to determine which face to
use:

--8<---------------cut here---------------start------------->8---
(pcase (org-link-get-parameter type :face)
  ((and (pred functionp) face) (funcall face path))
  ((and (pred facep) face) face)
  ((and (pred consp) face) face) ;anonymous
  (_ 'org-link))
--8<---------------cut here---------------end--------------->8---

However, ‘nil’ is a valid face, and thus this form returns ‘nil’ instead
of the default ‘org-link’ face if no :face keyword is given.

Best,

  Daniel

PS: Thanks a ton for Org Mode, I literally couldn’t live without it! :)

-- 
Daniel Borchmann
GPG (Mail)            0849 473E 6BF0 B504 DF0B  D640 455E 3610 01FF 778F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug: links are not highlighted anymore with Org Mode 9.2
  2019-01-03 12:18 Bug: links are not highlighted anymore with Org Mode 9.2 Daniel Borchmann
@ 2019-01-03 13:45 ` Nicolas Goaziou
  2019-01-03 14:37   ` Daniel Borchmann
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2019-01-03 13:45 UTC (permalink / raw)
  To: Daniel Borchmann; +Cc: emacs-orgmode

Hello,

Daniel Borchmann <daniel@algebra20.de> writes:

> links in Org Mode 9.2 are not highlighted anymore if no :face keyword is
> given in ‘org-link-parameters’.

I cannot reproduce this.

> The reason for this seems to be that
> ‘org-activate-links’ uses the following code to determine which face to
> use:
>
> --8<---------------cut here---------------start------------->8---
> (pcase (org-link-get-parameter type :face)
>   ((and (pred functionp) face) (funcall face path))
>   ((and (pred facep) face) face)
>   ((and (pred consp) face) face) ;anonymous
>   (_ 'org-link))
> --8<---------------cut here---------------end--------------->8---
>
> However, ‘nil’ is a valid face,

No, it isn't: (facep nil) => nil

> and thus this form returns ‘nil’ instead of the default ‘org-link’
> face if no :face keyword is given.

I don't think the analysis is correct, per above.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug: links are not highlighted anymore with Org Mode 9.2
  2019-01-03 13:45 ` Nicolas Goaziou
@ 2019-01-03 14:37   ` Daniel Borchmann
  2019-01-03 15:15     ` Daniel Borchmann
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Borchmann @ 2019-01-03 14:37 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]

ghItlhpu' Nicolas Goaziou <mail@nicolasgoaziou.fr>:
>> The reason for this seems to be that
>> ‘org-activate-links’ uses the following code to determine which face to
>> use:
>>
>> --8<---------------cut here---------------start------------->8---
>> (pcase (org-link-get-parameter type :face)
>>   ((and (pred functionp) face) (funcall face path))
>>   ((and (pred facep) face) face)
>>   ((and (pred consp) face) face) ;anonymous
>>   (_ 'org-link))
>> --8<---------------cut here---------------end--------------->8---
>>
>> However, ‘nil’ is a valid face,
>
> No, it isn't: (facep nil) => nil

Interesting!

I get (in the *scratch* buffer):

    (facep nil) → [face unspecified unspecified unspecified unspecified unspecified unspecified unspecified unspecified unspecified unspecified unspecified ...]

M-x emacs-version returns

    GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2018-12-26, modified by Debian

So this is more likely an issue of Emacs itself?  Maybe it has been
fixed in a later version?

Thanks!

  Daniel

-- 
Daniel Borchmann
GPG (Mail)            0849 473E 6BF0 B504 DF0B  D640 455E 3610 01FF 778F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug: links are not highlighted anymore with Org Mode 9.2
  2019-01-03 14:37   ` Daniel Borchmann
@ 2019-01-03 15:15     ` Daniel Borchmann
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Borchmann @ 2019-01-03 15:15 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 658 bytes --]

ghItlhpu' Daniel Borchmann <daniel@algebra20.de>:
> I get (in the *scratch* buffer):
>
>     (facep nil) → [face unspecified unspecified unspecified unspecified unspecified unspecified unspecified unspecified unspecified unspecified unspecified ...]

Seems this an issue with my configuration, not Emacs itself, as stock
Emacs (started with emacs -Q) returns nil for (facep nil), as you
mentioned.  Indeed, somehow something defined ‘nil’ as a face for me,
causing the above issues.

So no bug in Org Mode, sorry for the noise :)

  Daniel

-- 
Daniel Borchmann
GPG (Mail)            0849 473E 6BF0 B504 DF0B  D640 455E 3610 01FF 778F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-03 15:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-03 12:18 Bug: links are not highlighted anymore with Org Mode 9.2 Daniel Borchmann
2019-01-03 13:45 ` Nicolas Goaziou
2019-01-03 14:37   ` Daniel Borchmann
2019-01-03 15:15     ` Daniel Borchmann

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