emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* A few questions about how you write e-mails
@ 2010-10-20  5:37 Jeff Horn
  2010-10-20  5:51 ` Glyn Millington
                   ` (5 more replies)
  0 siblings, 6 replies; 40+ messages in thread
From: Jeff Horn @ 2010-10-20  5:37 UTC (permalink / raw)
  To: Org-mode ml

Dear orgsters,

I've had a few nagging questions that I didn't think warranted too
much discussion, but my curiosity has gotten the better of me this
evening.

Firstly, I notice some of the regular posters wrap org source in the
#+ style org wrappers, others use a <--8--cut-here---8--> or some
similar "horizontal-rule", and yet others use some sort of vertical
"quoting":

.----
| like this
| or this
.__

My first question is two-fold: 1) how did you come to use this style
for quoting code in your replies, and 2) mind sharing the macros or
letting us know what packages you use that help make your e-mails look
tidy?

Secondly, and somewhat related to the first, are orgsters simply using
gnus with message-mode hook to utilize org footnotes? I've noticed I
can style/face the text with a message-mode hook, but I'm wondering
how everyone deals, in general, with plain text footnotes in e-mail?
Do you even use footnotes for sharing links?

Lastly, are any orgsters using gnus+gmail? I've tried just reading org
list mails in gnus, but I find switching back and forth to be jarring
if I read org list e-mails in a browser throughout the day, since I
end up re-reading a lot of mails. Also, mind sharing how you've mapped
the cumbersome "B m [Gmail]/Trash" to a better key? If anyone feels
inspired, I'd use a package that utilized gmail movement shortcuts in
gnus (so mark with x, move out of inbox with e, or move to trash (as
above) with #).

Thanks for taking the time to respond!

Best wishes,
Jeff

-- 
Jeffrey Horn
Graduate Lecturer and PhD Student in Economics
George Mason University

(704) 271-4797
jhorn@gmu.edu
jrhorn424@gmail.com

http://www.failuretorefrain.com/jeff/

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

* Re: A few questions about how you write e-mails
  2010-10-20  5:37 A few questions about how you write e-mails Jeff Horn
@ 2010-10-20  5:51 ` Glyn Millington
  2010-10-20  5:57 ` Noorul Islam K M
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 40+ messages in thread
From: Glyn Millington @ 2010-10-20  5:51 UTC (permalink / raw)
  To: emacs-orgmode

Jeff Horn <jrhorn424@gmail.com> writes:

> Dear orgsters,
>
> I've had a few nagging questions that I didn't think warranted too
> much discussion, but my curiosity has gotten the better of me this
> evening.
>
> Firstly, I notice some of the regular posters wrap org source in the
> #+ style org wrappers, others use a <--8--cut-here---8--> or some
> similar "horizontal-rule", and yet others use some sort of vertical
> "quoting":
>
> .----
> | like this or this
> .__
>
> My first question is two-fold: 1) how did you come to use this style
> for quoting code in your replies, and 2) mind sharing the macros or
> letting us know what packages you use that help make your e-mails look
> tidy?

boxquote.el 


http://www.davep.org/emacs/boxquote.el

,----
| ;; boxquote provides a set of functions for using a text quoting style
| ;; that partially boxes in the left hand side of an area of text, such a
| ;; marking style might be used to show externally included text or
| ;; example code.
`----


atb




Glyn

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

* Re: A few questions about how you write e-mails
  2010-10-20  5:37 A few questions about how you write e-mails Jeff Horn
  2010-10-20  5:51 ` Glyn Millington
@ 2010-10-20  5:57 ` Noorul Islam K M
  2010-10-20  6:44 ` Samuel Wales
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 40+ messages in thread
From: Noorul Islam K M @ 2010-10-20  5:57 UTC (permalink / raw)
  To: Jeff Horn; +Cc: Org-mode ml

Jeff Horn <jrhorn424@gmail.com> writes:

