[Orgmode] Re: Orgmode[PATCH 4/4] Add handling of blockquote and output formats that must be flowed.

2010-04-30 Thread Wes Hardaker
 On Thu, 29 Apr 2010 10:00:43 -0500, Robert Goldman 
 rpgold...@real-time.com said:

RG So what I wanted here was newlines /only/ where the paragraphs
RG break.

The other potentially better thing to do then is rather than use a
boolean add-newline type variable, instead add a more generic
insert-after-paragraph token that lets you set it to \n or to
-- or to ...  IE, it's much more flexible so that others can
do other things at that output point besides just a \n.

RG Honestly, I don't understand how this is done in the wiki engine

They're nigh-impossible to understand a lot of the time ;-)
-- 
Wes Hardaker 
My Pictures:  http://capturedonearth.com/
My Thoughts:  http://pontifications.hardakers.net/


___
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


Re: [Orgmode] Re: Orgmode[PATCH 4/4] Add handling of blockquote and output formats that must be flowed.

2010-04-30 Thread Carsten Dominik

Hi everyone,

when this discussion is settled, can someone please summarize it for  
me and send me the patch everyone agrees on?


Thanks.

- Carsten

On Apr 30, 2010, at 5:15 PM, Robert Goldman wrote:


That's an excellent idea. I will try to revise accordingly.

In my copious free time! :-)

Wes Hardaker wjhns...@hardakers.net wrote:

On Thu, 29 Apr 2010 10:00:43 -0500, Robert Goldman rpgold...@real-time.com 
 said:


RG So what I wanted here was newlines /only/ where the paragraphs
RG break.

The other potentially better thing to do then is rather than use a
boolean add-newline type variable, instead add a more generic
insert-after-paragraph token that lets you set it to \n or to
-- or to ...  IE, it's much more flexible so that others can
do other things at that output point besides just a \n.

RG Honestly, I don't understand how this is done in the wiki engine

They're nigh-impossible to understand a lot of the time ;-)
--
Wes Hardaker
My Pictures:  http://capturedonearth.com/
My Thoughts:  http://pontifications.hardakers.net/



--
Sent from my Android phone with K-9 Mail. Please excuse my  
brevity.___

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


Re: [Orgmode] Re: Orgmode[PATCH 4/4] Add handling of blockquote and output formats that must be flowed.

2010-04-30 Thread Robert Goldman
On 4/30/10 Apr 30 -10:28 AM, Carsten Dominik wrote:
 Hi everyone,
 
 when this discussion is settled, can someone please summarize it for me
 and send me the patch everyone agrees on?

Will do.

Best,
r

 
 Thanks.
 
 - Carsten
 
 On Apr 30, 2010, at 5:15 PM, Robert Goldman wrote:
 
 That's an excellent idea. I will try to revise accordingly.

 In my copious free time! :-)

 Wes Hardaker wjhns...@hardakers.net wrote:

 On Thu, 29 Apr 2010 10:00:43 -0500, Robert Goldman
 rpgold...@real-time.com said:

 RG So what I wanted here was newlines /only/ where the paragraphs
 RG break.

 The other potentially better thing to do then is rather than use a
 boolean add-newline type variable, instead add a more generic
 insert-after-paragraph token that lets you set it to \n or to
 -- or to ...  IE, it's much more flexible so that others can
 do other things at that output point besides just a \n.

 RG Honestly, I don't understand how this is done in the wiki engine

 They're nigh-impossible to understand a lot of the time ;-)
 -- 
 Wes Hardaker
 My Pictures:  http://capturedonearth.com/
 My Thoughts:  http://pontifications.hardakers.net/


 -- 
 Sent from my Android phone with K-9 Mail. Please excuse my
 brevity.___
 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


[Orgmode] Re: Orgmode[PATCH 4/4] Add handling of blockquote and output formats that must be flowed.

2010-04-29 Thread Wes Hardaker
 On Wed, 28 Apr 2010 16:39:59 -0500, Robert P. Goldman 
 rpgold...@sift.info said:

RPG Added a handler for blockquotes.

That looks great.  Thanks!

RPG Also added :body-newline-paragraph to the org-set-generic-type.

