Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Emacs as external editor
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Andrea Crotti  
View profile  
 More options Oct 29, 5:36 pm
Newsgroups: comp.emacs
From: Andrea Crotti <kerny...@gmail.com>
Date: Thu, 29 Oct 2009 14:36:50 -0700 (PDT)
Local: Thurs, Oct 29 2009 5:36 pm
Subject: Emacs as external editor
I think I found somewhere that it was possible to use emacs as default
editor for other things.
At least it was possible with textmate to insert text starting from
for example a form in a web page.

I would like to have this to write emails (haven't configured mail in
emacs yet) and also from safari/firefox...
Anyone doing this?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruce Stephens  
View profile  
 More options Oct 29, 5:39 pm
Newsgroups: comp.emacs
From: Bruce Stephens <bruce+use...@cenderis.demon.co.uk>
Date: Thu, 29 Oct 2009 21:39:13 +0000
Local: Thurs, Oct 29 2009 5:39 pm
Subject: Re: Emacs as external editor

Andrea Crotti <kerny...@gmail.com> writes:
> I think I found somewhere that it was possible to use emacs as default
> editor for other things.
> At least it was possible with textmate to insert text starting from
> for example a form in a web page.

> I would like to have this to write emails (haven't configured mail in
> emacs yet) and also from safari/firefox...
> Anyone doing this?

Yes.

See the server-start function and the emacsclient program.  Emacs 23 has
a --daemon flag which makes this even more convenient.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrea Crotti  
View profile  
 More options Oct 29, 6:27 pm
Newsgroups: comp.emacs
From: Andrea Crotti <kerny...@gmail.com>
Date: Thu, 29 Oct 2009 15:27:57 -0700 (PDT)
Local: Thurs, Oct 29 2009 6:27 pm
Subject: Re: Emacs as external editor
On 29 Ott, 22:39, Bruce Stephens <bruce+use...@cenderis.demon.co.uk>
wrote:

> Andrea Crotti <kerny...@gmail.com> writes:

> Yes.

> See the server-start function and the emacsclient program.  Emacs 23 has
> a --daemon flag which makes this even more convenient.

Ah yes ok but how about the other programs?
I should set them up to call emacsclient somehow with a proper buffer
no?

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Glyn Millington  
View profile  
 More options Oct 29, 6:42 pm
Newsgroups: comp.emacs
From: Glyn Millington <wistansw...@linuxmail.org>
Date: Thu, 29 Oct 2009 22:42:11 +0000
Local: Thurs, Oct 29 2009 6:42 pm
Subject: Re: Emacs as external editor

Andrea Crotti <kerny...@gmail.com> writes:
> On 29 Ott, 22:39, Bruce Stephens <bruce+use...@cenderis.demon.co.uk>
> wrote:
>> Andrea Crotti <kerny...@gmail.com> writes:

>> Yes.

>> See the server-start function and the emacsclient program.  Emacs 23 has
>> a --daemon flag which makes this even more convenient.

> Ah yes ok but how about the other programs?
> I should set them up to call emacsclient somehow with a proper buffer
> no?

Hi Andreas,

Have look at the Its All Text plugin for firefox ...

https://addons.mozilla.org/en-US/firefox/addon/4125

I wouldn't know about Thunderbird - this might help,

http://globs.org/articles.php?pg=2&lng=en

but better still try Gnus :-)

atb

Glyn


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruce Stephens  
View profile  
 More options Oct 29, 7:14 pm
Newsgroups: comp.emacs
From: Bruce Stephens <bruce+use...@cenderis.demon.co.uk>
Date: Thu, 29 Oct 2009 23:14:28 +0000
Local: Thurs, Oct 29 2009 7:14 pm
Subject: Re: Emacs as external editor

Andrea Crotti <kerny...@gmail.com> writes:

[...]

> Ah yes ok but how about the other programs?
> I should set them up to call emacsclient somehow with a proper buffer
> no?

Sure.  With many, setting EDITOR or VISUAL appropriately will work.  For
Firefox there are extensions.  (I use Mozex, but I see there's another
one I didn't know about.)

The buffer works in the normal way: emacsclient is asked to edit a file,
and you get a buffer for that file (normally a new buffer).  You can
configure how the buffer's mapped onto a frame (whether you get a new
frame, new window, etc.) by configuring the "server" group.

