From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scot Becker Subject: Re: suggestion: display of #+TITLE Date: Wed, 24 Mar 2010 20:22:14 +0000 Message-ID: References: <87wrxcnsig.fsf@stats.ox.ac.uk> <87r5nhr9qr.fsf@stats.ox.ac.uk> <877hp5i1wl.fsf@stats.ox.ac.uk> <161BB572-48B8-4E1C-9437-EAA3A0863465@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1156844544==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NuX6G-0005mB-I0 for emacs-orgmode@gnu.org; Wed, 24 Mar 2010 16:22:48 -0400 Received: from [140.186.70.92] (port=58613 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuX6B-0005ii-Mc for emacs-orgmode@gnu.org; Wed, 24 Mar 2010 16:22:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuX64-00068V-AW for emacs-orgmode@gnu.org; Wed, 24 Mar 2010 16:22:43 -0400 Received: from mail-pw0-f41.google.com ([209.85.160.41]:35423) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuX63-00068K-RV for emacs-orgmode@gnu.org; Wed, 24 Mar 2010 16:22:36 -0400 Received: by pwi2 with SMTP id 2so992335pwi.0 for ; Wed, 24 Mar 2010 13:22:34 -0700 (PDT) In-Reply-To: <161BB572-48B8-4E1C-9437-EAA3A0863465@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: Dan Davison , emacs org-mode mailing list --===============1156844544== Content-Type: multipart/alternative; boundary=000e0cd1acf0bfe12c048291b019 --000e0cd1acf0bfe12c048291b019 Content-Type: text/plain; charset=ISO-8859-1 Or what about---in the spirit of the 'hidden' outline stars---the option to set "#+TITLE:" and friends in a 'barely visible' color, and in the 'standard' font of the document, if that's possible. As sexy as it is, really hiding the markup is a fair break from most (all?) of 'standard' org mode, where what you see is what you got. Even the invisible starts are there when you cursor over them. Just my 2p. Scot On Wed, Mar 24, 2010 at 2:52 PM, Carsten Dominik wrote: > Hi Dan, > > I think the patch is almost good. I do like the larger face > for the title, and I know that some themes also use larger faces > for headlines. > > But I think we at least need a variable > governing if the keyword will be made invisible or not. > If you type "#+email:", for example, that string does disappear > without a trace, and that is very confusing. In fact, my preference > would be to not make the keyword invisible. > > Thanks > > - Carsten > > > On Mar 22, 2010, at 2:24 AM, Dan Davison wrote: > > Dan Davison writes: >> >> Carsten Dominik writes: >>> >>> On Mar 16, 2010, at 5:25 PM, Dan Davison wrote: >>>> >>>> Might it be worth considering a special display for the #+title line >>>>> in >>>>> org buffers? >>>>> >>>>> Currently it is easy for the title to get buried among more technical >>>>> configuration lines like #+options, #+startup, #+seq_toto etc. One can >>>>> take the approach of leaving #+title at the top of the document, and >>>>> moving the other config lines elesewhere, but even so I am wondering >>>>> whether anyone else is attracted by the idea of providing an org-title >>>>> display property that would hide the #+title: component, and use an >>>>> appropriate face for the title text. >>>>> >>>>> In some ways, the current state gives the impression that the title is >>>>> something which becomes important during export, but is not really a >>>>> key >>>>> component of document when it is being viewed in emacs. For example, I >>>>> expect others are familiar with the experience of exporting an org >>>>> file >>>>> without a title, finding that the first heading has been used as a >>>>> title, and then going back to add in the title as an >>>>> afterthought. But a >>>>> title is an important part of a document, and I thought perhaps a >>>>> special title display would help to make the title more of a first >>>>> class >>>>> citizen in org buffers? >>>>> >>>> >>>> Hi Dan, >>>> >>>> I agree. Maybe he same should be true for DATE and AUTHOR, maybe EMAIL? >>>> >>>> Would you like to make a patch for this, introducing a new face >>>> and applying it to these constructs? >>>> >>> >> I've made a proposed patch (below). This involved making a few decisions >> about appearance -- it would be great to get other peoples' views and >> alternative proposals. >> >> At the risk of stating the obvious, I think we should ask the question >> "What might attract new users to org-mode most?", rather than query our >> personal preferences (because we can all change it ourselves or fire off >> an email to this list asking how). >> >> Here's my main proposal (corresponding to the patch below). Note that in >> the first 4 lines the #+TITLE: and #+AUTHOR: etc bits are still there, >> but invisible. >> >> [I've also put the screenshots at >> http://www.princeton.edu/~ddavison/org-faces/] >> >> [Default-MidnightBlue.png] >> >> >> The main issue then is that I'm suggesting making the title face larger >> than the other faces. This would be the only large face in org-mode, but >> I thought that it was appropriate for the title. Here's a version >> without the large title face: >> >> [Default-MidnightBlue-NoBigTitle.png] >> >> >> As for the colours, here's an alternative: >> >> [Default-DarkSlateGrey.png] >> >> >> The important thing is the default emacs colour theme shown above, but I >> did pick a colour for dark backgrounds. For what it's worth, here is >> what it looks like with (the excellent) color-theme-charcoal-black: >> >> [CharcoalBlack-SteelBlue.png] >> >> >> Here's the patch. If anyone wants to play around, it's pretty obvious in >> the patch below where to change the colours (and boldness and >> height). Don't forget the functions list-colors-display and >> list-faces-display. >> >> There's at least one issue with the patch: if you leave a space between >> e.g. '#+TITLE:' and the start of the title text, then that space will >> not be made invisible and so will appear at the start of the title. I >> couldn't see how to avoid that without altering one of the key font-lock >> regexps. >> >> Dan >> >> --8<---------------cut here---------------start------------->8--- >> commit 72aa791ea0bf613d50b9bf88affd6a53e91c1ebe >> Author: Dan Davison >> Date: Sun Mar 21 20:26:02 2010 -0400 >> >> Alter display of title, author, email and date lines. >> >> For each of #+TITLE:, #+AUTHOR:, #+EMAIL:, #+DATE:, the >> initial #+KEYWORD: part is hidden and the following new >> faces are applied to the remaining visible part: >> >> org-title-line >> org-author-line >> org-email-line >> org-date-line >> >> diff --git a/lisp/org-faces.el b/lisp/org-faces.el >> index e336b3c..ebc9596 100644 >> --- a/lisp/org-faces.el >> +++ b/lisp/org-faces.el >> @@ -468,6 +468,25 @@ changes." >> :group 'org-faces >> :version "22.1") >> >> +(defface org-title-line >> + '((((class color) (background light)) (:foreground "midnight blue" >> :weight bold :height 1.44)) >> + (((class color) (background dark)) (:foreground "steel blue" :weight >> bold :height 1.44)) >> + (t (:weight bold :height 1.44))) >> + "Face for #+TITLE: line." >> + :group 'org-faces) >> + >> +(defface org-author-line >> + '((((class color) (background light)) (:foreground "midnight blue")) >> + (((class color) (background dark)) (:foreground "steel blue"))) >> + "Face for #+AUTHOR: line." >> + :group 'org-faces) >> + >> +(org-copy-face 'org-author-line 'org-email-line >> + "Face for #+EMAIL: line.") >> + >> +(org-copy-face 'org-author-line 'org-date-line >> + "Face for #+DATE: line.") >> + >> (defface org-block >> (org-compatible-face 'shadow >> '((((class color grayscale) (min-colors 88) (background light)) >> diff --git a/lisp/org.el b/lisp/org.el >> index b723528..17e3877 100644 >> --- a/lisp/org.el >> +++ b/lisp/org.el >> @@ -4642,6 +4642,22 @@ will be prompted for." >> ((string= block-type "verse") >> (add-text-properties beg1 end1 '(face org-verse)))) >> t)) >> + ((equal dc1 "title:") >> + (add-text-properties beg (match-end 3) '(font-lock-fontified t >> invisible t)) >> + (add-text-properties >> + (match-beginning 6) (match-end 6) '(font-lock-fontified t >> face org-title-line))) >> + ((equal dc1 "author:") >> + (add-text-properties beg (match-end 3) '(font-lock-fontified t >> invisible t)) >> + (add-text-properties >> + (match-beginning 6) (match-end 6) '(font-lock-fontified t >> face org-author-line))) >> + ((equal dc1 "email:") >> + (add-text-properties beg (match-end 3) '(font-lock-fontified t >> invisible t)) >> + (add-text-properties >> + (match-beginning 6) (match-end 6) '(font-lock-fontified t >> face org-email-line))) >> + ((equal dc1 "date:") >> + (add-text-properties beg (match-end 3) '(font-lock-fontified t >> invisible t)) >> + (add-text-properties >> + (match-beginning 6) (match-end 6) '(font-lock-fontified t >> face org-date-line))) >> ((not (member (char-after beg) '(?\ ?\t))) >> ;; just any other in-buffer setting, but not indented >> (add-text-properties >> --8<---------------cut here---------------end--------------->8--- >> >> >> >> >>> OK, it's on my list. >>> >>> Dan >>> >>> >>>> - Carsten >>>> >>>> >>>> >>>> _______________________________________________ >>>> Emacs-orgmode mailing list >>>> Please use `Reply All' to send replies to the list. >>>> Emacs-orgmode@gnu.org >>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >>>> >>> >>> >>> _______________________________________________ >>> Emacs-orgmode mailing list >>> Please use `Reply All' to send replies to the list. >>> Emacs-orgmode@gnu.org >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >>> >> > - Carsten > > > > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > --000e0cd1acf0bfe12c048291b019 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Or what about---in the spirit of the 'hidden' outline stars---the o= ption to set "#+TITLE:" and friends in a 'barely visible'= color, and in the 'standard' font of the document, if that's p= ossible. =A0As sexy as it is, really hiding the markup is a fair break from= most (all?) of 'standard' org mode, where what you see is what you= got. =A0 =A0Even the invisible starts are there when you cursor over them.= =A0Just my 2p.

Scot


On We= d, Mar 24, 2010 at 2:52 PM, Carsten Dominik <carsten.dominik@gmail.com> wrote:
Hi Dan,

I think the patch is almost good. =A0I do like the larger face
for the title, and I know that some themes also use larger faces
for headlines.

But I think we at least need a variable
governing if the keyword will be made invisible or not.
If you type "#+email:", for example, that string does disappear without a trace, and that is very confusing. =A0In fact, my preference
would be to not make the keyword invisible.

Thanks

- Carsten


On Mar 22, 2010, at 2:24 AM, Dan Davison wrote:

Dan Davison <davison@stats.ox.ac.uk> writes:

Carsten Dominik <carsten.dominik@gmail.com> writes:

On Mar 16, 2010, at 5:25 PM, Dan Davison wrote:

Might it be worth considering a special display for the #+title line
in
org buffers?

Currently it is easy for the title to get buried among more technical
configuration lines like #+options, #+startup, #+seq_toto etc. One can
take the approach of leaving #+title at the top of the document, and
moving the other config lines elesewhere, but even so I am wondering
whether anyone else is attracted by the idea of providing an org-title
display property that would hide the #+title: component, and use an
appropriate face for the title text.

In some ways, the current state gives the impression that the title is
something which becomes important during export, but is not really a
key
component of document when it is being viewed in emacs. For example, I
expect others are familiar with the experience of exporting an org
file
without a title, finding that the first heading has been used as a
title, and then going back to add in the title as an
afterthought. But a
title is an important part of a document, and I thought perhaps a
special title display would help to make the title more of a first
class
citizen in org buffers?

Hi Dan,

I agree. =A0Maybe he same should be true for DATE and AUTHOR, maybe EMAIL?<= br>
Would you like to make a patch for this, introducing a new face
and applying it to these constructs?

I've made a proposed patch (below). This involved making a few decision= s
about appearance -- it would be great to get other peoples' views and alternative proposals.

At the risk of stating the obvious, I think we should ask the question
"What might attract new users to org-mode most?", rather than que= ry our
personal preferences (because we can all change it ourselves or fire off an email to this list asking how).

Here's my main proposal (corresponding to the patch below). Note that i= n
the first 4 lines the #+TITLE: and #+AUTHOR: etc bits are still there,
but invisible.

[I've also put the screenshots at http://www.princeton.edu/~ddavison/o= rg-faces/]

[Default-MidnightBlue.png]

<Default-MidnightBlue.png>
The main issue then is that I'm suggesting making the title face larger=
than the other faces. This would be the only large face in org-mode, but I thought that it was appropriate for the title. Here's a version
without the large title face:

[Default-MidnightBlue-NoBigTitle.png]

<Default-MidnightBlue-NoBigTitle.png>
As for the colours, here's an alternative:

[Default-DarkSlateGrey.png]

<Default-DarkSlateGrey.png>
The important thing is the default emacs colour theme shown above, but I did pick a colour for dark backgrounds. For what it's worth, here is what it looks like with (the excellent) color-theme-charcoal-black:

[CharcoalBlack-SteelBlue.png]

<CharcoalBlack-SteelBlue.png>
Here's the patch. If anyone wants to play around, it's pretty obvio= us in
the patch below where to change the colours (and boldness and
height). Don't forget the functions list-colors-display and
list-faces-display.

There's at least one issue with the patch: if you leave a space between=
e.g. '#+TITLE:' and the start of the title text, then that space wi= ll
not be made invisible and so will appear at the start of the title. I
couldn't see how to avoid that without altering one of the key font-loc= k
regexps.

Dan

--8<---------------cut here---------------start------------->8---
commit 72aa791ea0bf613d50b9bf88affd6a53e91c1ebe
Author: Dan Davison <davison@stats.ox.ac.uk>
Date: =A0 Sun Mar 21 20:26:02 2010 -0400

=A0 Alter display of title, author, email and date lines.

=A0 For each of #+TITLE:, #+AUTHOR:, #+EMAIL:, #+DATE:, the
=A0 initial #+KEYWORD: part is hidden and the following new
=A0 faces are applied to the remaining visible part:

=A0 org-title-line
=A0 org-author-line
=A0 org-email-line
=A0 org-date-line

diff --git a/lisp/org-faces.el b/lisp/org-faces.el
index e336b3c..ebc9596 100644
--- a/lisp/org-faces.el
+++ b/lisp/org-faces.el
@@ -468,6 +468,25 @@ changes."
=A0:group 'org-faces
=A0:version "22.1")