> Dear orgsters,
>
> I've had a few nagging questions that I didn't think warranted too
> much discussion, but my curiosity has gotten the better of me this
> evening.
>
> Firstly, I notice some of the regular posters wrap org source in the
> #+ style org wrappers, others use a <--8--cut-here---8--> or some
> similar "horizontal-rule", and yet others use some sort of vertical
> "quoting":
>
> .----
> | like this
> | or this
> .__
>
> My first question is two-fold: 1) how did you come to use this style
> for quoting code in your replies, and 2) mind sharing the macros or
> letting us know what packages you use that help make your e-mails look
> tidy?
>
> Secondly, and somewhat related to the first, are orgsters simply using
> gnus with message-mode hook to utilize org footnotes? I've noticed I
> can style/face the text with a message-mode hook, but I'm wondering
> how everyone deals, in general, with plain text footnotes in e-mail?
> Do you even use footnotes for sharing links?
>
> Lastly, are any orgsters using gnus+gmail? I've tried just reading org
> list mails in gnus, but I find switching back and forth to be jarring
> if I read org list e-mails in a browser throughout the day, since I
> end up re-reading a lot of mails. Also, mind sharing how you've mapped
> the cumbersome "B m [Gmail]/Trash" to a better key? If anyone feels
> inspired, I'd use a package that utilized gmail movement shortcuts in
> gnus (so mark with x, move out of inbox with e, or move to trash (as
> above) with #).

I have something like this in my .gnus

(defun noorul/move-to-gmail-trash ()
  (interactive)
  (let ((prefix (funcall gnus-move-group-prefix-function
			 gnus-newsgroup-name)))
    (let ((trash (concat prefix "[Gmail]/Trash")))
      (gnus-summary-move-article nil trash))))

(gnus-define-keys gnus-summary-mode-map 
    "\C-c\C-g" noorul/move-to-gmail-trash)

Also lots of gnus imap development is going on now. The latest dev build
fetches imap mail faster. But still B m is quiet slow. I hope new work
will give gnus a better future.

Thanks and Regards
Noorul

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

* Re: A few questions about how you write e-mails
  2010-10-20  5:37 A few questions about how you write e-mails Jeff Horn
  2010-10-20  5:51 ` Glyn Millington
  2010-10-20  5:57 ` Noorul Islam K M
@ 2010-10-20  6:44 ` Samuel Wales
  2010-10-20 11:36   ` Bernt Hansen
  2010-10-20 17:20 ` Nick Dokos
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 40+ messages in thread
From: Samuel Wales @ 2010-10-20  6:44 UTC (permalink / raw)
  To: Jeff Horn; +Cc: Org-mode ml

On 2010-10-19, Jeff Horn <jrhorn424@gmail.com> wrote:
> .----
> | like this
> | or this
> .__

As it can be an obstacle for people who are new to Emacs to remove the
rectangle,
I do

===
This
===

instead.

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

* Re: A few questions about how you write e-mails
  2010-10-20  6:44 ` Samuel Wales
@ 2010-10-20 11:36   ` Bernt Hansen
  0 siblings, 0 replies; 40+ messages in thread
From: Bernt Hansen @ 2010-10-20 11:36 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Jeff Horn, Org-mode ml

Samuel Wales <samologist@gmail.com> writes:

> On 2010-10-19, Jeff Horn <jrhorn424@gmail.com> wrote:
>> .----
>> | like this
>> | or this
>> .__
>
> As it can be an obstacle for people who are new to Emacs to remove the
> rectangle,
> I do
>
> ===
> This
> ===

Gnus provides a function to

--8<---------------cut here---------------start------------->8---
wrap text like
this
--8<---------------cut here---------------end--------------->8---

using C-c M-m (message-mark-inserted-region)

I have that as a global binding now
(global-set-key (kbd "<f9> m") 'message-mark-inserted-region)


I also use boxquote.el
(global-set-key (kbd "<f9> r") 'boxquote-region)
(global-set-key (kbd "<f9> f") 'boxquote-insert-file)

HTH,
Bernt

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

* Re: A few questions about how you write e-mails
  2010-10-20  5:37 A few questions about how you write e-mails Jeff Horn
                   ` (2 preceding siblings ...)
  2010-10-20  6:44 ` Samuel Wales
@ 2010-10-20 17:20 ` Nick Dokos
  2010-10-22  8:06   ` Sébastien Vauban
  2010-10-20 20:10 ` Eric Schulte
  2010-10-21  1:55 ` Matt Lundin
  5 siblings, 1 reply; 40+ messages in thread
From: Nick Dokos @ 2010-10-20 17:20 UTC (permalink / raw)
  To: Jeff Horn; +Cc: nicholas.dokos, Org-mode ml

Jeff Horn <jrhorn424@gmail.com> wrote:

> Firstly, I notice some of the regular posters wrap org source in the
> #+ style org wrappers, others use a <--8--cut-here---8--> or some
> similar "horizontal-rule", and yet others use some sort of vertical
> "quoting":
> 
> .----
> | like this
> | or this
> .__
> 
> My first question is two-fold: 1) how did you come to use this style
> for quoting code in your replies, and 2) mind sharing the macros or
> letting us know what packages you use that help make your e-mails look
> tidy?
> 

I use boxquote.el (see http://www.emacswiki.org/emacs/BoxQuote) for the
above style, but as Samuel and Bernt point out that's not the best way
for quoting material where the recipient is expected to use the quoted
material (e.g. code snippets): extracting it from the boxquote is more
difficult than it needs to be (even if one has boxquote.el installed).[fn:1]

For code, I use the method Bernt described: message-mark-inserted-region,
which is similar to the purely textual approach of Samuel's, but does
provide nice fontification in my mailer.

I bind these functions to keys: C-c q for the boxquote style, C-c m for
the message style, but this is very much a matter of personal
preference. Sometimes I need boxquote-unbox, but I don't have a key for
that: I call the function with M-x ...

> Secondly, and somewhat related to the first, are orgsters simply using
> gnus with message-mode hook to utilize org footnotes? I've noticed I
> can style/face the text with a message-mode hook, but I'm wondering
> how everyone deals, in general, with plain text footnotes in e-mail?
> Do you even use footnotes for sharing links?
> 

I don't use gnus/message-mode for mail. Re: footnotes - I use them
rarely in mail and most of the time by hand, but I do have
org-footnote-action bound to a key (see the footnote above) - I just
forget to use it most of the time. And I don't style them at all: whatever
the mailer/emacs/hooks at the receiving end does, is up to them.

> Lastly, are any orgsters using gnus+gmail? I've tried just reading org
> list mails in gnus, but I find switching back and forth to be jarring
> if I read org list e-mails in a browser throughout the day, since I
> end up re-reading a lot of mails. Also, mind sharing how you've mapped
> the cumbersome "B m [Gmail]/Trash" to a better key? If anyone feels
> inspired, I'd use a package that utilized gmail movement shortcuts in
> gnus (so mark with x, move out of inbox with e, or move to trash (as
> above) with #).
> 

I don't use gnus (except for news reading - which I only do very rarely
nowadays). For mail, I will die with the mh-e keybindings permanently
etched in the reptilian part of my brain - by now, the fingers can act
independently from the rest of my body. And I only use a browser to
search mailing list archives, never to read mail with.

Nick

Footnotes:

[fn:1] I used boxquotes for some code once and Seb Vauban (iirc) took me
to task. I'm pretty sure I have not repeated the faux-pas.

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

* Re: A few questions about how you write e-mails
  2010-10-20  5:37 A few questions about how you write e-mails Jeff Horn
                   ` (3 preceding siblings ...)
  2010-10-20 17:20 ` Nick Dokos
@ 2010-10-20 20:10 ` Eric Schulte
  2010-10-21  1:55 ` Matt Lundin
  5 siblings, 0 replies; 40+ messages in thread
From: Eric Schulte @ 2010-10-20 20:10 UTC (permalink / raw)
  To: Jeff Horn; +Cc: Org-mode ml

Jeff Horn <jrhorn424@gmail.com> writes:

[...]
>
> Secondly, and somewhat related to the first, are orgsters simply using
> gnus with message-mode hook to utilize org footnotes? I've noticed I
> can style/face the text with a message-mode hook, but I'm wondering
> how everyone deals, in general, with plain text footnotes in e-mail?

For footnotes I use footnote-mode [1], which is not related to Org-mode
except possibly as an ancestor or inspiration.  It is included in recent
versions of Emacs.

> Do you even use footnotes for sharing links?
>

Normally, especially for very long links.

>
> Lastly, are any orgsters using gnus+gmail? I've tried just reading org
> list mails in gnus, but I find switching back and forth to be jarring
> if I read org list e-mails in a browser throughout the day, since I
> end up re-reading a lot of mails. Also, mind sharing how you've mapped
> the cumbersome "B m [Gmail]/Trash" to a better key? If anyone feels
> inspired, I'd use a package that utilized gmail movement shortcuts in
> gnus (so mark with x, move out of inbox with e, or move to trash (as
> above) with #).
>

Stop using the gmail web interface and do everything through gnus.  At
least that's what works for me :)

Best -- Eric

>
> Thanks for taking the time to respond!
>
> Best wishes,
> Jeff

Footnotes: 
[1]  footnote-mode
footnote-mode is an interactive compiled Lisp function in
`footnote.el'.

(footnote-mode &optional ARG)

Toggle footnote minor mode.
This minor mode provides footnote support for `message-mode'.  To get
started, play around with the following keys:
key             binding
---             -------

C-c             Prefix Command

C-c !           Prefix Command

C-c ! a         Footnote-add-footnote
C-c ! b         Footnote-back-to-message
C-c ! c         Footnote-cycle-style
C-c ! d         Footnote-delete-footnote
C-c ! g         Footnote-goto-footnote
C-c ! r         Footnote-renumber-footnotes
C-c ! s         Footnote-set-style

[back]

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

* Re: A few questions about how you write e-mails
  2010-10-20  5:37 A few questions about how you write e-mails Jeff Horn
                   ` (4 preceding siblings ...)
  2010-10-20 20:10 ` Eric Schulte
@ 2010-10-21  1:55 ` Matt Lundin
  2010-10-21  2:47   ` suvayu ali
  2010-10-21  6:16   ` A few questions about how you write e-mails Noorul Islam K M
  5 siblings, 2 replies; 40+ messages in thread
From: Matt Lundin @ 2010-10-21  1:55 UTC (permalink / raw)
  To: Jeff Horn; +Cc: Org-mode ml

Jeff Horn <jrhorn424@gmail.com> writes:

> Firstly, I notice some of the regular posters wrap org source in the
> #+ style org wrappers, others use a <--8--cut-here---8--> 

> My first question is two-fold: 1) how did you come to use this style
> for quoting code in your replies:

As others have mentioned, I use C-c M-m (message-mark-inserted-region)
in message-mode to do the trick.

> Secondly, and somewhat related to the first, are orgsters simply using
> gnus with message-mode hook to utilize org footnotes? I've noticed I
> can style/face the text with a message-mode hook, but I'm wondering
> how everyone deals, in general, with plain text footnotes in e-mail?
> Do you even use footnotes for sharing links?

I simply have a global binding for org-footnote-action, which enables me
to insert footnotes anywhere.[1]

> Lastly, are any orgsters using gnus+gmail? I've tried just reading org
> list mails in gnus, but I find switching back and forth to be jarring
> if I read org list e-mails in a browser throughout the day, since I
> end up re-reading a lot of mails. Also, mind sharing how you've mapped
> the cumbersome "B m [Gmail]/Trash" to a better key? 

If a message is worth deleting, you might consider B DEL, which
dispatches it without mercy.

Best,
Matt

Footnotes:

[1] It works like a charm.

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

* Re: Re: A few questions about how you write e-mails
  2010-10-21  1:55 ` Matt Lundin
@ 2010-10-21  2:47   ` suvayu ali
  2010-10-21  3:40     ` Nick Dokos
  2010-10-21  7:45     ` Tassilo Horn
  2010-10-21  6:16   ` A few questions about how you write e-mails Noorul Islam K M
  1 sibling, 2 replies; 40+ messages in thread
From: suvayu ali @ 2010-10-21  2:47 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Jeff Horn, Org-mode ml

Hi Jeff,

On 20 October 2010 18:55, Matt Lundin <mdl@imapmail.org> wrote:
> I simply have a global binding for org-footnote-action, which enables me
> to insert footnotes anywhere.[1]
>

I do that too, but it shows up as [fn:1] for me. Is there some
variable I can customise to get it as [1] when I am using it outside
org-mode?

Also in my case, the footnotes appear below the signature. I have to
manually move it above that before sending the email. Would be awesome
if org-footnote-action understood signatures somehow.

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: Re: A few questions about how you write e-mails
  2010-10-21  2:47   ` suvayu ali
@ 2010-10-21  3:40     ` Nick Dokos
  2010-10-21  8:10       ` suvayu ali
  2010-10-21  7:45     ` Tassilo Horn
  1 sibling, 1 reply; 40+ messages in thread
From: Nick Dokos @ 2010-10-21  3:40 UTC (permalink / raw)
  To: suvayu ali; +Cc: nicholas.dokos, Matt Lundin, Org-mode ml, Jeff Horn

suvayu ali <fatkasuvayu+linux@gmail.com> wrote:

> Hi Jeff,
> 
> On 20 October 2010 18:55, Matt Lundin <mdl@imapmail.org> wrote:
> > I simply have a global binding for org-footnote-action, which enables me
> > to insert footnotes anywhere.[1]
> >
> 
> I do that too, but it shows up as [fn:1] for me. Is there some
> variable I can customise to get it as [1] when I am using it outside
> org-mode?
> 

There is a variable (of course!):

,----
| org-footnote-auto-label is a variable defined in `org-footnote.el'.
| Its value is t
| 
| Documentation:
| Non-nil means define automatically new labels for footnotes.
| Possible values are:
| 
| nil        prompt the user for each label
| t          create unique labels of the form [fn:1], [fn:2], ...
| confirm    like t, but let the user edit the created value.  In particular,
|            the label can be removed from the minibuffer, to create
|            an anonymous footnote.
| plain      Automatically create plain number labels like [1]
| 
| You can customize this variable.
`----

but how to use it in the way you specify is left as an exercise for the
interested reader.

> Also in my case, the footnotes appear below the signature. I have to
> manually move it above that before sending the email. Would be awesome
> if org-footnote-action understood signatures somehow.
> 

Given the mangling that mailers do to replies (e.g. the idiotic default
top posting of Thunderbird and its ilk), how they handle signatures, and
the non-standard nature of signatures themselves, I'd say this is pretty
much hopeless. At least the end is a well defined place that
org-footnote-action can always find.  The rest are shifting sands.

Of course, if you use a nice primitive mailer[1] where *you* do all the
placement the way *you* like it, that's no problem at all. I can add all
the footnotes I want, then M-> C-c C-s, done (that is, if I *had* a signature,
which I don't - and M-> is always right, since I (almost) never top-post).

Footnotes:

[1] E.g. mh-e :-)

Nick

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

* Re: A few questions about how you write e-mails
  2010-10-21  1:55 ` Matt Lundin
  2010-10-21  2:47   ` suvayu ali
@ 2010-10-21  6:16   ` Noorul Islam K M
  1 sibling, 0 replies; 40+ messages in thread
From: Noorul Islam K M @ 2010-10-21  6:16 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Jeff Horn, Org-mode ml

Matt Lundin <mdl@imapmail.org> writes:

> Jeff Horn <jrhorn424@gmail.com> writes:
>
>> Firstly, I notice some of the regular posters wrap org source in the
>> #+ style org wrappers, others use a <--8--cut-here---8--> 
>
>> My first question is two-fold: 1) how did you come to use this style
>> for quoting code in your replies:
>
> As others have mentioned, I use C-c M-m (message-mark-inserted-region)
> in message-mode to do the trick.
>
>> Secondly, and somewhat related to the first, are orgsters simply using
>> gnus with message-mode hook to utilize org footnotes? I've noticed I
>> can style/face the text with a message-mode hook, but I'm wondering
>> how everyone deals, in general, with plain text footnotes in e-mail?
>> Do you even use footnotes for sharing links?
>
> I simply have a global binding for org-footnote-action, which enables me
> to insert footnotes anywhere.[1]
>
>> Lastly, are any orgsters using gnus+gmail? I've tried just reading org
>> list mails in gnus, but I find switching back and forth to be jarring
>> if I read org list e-mails in a browser throughout the day, since I
>> end up re-reading a lot of mails. Also, mind sharing how you've mapped
>> the cumbersome "B m [Gmail]/Trash" to a better key? 
>
> If a message is worth deleting, you might consider B DEL, which
> dispatches it without mercy.
>