In the emacsclient from Emacs 23 you need to pass -c to get a frame or
-t to get a terminal (if you don't have a windowing system).  (I use a
simple script that calls emacsclient with the appropriate flag depending
on whether DISPLAY is defined.)


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Giorgos Keramidas  
View profile  
 More options Oct 29, 8:35 pm
Newsgroups: comp.emacs
From: Giorgos Keramidas <keram...@ceid.upatras.gr>
Date: Fri, 30 Oct 2009 02:35:48 +0200
Local: Thurs, Oct 29 2009 8:35 pm
Subject: Re: Emacs as external editor

On Thu, 29 Oct 2009 23:14:28 +0000, Bruce Stephens <bruce+use...@cenderis.demon.co.uk> wrote:
> Andrea Crotti <kerny...@gmail.com> writes:
>> Ah yes ok but how about the other programs?

>> I should set them up to call emacsclient somehow with a proper buffer
>> no?

> Sure.  With many, setting EDITOR or VISUAL appropriately will work.
> For Firefox there are extensions.  (I use Mozex, but I see there's
> another one I didn't know about.)

> The buffer works in the normal way: emacsclient is asked to edit a
> file, and you get a buffer for that file (normally a new buffer).  You
> can configure how the buffer's mapped onto a frame (whether you get a
> new frame, new window, etc.) by configuring the "server" group.

Another extension that supports this is called "It's All Text!".

> In the emacsclient from Emacs 23 you need to pass -c to get a frame or
> -t to get a terminal (if you don't have a windowing system).  (I use a
> simple script that calls emacsclient with the appropriate flag
> depending on whether DISPLAY is defined.)

Precisely.

I have been using a similar script for several months.  The script calls
emacsclient with either -c or -t depending on the value of $DISPLAY:

    #!/bin/sh

    # Set up locale environment, but only if LANG is currently unset.
    if test -z "${LANG}" ; then
            # First clear off any locale related environment vars.
            __junk=""
            unset __junk `env | sed -n -E '/^(LANG|LC_[A-Z]+)=.*$/ s/=.*$//p'`

            # Then set the preferred locale variables for Greek text.
            export LANG="C"
            export LC_CTYPE="el_GR.ISO8859-7"
            export LC_COLLATE="el_GR.ISO8859-7"
    fi

    # When ${DISPLAY} is non-empty, assume it's ok to spawn a frame with
    # the -c option of emacsclient.
    if [ -z "${DISPLAY}" ]; then
            frameopt='-c'
    else
            frameopt='-t'
    fi

    # Try to fire up some version of emacsclient.
    # The first one that works will terminate this script.

    test -x /opt/emacs/bin/emacsclient && \
        exec /opt/emacs/bin/emacsclient ${frameopt} "$@"
    test -x /usr/local/bin/emacsclient && \
        exec /usr/local/bin/emacsclient ${frameopt} "$@"
    test -x /usr/bin/emacsclient && \
        exec /usr/bin/emacsclient ${frameopt} "$@"

    echo >&2 "emacsclient-wrapper: no emacsclient found."
    exit 1

This is saved as `/home/keramida/bin/emacsclient-wrapper' in my HOME
directory, and I call the script from "It's All Text!".


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruce Stephens  
View profile  
 More options Oct 30, 1:58 pm
Newsgroups: comp.emacs
From: Bruce Stephens <bruce+use...@cenderis.demon.co.uk>
Date: Fri, 30 Oct 2009 17:58:57 +0000
Local: Fri, Oct 30 2009 1:58 pm
Subject: Re: Emacs as external editor

Giorgos Keramidas <keram...@ceid.upatras.gr> writes:

[...]

> This is saved as `/home/keramida/bin/emacsclient-wrapper' in my HOME
> directory, and I call the script from "It's All Text!".

Hmm.  I call mine "ee" and use it routinely from terminals as well.
Depends how you usually work, I guess, but for my uses having a very
long name would be inconvenient.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google