Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] How to make emacs position my cursor for me
@ 2008-11-04 15:55 Steve Goldman
  2008-11-04 16:25 ` Stephen Patterson
  0 siblings, 1 reply; 8+ messages in thread
From: Steve Goldman @ 2008-11-04 15:55 UTC (permalink / raw)



I understand your religious fanaticism about top posting, etc.  I'll buy into it if you can tell me how to make sup make emacs position my cursor in the correct place when I hit compose or reply.  I want to hit 'c' or 'r' and immediately begin typing, instead of navigate around the buffer and dodge quoted text and a hundred signatures.

Thanks.
-- 

Steve Goldman
sgoldman at tower-research.com

T: 212.219.6014
F: 212.219.6007

Tower Research Capital, LLC
377 Broadway, 11th Fl.
New York, NY 10013


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

* [sup-talk] How to make emacs position my cursor for me
  2008-11-04 15:55 [sup-talk] How to make emacs position my cursor for me Steve Goldman
@ 2008-11-04 16:25 ` Stephen Patterson
  2008-11-04 17:18   ` John Bent
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Patterson @ 2008-11-04 16:25 UTC (permalink / raw)


On 04 Nov 08, Steve Goldman (sgoldman at tower-research.com) wrote:
> 
> I understand your religious fanaticism about top posting, etc.  I'll buy into it if you can tell me how to make sup make emacs position my cursor in the correct place when I hit compose or reply.  I want to hit 'c' or 'r' and immediately begin typing, instead of navigate around the buffer and dodge quoted text and a hundred signatures.

Not sure how you set the editor for sup, but "emacs +8" will start the
cursor on line 8. Mail clients (mutt) normally put the cursor at the top
though.


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

* [sup-talk] How to make emacs position my cursor for me
  2008-11-04 16:25 ` Stephen Patterson
@ 2008-11-04 17:18   ` John Bent
  2008-11-04 19:06     ` Nicolas Pouillard
  0 siblings, 1 reply; 8+ messages in thread
From: John Bent @ 2008-11-04 17:18 UTC (permalink / raw)


Excerpts from Stephen Patterson's message of Tue Nov 04 09:25:42 -0700 2008:
> On 04 Nov 08, Steve Goldman (sgoldman at tower-research.com) wrote:
> > 
> > I understand your religious fanaticism about top posting, etc.  I'll buy into it if you can tell me how to make sup make emacs position my cursor in the correct place when I hit compose or reply.  I want to hit 'c' or 'r' and immediately begin typing, instead of navigate around the buffer and dodge quoted text and a hundred signatures.
> 
> Not sure how you set the editor for sup, but "emacs +8" will start the
> cursor on line 8. Mail clients (mutt) normally put the cursor at the top
> though.
>
To set the editor for sup, just edit the :editor: line in
.sup/config.yaml.

vim has the same +N option but for email editing in sup I prefer 
'+/^\s*\n'  which sets the initial cursor position to the first blank
line (i.e. following the email headers).  

John 


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

* [sup-talk] How to make emacs position my cursor for me
  2008-11-04 17:18   ` John Bent
@ 2008-11-04 19:06     ` Nicolas Pouillard
  2008-11-04 21:28       ` [sup-talk] Patch: jump to body on compose [was: Re: How to make emacs position my cursor for me] Tomas Pospisek ML
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Pouillard @ 2008-11-04 19:06 UTC (permalink / raw)


Excerpts from John Bent's message of Tue Nov 04 18:18:52 +0100 2008:
> Excerpts from Stephen Patterson's message of Tue Nov 04 09:25:42 -0700 2008:
> > On 04 Nov 08, Steve Goldman (sgoldman at tower-research.com) wrote:
> > > 
> > > I understand your religious fanaticism about top posting, etc.  I'll buy into it if you can tell me how to make sup make emacs position my cursor in the correct place when I hit compose or reply.  I want to hit 'c' or 'r' and immediately begin typing, instead of navigate around the buffer and dodge quoted text and a hundred signatures.
> > 
> > Not sure how you set the editor for sup, but "emacs +8" will start the
> > cursor on line 8. Mail clients (mutt) normally put the cursor at the top
> > though.
> >
> To set the editor for sup, just edit the :editor: line in
> .sup/config.yaml.
> 
> vim has the same +N option but for email editing in sup I prefer 
> '+/^\s*\n'  which sets the initial cursor position to the first blank
> line (i.e. following the email headers).  

Cool, thanks for the tip!

-- 
Nicolas Pouillard aka Ertai


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

* [sup-talk] Patch: jump to body on compose [was: Re: How to make emacs position my cursor for me]
  2008-11-04 19:06     ` Nicolas Pouillard
