[Orgmode] Re: [PATCH] Make footnotes work correctly in message-mode

2010-10-22 Thread Sébastien Vauban
Tassilo,

Tassilo Horn wrote:
> Sébastien Vauban  writes:
>
>> Tested. Works perfectly for me. Fan-tas-tic!
>
> Great! :-)
>
> Did you only test `org-footnote-action', or also the delete and normalize
> stuff? Just to make sure I didn't break that...

Good question... I only tested =org-footnote-action= from the 3 points of
view:

- adding a new footnote
- coming back to the footnote's link (in the message)
- going to an already created footnote.

I don't know how the other behaved before (never used them).

Best regards,
  Seb

-- 
Sébastien Vauban


___
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: [PATCH] Make footnotes work correctly in message-mode

2010-10-22 Thread Tassilo Horn
Sébastien Vauban 
writes:

Hi Seb,

> Tested. Works perfectly for me. Fan-tas-tic!

Great! :-)

Did you only test `org-footnote-action', or also the delete and
normalize stuff?  Just to make sure I didn't break that...

Bye,
Tassilo


___
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: [PATCH] Make footnotes work correctly in message-mode

2010-10-22 Thread Sébastien Vauban
Hi Dan,

Dan Davison wrote:
> Sébastien Vauban  
> writes:
>
>> error: lisp/org-footnote.el: patch does not apply
>>
>> Any help?  (I don't know "anything" of git)
>
> I've been in this situation before! It's quite frustrating. That's why I've
> suggested previously that we set up a community git repository to which we
> all have access, then we can try out various different Org development
> initiatives while they are developed and/or being considered for inclusion.
> I have this fork of Org
>
> git://github.com/dandavison/org-devel.git
>
> and I'm happy to give anyone write access so that we can share patches in a
> more convenient way.
>
> This would be an improvement. For example, who knows where to find the most
> recent version of Nicolas Girard's org-icons project? If things like that
> were stashed in a community repo then forwards momentum could be more easily
> maintained.

You mean that you would (manually or automatically) apply all coming patches?


> It doesn't mean maintaining multiple Org repos in different places on your
> local machine; effectively it would just becomes another branch when you add
> the community repo using "git remote add".

What's the difference between both:

- 2 repos
- 1 repos with 1 trunk and 1 branch?

How do you switch between both before re-applying =org-reload=?

Best regards,
  Seb

-- 
Sébastien Vauban


___
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: [PATCH] Make footnotes work correctly in message-mode

2010-10-22 Thread Sébastien Vauban
Hi Tassilo,

Tassilo Horn wrote:
> * repos/el/org-mode/lisp/org-footnote.el
> (org-footnote-create-definition)
> (org-footnote-goto-local-insertion-point): Add footnotes before
> signature when in message-mode.
> ---
>  lisp/org-footnote.el |   25 +++--
>  1 files changed, 15 insertions(+), 10 deletions(-)
>
> diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
> index 36fcfb2..ac1305f 100644
> --- a/lisp/org-footnote.el
> +++ b/lisp/org-footnote.el
> @@ -302,15 +302,19 @@ or new, let the user edit the definition of the 
> footnote."
>   (t
>(setq re (concat "^" org-footnote-tag-for-non-org-mode-files "[ 
> \t]*$"))
>(unless (re-search-forward re nil t)
> - (goto-char (point-max))
> - (skip-chars-backward " \t\r\n")
> - (insert "\n\n")
> - (delete-region (point) (point-max))
> - (insert org-footnote-tag-for-non-org-mode-files "\n"))
> -  (goto-char (point-max))
> -  (skip-chars-backward " \t\r\n")))
> -(insert "\n\n")
> -(insert "[" label "] ")
> + (let ((max (if (and (eq major-mode 'message-mode)
> + (re-search-forward message-signature-separator nil 
> t))
> +(progn (beginning-of-line) (point))
> +  (goto-char (point-max)
> +   (skip-chars-backward " \t\r\n")
> +   (delete-region (point) max)
> +   (insert "\n\n")
> +   (insert org-footnote-tag-for-non-org-mode-files "\n")
> +;; Skip existing footnotes
> +(while (re-search-forward "^[[:space:]]*\\[[^]]+\\] " nil t)
> +  (forward-line))
> +(insert "[" label "] \n")
> +(goto-char (1- (point)))
>  (message "Edit definition and go back with `C-c &' or, if unique, with 
> `C-c C-c'.")))
>  
>  ;;;###autoload
> @@ -506,7 +510,8 @@ ENTRY is (fn-label num-mark definition)."
>  (beginning-of-line 0))
>(if (looking-at "[ \t]*#\\+TBLFM:") (beginning-of-line 2))
>(end-of-line 1)
> -  (skip-chars-backward "\n\r\t "))
> +  (skip-chars-backward "\n\r\t ")
> +  (forward-line))
>  
>  (defun org-footnote-delete (&optional label)
>"Delete the footnote at point.

Tested. Works perfectly for me. Fan-tas-tic!

Best regards,
  Seb

-- 
Sébastien Vauban


___
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: [PATCH] Make footnotes work correctly in message-mode

2010-10-22 Thread Dan Davison


Sébastien Vauban 
writes:

> Hi Tassilo,
>
> Tassilo Horn wrote:

[...]

> I tried to use this patch, but failed doing so:

[...]

> error: lisp/org-footnote.el: patch does not apply
>
> Any help?  (I don't know "anything" of git)

I've been in this situation before! It's quite frustrating. That's why
I've suggested previously that we set up a community git repository to
which we all have access, then we can try out various different Org
development initiatives while they are developed and/or being considered
for inclusion. I have this fork of Org

git://github.com/dandavison/org-devel.git

and I'm happy to give anyone write access so that we can share patches
in a more convenient way.

This would be an improvement. For example, who knows where to find the
most recent version of Nicolas Girard's org-icons project? If things
like that were stashed in a community repo then forwards momentum could
be more easily maintained.

It doesn't mean maintaining multiple Org repos in different places on
your local machine; effectively it would just becomes another branch
when you add the community repo using "git remote add".

Dan


>
> FYI, before this, I have pulled Org's latest dev version -- lots of change,
> BTW (all Babel files or so) -- as last time was a few days ago.
>
> Best regards,
>   Seb


___
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: [PATCH] Make footnotes work correctly in message-mode

2010-10-22 Thread Sébastien Vauban
Hi Tassilo,

Tassilo Horn wrote:
> Sébastien Vauban  writes:
>
>> I tried to use this patch, but failed doing so:
>>
>> [...@mediacenter] ~/src/org-mode>git apply patch
>> patch:18: trailing whitespace.
>> (let ((max (if (and (eq major-mode 'message-mode)
>> patch:19: trailing whitespace.
>> (re-search-forward message-signature-separator 
>> nil t))
>> patch:20: trailing whitespace.
>>(progn (beginning-of-line) (point))
>> patch:21: trailing whitespace.
>>  (goto-char (point-max)
>> patch:22: trailing whitespace.
>>   (skip-chars-backward " \t\r\n")
>> error: patch failed: lisp/org-footnote.el:302
>> error: lisp/org-footnote.el: patch does not apply
>
> Hm, git apply  is correct. So I guess your  is bogus. I've
> just downloaded the patch from
> http://patchwork.newartisans.com/project/org-mode/list/ by selecting the
> patch in the summary followed by Download patch. That does apply without
> problems here.

Successfully applied, now.

The problem was my patch file was in UTF-8-dos, not unix...

Thanks. Still need to test it now...

Best regards,
  Seb

-- 
Sébastien Vauban


___
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: [PATCH] Make footnotes work correctly in message-mode

2010-10-22 Thread Tassilo Horn
Sébastien Vauban 
writes:

Hi Seb,

> I tried to use this patch, but failed doing so:
>
> [...@mediacenter] ~/src/org-mode>git apply patch
> patch:18: trailing whitespace.
> (let ((max (if (and (eq major-mode 'message-mode)
> patch:19: trailing whitespace.
> (re-search-forward message-signature-separator 
> nil t))
> patch:20: trailing whitespace.
>(progn (beginning-of-line) (point))
> patch:21: trailing whitespace.
>  (goto-char (point-max)
> patch:22: trailing whitespace.
>   (skip-chars-backward " \t\r\n")
> error: patch failed: lisp/org-footnote.el:302
> error: lisp/org-footnote.el: patch does not apply

Hm, git apply  is correct.  So I guess your  is bogus.
I've just downloaded the patch from
http://patchwork.newartisans.com/project/org-mode/list/ by selecting the
patch in the summary followed by Download patch.  That does apply
without problems here.

Bye,
Tassilo


___
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: [PATCH] Make footnotes work correctly in message-mode

2010-10-22 Thread Sébastien Vauban
Hi Tassilo,

Tassilo Horn wrote:
> * repos/el/org-mode/lisp/org-footnote.el
> (org-footnote-create-definition)
> (org-footnote-goto-local-insertion-point): Add footnotes before
> signature when in message-mode.
> ---
>  lisp/org-footnote.el |   25 +++--
>  1 files changed, 15 insertions(+), 10 deletions(-)
>
> diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
> index 36fcfb2..ac1305f 100644
> --- a/lisp/org-footnote.el
> +++ b/lisp/org-footnote.el
> @@ -302,15 +302,19 @@ or new, let the user edit the definition of the 
> footnote."
>   (t
>(setq re (concat "^" org-footnote-tag-for-non-org-mode-files "[ 
> \t]*$"))
>(unless (re-search-forward re nil t)
> - (goto-char (point-max))
> - (skip-chars-backward " \t\r\n")
> - (insert "\n\n")
> - (delete-region (point) (point-max))
> - (insert org-footnote-tag-for-non-org-mode-files "\n"))
> -  (goto-char (point-max))
> -  (skip-chars-backward " \t\r\n")))
> -(insert "\n\n")
> -(insert "[" label "] ")
> + (let ((max (if (and (eq major-mode 'message-mode)
> + (re-search-forward message-signature-separator nil 
> t))
> +(progn (beginning-of-line) (point))
> +  (goto-char (point-max)
> +   (skip-chars-backward " \t\r\n")
> +   (delete-region (point) max)
> +   (insert "\n\n")
> +   (insert org-footnote-tag-for-non-org-mode-files "\n")
> +;; Skip existing footnotes
> +(while (re-search-forward "^[[:space:]]*\\[[^]]+\\] " nil t)
> +  (forward-line))
> +(insert "[" label "] \n")
> +(goto-char (1- (point)))
>  (message "Edit definition and go back with `C-c &' or, if unique, with 
> `C-c C-c'.")))
>  
>  ;;;###autoload
> @@ -506,7 +510,8 @@ ENTRY is (fn-label num-mark definition)."
>  (beginning-of-line 0))
>(if (looking-at "[ \t]*#\\+TBLFM:") (beginning-of-line 2))
>(end-of-line 1)
> -  (skip-chars-backward "\n\r\t "))
> +  (skip-chars-backward "\n\r\t ")
> +  (forward-line))
>  
>  (defun org-footnote-delete (&optional label)
>"Delete the footnote at point.

I tried to use this patch, but failed doing so:

--8<---cut here---start->8---
[...@mediacenter] ~/src/org-mode>git apply patch
patch:18: trailing whitespace.
(let ((max (if (and (eq major-mode 'message-mode)
patch:19: trailing whitespace.
(re-search-forward message-signature-separator nil 
t))
patch:20: trailing whitespace.
   (progn (beginning-of-line) (point))
patch:21: trailing whitespace.
 (goto-char (point-max)
patch:22: trailing whitespace.
  (skip-chars-backward " \t\r\n")
error: patch failed: lisp/org-footnote.el:302
error: lisp/org-footnote.el: patch does not apply

[...@mediacenter] ~/src/org-mode>patch < patch
diff: unknown option -- git
diff: Try `diff --help' for more information.
./patch: line 2: index: command not found
./patch: line 3: ---: command not found
./patch: line 4: +++: command not found
./patch: line 31: unexpected EOF while looking for matching `''
./patch: line 44: syntax error: unexpected end of file

[...@mediacenter] ~/src/org-mode>git apply < patch
:18: trailing whitespace.
(let ((max (if (and (eq major-mode 'message-mode)
:19: trailing whitespace.
(re-search-forward message-signature-separator nil 
t))
:20: trailing whitespace.
   (progn (beginning-of-line) (point))
:21: trailing whitespace.
 (goto-char (point-max)
:22: trailing whitespace.
  (skip-chars-backward " \t\r\n")
error: patch failed: lisp/org-footnote.el:302
error: lisp/org-footnote.el: patch does not apply
--8<---cut here---end--->8---

Any help?  (I don't know "anything" of git)

FYI, before this, I have pulled Org's latest dev version -- lots of change,
BTW (all Babel files or so) -- as last time was a few days ago.

Best regards,
  Seb

-- 
Sébastien Vauban


___
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