Re: [O] Clean up org-faces.el

2018-04-08 Thread Vikas Rawal
> 
> off topic here, but the problem with visual-line-mode for me is that
> at least in 24.4 it does not respect fill column.  this is a
> dealbreaker.  i stick with m-q.

There is a visual-fill-column-mode. Have you tried that?

Vikas



Re: [O] Clean up org-faces.el

2018-04-08 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


Rasmus  writes:

> Hi,
>
> stardiviner  writes:
>
>> Add face for inline src: src_ruby{require 'library'}
>>
>> Here is my custom face: ...
>
> Are you saying that we should display inline calls better?
>
> Rasmus

Yes, currently it seems does not have font-lock yet.

- -- 
[ stardiviner ] don't need to convince with trends.
   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  
-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlrK0+kACgkQG13xyVro
msNLhAf8DQlW4Iq/UMq7IpmWUQC0RTifkNbAFrtTABZukjYjbGJesh++EBOMEANJ
8sHPZhD4fIGCRfOx7SmyLNd29vhDCDwMtlopmWMydSvMw7hs9uljtQPSaps3rYrt
R32DZ+rg809aOBHBB/o5ksT1WZNubZIUX+6MuJ1m53J23ZXAo/7sjBubERWpwOqL
M7SGfxy8+7EicuuO7+7HWNP2ATVYW5fHzUFT1bL1kMD7R4g+TjPu7qwCEZrWYNXK
XKnJXuXPt3qk+ASY1r9WwPInTxlz7qVe0bjO3vnTlTtJb596dD+K1eIv54Tyc2+4
ZKNSsJt6kUKouk0iGqryMwgKdAU8kw==
=+sIt
-END PGP SIGNATURE-



Re: [O] Clean up org-faces.el

2018-04-08 Thread Diego Zamboni

> that is a great blog post!  lots of good detail.  and visually pleasing 
> itself.

Thanks! I recently started using ox-hugo for my blogging, and it works great.

> off topic here, but the problem with visual-line-mode for me is that
> at least in 24.4 it does not respect fill column.  this is a
> dealbreaker.  i stick with m-q.

It still doesn’t (I’m using 25.3.2), but I have become used to adjusting the 
width of my Emacs window to match what I want to do - make it full-width for 
coding, and half- or two-thirds for prose. The lines then adjust to the width 
of the window automatically.

Thinking about it, I’m not sure it’s even possible, since fill-column (just 
like m-q) works based on number of characters in a line, which is not a good 
indicator with proportional fonts. There would need to be some other way to 
indicate where to wrap the line that does not depend on number of characters (I 
guess this is what setting the window width does, in fact).

> in any case pleased that this stuff is being made /even better/ by rasmus.

Fully agree!

—Diego




Re: [O] Clean up org-faces.el

2018-04-08 Thread Samuel Wales
that is a great blog post!  lots of good detail.  and visually pleasing itself.

off topic here, but the problem with visual-line-mode for me is that
at least in 24.4 it does not respect fill column.  this is a
dealbreaker.  i stick with m-q.