In the case of gmail imap it won't delete the mail completely instead it
archives. 

Thanks and Regards
Noorul

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

* Re: A few questions about how you write e-mails
  2010-10-21  2:47   ` suvayu ali
  2010-10-21  3:40     ` Nick Dokos
@ 2010-10-21  7:45     ` Tassilo Horn
  2010-10-21  8:07       ` suvayu ali
  1 sibling, 1 reply; 40+ messages in thread
From: Tassilo Horn @ 2010-10-21  7:45 UTC (permalink / raw)
  To: emacs-orgmode

suvayu ali <fatkasuvayu+linux@gmail.com> writes:

Hi!

> Also in my case, the footnotes appear below the signature. I have to
> manually move it above that before sending the email. Would be awesome
> if org-footnote-action understood signatures somehow.

Hm, I don't use org-mode and its functions when writing mails using
Gnus, but I enable footnote-mode in message-mode and then call
`Footnote-add-footnote' and friends directly.  That adds footnotes
before the signature just as you want.  test [1], test [2], ...

I've checked my .emacs, but I don't have any special setup for making
that work...

Bye,
Tassilo

Footnotes: 
[1]  foo
[2]  bar
-- 
This is a test signature...

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

* Re: Re: A few questions about how you write e-mails
  2010-10-21  7:45     ` Tassilo Horn
@ 2010-10-21  8:07       ` suvayu ali
  2010-10-21  8:17         ` Difference between org-footnote.el and footnote.el (was: A few questions about how you write e-mails) Tassilo Horn
  0 siblings, 1 reply; 40+ messages in thread
From: suvayu ali @ 2010-10-21  8:07 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-orgmode

Hi Tassilo,

On 21 October 2010 00:45, Tassilo Horn <tassilo@member.fsf.org> wrote:
> suvayu ali <fatkasuvayu+linux@gmail.com> writes:
>
> Hi!
>
>> Also in my case, the footnotes appear below the signature. I have to
>> manually move it above that before sending the email. Would be awesome
>> if org-footnote-action understood signatures somehow.
>
> Hm, I don't use org-mode and its functions when writing mails using
> Gnus, but I enable footnote-mode in message-mode and then call
> `Footnote-add-footnote' and friends directly.  That adds footnotes
> before the signature just as you want.  test [1], test [2], ...
>

This is exactly what I was looking for, I wasn't aware of
footnode-mode. Thanks a lot!! :)

> Bye,
> Tassilo

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: Re: A few questions about how you write e-mails
  2010-10-21  3:40     ` Nick Dokos
@ 2010-10-21  8:10       ` suvayu ali
  2010-10-22 12:27         ` Matthias Danzl
  0 siblings, 1 reply; 40+ messages in thread
From: suvayu ali @ 2010-10-21  8:10 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Org-mode ml

Hi Nick,

On 20 October 2010 20:40, Nick Dokos <nicholas.dokos@hp.com> wrote:
> Given the mangling that mailers do to replies (e.g. the idiotic default
> top posting of Thunderbird and its ilk), how they handle signatures, and
> the non-standard nature of signatures themselves, I'd say this is pretty
> much hopeless.

After our discussion yesterday, I did some research. Didn't find
anything +ve. I am considering switching to mutt. :)

> At least the end is a well defined place that
> org-footnote-action can always find.  The rest are shifting sands.
>

footnote-mode seems to do the trick exactly as I was hoping to. See
Tassilo's response.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.

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

* Difference between org-footnote.el and footnote.el (was: A few questions about how you write e-mails)
  2010-10-21  8:07       ` suvayu ali
@ 2010-10-21  8:17         ` Tassilo Horn
  2010-10-21  9:10           ` [Orgmode] Difference between org-footnote.el and footnote.el Andreas Röhler
  0 siblings, 1 reply; 40+ messages in thread
From: Tassilo Horn @ 2010-10-21  8:17 UTC (permalink / raw)
  To: emacs-orgmode

suvayu ali <fatkasuvayu+linux@gmail.com> writes:

Hi!

>> Hm, I don't use org-mode and its functions when writing mails using
>> Gnus, but I enable footnote-mode in message-mode and then call
>> `Footnote-add-footnote' and friends directly.  That adds footnotes
>> before the signature just as you want.  test [1], test [2], ...
>
> This is exactly what I was looking for, I wasn't aware of
> footnode-mode. Thanks a lot!! :)

Oh, I was pretty sure that org-footnote.el is only a wrapper around the
original footnote.el that comes with emacs, but looking at the code it
seems to be a completely separate facility.

It says to have "better support for resuming editing" than footnote.el
but be less configurable.  Can someone enlighten my what is meant with
that better support for resuming editing?  I mean, footnote.el already
provides automatic renumbering which is the only special feature I can
imagine to be of great use when resuming to edit a footnoted document...

Bye,
Tassilo

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

* Re: [Orgmode] Difference between org-footnote.el and footnote.el
  2010-10-21  8:17         ` Difference between org-footnote.el and footnote.el (was: A few questions about how you write e-mails) Tassilo Horn
@ 2010-10-21  9:10           ` Andreas Röhler
  2010-10-21  9:38             ` Tassilo Horn
  0 siblings, 1 reply; 40+ messages in thread
From: Andreas Röhler @ 2010-10-21  9:10 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Carsten Dominik, Emacs developers

[ ... ]
>
> Oh, I was pretty sure that org-footnote.el is only a wrapper around the
> original footnote.el that comes with emacs, but looking at the code it
> seems to be a completely separate facility.
>
> It says to have "better support for resuming editing" than footnote.el
> but be less configurable.  Can someone enlighten my what is meant with
> that better support for resuming editing?  I mean, footnote.el already
> provides automatic renumbering which is the only special feature I can
> imagine to be of great use when resuming to edit a footnoted document...
>
> Bye,
> Tassilo
>
>

Hi Tassilo,

common footnote.el was never able to detect if a file opened has already 
footnote inside. Didn't check that for some month now...

Also org-footnote implemented labeled footnotes, very useful to avoid 
clashes with forms like list[1]

BTW suggest to replace the common footnote by the org's footnotes, 
remove the prefix then, leave some aliases in org-mode for 
backward-compatibility.

cc to emacs-devel for this.

Cheers

Andreas

--
https://code.launchpad.net/~a-roehler/python-mode/python-mode-components
https://code.launchpad.net/s-x-emacs-werkstatt/

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

* Re: [Orgmode] Difference between org-footnote.el and footnote.el
  2010-10-21  9:10           ` [Orgmode] Difference between org-footnote.el and footnote.el Andreas Röhler