I'm fine with that too, but in the end couldn't you just put a \n in
the format strings?  I thought about what to do about newlines when I
wrote the code base and in the end I decided that with the existing
methods you could always add \ns everywhere you needed them which
provided the maximum flexibility.  The downside is that reading \ns
everywhere isn't exactly pretty on the specification side :-/

(Carsten, go ahead and apply it on your end)
-- 
Wes Hardaker 
My Pictures:  http://capturedonearth.com/
My Thoughts:  http://pontifications.hardakers.net/


___
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


Re: [Orgmode] Re: Orgmode[PATCH 4/4] Add handling of blockquote and output formats that must be flowed.

2010-04-29 Thread Carsten Dominik

Applied, thanks.

I had two email saying patch 4/4, I too one of them, what happened  
with 1/4, 2/4, 3/4?


Please verify that this went well.

Thanks!

- Carsten

On Apr 29, 2010, at 3:54 PM, Wes Hardaker wrote:

On Wed, 28 Apr 2010 16:39:59 -0500, Robert P. Goldman rpgold...@sift.info 
 said:


RPG Added a handler for blockquotes.

That looks great.  Thanks!

RPG Also added :body-newline-paragraph to the org-set-generic-type.

I'm fine with that too, but in the end couldn't you just put a \n in
the format strings?  I thought about what to do about newlines when I
wrote the code base and in the end I decided that with the existing
methods you could always add \ns everywhere you needed them which
provided the maximum flexibility.  The downside is that reading \ns
everywhere isn't exactly pretty on the specification side :-/

(Carsten, go ahead and apply it on your end)
--
Wes Hardaker
My Pictures:  http://capturedonearth.com/
My Thoughts:  http://pontifications.hardakers.net/


___
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


[Orgmode] Re: Orgmode[PATCH 4/4] Add handling of blockquote and output formats that must be flowed.

2010-04-29 Thread Robert Goldman
On 4/29/10 Apr 29 -8:54 AM, Wes Hardaker wrote:
 On Wed, 28 Apr 2010 16:39:59 -0500, Robert P. Goldman 
 rpgold...@sift.info said:
 
 RPG Added a handler for blockquotes.
 
 That looks great.  Thanks!
 
 RPG Also added :body-newline-paragraph to the org-set-generic-type.
 
 I'm fine with that too, but in the end couldn't you just put a \n in
 the format strings?  I thought about what to do about newlines when I
 wrote the code base and in the end I decided that with the existing
 methods you could always add \ns everywhere you needed them which
 provided the maximum flexibility.  The downside is that reading \ns
 everywhere isn't exactly pretty on the specification side :-/

No, unfortunately, I couldn't make this work for the tikiwiki export.
As far as I can tell, if you give the tikiwiki a block of text with
newlines in it, the tikiwiki will decide that you wanted to set the
linebreaks yourself, and will format the block as pre, making it
impossible for a browser to reflow the text.  This is not what I wanted.
 I want paragraphs in my org document to look like paragraphs when exported.

So what I wanted here was newlines /only/ where the paragraphs break.

Honestly, I don't understand how this is done in the wiki engine --- it
seems hard to specify this as an unambiguous translation and get the
edge cases (like single-line paragraphs) right.  However, my appetite
for reading PHP code is /extremely/ limited, so I have been learning the
format rules by experimentation.

Hope that explains things,

Best,


r



___
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


Re: [Orgmode] Re: Orgmode[PATCH 4/4] Add handling of blockquote and output formats that must be flowed.

2010-04-29 Thread Robert Goldman
On 4/29/10 Apr 29 -8:58 AM, Carsten Dominik wrote:
 Applied, thanks.
 
 I had two email saying patch 4/4, I too one of them, what happened with
 1/4, 2/4, 3/4?

What happened was that I am incompetent with git.  Somehow git thinks
that my copy is four patches away from origin/master.  But, in fact,
only the last patch (hence 4/4) is a bona fide diff from origin/master
(your version).

To use a cliche, I need to figure out how to convince git that I am now
on the same page as the origin.  I think this may have something to do
with submitting patches by email instead of pushing them.  I will try to
figure this out before submitting my next patch.
 
 Please verify that this went well.