+(defface org-title-line
+ =A0'((((class color) (background light)) (:foreground "midnight = blue" :weight bold :height 1.44))
+ =A0 =A0(((class color) (background dark)) (:foreground "steel blue&q= uot; :weight bold :height 1.44))
+ =A0 =A0(t (:weight bold :height 1.44)))
+ =A0"Face for #+TITLE: line."
+ =A0:group 'org-faces)
+
+(defface org-author-line
+ =A0'((((class color) (background light)) (:foreground "midnight = blue"))
+ =A0 =A0(((class color) (background dark)) (:foreground "steel blue&q= uot;)))
+ =A0"Face for #+AUTHOR: line."
+ =A0:group 'org-faces)
+
+(org-copy-face 'org-author-line 'org-email-line
+ =A0"Face for #+EMAIL: line.")
+
+(org-copy-face 'org-author-line 'org-date-line
+ =A0"Face for #+DATE: line.")
+
(defface org-block
=A0(org-compatible-face 'shadow
=A0 =A0'((((class color grayscale) (min-colors 88) (background light))=
diff --git a/lisp/org.el b/lisp/org.el
index b723528..17e3877 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4642,6 +4642,22 @@ will be prompted for."
=A0 =A0 =A0 =A0 =A0 =A0 =A0 ((string=3D block-type "verse")
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(add-text-properties beg1 end1 '(face o= rg-verse))))
=A0 =A0 =A0 =A0 =A0 =A0 =A0t))
+ =A0 =A0 =A0 =A0 =A0((equal dc1 "title:")
+ =A0 =A0 =A0 =A0 =A0 (add-text-properties beg (match-end 3) '(font-loc= k-fontified t invisible t))
+ =A0 =A0 =A0 =A0 =A0 (add-text-properties
+ =A0 =A0 =A0 =A0 =A0 =A0(match-beginning 6) (match-end 6) '(font-lock-= fontified t face org-title-line)))
+ =A0 =A0 =A0 =A0 =A0((equal dc1 "author:")
+ =A0 =A0 =A0 =A0 =A0 (add-text-properties beg (match-end 3) '(font-loc= k-fontified t invisible t))
+ =A0 =A0 =A0 =A0 =A0 (add-text-properties
+ =A0 =A0 =A0 =A0 =A0 =A0(match-beginning 6) (match-end 6) '(font-lock-= fontified t face org-author-line)))
+ =A0 =A0 =A0 =A0 =A0((equal dc1 "email:")
+ =A0 =A0 =A0 =A0 =A0 (add-text-properties beg (match-end 3) '(font-loc= k-fontified t invisible t))
+ =A0 =A0 =A0 =A0 =A0 (add-text-properties
+ =A0 =A0 =A0 =A0 =A0 =A0(match-beginning 6) (match-end 6) '(font-lock-= fontified t face org-email-line)))
+ =A0 =A0 =A0 =A0 =A0((equal dc1 "date:")
+ =A0 =A0 =A0 =A0 =A0 (add-text-properties beg (match-end 3) '(font-loc= k-fontified t invisible t))
+ =A0 =A0 =A0 =A0 =A0 (add-text-properties
+ =A0 =A0 =A0 =A0 =A0 =A0(match-beginning 6) (match-end 6) '(font-lock-= fontified t face org-date-line)))
=A0 =A0 =A0 =A0 =A0 ((not (member (char-after beg) '(?\ =A0?\t)))
=A0 =A0 =A0 =A0 =A0 =A0;; just any other in-buffer setting, but not indent= ed
=A0 =A0 =A0 =A0 =A0 =A0(add-text-properties
--8<---------------cut here---------------end--------------->8---




OK, it's on my list.

Dan


- Carsten



_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gn= u.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gn= u.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten





_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gn= u.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

--000e0cd1acf0bfe12c048291b019-- --===============1156844544== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1156844544==--