@ 2010-10-21  9:38             ` Tassilo Horn
  2010-10-21 10:17               ` Tassilo Horn
  2010-10-21 15:05               ` Nick Dokos
  0 siblings, 2 replies; 40+ messages in thread
From: Tassilo Horn @ 2010-10-21  9:38 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: Emacs developers, emacs-orgmode, Carsten Dominik

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

Hi Andreas,

>> Oh, I was pretty sure that org-footnote.el is only a wrapper around
>> the original footnote.el that comes with emacs, but looking at the
>> code it seems to be a completely separate facility.
>>
>> It says to have "better support for resuming editing" than
>> footnote.el but be less configurable.  Can someone enlighten my what
>> is meant with that better support for resuming editing?  I mean,
>> footnote.el already provides automatic renumbering which is the only
>> special feature I can imagine to be of great use when resuming to
>> edit a footnoted document...
>
> common footnote.el was never able to detect if a file opened has
> already footnote inside. Didn't check that for some month now...

Yes, I've just tried that.  Create a file with footnotes, save it, kill
the buffer, find it again, add another footnote, and it starts numbering
from [1] again.  Looks like a bug to me.  I'll report it...

> Also org-footnote implemented labeled footnotes, very useful to avoid
> clashes with forms like list[1]
>
> BTW suggest to replace the common footnote by the org's footnotes, remove the
> prefix then, leave some aliases in org-mode for backward-compatibility.

Well, I don't have a strong opinion on that.  But currently
org-footnote.el is not very good when writing mails, because it places
footnotes at the end of a buffer.  If there's a signature, then
footnotes are in that and likely to be removed by people replying to
your mail.

Bye,
Tassilo

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

* Re: [Orgmode] Difference between org-footnote.el and footnote.el
  2010-10-21  9:38             ` Tassilo Horn
@ 2010-10-21 10:17               ` Tassilo Horn
  2010-10-21 15:05               ` Nick Dokos
  1 sibling, 0 replies; 40+ messages in thread
From: Tassilo Horn @ 2010-10-21 10:17 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: Carsten Dominik, emacs-orgmode, Emacs developers

Tassilo Horn <tassilo@member.fsf.org> writes:

>> common footnote.el was never able to detect if a file opened has
>> already footnote inside. Didn't check that for some month now...
>
> Yes, I've just tried that.  Create a file with footnotes, save it, kill
> the buffer, find it again, add another footnote, and it starts numbering
> from [1] again.  Looks like a bug to me.  I'll report it...

Done as bug#7258.

Bye,
Tassilo

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

* Re: Difference between org-footnote.el and footnote.el
  2010-10-21  9:38             ` Tassilo Horn
  2010-10-21 10:17               ` Tassilo Horn
@ 2010-10-21 15:05               ` Nick Dokos
  2010-10-21 15:19                 ` Charles Philip Chan
  1 sibling, 1 reply; 40+ messages in thread
From: Nick Dokos @ 2010-10-21 15:05 UTC (permalink / raw)
  To: Tassilo Horn
  Cc: emacs-orgmode, Carsten Dominik, nicholas.dokos, Emacs developers

Tassilo Horn <tassilo@member.fsf.org> wrote:


> > BTW suggest to replace the common footnote by the org's footnotes, remove the
> > prefix then, leave some aliases in org-mode for backward-compatibility.
> 
> Well, I don't have a strong opinion on that.  But currently
> org-footnote.el is not very good when writing mails, because it places
> footnotes at the end of a buffer.  If there's a signature, then
> footnotes are in that and likely to be removed by people replying to
> your mail.
> 

How does footnote.el find the signature? I assumed before that
signatures are free-form and therefore unfindable algorithmically, but
that seems to be a mistake on my part. If that's the case, the
mechanism can be grafted into org-footnote.el, perhaps with an expanded
meaning of org-footnote-placement: in addition to nil or a string, it
can be a symbol, say 'before-signature, and that can be set in an appropriate
mail composition hook.

Nick

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

* Re: Difference between org-footnote.el and footnote.el
  2010-10-21 15:05               ` Nick Dokos
@ 2010-10-21 15:19                 ` Charles Philip Chan
  2010-10-21 15:28                   ` Tassilo Horn
  0 siblings, 1 reply; 40+ messages in thread
From: Charles Philip Chan @ 2010-10-21 15:19 UTC (permalink / raw)
  To: emacs-orgmode


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

Nick Dokos <nicholas.dokos@hp.com> writes:

> How does footnote.el find the signature?

I presume by looking for the line "--" which precedes the signature.

Charles

-- 
"I'd crawl over an acre of 'Visual This++' and 'Integrated Development
That' to get to gcc, Emacs, and gdb.  Thank you."
(By Vance Petree, Virginia Power)

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

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

_______________________________________________
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

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

* Re: Difference between org-footnote.el and footnote.el
  2010-10-21 15:19                 ` Charles Philip Chan
@ 2010-10-21 15:28                   ` Tassilo Horn
  2010-10-21 19:11                     ` Eric S Fraga
  0 siblings, 1 reply; 40+ messages in thread
From: Tassilo Horn @ 2010-10-21 15:28 UTC (permalink / raw)
  To: emacs-orgmode

Charles Philip Chan <cpchan@sympatico.ca> writes:

Hi Charles and Nick,

>> How does footnote.el find the signature?
>
> I presume by looking for the line "--" which precedes the signature.

That's not completely true.  The line has to be "-- ", i.e. "--"
followed by exactly one space.

Bye,
Tassilo

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

* Re: Re: Difference between org-footnote.el and footnote.el
  2010-10-21 15:28                   ` Tassilo Horn
@ 2010-10-21 19:11                     ` Eric S Fraga
  2010-10-22  8:22                       ` Sébastien Vauban
  0 siblings, 1 reply; 40+ messages in thread
From: Eric S Fraga @ 2010-10-21 19:11 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-orgmode

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

On Thu, 21 Oct 2010 17:28:20 +0200, Tassilo Horn <tassilo@member.fsf.org> wrote:
> 
> Charles Philip Chan <cpchan@sympatico.ca> writes:
> 
> Hi Charles and Nick,
> 
> >> How does footnote.el find the signature?
> >
> > I presume by looking for the line "--" which precedes the signature.
> 
> That's not completely true.  The line has to be "-- ", i.e. "--"
> followed by exactly one space.
> 
> Bye,
> Tassilo

indeed. looking at the code in footnode.el, there is a search for the
message-signature-separator, which defaults to "^-- $" to find where
to insert footnotes.

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

-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D

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

_______________________________________________
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

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

* Re: A few questions about how you write e-mails
  2010-10-20 17:20 ` Nick Dokos