Looks good to me, thanks,
r

 
 Thanks!
 
 - Carsten
 
 On Apr 29, 2010, at 3:54 PM, Wes Hardaker wrote:
 
 On Wed, 28 Apr 2010 16:39:59 -0500, Robert P. Goldman
 rpgold...@sift.info said:

 RPG Added a handler for blockquotes.

 That looks great.  Thanks!

 RPG Also added :body-newline-paragraph to the org-set-generic-type.

 I'm fine with that too, but in the end couldn't you just put a \n in
 the format strings?  I thought about what to do about newlines when I
 wrote the code base and in the end I decided that with the existing
 methods you could always add \ns everywhere you needed them which
 provided the maximum flexibility.  The downside is that reading \ns
 everywhere isn't exactly pretty on the specification side :-/

 (Carsten, go ahead and apply it on your end)
 -- 
 Wes Hardaker
 My Pictures:  http://capturedonearth.com/
 My Thoughts:  http://pontifications.hardakers.net/


 ___
 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


[Orgmode] Re: Orgmode[PATCH 4/4] Add handling of blockquote and output formats that must be flowed.

2010-04-29 Thread Bernt Hansen
Robert Goldman rpgold...@real-time.com writes:

 On 4/29/10 Apr 29 -8:58 AM, Carsten Dominik wrote:
 Applied, thanks.
 
 I had two email saying patch 4/4, I too one of them, what happened with
 1/4, 2/4, 3/4?

 What happened was that I am incompetent with git.  Somehow git thinks
 that my copy is four patches away from origin/master.  But, in fact,
 only the last patch (hence 4/4) is a bona fide diff from origin/master
 (your version).

 To use a cliche, I need to figure out how to convince git that I am now
 on the same page as the origin.  I think this may have something to do
 with submitting patches by email instead of pushing them.  I will try to
 figure this out before submitting my next patch.

git format-patch -1

should give you a single patch with no numbers.  You can specify how
many commits to include with -n  (eg. git format-patch -3 ) and it
numbers the 3 patches appropriately.

You can turn off the patch numbering if they are unrelated with
--no-numbered.

If you are using git send-email it uses the same format-patch parameters
IIRC.

I use git send-email --annotate

which brings each patch into an edit buffer where I can add extra
(non-commit message) information before the diffstat.

HTH,
Bernt


___
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


[Orgmode] Re: Orgmode[PATCH 4/4] Add handling of blockquote and output formats that must be flowed.

2010-04-29 Thread Robert Goldman
On 4/29/10 Apr 29 -12:00 PM, Bernt Hansen wrote:
 Robert Goldman rpgold...@real-time.com writes:
 
 On 4/29/10 Apr 29 -8:58 AM, Carsten Dominik wrote:
 Applied, thanks.

 I had two email saying patch 4/4, I too one of them, what happened with
 1/4, 2/4, 3/4?

 What happened was that I am incompetent with git.  Somehow git thinks
 that my copy is four patches away from origin/master.  But, in fact,
 only the last patch (hence 4/4) is a bona fide diff from origin/master
 (your version).

 To use a cliche, I need to figure out how to convince git that I am now
 on the same page as the origin.  I think this may have something to do
 with submitting patches by email instead of pushing them.  I will try to
 figure this out before submitting my next patch.
 
 git format-patch -1
 
 should give you a single patch with no numbers.  You can specify how
 many commits to include with -n  (eg. git format-patch -3 ) and it
 numbers the 3 patches appropriately.
 
 You can turn off the patch numbering if they are unrelated with
 --no-numbered.
 
 If you are using git send-email it uses the same format-patch parameters
 IIRC.
 
 I use git send-email --annotate
 
 which brings each patch into an edit buffer where I can add extra
 (non-commit message) information before the diffstat.

Thanks, Bernt.  That's /very/ helpful.  git send-email and format-patch
have a pretty overwhelming set of options, and this will help me focus
on the ones I should use.

A quick follow-up --- I got into trouble by sending patches computed
versus origin/master.  It turns out that this is not what I (or anyone
else, I would have thought) wants.  What I want is to get patches
relative to the merge commit that brings together my local commits and
origin/master.  Is there a common way to encourage git to do that?

thanks,
r


___
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


[Orgmode] Re: Orgmode[PATCH 4/4] Add handling of blockquote and output formats that must be flowed.

2010-04-29 Thread Bernt Hansen
Robert Goldman rpgold...@real-time.com writes:

 A quick follow-up --- I got into trouble by sending patches computed
 versus origin/master.  It turns out that this is not what I (or anyone
 else, I would have thought) wants.  What I want is to get patches
 relative to the merge commit that brings together my local commits and
 origin/master.  Is there a common way to encourage git to do that?

