unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* slrn and emacsclient
@ 2007-02-01 12:40 Tyler Smith
  2007-02-01 17:04 ` Maarten Bergvelt
  2007-02-01 17:28 ` Phil Jackson
  0 siblings, 2 replies; 11+ messages in thread
From: Tyler Smith @ 2007-02-01 12:40 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I'm trying to get emacsclient set up as my editor for slrn. This
arrangment works well for mutt, but it's a little rough with slrn as I
have it configured.

Posting from slrn calls emacsclient, but not in mail mode. When I
finish I have to save the message, kill the buffer, confirm kill the
buffer even though it still has clients, switch to the slrn window,
control-c to get past "waiting for Emacs", and then finally post the
message.

With mutt I just C-x k the message and switch to the mutt window,
which is waiting for me to send the message. How do I get the same
functionality with slrn?

I know, I should probably be using gnus instead from inside emacs, but
I couldn't quite get that working. Eventually I'll sort it out, but
the mutt-like interface of slrn is familiar.

Oh, and here's the relevant part of my .emacs:

;; mutt and mail stuff:
(add-to-list 'auto-mode-alist '("/mutt" . mail-mode))
(add-to-list 'auto-mode-alist '("/slrn" . mail-mode)) ;; just a guess!

(defun my-mail-mode-hook ()
     (auto-fill-mode 1)
     (abbrev-mode 1)
     (local-set-key "\C-Xk" 'server-edit))
(add-hook 'mail-mode-hook 'my-mail-mode-hook)


-- 
Regards,

Tyler Smith

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

* Re: slrn and emacsclient
  2007-02-01 12:40 slrn and emacsclient Tyler Smith
@ 2007-02-01 17:04 ` Maarten Bergvelt
  2007-02-01 21:55   ` Tyler Smith
  2007-02-01 17:28 ` Phil Jackson
  1 sibling, 1 reply; 11+ messages in thread
From: Maarten Bergvelt @ 2007-02-01 17:04 UTC (permalink / raw)
  To: help-gnu-emacs

In article <slrnes3ntg.9uu.tyler.smith@blackbart.mynetwork>, Tyler Smith wrote:
> I'm trying to get emacsclient set up as my editor for slrn. This
> arrangment works well for mutt, but it's a little rough with slrn as I
> have it configured.
> 
> Posting from slrn calls emacsclient, but not in mail mode. When I
> finish I have to save the message, kill the buffer, confirm kill the
> buffer even though it still has clients, switch to the slrn window,
> control-c to get past "waiting for Emacs", and then finally post the
> message.
> 
> With mutt I just C-x k the message and switch to the mutt window,
> which is waiting for me to send the message. How do I get the same
> functionality with slrn?
> 
> I know, I should probably be using gnus instead from inside emacs, but
> I couldn't quite get that working. Eventually I'll sort it out, but
> the mutt-like interface of slrn is familiar.
> 
> Oh, and here's the relevant part of my .emacs:
> 
> ;; mutt and mail stuff:
> (add-to-list 'auto-mode-alist '("/mutt" . mail-mode))
> (add-to-list 'auto-mode-alist '("/slrn" . mail-mode)) ;; just a guess!
> 
> (defun my-mail-mode-hook ()
>      (auto-fill-mode 1)
>      (abbrev-mode 1)
>      (local-set-key "\C-Xk" 'server-edit))
> (add-hook 'mail-mode-hook 'my-mail-mode-hook)

I do in my .slrnrc
set editor_command "emacs -nw '%s'"
and I don't have any customization in my .emacs. It just works for me,
after finishing the posting I type C-c C-c and it returns me to slrn,
to send it. 

Same for mutt:
 set editor="emacs -nw"
in .muttrc, no customization for mutt in .emacs. I don't need to switch to the
mutt window, emacs runs in the same terminal as mutt (or slrn).

I think it is distracting to need to move my attention from the
terminal window running slrn/mutt to the emacs window and back.  This
setup works also over ssh, which is very important for me.

hth.
-- 
Maarten Bergvelt		

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

* Re: slrn and emacsclient
  2007-02-01 12:40 slrn and emacsclient Tyler Smith
  2007-02-01 17:04 ` Maarten Bergvelt
@ 2007-02-01 17:28 ` Phil Jackson
  1 sibling, 0 replies; 11+ messages in thread
From: Phil Jackson @ 2007-02-01 17:28 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Tyler,

Tyler Smith <tyler.smith@mail.mcgill.ca> writes:

> With mutt I just C-x k the message and switch to the mutt window,
> which is waiting for me to send the message. How do I get the same
> functionality with slrn?

'C-x k' seems like the wrong thing to do, what happens if you
save-buffer and then hit 'C-x #' ?

Cheers,
Phil
-- 
"China is a big country, inhabited by many Chinese."
- Charles De Gaulle, former French President    

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

* Re: slrn and emacsclient
  2007-02-01 17:04 ` Maarten Bergvelt
@ 2007-02-01 21:55   ` Tyler Smith
  2007-02-01 22:09     ` Tyler Smith
                       ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Tyler Smith @ 2007-02-01 21:55 UTC (permalink / raw)
  To: help-gnu-emacs

On 2007-02-01, Maarten Bergvelt <bergv@math.uiuc.edu> wrote:
>
> I do in my .slrnrc
> set editor_command "emacs -nw '%s'"
> and I don't have any customization in my .emacs. It just works for me,
> after finishing the posting I type C-c C-c and it returns me to slrn,
> to send it. 

Ok, I've got that now as well, we'll see how it works.

C-c C-c does nothing.

C-x # does nothing

C-x C-c ask me to save then returns control to slrn so that I can
post, or re-edit. That looks good. Still, it would be nice to have it
open automatically in mail-mode (or text mode) to do proper
line-wrapping and quote highlighting etc.

> Same for mutt: set editor="emacs -nw" in .muttrc, no customization
>for mutt in .emacs. I don't need to switch to the mutt window, emacs
>runs in the same terminal as mutt (or slrn).

I'm going to try that out. The only down side is that there is a
delay as a whole new instance of emacs fires up, as opposed to the
immediate response of emacs client. Not a big deal, but for a quick
one-line response it becomes noticeable.

>
> I think it is distracting to need to move my attention from the
> terminal window running slrn/mutt to the emacs window and back.  This
> setup works also over ssh, which is very important for me.
>
> hth.

It is a bit distracting, so the -nw route may be what I switch
to. Thanks very much!

-- 
Regards,

Tyler Smith

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

* Re: slrn and emacsclient
  2007-02-01 21:55   ` Tyler Smith
@ 2007-02-01 22:09     ` Tyler Smith
  2007-02-04 17:28     ` Kevin Rodgers
       [not found]     ` <mailman.4001.1170610117.2155.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 11+ messages in thread
From: Tyler Smith @ 2007-02-01 22:09 UTC (permalink / raw)
  To: help-gnu-emacs


> On 2007-02-01, Maarten Bergvelt <bergv@math.uiuc.edu> wrote:
>
>>
>> I think it is distracting to need to move my attention from the
>> terminal window running slrn/mutt to the emacs window and back.  This
>> setup works also over ssh, which is very important for me.
>>
>> hth.
>
> It is a bit distracting, so the -nw route may be what I switch
> to. Thanks very much!
>

Wow, that is much better than jumping to another window for all my
mail! I will try that out over the next few days. The mode hooks in my
.emacs still work, it pops me right into mail mode. How can I do that
for slrn? Also, is there any way to get my alt key to work in a
terminal window? It feels like I'm missing a finger without it...

-- 
Regards,

Tyler Smith

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

* Re: slrn and emacsclient
  2007-02-01 21:55   ` Tyler Smith
  2007-02-01 22:09     ` Tyler Smith
@ 2007-02-04 17:28     ` Kevin Rodgers
       [not found]     ` <mailman.4001.1170610117.2155.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 11+ messages in thread
From: Kevin Rodgers @ 2007-02-04 17:28 UTC (permalink / raw)
  To: help-gnu-emacs

Tyler Smith wrote:
> On 2007-02-01, Maarten Bergvelt <bergv@math.uiuc.edu> wrote:
>> I do in my .slrnrc
>> set editor_command "emacs -nw '%s'"
>> and I don't have any customization in my .emacs. It just works for me,
>> after finishing the posting I type C-c C-c and it returns me to slrn,
>> to send it. 
> 
> Ok, I've got that now as well, we'll see how it works.
> 
> C-c C-c does nothing.
> 
> C-x # does nothing
> 
> C-x C-c ask me to save then returns control to slrn so that I can
> post, or re-edit. That looks good. Still, it would be nice to have it
> open automatically in mail-mode (or text mode) to do proper
> line-wrapping and quote highlighting etc.

That's the easy part: `C-h v buffer-file-name' in the message buffer,
then fix this part of your .emacs to match the slrn temp file names:

(add-to-list 'auto-mode-alist '("/slrn" . mail-mode)) ;; just a guess!


-- 
Kevin Rodgers
Denver, Colorado, USA

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

* Re: slrn and emacsclient
       [not found]     ` <mailman.4001.1170610117.2155.help-gnu-emacs@gnu.org>
@ 2007-02-05  4:12       ` Tyler Smith
  2007-02-05  9:59         ` Peter Dyballa
       [not found]         ` <mailman.4033.1170669629.2155.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 11+ messages in thread
From: Tyler Smith @ 2007-02-05  4:12 UTC (permalink / raw)
  To: help-gnu-emacs

On 2007-02-04, Kevin Rodgers <kevin.d.rodgers@gmail.com> wrote:
>> it would be nice to have it
>> open automatically in mail-mode (or text mode) to do proper
>> line-wrapping and quote highlighting etc.
>
> That's the easy part: `C-h v buffer-file-name' in the message buffer,
> then fix this part of your .emacs to match the slrn temp file names:
>

Excellent, thanks!

I'm still having trouble with my alt key in the non-X emacs. When I
type alt-x it runs the command capitalize-word, and leaves M8 in the
minibuffer, so that the next key gets repeated 8 times. That's not
right...


-- 
Regards,

Tyler Smith

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

* Re: slrn and emacsclient
  2007-02-05  4:12       ` Tyler Smith
@ 2007-02-05  9:59         ` Peter Dyballa
       [not found]         ` <mailman.4033.1170669629.2155.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 11+ messages in thread
From: Peter Dyballa @ 2007-02-05  9:59 UTC (permalink / raw)
  To: Tyler Smith; +Cc: help-gnu-emacs


Am 05.02.2007 um 04:12 schrieb Tyler Smith:

> I'm still having trouble with my alt key in the non-X emacs. When I
> type alt-x it runs the command capitalize-word, and leaves M8 in the
> minibuffer, so that the next key gets repeated 8 times. That's not
> right...

You're wrong! When GNU Emacs runs in some terminal emulation it is no  
X client anymore. It receives key events which the terminal emulation  
has received first, filtered, and then passed to programmes running  
in it: a shell, vi, hangman, GNU Emacs ...

--
Greetings

   Pete

"America believes in education: the average professor earns more money
in a year than a professional athlete earns in a whole week." – Evan
Esar

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

* Re: slrn and emacsclient
       [not found]         ` <mailman.4033.1170669629.2155.help-gnu-emacs@gnu.org>
@ 2007-02-05 16:02           ` Tyler Smith
  2007-02-05 17:57             ` Peter Dyballa
       [not found]             ` <mailman.4057.1170698276.2155.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 11+ messages in thread
From: Tyler Smith @ 2007-02-05 16:02 UTC (permalink / raw)
  To: help-gnu-emacs

On 2007-02-05, Peter Dyballa <Peter_Dyballa@Web.DE> wrote:
>
> Am 05.02.2007 um 04:12 schrieb Tyler Smith:
>
>> I'm still having trouble with my alt key in the non-X emacs. When I
>> type alt-x it runs the command capitalize-word, and leaves M8 in the
>> minibuffer, so that the next key gets repeated 8 times. That's not
>> right...
>
> You're wrong! When GNU Emacs runs in some terminal emulation it is no  
> X client anymore. It receives key events which the terminal emulation  
> has received first, filtered, and then passed to programmes running  
> in it: a shell, vi, hangman, GNU Emacs ...

Is this true for all terminal emulators, or is there one that is
better for use with emacs, ie. one that passes the meta key events on
to emacs without altering them?

-- 
Regards,

Tyler Smith

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

* Re: slrn and emacsclient
  2007-02-05 16:02           ` Tyler Smith
@ 2007-02-05 17:57             ` Peter Dyballa
       [not found]             ` <mailman.4057.1170698276.2155.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 11+ messages in thread
From: Peter Dyballa @ 2007-02-05 17:57 UTC (permalink / raw)
  To: Tyler Smith; +Cc: help-gnu-emacs


Am 05.02.2007 um 16:02 schrieb Tyler Smith:

>> When GNU Emacs runs in some terminal emulation it is no
>> X client anymore. It receives key events which the terminal emulation
>> has received first, filtered, and then passed to programmes running
>> in it: a shell, vi, hangman, GNU Emacs ...
>
> Is this true for all terminal emulators, or is there one that is
> better for use with emacs, ie. one that passes the meta key events on
> to emacs without altering them?

*I* don't know of any exception.

--
Greetings

   Pete

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
      -Benjamin Franklin, Historical Review of Pennsylvania.

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

* Re: slrn and emacsclient
       [not found]             ` <mailman.4057.1170698276.2155.help-gnu-emacs@gnu.org>
@ 2007-02-06  2:36               ` Tyler Smith
  0 siblings, 0 replies; 11+ messages in thread
From: Tyler Smith @ 2007-02-06  2:36 UTC (permalink / raw)
  To: help-gnu-emacs

On 2007-02-05, Peter Dyballa <Peter_Dyballa@Web.DE> wrote:
>
> Am 05.02.2007 um 16:02 schrieb Tyler Smith:
>
>>> When GNU Emacs runs in some terminal emulation it is no
>>> X client anymore. It receives key events which the terminal emulation
>>> has received first, filtered, and then passed to programmes running
>>> in it: a shell, vi, hangman, GNU Emacs ...
>>
>> Is this true for all terminal emulators, or is there one that is
>> better for use with emacs, ie. one that passes the meta key events on
>> to emacs without altering them?
>
> *I* don't know of any exception.
>

Well, to answer my own question, I found one with some help from the
Debian people. Xterm will accpet Alt/Meta modifiers, with the
following line in your .Xresources file:

xterm*metaSendsEscape: true

This works for me with Debian testing, YMMV. There's also a package
called XtermExtras, with an .el file, .inputrc and .Xresources
modifications available at the EmacsWiki. 

-- 
Regards,

Tyler Smith

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

end of thread, other threads:[~2007-02-06  2:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-01 12:40 slrn and emacsclient Tyler Smith
2007-02-01 17:04 ` Maarten Bergvelt
2007-02-01 21:55   ` Tyler Smith
2007-02-01 22:09     ` Tyler Smith
2007-02-04 17:28     ` Kevin Rodgers
     [not found]     ` <mailman.4001.1170610117.2155.help-gnu-emacs@gnu.org>
2007-02-05  4:12       ` Tyler Smith
2007-02-05  9:59         ` Peter Dyballa
     [not found]         ` <mailman.4033.1170669629.2155.help-gnu-emacs@gnu.org>
2007-02-05 16:02           ` Tyler Smith
2007-02-05 17:57             ` Peter Dyballa
     [not found]             ` <mailman.4057.1170698276.2155.help-gnu-emacs@gnu.org>
2007-02-06  2:36               ` Tyler Smith
2007-02-01 17:28 ` Phil Jackson

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).