@ 2010-10-22  8:06   ` Sébastien Vauban
  2010-10-22  8:47     ` Tassilo Horn
  0 siblings, 1 reply; 40+ messages in thread
From: Sébastien Vauban @ 2010-10-22  8:06 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Nick,

Nick Dokos wrote:
> Jeff Horn <jrhorn424-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> I use boxquote.el (see http://www.emacswiki.org/emacs/BoxQuote) for the
> above style, but as Samuel and Bernt point out that's not the best way
> for quoting material where the recipient is expected to use the quoted
> material (e.g. code snippets): extracting it from the boxquote is more
> difficult than it needs to be (even if one has boxquote.el installed).[fn:1]
>
> For code, I use the method Bernt described: message-mark-inserted-region,
> which is similar to the purely textual approach of Samuel's, but does
> provide nice fontification in my mailer.
>
> I bind these functions to keys: C-c q for the boxquote style, C-c m for
> the message style, but this is very much a matter of personal
> preference. Sometimes I need boxquote-unbox, but I don't have a key for
> that: I call the function with M-x ...
>
> [fn:1] I used boxquotes for some code once and Seb Vauban (iirc) took me
> to task. I'm pretty sure I have not repeated the faux-pas.

Now, I'd even advice you to use =C-c C-v C-d=, the Babel code markup. I've
signed the FSF papers, and its automatic fontifying (using Org mode faces)
should be integrated in the Gnus dev code.

#+begin_src sh
date
#+end_src

(see a recent thread on that)

But the following:

--8<---------------cut here---------------start------------->8---
date
--8<---------------cut here---------------end--------------->8---

is still good. for code.. ;-)  and maybe supported in other emailers than
Gnus?

Best regards,
  Seb

-- 
Sébastien Vauban


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

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

* Re: Difference between org-footnote.el and footnote.el
  2010-10-21 19:11                     ` Eric S Fraga
@ 2010-10-22  8:22                       ` Sébastien Vauban
  2010-10-22  9:43                         ` Tassilo Horn
  0 siblings, 1 reply; 40+ messages in thread
From: Sébastien Vauban @ 2010-10-22  8:22 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi all,

Eric S Fraga wrote:
> On Thu, 21 Oct 2010 17:28:20 +0200, Tassilo Horn <tassilo-IGUgQLVVQiRCV4ILt04nZQ@public.gmane.org> wrote:
>> Charles Philip Chan <cpchan-rieW9WUcm8FFJ04o6PK0Fg@public.gmane.org> writes:
>> 
>> >> How does footnote.el find the signature?
>> >
>> > I presume by looking for the line "--" which precedes the signature.
>> 
>> That's not completely true.  The line has to be "-- ", i.e. "--"
>> followed by exactly one space.
>
> indeed. looking at the code in footnode.el, there is a search for the
> message-signature-separator, which defaults to "^-- $" to find where
> to insert footnotes.

If I sum up this whole thread about footnote.el vs org-footnote.el, the latest
one (org-footnote.el) seems better than the original footnote.el in every
aspect but for the placement of the footnotes before the signature.

Does someone take care of updating it?

Best regards,
  Seb

-- 
Sébastien Vauban


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

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

* Re: A few questions about how you write e-mails
  2010-10-22  8:06   ` Sébastien Vauban
@ 2010-10-22  8:47     ` Tassilo Horn
  0 siblings, 0 replies; 40+ messages in thread
From: Tassilo Horn @ 2010-10-22  8:47 UTC (permalink / raw)
  To: emacs-orgmode

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com>
writes:

> --8<---------------cut here---------------start------------->8---
> date
> --8<---------------cut here---------------end--------------->8---
>
> is still good. for code.. ;-) and maybe supported in other emailers
> than Gnus?

I'm not sure, but `C-u C-c M-m' inserts verbatim marks that are at least
understood by slrn (and Gnus).

#v+
date
#v-

Bye,
Tassilo

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

* Re: Difference between org-footnote.el and footnote.el
  2010-10-22  8:22                       ` Sébastien Vauban
@ 2010-10-22  9:43                         ` Tassilo Horn
  2010-10-22  9:53                           ` [PATCH] Make footnotes work correctly in message-mode (was: Difference between org-footnote.el and footnote.el) Tassilo Horn
  0 siblings, 1 reply; 40+ messages in thread
From: Tassilo Horn @ 2010-10-22  9:43 UTC (permalink / raw)
  To: emacs-orgmode

* 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 |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index 36fcfb2..4be0504 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -302,15 +302,20 @@ 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)))
+    (when (org-mode-p) (org-indent-line-function))
     (message "Edit definition and go back with `C-c &' or, if unique, with `C-c C-c'.")))
 
 ;;;###autoload
@@ -506,7 +511,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.
-- 
1.7.3.1

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com>
writes:

Hi Seb,

> If I sum up this whole thread about footnote.el vs org-footnote.el,
> the latest one (org-footnote.el) seems better than the original
> footnote.el in every aspect but for the placement of the footnotes
> before the signature.

Yep, that sounds correct.

> Does someone take care of updating it?

Above is a patch.  It seems to work correctly in both mails and
org-files for me, but I was that stupid not to try the original
org-footnote.el before implementing that feature.  So there could be
regressions, or at least not 100% compatible behavior.  I'm not sure,
but did the original version create a "stack of footnote definitions",
e.g. was the numbering from latest to oldest footnote?  Now it's the
other way round, which looks better to me...

Please everyone, give it a test drive, and if it works, feel free to
commit.

Bye,
Tassilo

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

* [PATCH] Make footnotes work correctly in message-mode (was: Difference between org-footnote.el and footnote.el)
  2010-10-22  9:43                         ` Tassilo Horn
@ 2010-10-22  9:53                           ` Tassilo Horn
  2010-10-22 12:11                             ` [PATCH] Make footnotes work correctly in message-mode Sébastien Vauban
                                               ` (2 more replies)
  0 siblings, 3 replies; 40+ messages in thread
From: Tassilo Horn @ 2010-10-22  9:53 UTC (permalink / raw)
  To: emacs-orgmode

* 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.
-- 
1.7.3.1

Ups, my previous patch (as reply to Seb) had a bug, so here's a new one.

Bye,
Tassilo

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

* Re: [PATCH] Make footnotes work correctly in message-mode
  2010-10-22  9:53                           ` [PATCH] Make footnotes work correctly in message-mode (was: Difference between org-footnote.el and footnote.el) Tassilo Horn
@ 2010-10-22 12:11                             ` Sébastien Vauban
  2010-10-22 12:29                               ` Tassilo Horn
  2010-10-22 13:00                               ` Dan Davison
  2010-10-22 15:43                             ` Sébastien Vauban
  2010-10-24 16:20                             ` [PATCH] Make footnotes work correctly in message-mode (was: Difference between org-footnote.el and footnote.el) Carsten Dominik
  2 siblings, 2 replies; 40+ messages in thread
From: Sébastien Vauban @ 2010-10-22 12:11 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

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---
[sva@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

[sva@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

[sva@MEDIACENTER] ~/src/org-mode>git apply < patch
<stdin>:18: trailing whitespace.
        (let ((max (if (and (eq major-mode 'message-mode)
<stdin>:19: trailing whitespace.
                            (re-search-forward message-signature-separator nil t))
<stdin>:20: trailing whitespace.
                       (progn (beginning-of-line) (point))
<stdin>:21: trailing whitespace.
                     (goto-char (point-max)))))
<stdin>: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-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: A few questions about how you write e-mails
  2010-10-21  8:10       ` suvayu ali
@ 2010-10-22 12:27         ` Matthias Danzl
  2010-10-22 15:07           ` suvayu ali
  0 siblings, 1 reply; 40+ messages in thread
From: Matthias Danzl @ 2010-10-22 12:27 UTC (permalink / raw)
  To: suvayu ali, Org-mode ml

On 10/21/2010 10:10 AM, suvayu ali wrote:
> On 20 October 2010 20:40, Nick Dokos <nicholas.dokos@hp.com> wrote:
>> Given the mangling that mailers do to replies (e.g. the idiotic default
>> top posting of Thunderbird and its ilk), how they handle signatures, and
>> the non-standard nature of signatures themselves, I'd say this is pretty
>> much hopeless.
> 
> After our discussion yesterday, I did some research. Didn't find
> anything +ve. I am considering switching to mutt. :)

Hello!!

I didn't read the entire thread on this, but I like to add that Thunderbird
can be customized in where and how it posts the original message in replies
(Account Settings -> Composition). AND it has support for an external
editor [0]. I'm using Thunderbird 3 + emacs. You even can use a single
Profile
cross-platform!

However, thanks for boxquote.el, it's pretty nice!

[0] http://globs.org/articles.php?pg=2&lng=en Download and install "External
Editor" and set it to launch a simple emacsclient

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

* Re: [PATCH] Make footnotes work correctly in message-mode
  2010-10-22 12:11                             ` [PATCH] Make footnotes work correctly in message-mode Sébastien Vauban
@ 2010-10-22 12:29                               ` Tassilo Horn
  2010-10-22 14:24                                 ` Sébastien Vauban
  2010-10-22 13:00                               ` Dan Davison
  1 sibling, 1 reply; 40+ messages in thread
From: Tassilo Horn @ 2010-10-22 12:29 UTC (permalink / raw)
  To: emacs-orgmode

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com>
writes:

Hi Seb,

> I tried to use this patch, but failed doing so:
>
> [sva@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 <patch> is correct.  So I guess your <patch> 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

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

* Re: [PATCH] Make footnotes work correctly in message-mode
  2010-10-22 12:11                             ` [PATCH] Make footnotes work correctly in message-mode Sébastien Vauban
  2010-10-22 12:29                               ` Tassilo Horn
@ 2010-10-22 13:00                               ` Dan Davison
  2010-10-22 15:51                                 ` Sébastien Vauban
  1 sibling, 1 reply; 40+ messages in thread
From: Dan Davison @ 2010-10-22 13:00 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
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

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

* Re: [PATCH] Make footnotes work correctly in message-mode
  2010-10-22 12:29                               ` Tassilo Horn
@ 2010-10-22 14:24                                 ` Sébastien Vauban
  0 siblings, 0 replies; 40+ messages in thread
From: Sébastien Vauban @ 2010-10-22 14:24 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Tassilo,

Tassilo Horn wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>
>> I tried to use this patch, but failed doing so:
>>
>> [sva@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 <patch> is correct. So I guess your <patch> 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-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: A few questions about how you write e-mails
  2010-10-22 12:27         ` Matthias Danzl
@ 2010-10-22 15:07           ` suvayu ali
  0 siblings, 0 replies; 40+ messages in thread
From: suvayu ali @ 2010-10-22 15:07 UTC (permalink / raw)
  To: Matthias Danzl; +Cc: Org-mode ml

Hi Matthias,

On 22 October 2010 05:27, Matthias Danzl <mdanzl1@aol.com> wrote:
> On 10/21/2010 10:10 AM, suvayu ali wrote:
>> On 20 October 2010 20:40, Nick Dokos <nicholas.dokos@hp.com> wrote:
>>> Given the mangling that mailers do to replies (e.g. the idiotic default
>>> top posting of Thunderbird and its ilk), how they handle signatures, and
>>> the non-standard nature of signatures themselves, I'd say this is pretty
>>> much hopeless.
>>
>> After our discussion yesterday, I did some research. Didn't find
>> anything +ve. I am considering switching to mutt. :)
>
> Hello!!
>
> I didn't read the entire thread on this, but I like to add that Thunderbird
> can be customized in where and how it posts the original message in replies
> (Account Settings -> Composition). AND it has support for an external
> editor [0]. I'm using Thunderbird 3 + emacs. You even can use a single
> Profile
> cross-platform!
>
> However, thanks for boxquote.el, it's pretty nice!
>
> [0] http://globs.org/articles.php?pg=2&lng=en Download and install "External
> Editor" and set it to launch a simple emacsclient
>

I have been using External Editor, tbemail.el and emacsclient for many
months now. Its great, better than before. But still it leaves me
wanting for more Emacs integration. My recent search for an emailer
started when I realised Thunderbird's attachment facility is pretty
much beyond my control.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: [PATCH] Make footnotes work correctly in message-mode
  2010-10-22  9:53                           ` [PATCH] Make footnotes work correctly in message-mode (was: Difference between org-footnote.el and footnote.el) Tassilo Horn
  2010-10-22 12:11                             ` [PATCH] Make footnotes work correctly in message-mode Sébastien Vauban
@ 2010-10-22 15:43                             ` Sébastien Vauban
  2010-10-22 16:23                               ` Tassilo Horn
  2010-10-24 16:20                             ` [PATCH] Make footnotes work correctly in message-mode (was: Difference between org-footnote.el and footnote.el) Carsten Dominik
  2 siblings, 1 reply; 40+ messages in thread
From: Sébastien Vauban @ 2010-10-22 15:43 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

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-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [PATCH] Make footnotes work correctly in message-mode
  2010-10-22 13:00                               ` Dan Davison
@ 2010-10-22 15:51                                 ` Sébastien Vauban
  0 siblings, 0 replies; 40+ messages in thread
From: Sébastien Vauban @ 2010-10-22 15:51 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Dan,

Dan Davison wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw-XMD5yJDbdMSQIYZ4X/+iSw@public.gmane.orgrg> 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-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [PATCH] Make footnotes work correctly in message-mode
  2010-10-22 15:43                             ` Sébastien Vauban
@ 2010-10-22 16:23                               ` Tassilo Horn
  2010-10-22 18:44                                 ` Sébastien Vauban
  0 siblings, 1 reply; 40+ messages in thread
From: Tassilo Horn @ 2010-10-22 16:23 UTC (permalink / raw)
  To: emacs-orgmode

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com>
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

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

* Re: [PATCH] Make footnotes work correctly in message-mode
  2010-10-22 16:23                               ` Tassilo Horn
@ 2010-10-22 18:44                                 ` Sébastien Vauban
  0 siblings, 0 replies; 40+ messages in thread
From: Sébastien Vauban @ 2010-10-22 18:44 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Tassilo,

Tassilo Horn wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> 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-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [PATCH] Make footnotes work correctly in message-mode (was: Difference between org-footnote.el and footnote.el)
  2010-10-22  9:53                           ` [PATCH] Make footnotes work correctly in message-mode (was: Difference between org-footnote.el and footnote.el) Tassilo Horn
  2010-10-22 12:11                             ` [PATCH] Make footnotes work correctly in message-mode Sébastien Vauban
  2010-10-22 15:43                             ` Sébastien Vauban
@ 2010-10-24 16:20                             ` Carsten Dominik
  2010-10-24 17:02                               ` Nick Dokos
  2 siblings, 1 reply; 40+ messages in thread
From: Carsten Dominik @ 2010-10-24 16:20 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-orgmode

Applied, thanks - bplease confirm that I did get the right patch.

Thanks.

- Carsten

On Oct 22, 2010, at 11:53 AM, 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.
> -- 
> 1.7.3.1
>
> Ups, my previous patch (as reply to Seb) had a bug, so here's a new  
> one.
>
> 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

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

* Re: [PATCH] Make footnotes work correctly in message-mode (was: Difference between org-footnote.el and footnote.el)
  2010-10-24 16:20                             ` [PATCH] Make footnotes work correctly in message-mode (was: Difference between org-footnote.el and footnote.el) Carsten Dominik
@ 2010-10-24 17:02                               ` Nick Dokos
  2010-10-24 17:14                                 ` [PATCH] Make footnotes work correctly in message-mode Tassilo Horn
  0 siblings, 1 reply; 40+ messages in thread
From: Nick Dokos @ 2010-10-24 17:02 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Tassilo Horn, nicholas.dokos, emacs-orgmode

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

> Applied, thanks - bplease confirm that I did get the right patch.
> 
> Thanks.
> 
> - Carsten
> 
> On Oct 22, 2010, at 11:53 AM, 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.
> > --
> > 1.7.3.1
> >
> > Ups, my previous patch (as reply to Seb) had a bug, so here's a new
> > one.

Message-mode is just *one* message composition mode available to emacs
users and there are various other mail readers out there that don't use
it (e.g. mh-e) and therefore cannot take advantage of this
patch. Whether anybody cares or not, I don't know.[fn:1]

Nick

Footnotes:

[fn:1] Personally (mh-e user), I don't care. My signature has always
       been nil.

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

* Re: [PATCH] Make footnotes work correctly in message-mode
  2010-10-24 17:02                               ` Nick Dokos
@ 2010-10-24 17:14                                 ` Tassilo Horn
  0 siblings, 0 replies; 40+ messages in thread
From: Tassilo Horn @ 2010-10-24 17:14 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, Carsten Dominik

Nick Dokos <nicholas.dokos@hp.com> writes:

Hi Carsten & Nick,

>> Applied, thanks - bplease confirm that I did get the right patch.

Yes, you've applied the right one.  Thanks!

> Message-mode is just *one* message composition mode available to emacs
> users and there are various other mail readers out there that don't
> use it (e.g. mh-e) and therefore cannot take advantage of this
> patch.

Yes, indeed, but I think that there are tendencies to make message-mode
the default mail editing mode in emacs.  At least Gnus and now also
rmail use it.

Anyway, we can add a big (or ...) with any mail mode we know, or we can
even assume that an occurence of "^-- \n" is that special that is has to
be a mail.

Bye,
Tassilo

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

end of thread, other threads:[~2010-10-24 17:14 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-20  5:37 A few questions about how you write e-mails Jeff Horn
2010-10-20  5:51 ` Glyn Millington
2010-10-20  5:57 ` Noorul Islam K M
2010-10-20  6:44 ` Samuel Wales
2010-10-20 11:36   ` Bernt Hansen
2010-10-20 17:20 ` Nick Dokos
2010-10-22  8:06   ` Sébastien Vauban
2010-10-22  8:47     ` Tassilo Horn
2010-10-20 20:10 ` Eric Schulte
2010-10-21  1:55 ` Matt Lundin
2010-10-21  2:47   ` suvayu ali
2010-10-21  3:40     ` Nick Dokos
2010-10-21  8:10       ` suvayu ali
2010-10-22 12:27         ` Matthias Danzl
2010-10-22 15:07           ` suvayu ali
2010-10-21  7:45     ` Tassilo Horn
2010-10-21  8:07       ` suvayu ali
2010-10-21  8:17         ` Difference between org-footnote.el and footnote.el (was: A few questions about how you write e-mails) Tassilo Horn
2010-10-21  9:10           ` [Orgmode] Difference between org-footnote.el and footnote.el Andreas Röhler
2010-10-21  9:38             ` Tassilo Horn
2010-10-21 10:17               ` Tassilo Horn
2010-10-21 15:05               ` Nick Dokos
2010-10-21 15:19                 ` Charles Philip Chan
2010-10-21 15:28                   ` Tassilo Horn
2010-10-21 19:11                     ` Eric S Fraga
2010-10-22  8:22                       ` Sébastien Vauban
2010-10-22  9:43                         ` Tassilo Horn
2010-10-22  9:53                           ` [PATCH] Make footnotes work correctly in message-mode (was: Difference between org-footnote.el and footnote.el) Tassilo Horn
2010-10-22 12:11                             ` [PATCH] Make footnotes work correctly in message-mode Sébastien Vauban
2010-10-22 12:29                               ` Tassilo Horn
2010-10-22 14:24                                 ` Sébastien Vauban
2010-10-22 13:00                               ` Dan Davison
2010-10-22 15:51                                 ` Sébastien Vauban
2010-10-22 15:43                             ` Sébastien Vauban
2010-10-22 16:23                               ` Tassilo Horn
2010-10-22 18:44                                 ` Sébastien Vauban
2010-10-24 16:20                             ` [PATCH] Make footnotes work correctly in message-mode (was: Difference between org-footnote.el and footnote.el) Carsten Dominik
2010-10-24 17:02                               ` Nick Dokos
2010-10-24 17:14                                 ` [PATCH] Make footnotes work correctly in message-mode Tassilo Horn
2010-10-21  6:16   ` A few questions about how you write e-mails Noorul Islam K M

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