Hi Robert.

Just as a quick test I branched 10 commits back in origin/master
with

git checkout -b foo origin/master~10

and then created a couple of throw-away commits for format-patch to play
with (by editing and committing lisp/ChangeLog)

My history now looks something like this:


 o -- o -- B -- o -- o -- o -- ... -- o -- o -- A origin/master
\
 X -- Y  foo

From anywhere in the history I can do

git format-patch origin/master..foo

and I get only the X and Y commits created as patches.  You can
experiment with the git log command instead of format-patch to show the
commits you get.  Basically it lists the commits not in origin/master on
the foo branch.

If you happen to be at foo (commit Y) you can omit the second branch
name since HEAD is assumed so origin/master..foo is the same as
origin/master..

HTH,

Bernt


___
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


[Orgmode] [PATCH 4/4] Add handling of blockquote and output formats that must be flowed.

2010-04-28 Thread Robert P. Goldman
From: Robert P. Goldman rpgold...@real-time.com

Added a handler for blockquotes.

Also added :body-newline-paragraph to the org-set-generic-type.  This is
intended to help handling output formats (like tikiwiki) where newlines are
treated as paragraph separators, instead of being used to fill (i.e., the
destination is expected to do the word-wrapping).  If this is set to T then
org-export-generic will emit a newline character when it sees a blank
line.  This should be used in concert with a value like %s  for
:body-line-format and nil for :body-line-wrap.
---
 contrib/lisp/org-export-generic.el |   19 +--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-export-generic.el 
b/contrib/lisp/org-export-generic.el
index 11c37da..1b099dd 100644
--- a/contrib/lisp/org-export-generic.el
+++ b/contrib/lisp/org-export-generic.el
@@ -88,8 +88,9 @@
 ;;   * properties
 ;;   * drawers
 ;;   * oh my
-;;   * optmization (many plist extracts should be in (let) vars
+;;   * optmization (many plist extracts should be in let vars)
 ;;   * define defcustom spec for the specifier list
+;;   * fonts:  at least monospace is not handled at all here.
 ;;
 ;
 ;;
@@ -638,10 +639,14 @@ underlined headlines.  The default is 3.
  (or (plist-get export-plist :body-list-checkbox-done-end) ))
 (listcheckhalfend
  (or (plist-get export-plist :body-list-checkbox-half-end) ))
+ (bodynewline-paragraph   (plist-get export-plist 
:body-newline-paragraph))
 (bodytextpre   (plist-get export-plist :body-text-prefix))
 (bodytextsuf   (plist-get export-plist :body-text-suffix))
 (bodylinewrap  (plist-get export-plist :body-line-wrap))
 (bodylineform  (or (plist-get export-plist :body-line-format) %s))
+ (blockquotestart (or (plist-get export-plist :blockquote-start) 
\n\n\t))
+ (blockquoteend (or (plist-get export-plist :blockquote-end) \n\n))
+ 
 
 thetoc toctags have-headings first-heading-pos
 table-open table-buffer link-buffer link desc desc0 rpl wrap)
@@ -868,7 +873,7 @@ underlined headlines.  The default is 3.
 
((string-match ^\\([ \t]*\\)\\(:\\( \\|$\\)\\) line)
;;
-   ;; pre-formated text
+   ;; pre-formatted text
;;
(setq line (replace-match \\1 nil nil line))
 
@@ -933,6 +938,15 @@ underlined headlines.  The default is 3.
 )
 
(insert (format numlistformat line)))
+
+   ((equal line ORG-BLOCKQUOTE-START)
+(setq line blockquotestart))
+   ((equal line ORG-BLOCKQUOTE-END)
+(setq line blockquoteend))
+   ((string-match ^\\s-*$ line)
+;; blank line
+(if bodynewline-paragraph
+(insert \n)))
(t
;;
;; body
@@ -1009,6 +1023,7 @@ underlined headlines.  The default is 3.
(goto-char beg)))
 (goto-char (point-min
 
+
 (defun org-export-generic-format (export-plist prop optional len n reverse)
   converts a property specification to a string given types of properties
 
-- 
1.6.5.3



___
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