From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Salazar Subject: Re: block quotes in prose? Date: Mon, 4 Feb 2013 23:10:47 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d042f949aee9c5c04d4f26456 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2Zrv-0004fi-5R for emacs-orgmode@gnu.org; Mon, 04 Feb 2013 23:10:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2Zrt-0004wT-D9 for emacs-orgmode@gnu.org; Mon, 04 Feb 2013 23:10:51 -0500 Received: from mail-da0-f52.google.com ([209.85.210.52]:47280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2Zrs-0004wM-Uy for emacs-orgmode@gnu.org; Mon, 04 Feb 2013 23:10:49 -0500 Received: by mail-da0-f52.google.com with SMTP id f10so2933542dak.39 for ; Mon, 04 Feb 2013 20:10:47 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Hendy Cc: org-mode --f46d042f949aee9c5c04d4f26456 Content-Type: text/plain; charset=ISO-8859-1 I think an easy workaround would be to define block quotes as code blocks instead. putting the ":" as a prefix before a paragraph automatically fontifies it and places it in another color. This allows me to work in org-mode with visual highlighting of block quotes as desired. Now the question is: How do I make org-mode recognize the ">" prefix as a demarcator of a code block, so that my document remains readable as Markdown? Thanks! On Wed, Jan 23, 2013 at 12:03 AM, John Hendy wrote: > On Tue, Jan 22, 2013 at 6:13 PM, Peter Salazar > wrote: > > 1. What's the best way to demarcate block quotes in org-mode? I'd like a > way > > to demarcate them that makes it visually clear at a glance that it's a > block > > quote and not regular text. > > > > I would prefer not to have to put them inside #+BEGIN_QUOTE and > #+END_QUOTE > > references, because I'd rather not have any content in my buffer that > > distracts me from my actual writing. > > > > In Markdown-Mode, for instance, I just prefix a block quote with a > and > the > > line automatically changes color: > > > > http://i.imgur.com/AUsYJ.png > > > > Org-mode is infinitely more powerful than Markdown-Mode, so I'd just > like a > > way to work with lots of prose and block quotes in org-mode that will be > > easy and visually pleasing. I'm primarily concerned about how it appears > in > > the org-mode editor, not in export. > > > > Looking around, at least some of this appears defined in > /path/to/org-src/lisp/org-faces.el. > > I don't know enough elisp to tell you how to make Org treat "> > text..." the same as #+begin_quote. > > Perhaps you could figure out where the face change is for lines like > #+latex: and #+begin_src, as they both change the face of the text > immediately after (no need for an #+end_ command to tell Org to go > back to the default face). You might be able to add "^> text" to the > list of face-sensitive regexps to look for (using ^ as symbol for > beginning of line). > > ETA: after some more grepping, it looks like you could add something > in two places: > > 1) org-faces.el > > Search the file for "defface" and make a new face. I've not done this, > but you can definitely copy/yank some existing definitions and tweak > to your liking. > > 2) org.el > > Find a matching fontify function to see how the fontification is done. > They look pretty complicated... but perhaps it's possible to tweak one > to fontify "^> text...". > > Perhaps the easiest would be to find a face you like and just add "^> > text..." to the existing list of things org already fontifies with > that style. In other words, add "^> text" regexp to the existing hunt > for lines that start with #+ in order to get src code fontification > applied. > > > 2. It would also be cool to find a way to make bulleted lists appear in a > > different color if possible, or a workaround to simulate this. > > As in? > - item 1 > - item 2 > > I'm sure that's possible, too. Can't imagine this will become global, > but you could surely create your own git branch if you figure out how > or someone tells you how. > > > Good luck! > John > > > > > > Thanks! > > > > > --f46d042f949aee9c5c04d4f26456 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I think an easy workaround would be to define block quotes as code blocks i= nstead.=A0

putting the ":" as a prefix before = a paragraph automatically fontifies it and places it in another color.=A0

This allows me to work in org-mode with visual highligh= ting of block quotes as desired.

Now the question = is: How do I make org-mode recognize the ">" prefix as a demar= cator of a code block, so that my document remains readable as Markdown?

Thanks!


On= Wed, Jan 23, 2013 at 12:03 AM, John Hendy <jw.hendy@gmail.com> wrote:
On Tue, Jan 22, 2013 at 6:= 13 PM, Peter Salazar <cycleofso= ng@gmail.com> wrote:
> 1. What's the best way to demarcate block quotes in org-mode? I= 9;d like a way
> to demarcate them that makes it visually clear at a glance that it'= ;s a block
> quote and not regular text.
>
> I would prefer not to have to put them inside #+BEGIN_QUOTE and #+END_= QUOTE
> references, because I'd rather not have any content in my buffer t= hat
> distracts me from my actual writing.
>
> In Markdown-Mode, for instance, I just prefix a block quote with a >= ; and the
> line automatically changes color:
>
> http://i.im= gur.com/AUsYJ.png
>
> Org-mode is infinitely more powerful than Markdown-Mode, so I'd ju= st like a
> way to work with lots of prose and block quotes in org-mode that will = be
> easy and visually pleasing. I'm primarily concerned about how it a= ppears in
> the org-mode editor, not in export.
>

Looking around, at least some of this appears defined in
/path/to/org-src/lisp/org-faces.el.

I don't know enough elisp to tell you how to make Org treat "><= br> text..." the same as #+begin_quote.

Perhaps you could figure out where the face change is for lines like
#+latex: and #+begin_src, as they both change the face of the text
immediately after (no need for an #+end_ command to tell Org to go
back to the default face). You might be able to add "^> text" = to the
list of face-sensitive regexps to look for (using ^ as symbol for
beginning of line).

ETA: after some more grepping, it looks like you could add something
in two places:

1) org-faces.el

Search the file for "defface" and make a new face. I've not d= one this,
but you can definitely copy/yank some existing definitions and tweak
to your liking.

2) org.el

Find a matching fontify function to see how the fontification is done.
They look pretty complicated... but perhaps it's possible to tweak one<= br> to fontify "^> text...".

Perhaps the easiest would be to find a face you like and just add "^&g= t;
text..." to the existing list of things org already fontifies with
that style. In other words, add "^> text" regexp to the existi= ng hunt
for lines that start with #+ in order to get src code fontification
applied.

> 2. It would also be cool to find a way to make bulleted lists appear i= n a
> different color if possible, or a workaround to simulate this.

As in?
- item 1
- item 2

I'm sure that's possible, too. Can't imagine this will become g= lobal,
but you could surely create your own git branch if you figure out how
or someone tells you how.


Good luck!
John


>
> Thanks!
>
>

--f46d042f949aee9c5c04d4f26456--