the variable line-spacing is defined in c, so that might need to be
made more subtle in c.  i have not noticed the issue.  at least (list
(frame-width) (frame-height is identical whether variable or
fixed.

in any case pleased that this stuff is being made /even better/ by rasmus.

-- 
The Kafka Pandemic: 

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
.



Re: [O] Clean up org-faces.el

2018-04-08 Thread Samuel Wales
ah, i have org-block fixed also and did not update the list of things
not separate.

   (org-block ((t (:inherit fixed-pitch :foreground "#70b020"
   (org-date ((t (:inherit fixed-pitch :foreground "#806ab0"
:underline t
   (org-date-selected ((t (:inherit fixed-pitch :background "Pink"
   (org-table ((t (:inherit fixed-pitch :foreground "#70a000"

also org-code and rcirc-timestamp.


On 4/8/18, Diego Zamboni  wrote:
> Hi Samuel,
>
> Agree, I have started using variable pitch in org-mode and it has made it
> much more enjoyable.
>
> I recently documented my configuration here:
> http://zzamboni.org/post/beautifying-org-mode-in-emacs/
> 
>
> About your point (1.3), I have source blocks set to fixed-pitch by
> configuring the “org-block” face, works well.
>
> Best,
> —Diego
>
>
>
>> On 8 Apr 2018, at 21:08, Samuel Wales  wrote:
>>
>> On 4/8/18, Rasmus  wrote:
>>> I have been wanting to clean up org-faces.el for a couple of years.
>>
>> thanks.
>>
>> fwiw on variable pitch.
>>
>> i find that variable pitch reads legibly.  is efficient with
>> horizontal space, and looks great.  it also makes the mode
>> line short.  took a few days to get used to, then it got awesome.  i
>> will never go back.
>>
>> in my .emacs i made tables, example block contents, and
>> timestamps be fixed-pitch.  you want those to align.
>>
>> it works great in org.
>>
>> the only issues i have found in org are:
>>
>>  1) these items do not seem to have their own face and thus
>> cannot yet be made to be fixed pitch:
>> 1) list bullets
>> 2) the spaces before list items and contents
>> 3) source block contents
>> 4) numbers and number components like .-,+
>>  2) tags do not get aligned to the same window-pixel
>>  3) by default, c-c ' does not run prog-mode hooks where necessary to
>> turn it off.  or something.  trivial workaround is setting mode in the
>> block.  so not really a problem.
>>
>>
>> samuel
>>
>
>


-- 
The Kafka Pandemic: 

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
.



Re: [O] Clean up org-faces.el

2018-04-08 Thread Diego Zamboni
Hi Samuel,

Agree, I have started using variable pitch in org-mode and it has made it much 
more enjoyable.

I recently documented my configuration here: 
http://zzamboni.org/post/beautifying-org-mode-in-emacs/ 


About your point (1.3), I have source blocks set to fixed-pitch by configuring 
the “org-block” face, works well.

Best,
—Diego



> On 8 Apr 2018, at 21:08, Samuel Wales  wrote:
> 
> On 4/8/18, Rasmus  wrote:
>> I have been wanting to clean up org-faces.el for a couple of years.
> 
> thanks.
> 
> fwiw on variable pitch.
> 
> i find that variable pitch reads legibly.  is efficient with
> horizontal space, and looks great.  it also makes the mode
> line short.  took a few days to get used to, then it got awesome.  i
> will never go back.
> 
> in my .emacs i made tables, example block contents, and
> timestamps be fixed-pitch.  you want those to align.
> 
> it works great in org.
> 
> the only issues i have found in org are:
> 
>  1) these items do not seem to have their own face and thus
> cannot yet be made to be fixed pitch:
> 1) list bullets
> 2) the spaces before list items and contents
> 3) source block contents
> 4) numbers and number components like .-,+
>  2) tags do not get aligned to the same window-pixel
>  3) by default, c-c ' does not run prog-mode hooks where necessary to
> turn it off.  or something.  trivial workaround is setting mode in the
> block.  so not really a problem.
> 
> 
> samuel
> 



Re: [O] Clean up org-faces.el

2018-04-08 Thread Samuel Wales
On 4/8/18, Rasmus  wrote:
> I have been wanting to clean up org-faces.el for a couple of years.

thanks.

fwiw on variable pitch.

i find that variable pitch reads legibly.  is efficient with
horizontal space, and looks great.  it also makes the mode
line short.  took a few days to get used to, then it got awesome.  i
will never go back.

in my .emacs i made tables, example block contents, and
timestamps be fixed-pitch.  you want those to align.

it works great in org.

the only issues i have found in org are:

  1) these items do not seem to have their own face and thus
 cannot yet be made to be fixed pitch:
 1) list bullets
 2) the spaces before list items and contents
 3) source block contents
 4) numbers and number components like .-,+
  2) tags do not get aligned to the same window-pixel
  3) by default, c-c ' does not run prog-mode hooks where necessary to
turn it off.  or something.  trivial workaround is setting mode in the
block.  so not really a problem.


samuel



Re: [O] Clean up org-faces.el

2018-04-08 Thread Daniele Nicolodi
On 08/04/2018 11:33, Rasmus wrote:
> Daniele Nicolodi  writes:
> 
>> On 08/04/2018 07:27, Rasmus wrote:
>>> I have been wanting to clean up org-faces.el for a couple of years.
>>
>> Only tangentially related: is there a way to have a different face for
>> tables content and tables structure (ie the grid)?  The default blue
>> hurts my eyes :-)
> 
> That’s a nice idea.
> 
> At the moment it’s not possible as it’s the same face for table contents
> and table borders.  It shouldn’t be too hard to add since cells are
> recognized by org-element.  It would solve another of my issues.  I
> typically display links in variable pitch, but when they then go into
> tables, it breaks the alignment.

I can look into it, but it may take a while for me to figure it out.

Cheers,
Dan



Re: [O] Clean up org-faces.el

2018-04-08 Thread Rasmus
Hi,

stardiviner  writes:

> Add face for inline src: src_ruby{require 'library'}
>
> Here is my custom face: ...

Are you saying that we should display inline calls better?

Rasmus

-- 
Warning: Everything saved will be lost




Re: [O] Clean up org-faces.el

2018-04-08 Thread Rasmus
Daniele Nicolodi  writes:

> On 08/04/2018 07:27, Rasmus wrote:
>> I have been wanting to clean up org-faces.el for a couple of years.
>
> Only tangentially related: is there a way to have a different face for
> tables content and tables structure (ie the grid)?  The default blue
> hurts my eyes :-)

That’s a nice idea.

At the moment it’s not possible as it’s the same face for table contents
and table borders.  It shouldn’t be too hard to add since cells are
recognized by org-element.  It would solve another of my issues.  I
typically display links in variable pitch, but when they then go into
tables, it breaks the alignment.

Rasmus

-- 
Dobbelt-A




Re: [O] Clean up org-faces.el

2018-04-08 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Add face for inline src: src_ruby{require 'library'}

Here is my custom face:

;; inline code face => src_ruby{require 'something'}
;;
;; (REGEXP . FACE)
;; Highlight REGEXP with FACE
;; (REGEXP N FACE)
;; Highlight group N in REGEXP with FACE
;; (REGEXP (N1 FACE1) (N2 FACE2) (N3 FACE3) …)
;; Highlight group Ni in REGEXP with FACEi
;;
;; src_lang{code...}[:header arguments] / NOTE: override by `org-verbatim'.
;; result in following =[result]=

;; src_
(font-lock-add-keywords
 'org-mode
 '(("\\(src_\\)\\([^[{]+\\)\\(\\[:.*\\]\\)\\({\\)\\([^}]*\\)\\(}\\)"
(1 '(:foreground "black" :weight 'normal :height 0.1)) ; src_ part
(2 '(:foreground "cyan" :weight 'bold :height 0.8 :box '(:color "light 
gray"))) ; "lang" part.
(3 '(:foreground "#55" :height 0.7)) ; [:header arguments] part.
(4 '(:foreground "#33")) ; {
(5 'org-code) ; "code..." part.
(6 '(:foreground "#33")) ; }
))
 'append)

;; src without arguments
(font-lock-add-keywords
 'org-mode
 '(("\\(src_\\)\\([^[{]+\\)\\({\\)\\([^}]*\\)\\(}\\)"
(1 '(:foreground "black" :weight 'normal :height 0.1)) ; src_ part
(2 '(:foreground "cyan" :weight 'bold :height 0.8 :box '(:color "light 
gray"))) ; "lang" part.
(3 '(:foreground "#33")) ; {
(4 'org-code) ; "code..." part.
(5 '(:foreground "#33")) ; }
))
 'append)

;; inline babel call
;; ... call_[]()[] ...
(font-lock-add-keywords
 'org-mode
 '(("\\(call_\\)\\([^[(]*\\)\\[\\(.*\\)\\](\\(.*\\))\\[\\(.*\\)\\]"
;; "\\(call_\\)\\([^[(]*\\)\\([([][^)]*]\\)+"
(1 '(:foreground "orange red" :height 0.6)) ; call_
(2 '(:foreground "yellow" :weight 'bold :underline "dark gray")) ; 
(3 '(:foreground "gray" :height 0.6)) ; []
(4 '(:foreground "cyan" :weight 'bold)) ; ()
(5 '(:foreground "gray" :height 0.6)) ; []
))
 'append)

;; call_[]()
(font-lock-add-keywords
 'org-mode
 '(("\\(call_\\)\\([^[(]*\\)\\[\\(.*\\)\\](\\(.*\\))"
(1 '(:foreground "orange red" :height 0.6)) ; call_
(2 '(:foreground "yellow" :weight 'bold :underline "dark gray")) ; 
(3 '(:foreground "gray" :height 0.6)) ; []
(4 '(:foreground "cyan" :weight 'bold)) ; ()
))
 'append)

;; call_(arguments)
(font-lock-add-keywords
 'org-mode
 '(("\\(call_\\)\\([^[(]*\\)\\((.*)\\)"
(1 '(:foreground "orange red" :height 0.6)) ; call_
(2 '(:foreground "yellow" :weight 'bold :underline "dark gray")) ; 
(3 '(:foreground "cyan" :weight 'bold)) ; ()
))
 'append)

- -- 
[ stardiviner ] don't need to convince with trends.
   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  
-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlrKOvwACgkQG13xyVro
msPuAwf/WNhzQi6UNCfO/Oeb6Mh5O+OwXK9wDU8rZI+pxN17XrBhGEqsLgDUO3RF
W/vmMs49a1C45Id5xlRZXiZ16oC6nuIWjP4W7syorf7WIZismk6AncsATin5DfiG
TzrmZ2jjpHhucr8kjbCji3r5/ch/JZUJ52MQVsmD4MqyG/RSVUknbDRJD0qWsaxJ
AComyyaNqQbtWPwi0s896RKa+aWPTXg62Yq26Z0k5ANwh022APRu/ona4FIVMmbN
fEGflIgfXmDPkqZg9O8v9WPVwq0ZhA4kc+3+Efkatwf9nmPW2BtHi2eTo/+c50Jh
WgwPhqMf7CYdUUEOaxx4UdqcDe1JUQ==
=bJNn
-END PGP SIGNATURE-



Re: [O] Clean up org-faces.el

2018-04-08 Thread Daniele Nicolodi
On 08/04/2018 07:27, Rasmus wrote:
> I have been wanting to clean up org-faces.el for a couple of years.

Only tangentially related: is there a way to have a different face for
tables content and tables structure (ie the grid)?  The default blue
hurts my eyes :-)

Cheers,
Dan



Re: [O] Clean up org-faces.el

2018-04-08 Thread Nicolas Goaziou
Rasmus  writes:

> I have been wanting to clean up org-faces.el for a couple of years.

Good idea.

> However, it would be useful to know what sort of ideas there are about
> faces.  E.g. I know that faces are eventually to reflect the element
> type.

Faces predate elements, so faces and elements may not perfectly match.
It would be good if they did, though.