emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Quote blocks face
@ 2009-05-12 13:38 Julien Barnier
  2009-05-12 14:06 ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Julien Barnier @ 2009-05-12 13:38 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

And first of all, thanks to everybody for this really great piece of
work that org-mode is. I think I discover a new feature almost every
day. :-)

I've got one little question : is there a simple way to customize the
face of some «environments» inside Emacs ? More precisely, I'd like to
make everything between #+BEGIN_QUOTE and #+END_QUOTE to be displayed
in italic...

Thanks a lot in advance,

-- 
Julien

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

* Re: Quote blocks face
  2009-05-12 13:38 Quote blocks face Julien Barnier
@ 2009-05-12 14:06 ` Carsten Dominik
  2009-05-12 21:09   ` Scot Becker
  2009-05-13 12:05   ` Scot Becker
  0 siblings, 2 replies; 5+ messages in thread
From: Carsten Dominik @ 2009-05-12 14:06 UTC (permalink / raw)
  To: Julien Barnier; +Cc: emacs-orgmode


On May 12, 2009, at 3:38 PM, Julien Barnier wrote:

> Hi,
>
> And first of all, thanks to everybody for this really great piece of
> work that org-mode is. I think I discover a new feature almost every
> day. :-)
>
> I've got one little question : is there a simple way to customize the
> face of some «environments» inside Emacs ? More precisely, I'd like to
> make everything between #+BEGIN_QUOTE and #+END_QUOTE to be displayed
> in italic...

No, Org-mode cannot fontify blocks.  I have not been
able to figure out how to do this.

- Carsten

>
> Thanks a lot in advance,
>
> -- 
> Julien
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Quote blocks face
  2009-05-12 14:06 ` Carsten Dominik
@ 2009-05-12 21:09   ` Scot Becker
       [not found]     ` <m2zldh6hri.fsf@gmail.com>
  2009-05-13 12:05   ` Scot Becker
  1 sibling, 1 reply; 5+ messages in thread
From: Scot Becker @ 2009-05-12 21:09 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode, Julien Barnier


[-- Attachment #1.1: Type: text/plain, Size: 728 bytes --]

I have managed to do multiple-line fontification in Emacs (and I think in
org) using hi-lock mode:
M-x hi-lock-face-buffer <REGEX> RET
italic RET

But I can't for the life of me get that regex back which could span multiple
lines.  I was sure I grouped '.' and the newline character somehow, but I
can't reclaim it.  Maybe someone else has an idea.

If you get it figured out, you can then write the hi-lock regexp's into your
file, and set things up so that they get read every time the file is loaded
(with or without confirmation).

It worked for me in a limited trial but I'm not sure how hi-lock would
interact with org over the long haul.  It certainly has the potential to
slow things down, but I never noticed it.

Scot

[-- Attachment #1.2: Type: text/html, Size: 846 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

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

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

* Re: Quote blocks face
  2009-05-12 14:06 ` Carsten Dominik
  2009-05-12 21:09   ` Scot Becker
@ 2009-05-13 12:05   ` Scot Becker
  1 sibling, 0 replies; 5+ messages in thread
From: Scot Becker @ 2009-05-13 12:05 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode, Julien Barnier

Eric S. sent this to me :

>
> I use [^\000]+ for a multiline regexp (learned this from the org-mode
> code actually).  It seems to match pretty much everything.

In that case something like this should work as a regexp value for
M-x hi-lock-face-buffer:

^#\+BEGIN_QUOTE[^\000]+?\+END_QUOTE

face: italic

... should work, but it only matches the first time for me, not every
time as I would expect.

Scot

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

* Re: Quote blocks face
       [not found]       ` <e0e1fe620905130316q5fb6e230q5c46fb5be53f76a1@mail.gmail.com>
@ 2009-05-13 19:47         ` Eric Schulte
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Schulte @ 2009-05-13 19:47 UTC (permalink / raw)
  To: Scot Becker; +Cc: Org Mode List

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

Hi Scot,

The following regexp[1] was able to highlight the first two blocks for
me in this buffer


[-- Attachment #2: test.org --]
[-- Type: application/octet-stream, Size: 200 bytes --]



regexp
#\+begin_quote[^\000]+?\+end_quote

#+begin_quote 
This is the first quote
#+end_quote

#+begin_quote 
and this is the second
#+end_quote

#+BEGIN_QUOTE
and this quote is in caps
#+END_QUOTE

[-- Attachment #3: Type: text/plain, Size: 715 bytes --]



It would be nice if there was a way to only highlight the contents of
the blocks, rather than the blocks themselves, or if there was an easy
way to match both capital/lower-case letters.  Cheers -- Eric

[1] #\+begin_quote[^\000]+?\+end_quote

Scot Becker <scot.becker@gmail.com> writes:

>>
>> I use [^\000]+ for a multiline regexp (learned this from the org-mode
>> code actually).  It seems to match pretty much everything.
>
> In that case something like this should work as a regexp value for
> hi-lock-face-buffer:
>
> ^#\+BEGIN_QUOTE[^\000]+?\+END_QUOTE
>
> face: italic
>
> ... should work, but it only matches the first time for me, not every
> time as I would expect.
>
> Scot

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

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

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

end of thread, other threads:[~2009-05-13 19:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-12 13:38 Quote blocks face Julien Barnier
2009-05-12 14:06 ` Carsten Dominik
2009-05-12 21:09   ` Scot Becker
     [not found]     ` <m2zldh6hri.fsf@gmail.com>
     [not found]       ` <e0e1fe620905130316q5fb6e230q5c46fb5be53f76a1@mail.gmail.com>
2009-05-13 19:47         ` Eric Schulte
2009-05-13 12:05   ` Scot Becker

Code repositories for project(s) associated with this 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).