@ 2008-11-04 21:28       ` Tomas Pospisek ML
  2008-11-04 22:11         ` John Bent
  0 siblings, 1 reply; 8+ messages in thread
From: Tomas Pospisek ML @ 2008-11-04 21:28 UTC (permalink / raw)



On 11/4/2008, "Nicolas Pouillard" <nicolas.pouillard at gmail.com> wrote:

>Excerpts from John Bent's message of Tue Nov 04 18:18:52 +0100 2008:
>> Excerpts from Stephen Patterson's message of Tue Nov 04 09:25:42 -0700 2008:
>> > On 04 Nov 08, Steve Goldman (sgoldman at tower-research.com) wrote:
>> > >
>> > > I understand your religious fanaticism about top posting, etc.  I'll buy into it if you can tell me how to make sup make emacs position my cursor in the correct place when I hit compose or reply.  I want to hit 'c' or 'r' and immediately begin typing, instead of navigate around the buffer and dodge quoted text and a hundred signatures.
>> >
>> > Not sure how you set the editor for sup, but "emacs +8" will start the
>> > cursor on line 8. Mail clients (mutt) normally put the cursor at the top
>> > though.
>> >
>> To set the editor for sup, just edit the :editor: line in
>> .sup/config.yaml.
>>
>> vim has the same +N option but for email editing in sup I prefer
>> '+/^\s*\n'  which sets the initial cursor position to the first blank
>> line (i.e. following the email headers).
>
>Cool, thanks for the tip!

Sounds like a reasonable default to me. (Sorry for not putting this into
a Git repo William. In case I get around hacking larger pieces of Sup
I'll do that I promise):

--- sup.rb.orig	2008-11-04 22:19:35.000000000 +0100
+++ sup.rb	2008-11-04 22:23:45.000000000 +0100
@@ -212,7 +212,8 @@
         :signature => File.join(ENV["HOME"], ".signature")
       }
     },
-    :editor => ENV["EDITOR"] || "/usr/bin/vim -f -c 'setlocal spell
spelllang=en_us' -c 'set filetype=mail'",
+    :editor => ENV["EDITOR"] ||
+               '/usr/bin/vim -f -c "setlocal spell spelllang=en_us"
-c "set filetype=mail" -c \'+/^\s*\n\'',
     :thread_by_subject => false,
     :edit_signature => false,
     :ask_for_cc => true,


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

