* Links in #+caption: lines
@ 2015-06-03 6:08 Thomas S. Dye
2015-06-03 11:25 ` Rasmus
0 siblings, 1 reply; 11+ messages in thread
From: Thomas S. Dye @ 2015-06-03 6:08 UTC (permalink / raw
To: emacs-orgmode
Aloha all,
Links in #+caption: lines are shown as literal links. IIRC, they used
to show as descriptive links. Has this changed, or is my memory faulty?
In any case, I'd like them to be descriptive links to keep the
#+caption: lines as short as possible.
All the best,
Tom
--
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Links in #+caption: lines
2015-06-03 6:08 Links in #+caption: lines Thomas S. Dye
@ 2015-06-03 11:25 ` Rasmus
2015-06-03 16:48 ` Thomas S. Dye
0 siblings, 1 reply; 11+ messages in thread
From: Rasmus @ 2015-06-03 11:25 UTC (permalink / raw
To: emacs-orgmode
tsd@tsdye.com (Thomas S. Dye) writes:
> Aloha all,
>
> Links in #+caption: lines are shown as literal links. IIRC, they used
> to show as descriptive links. Has this changed, or is my memory faulty?
>
> In any case, I'd like them to be descriptive links to keep the
>
> #+caption: lines as short as possible.
Maybe it's an effect of 37d2a2d1cfa58c5334eec4f7fbabc4a2f313ab33? Cf.
http://thread.gmane.org/gmane.emacs.orgmode/95415
In any case, unless links can be fortified in captions, I think current
behavior is OK. "Hidden" links are worse, IMO.
Rasmus
--
Lasciate ogni speranza, voi che leggete questo.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Links in #+caption: lines
2015-06-03 11:25 ` Rasmus
@ 2015-06-03 16:48 ` Thomas S. Dye
2015-06-03 20:26 ` Rasmus
0 siblings, 1 reply; 11+ messages in thread
From: Thomas S. Dye @ 2015-06-03 16:48 UTC (permalink / raw
To: Rasmus; +Cc: emacs-orgmode
Aloha Rasmus,
Rasmus <rasmus@gmx.us> writes:
> tsd@tsdye.com (Thomas S. Dye) writes:
>
>> Aloha all,
>>
>> Links in #+caption: lines are shown as literal links. IIRC, they used
>> to show as descriptive links. Has this changed, or is my memory faulty?
>>
>> In any case, I'd like them to be descriptive links to keep the
>>
>> #+caption: lines as short as possible.
>
> Maybe it's an effect of 37d2a2d1cfa58c5334eec4f7fbabc4a2f313ab33? Cf.
>
> http://thread.gmane.org/gmane.emacs.orgmode/95415
>
> In any case, unless links can be fortified in captions, I think current
> behavior is OK. "Hidden" links are worse, IMO.
I don't know if it is an effect of 37d2a2d. I'm also seeing a different
background for captions, similar to the background the emacs 24 starter
kit gives me for #+begin_src and #+end_src lines.
I use links for citations, which frequently appear in captions when I
specify the source of data, etc. The paper I'm working on now looks a
bit ungainly in the Org mode buffer due to the literal links in captions
and the weird backgrounds.
If it is necessary to choose between literal links in macros or
descriptive links in captions, perhaps there could be a switch for users
like you and me who use one but not the other?
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Links in #+caption: lines
2015-06-03 16:48 ` Thomas S. Dye
@ 2015-06-03 20:26 ` Rasmus
2015-06-05 0:05 ` Thomas S. Dye
0 siblings, 1 reply; 11+ messages in thread
From: Rasmus @ 2015-06-03 20:26 UTC (permalink / raw
To: emacs-orgmode
Hi,
tsd@tsdye.com (Thomas S. Dye) writes:
> I don't know if it is an effect of 37d2a2d.
I just tested it against 50a0e712cceeef02c0d6a7c41b619b308ea1b15c.
37d2a2d seems critical here.
> I'm also seeing a different background for captions, similar to the
> background the emacs 24 starter kit gives me for #+begin_src and
> #+end_src lines.
On my computer with angry fruit colors, captions are formatted as
#+caption: caption text
AFC color Red Gray
Face org-meta-line org-block
I don't know starter kit. But the Leuven theme changes background colors
for various parts of Org like this:
https://github.com/fniessen/emacs-leuven-theme/blob/master/images/agenda-and-task-list.png
Is that your theme?
> I use links for citations, which frequently appear in captions when I
> specify the source of data, etc. The paper I'm working on now looks a
> bit ungainly in the Org mode buffer due to the literal links in captions
> and the weird backgrounds.
For the latter try something like: (set-face-background 'org-block nil)
> If it is necessary to choose between literal links in macros or
> descriptive links in captions, perhaps there could be a switch for users
> like you and me who use one but not the other?
In the patch I guess this is the passage you disagree with:
+ ((equal dc1 "+caption:")
+ (org-remove-flyspell-overlays-in (match-end 2) (match-end 0))
+ (remove-text-properties (match-beginning 0) (match-end 0)
+ '(display t invisible t intangible t))
+ (add-text-properties (match-beginning 1) (match-end 3)
+ '(font-lock-fontified t face org-meta-line))
+ (add-text-properties (match-beginning 6) (+ (match-end 6) 1)
+ '(font-lock-fontified t face org-block)))
Perhaps it is possible to let normal fontification rule in region six
above?
IMO hidden link (== no color highlight and not literal) is no good.
Rasmus
--
One thing that is clear: it's all down hill from here
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Links in #+caption: lines
2015-06-03 20:26 ` Rasmus
@ 2015-06-05 0:05 ` Thomas S. Dye
2015-06-05 5:48 ` Rasmus
0 siblings, 1 reply; 11+ messages in thread
From: Thomas S. Dye @ 2015-06-05 0:05 UTC (permalink / raw
To: Rasmus; +Cc: emacs-orgmode
Rasmus <rasmus@gmx.us> writes:
> In the patch I guess this is the passage you disagree with:
>
> + ((equal dc1 "+caption:")
> + (org-remove-flyspell-overlays-in (match-end 2) (match-end 0))
> + (remove-text-properties (match-beginning 0) (match-end 0)
> + '(display t invisible t intangible t))
> + (add-text-properties (match-beginning 1) (match-end 3)
> + '(font-lock-fontified t face org-meta-line))
> + (add-text-properties (match-beginning 6) (+ (match-end 6) 1)
> + '(font-lock-fontified t face org-block)))
>
> Perhaps it is possible to let normal fontification rule in region six
> above?
How would I change this so descriptive links are shown in #+caption:
lines?
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Links in #+caption: lines
2015-06-05 0:05 ` Thomas S. Dye
@ 2015-06-05 5:48 ` Rasmus
2015-06-05 6:57 ` Nicolas Goaziou
0 siblings, 1 reply; 11+ messages in thread
From: Rasmus @ 2015-06-05 5:48 UTC (permalink / raw
To: tsd; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1082 bytes --]
Hi,
tsd@tsdye.com (Thomas S. Dye) writes:
>> In the patch I guess this is the passage you disagree with:
>>
>> + ((equal dc1 "+caption:")
>> + (org-remove-flyspell-overlays-in (match-end 2) (match-end 0))
>> + (remove-text-properties (match-beginning 0) (match-end 0)
>> + '(display t invisible t intangible t))
>> + (add-text-properties (match-beginning 1) (match-end 3)
>> + '(font-lock-fontified t face org-meta-line))
>> + (add-text-properties (match-beginning 6) (+ (match-end 6) 1)
>> + '(font-lock-fontified t face org-block)))
>>
>> Perhaps it is possible to let normal fontification rule in region six
>> above?
>
> How would I change this so descriptive links are shown in #+caption:
> lines?
Try the attached patch.
I have done 20 second of testing (I'm traveling) so there may be adverse
effects. But it looked OK.
Have a nice weekend.
—Rasmus
--
With monopolies the cake is a lie!
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org.el-Alter-caption-label-formatting.patch --]
[-- Type: text/x-diff, Size: 1085 bytes --]
From bdfbda33ee01200f52393884c51e8fc865f8ec0c Mon Sep 17 00:00:00 2001
From: Rasmus <rasmus@gmx.us>
Date: Fri, 5 Jun 2015 07:38:13 +0200
Subject: [PATCH] org.el: Alter caption label formatting
* org.el (org-fontify-meta-lines-and-blocks-1): Caption labels
retain normally formatted.
---
lisp/org.el | 4 ----
1 file changed, 4 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 62684e9..81d1022 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5951,12 +5951,8 @@ by a #."
'(font-lock-fontified t face org-document-info))))
((equal dc1 "+caption:")
(org-remove-flyspell-overlays-in (match-end 2) (match-end 0))
- (remove-text-properties (match-beginning 0) (match-end 0)
- '(display t invisible t intangible t))
(add-text-properties (match-beginning 1) (match-end 3)
'(font-lock-fontified t face org-meta-line))
- (add-text-properties (match-beginning 6) (+ (match-end 6) 1)
- '(font-lock-fontified t face org-block))
t)
((member dc3 '(" " ""))
(org-remove-flyspell-overlays-in beg (match-end 0))
--
2.4.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Links in #+caption: lines
2015-06-05 5:48 ` Rasmus
@ 2015-06-05 6:57 ` Nicolas Goaziou
2015-06-05 8:41 ` Thomas S. Dye
2015-06-05 15:45 ` Rasmus
0 siblings, 2 replies; 11+ messages in thread
From: Nicolas Goaziou @ 2015-06-05 6:57 UTC (permalink / raw
To: Rasmus; +Cc: emacs-orgmode, tsd
Hello,
Rasmus <rasmus@gmx.us> writes:
> Try the attached patch.
>
> I have done 20 second of testing (I'm traveling) so there may be adverse
> effects. But it looked OK.
With this patch, you remove fontification from caption contents, which
is not desirable. Caption is an affiliated keyword and should be marked
as such.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Links in #+caption: lines
2015-06-05 6:57 ` Nicolas Goaziou
@ 2015-06-05 8:41 ` Thomas S. Dye
2015-06-05 15:45 ` Rasmus
1 sibling, 0 replies; 11+ messages in thread
From: Thomas S. Dye @ 2015-06-05 8:41 UTC (permalink / raw
To: Rasmus; +Cc: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Rasmus <rasmus@gmx.us> writes:
>
>> Try the attached patch.
>>
>> I have done 20 second of testing (I'm traveling) so there may be adverse
>> effects. But it looked OK.
>
> With this patch, you remove fontification from caption contents, which
> is not desirable. Caption is an affiliated keyword and should be marked
> as such.
Is it possible to have descriptive links in captions?
All the best,
Tom
--
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Links in #+caption: lines
2015-06-05 6:57 ` Nicolas Goaziou
2015-06-05 8:41 ` Thomas S. Dye
@ 2015-06-05 15:45 ` Rasmus
2015-06-09 7:22 ` Nicolas Goaziou
1 sibling, 1 reply; 11+ messages in thread
From: Rasmus @ 2015-06-05 15:45 UTC (permalink / raw
To: tsd; +Cc: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Rasmus <rasmus@gmx.us> writes:
>
>> Try the attached patch.
>>
>> I have done 20 second of testing (I'm traveling) so there may be adverse
>> effects. But it looked OK.
>
> With this patch, you remove fontification from caption contents, which
> is not desirable. Caption is an affiliated keyword and should be marked
> as such.
I was not proposing merging it. Perhaps it can be changed to an advice or
something.
Would it be possible to specify inheritance priority? So that e.g. link
would retain the blue coloring?
Rasmus
--
Vote for Dick Taid in an election near you!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Links in #+caption: lines
2015-06-05 15:45 ` Rasmus
@ 2015-06-09 7:22 ` Nicolas Goaziou
2015-06-09 17:18 ` Thomas S. Dye
0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2015-06-09 7:22 UTC (permalink / raw
To: Rasmus; +Cc: emacs-orgmode, tsd, Kaushal
Rasmus <rasmus@gmx.us> writes:
> Would it be possible to specify inheritance priority? So that e.g. link
> would retain the blue coloring?
One solution would be to split fontification of raw keywords and blocks
OTOH and blocks that can contain Org data OTOH, as suggested by Kaushal
(<http://permalink.gmane.org/gmane.emacs.orgmode/97530>, Cc'ed).
Link fontification would happen after the latter, but before the former.
Anyway, after 8.3 release (or maybe 8.4 depending on the bugs
encountered), we'll have to drop regexp fontification for parser
fontification so this problem will simply disappear.
Regards,
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Links in #+caption: lines
2015-06-09 7:22 ` Nicolas Goaziou
@ 2015-06-09 17:18 ` Thomas S. Dye
0 siblings, 0 replies; 11+ messages in thread
From: Thomas S. Dye @ 2015-06-09 17:18 UTC (permalink / raw
To: Rasmus; +Cc: emacs-orgmode, Kaushal
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Rasmus <rasmus@gmx.us> writes:
>
>> Would it be possible to specify inheritance priority? So that e.g. link
>> would retain the blue coloring?
>
> One solution would be to split fontification of raw keywords and blocks
> OTOH and blocks that can contain Org data OTOH, as suggested by Kaushal
> (<http://permalink.gmane.org/gmane.emacs.orgmode/97530>, Cc'ed).
>
> Link fontification would happen after the latter, but before the former.
>
> Anyway, after 8.3 release (or maybe 8.4 depending on the bugs
> encountered), we'll have to drop regexp fontification for parser
> fontification so this problem will simply disappear.
Sounds good to me. Full speed ahead on 8.3/8.4 then.
All the best,
Tom
--
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2015-06-09 17:18 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-03 6:08 Links in #+caption: lines Thomas S. Dye
2015-06-03 11:25 ` Rasmus
2015-06-03 16:48 ` Thomas S. Dye
2015-06-03 20:26 ` Rasmus
2015-06-05 0:05 ` Thomas S. Dye
2015-06-05 5:48 ` Rasmus
2015-06-05 6:57 ` Nicolas Goaziou
2015-06-05 8:41 ` Thomas S. Dye
2015-06-05 15:45 ` Rasmus
2015-06-09 7:22 ` Nicolas Goaziou
2015-06-09 17:18 ` Thomas S. Dye
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.