* [sup-talk] Patch: jump to body on compose [was: Re: How to make emacs position my cursor for me]
  2008-11-04 21:28       ` [sup-talk] Patch: jump to body on compose [was: Re: How to make emacs position my cursor for me] Tomas Pospisek ML
@ 2008-11-04 22:11         ` John Bent
  2008-11-10  3:51           ` William Morgan
  0 siblings, 1 reply; 8+ messages in thread
From: John Bent @ 2008-11-04 22:11 UTC (permalink / raw)


Excerpts from Tomas Pospisek ML's message of Tue Nov 04 14:28:35 -0700 2008:
> 
> On 11/4/2008, "Nicolas Pouillard" <nicolas.pouillard at gmail.com> wrote:
> 
> >Excerpts from John Bent's message of Tue Nov 04 18:18:52 +0100 2008:
> >> Excerpts from Stephen Patterson's message of Tue Nov 04 09:25:42 -0700 2008:
> >> > On 04 Nov 08, Steve Goldman (sgoldman at tower-research.com) wrote:
> >> > >
> >> > > I understand your religious fanaticism about top posting, etc.  I'll buy into it if you can tell me how to make sup make emacs position my cursor in the correct place when I hit compose or reply.  I want to hit 'c' or 'r' and immediately begin typing, instead of navigate around the buffer and dodge quoted text and a hundred signatures.
> >> >
> >> > Not sure how you set the editor for sup, but "emacs +8" will start the
> >> > cursor on line 8. Mail clients (mutt) normally put the cursor at the top
> >> > though.
> >> >
> >> To set the editor for sup, just edit the :editor: line in
> >> .sup/config.yaml.
> >>
> >> vim has the same +N option but for email editing in sup I prefer
> >> '+/^\s*\n'  which sets the initial cursor position to the first blank
> >> line (i.e. following the email headers).
> >
> >Cool, thanks for the tip!
> 
> Sounds like a reasonable default to me. (Sorry for not putting this into
> a Git repo William. In case I get around hacking larger pieces of Sup
> I'll do that I promise):
> 
You don't want the preceding -c.  The tics (') are to protect the
slashes and wildcards from the shell.  This is what you want:

'/usr/bin/vim -f +/^\s*\n-c "setlocal spell spelllang=en_us" -c "set filetype=mail" '

I also like passing -X to make it go a little faster in a terminal....

John 

> --- sup.rb.orig    2008-11-04 22:19:35.000000000 +0100
> +++ sup.rb    2008-11-04 22:23:45.000000000 +0100
> @@ -212,7 +212,8 @@
>          :signature => File.join(ENV["HOME"], ".signature")
>        }
>      },
> -    :editor => ENV["EDITOR"] || "/usr/bin/vim -f -c 'setlocal spell
> spelllang=en_us' -c 'set filetype=mail'",
> +    :editor => ENV["EDITOR"] ||
> +               '/usr/bin/vim -f -c "setlocal spell spelllang=en_us"
> -c "set filetype=mail" -c \'+/^\s*\n\'',
>      :thread_by_subject => false,
>      :edit_signature => false,
>      :ask_for_cc => true,


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

* [sup-talk] Patch: jump to body on compose [was: Re: How to make emacs position my cursor for me]
  2008-11-04 22:11         ` John Bent
@ 2008-11-10  3:51           ` William Morgan
  2008-11-26 21:16             ` Marc Hartstein
  0 siblings, 1 reply; 8+ messages in thread
From: William Morgan @ 2008-11-10  3:51 UTC (permalink / raw)


Reformatted excerpts from John Bent's message of 2008-11-04:
> '/usr/bin/vim -f +/^\s*\n-c "setlocal spell spelllang=en_us" -c "set
> filetype=mail" '

I'll accept a patch to this effect if someone wants to whip one up!
-- 
William <wmorgan-sup at masanjin.net>


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

* [sup-talk] Patch: jump to body on compose [was: Re: How to make emacs position my cursor for me]
  2008-11-10  3:51           ` William Morgan
@ 2008-11-26 21:16             ` Marc Hartstein
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Hartstein @ 2008-11-26 21:16 UTC (permalink / raw)


Excerpts from William Morgan's message of Sun Nov 09 22:51:55 -0500 2008:
> Reformatted excerpts from John Bent's message of 2008-11-04:
> > '/usr/bin/vim -f +/^\s*\n-c "setlocal spell spelllang=en_us" -c "set
> > filetype=mail" '
> 
> I'll accept a patch to this effect if someone wants to whip one up!

To discourage top-posting, would it not be preferable to begin with the
cursor on the last line rather than the first line of the body?

:editor: '/usr/bin/vim -f +$ -c "setlocal spell spelllang=en_us" -c "set
filetype=mail"'

(Of course, that might encourage an increased cascade, but there's only
so much the tool author can do to encourage the user to comply with
conventions)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20081126/70488389/attachment.bin>


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

end of thread, other threads:[~2008-11-26 21:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-04 15:55 [sup-talk] How to make emacs position my cursor for me Steve Goldman
2008-11-04 16:25 ` Stephen Patterson
2008-11-04 17:18   ` John Bent
2008-11-04 19:06     ` Nicolas Pouillard
2008-11-04 21:28       ` [sup-talk] Patch: jump to body on compose [was: Re: How to make emacs position my cursor for me] Tomas Pospisek ML
2008-11-04 22:11         ` John Bent
2008-11-10  3:51           ` William Morgan
2008-11-26 21:16             ` Marc Hartstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox