help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs like line editing during perl input.


From: Harry Putnam
Subject: Re: Emacs like line editing during perl input.
Date: Mon, 30 Dec 2002 16:01:23 GMT
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

those who know me have no need of my name <not-a-real-address@usa.net> writes:

Sorry Those, but Nope ... you're not redirecting me.  I posted here
for a purpose.  I wanted the input of emacs perl sharpies.


>>I'd like to have somekind of line editing available during user
>>input to a perl script.
>>
>>By default it seems none is available.  Any attempt to navigate or
>>edit an input line produces control chars.  Only backspace works to
>>edit.
>
> that's all that is provided by your system's terminal driver.  (probably
> there are some other functions too, but nowhere near what emacs provides.)
> most likely you want to special case terminal input to use Term::ReadLine.
>
>>I think Term::ReadLine is the tool for this but couldn't figure out
>>how to deploy it.

Not sure why you would post the synopsis since I had stated clearly
it was not parsable by me.  I wasn't able to see how to translate
that example into something usable to make user input editable.


> | SYNOPSIS
> |          use Term::ReadLine;
> |          $term = new Term::ReadLine 'Simple Perl calc';
> |          $prompt = "Enter your arithmetic expression: ";
> |          $OUT = $term->OUT || STDOUT;
> |          while ( defined ($_ = $term->readline($prompt)) ) {
> |            $res = eval($_), "\n";
> |            warn $@ if $@;
> |            print $OUT $res, "\n" unless $@;
> |            $term->addhistory($_) if /\S/;
> |          }
> `----

For example:  In the above script, the input lines are no more
editable than  with perl -e 'while (<>){print}'

$ ksh93
$ set -o emacs
$ read
<enter line?

provides a fully emacs style line editor.
>From help-gnu-emacs-bounces@gnu.org  Mon Dec 30 11:20:22 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!newsfeed.mathworks.com!cyclone.swbell.net!newsfeed1.easynews.com!easynews.com!easynews!sn-xit-02!sn-xit-06!sn-post-02!sn-post-01!supernews.com!news.supernews.com!not-for-mail
From: those who know me have no need of my name <not-a-real-address@usa.net>
Newsgroups: gnu.emacs.help
Date: 30 Dec 2002 16:15:07 GMT
Organization: earthfriends
Message-ID: <m1ptrjmqo4.gnus@usa.net>
References: <m28yy8gt8p.fsf@sbcglobal.net> <m1hecvx6u0.gnus@usa.net>
 <m2of73fqct.fsf@sbcglobal.net>
User-Agent: Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Military
 Intelligence, i686-redhat-linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@supernews.com
Lines: 15
Xref: shelby.stanford.edu gnu.emacs.help:108601
To: help-gnu-emacs@gnu.org
Subject: Re: Emacs like line editing during perl input.
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 30 Dec 2002 16:20:22 -0000

in gnu.emacs.help i read:
>those who know me have no need of my name <not-a-real-address@usa.net>
>writes:

>Sorry Those, but Nope ... you're not redirecting me.  I posted here
>for a purpose.  I wanted the input of emacs perl sharpies.

too bad, they'd answer your entirely perl question.  (childish-mode: i know
how to do what you want to do, in fact it's plain as can be for anyone that
is willing to invest the effort in actually learning a little perl, but i'm
not going to tell you because you decided to ignore my hint, and besides
it's off-topic for this group.)

-- 
bringing you boring signatures for 17 years
>From help-gnu-emacs-bounces@gnu.org  Mon Dec 30 11:20:22 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.teledanmark.no!uninett.no!Norway.EU.net!asap-asp.net!uio.no!nntp.uio.no!not-for-mail
From: Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
Newsgroups: gnu.emacs.help
Date: 30 Dec 2002 17:20:04 +0100
Organization: University of Oslo, Norway
Lines: 17
Message-ID: <HBF.20021230ruq7@bombur.uio.no>
References: <mailman.676.1041119392.19936.help-gnu-emacs@gnu.org>
        <84el81xdni.fsf@lucy.cs.uni-dortmund.de>
NNTP-Posting-Host: bombur.uio.no
Xref: shelby.stanford.edu gnu.emacs.help:108602
To: help-gnu-emacs@gnu.org
Subject: Re: setting site-wide default colors,fonts,... in Emacs
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 30 Dec 2002 16:20:22 -0000

kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:
>Frank C. Weiler <fcweiler@sbcglobal.net> writes:
>> I have gone through the documentaiton several times, and am not able
>> to locate WHERE the site wide default color scheme and default fonts
>> are established for any user.
> 
> You could also use strace (or trace or truss or ktrace, depending on
> OS) on an invocation of Emacs.  Look for stat or open calls on files
> named Emacs (with capital E).

...in the lib/X11/app-defaults directory.  On my site, it would be
  /local/X11R6/lib/X11/app-defaults/Emacs
which could contain lines like
  *foreground: blue

-- 
Hallvard
>From help-gnu-emacs-bounces@gnu.org  Mon Dec 30 11:35:16 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.stueberl.de!fu-berlin.de!uni-berlin.de!p50877cb3.dip.t-dialin.NET!not-for-mail
From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=)
Newsgroups: gnu.emacs.help
Date: Mon, 30 Dec 2002 17:35:05 +0100
Organization: University of Dortmund, Germany
Lines: 21
Message-ID: <84r8bz79dy.fsf@lucy.cs.uni-dortmund.de>
References: <mailman.705.1041256662.19936.help-gnu-emacs@gnu.org>
NNTP-Posting-Host: p50877cb3.dip.t-dialin.net (80.135.124.179)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: fu-berlin.de 1041266112 8792158 80.135.124.179 (16 [73968])
User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50
 (i686-pc-linux-gnu)
Cancel-Lock: sha1:EArfIZkyYTA9Azo8iLoriWlwWxs=
Xref: shelby.stanford.edu gnu.emacs.help:108603
To: help-gnu-emacs@gnu.org
Subject: Re: C Mode Comments
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 30 Dec 2002 16:35:16 -0000

Kevin Dziulko <dziulko@klaatu.canisius.edu> writes:

> I am running GNU Emacs 20.2.3.  M-; does not run comment-dwim, but runs 
> indent-for-comment.
>
> What I am looking for is a command that would have the effect of killing 
> an entire comment.  For example, given:
>
> int x;      /* this is a comment */
>
> Only "int x;" would remain on this line of code.

It might work to say C-u M-;.

You could try to search for a file newcomment.el, it might have been
posted to gnu.emacs.sources and this version might work with your
Emacs.  Or it might not.  Maybe it's easier to just upgrade your
Emacs.  This is very easy to do, if you have enough space in your
home dir, say.
-- 
Ambibibentists unite!
>From help-gnu-emacs-bounces@gnu.org  Mon Dec 30 12:10:10 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newspeer.monmouth.com!newshosting.com!news-xfer1.atl.newshosting.com!uunet!dca.uu.net!ash.uu.net!world!not-for-mail
From: Craig Smilovitz <craig@theWorld.com>
Newsgroups: gnu.emacs.help
Date: 30 Dec 2002 12:07:04 -0500
Organization: The World : www.TheWorld.com : Since 1989
Lines: 24
Sender: craig@ppp0b150.std.com
Message-ID: <wkr8bzqvuv.fsf@theWorld.com>
NNTP-Posting-Host: ppp0b150.std.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: pcls4.std.com 1041267908 15493 208.192.101.150 (30 Dec 2002 17:05:08
        GMT)
X-Complaints-To: abuse@TheWorld.com
NNTP-Posting-Date: Mon, 30 Dec 2002 17:05:08 +0000 (UTC)
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1
Xref: shelby.stanford.edu gnu.emacs.help:108604
To: help-gnu-emacs@gnu.org
Subject: MIME files in MSWindows - Emacs 21.1.1
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 30 Dec 2002 17:10:10 -0000


I'm running Emacs 21.1.1 under WinME and using it to read mail.  This
version of emacs does not interpret MIME-encoded mail when under
windows, but simply displays it as an ASCII message.  (When I first
try and read mail, the status line says "feature rmail-mime not
supported").

That's normally ok, but sometimes I actually want the byte-stream or
.gif (etc.) data.  Doing rmail-resend and reading the resent mail with
another mail reader (such as Netscape) used to work but it doesn't
anymore.  (I don't remember what caused that to first fail, probably
the upgrade to 21.1 from whatever I used before.)  I believe there's a
DOS utility that pulls apart MIME but I have no idea what it's called
or where to find it.

Does anyone know if either 1) I can get Windows based emacs to
interpret Mime or 2) there is a DOS-based utility around to pull apart
these messages (and eliminate the character-based line endings that
emacs inserted)?

Thank you in advance,

Craig Smilovitz
craig@theworld.com
>From help-gnu-emacs-bounces@gnu.org  Mon Dec 30 12:45:11 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!p50877cb3.dip.t-dialin.NET!not-for-mail
From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=)
Newsgroups: gnu.emacs.help
Date: Mon, 30 Dec 2002 18:40:23 +0100
Organization: University of Dortmund, Germany
Lines: 24
Message-ID: <84lm27be2g.fsf@lucy.cs.uni-dortmund.de>
References: <wkr8bzqvuv.fsf@theWorld.com>
NNTP-Posting-Host: p50877cb3.dip.t-dialin.net (80.135.124.179)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: fu-berlin.de 1041270030 9782484 80.135.124.179 (16 [73968])
User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50
 (i686-pc-linux-gnu)
Cancel-Lock: sha1:RHFNfTprsQId+604E6/7qTPq2ig=
Xref: shelby.stanford.edu gnu.emacs.help:108605
To: help-gnu-emacs@gnu.org
Subject: Re: MIME files in MSWindows - Emacs 21.1.1
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 30 Dec 2002 17:45:11 -0000

Craig Smilovitz <craig@theWorld.com> writes:

> I'm running Emacs 21.1.1 under WinME and using it to read mail.  This
> version of emacs does not interpret MIME-encoded mail when under
> windows, but simply displays it as an ASCII message.  (When I first
> try and read mail, the status line says "feature rmail-mime not
> supported").

RMAIL is the default Emacs mail reader, but it doesn't grok MIME.
There is rmime.el by Ray Moody for reading MIME.

I think that MH-E has MIME support, but I don't know any details.
MH-E comes with Emacs.

Gnus comes with Emacs, it also allows you to read mail, and it
supports MIME.  The catch here is that Gnus behaves in a newsreaderly
fashion which is unusual for a mail reader, and also it's not that
simple to set up.

Then there is VM.  It does not come with Emacs.  It's the default
XEmacs mail reader.  It supports MIME.  There was a time when VM was
not supported on Emacs, but this has changed I think.
-- 
Ambibibentists unite!
>From p.galbraith@globetrotter.net Mon Dec 30 13:06:48 2002
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
        id 18T4Hg-0007RG-00
        for help-gnu-emacs@gnu.org; Mon, 30 Dec 2002 13:05:04 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
        id 18T4GC-0006kP-00
        for help-gnu-emacs@gnu.org; Mon, 30 Dec 2002 13:03:33 -0500
Received: from adsl-123-175.globetrotter.net ([142.169.123.175]
        helo=mixed.dyndns.org)
        by monty-python.gnu.org with esmtp (Exim 4.10.13)       id 
18T4Fi-0006Yy-00
        for help-gnu-emacs@gnu.org; Mon, 30 Dec 2002 13:03:03 -0500
Received: from mixed.dyndns.org (localhost [127.0.0.1])
        by mixed.dyndns.org (Postfix) with ESMTP id 50F9943B06
        for <help-gnu-emacs@gnu.org>; Mon, 30 Dec 2002 13:03:01 -0500 (EST)
To: help-gnu-emacs@gnu.org
In-Reply-To: Message from kai.grossjohann@uni-duisburg.de (Kai Gro johann) 
        <84lm27be2g.fsf@lucy.cs.uni-dortmund.de> 
References: <wkr8bzqvuv.fsf@theWorld.com>
        <84lm27be2g.fsf@lucy.cs.uni-dortmund.de> 
Organization: mh-e crew - mh-e.sourceforge.net
X-Mailer: MH-E 7.0+cvs; nmh 1.0.4+dev; Emacs 21.2
X-Face: "#bYm%*(4JuXAkouMxaLz|M2dbXUFnQ"IRX)zpsiM"(B}`#|_b548$VB}5L&VIck1F#FNc'
        rsASk0?-/gFp2qzM>0]`Jc}Qd<8[l)N7{8%qMN~{|DS.ME.$
Date: Mon, 30 Dec 2002 13:03:01 -0500
From: Peter S Galbraith <p.galbraith@globetrotter.net>
Message-Id: <20021230180301.50F9943B06@mixed.dyndns.org>
Subject: Re: MIME files in MSWindows - Emacs 21.1.1 
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 30 Dec 2002 18:06:48 -0000

Kai Großjohann <kai.grossjohann@uni-duisburg.de> wrote:

> Craig Smilovitz <craig@theWorld.com> writes:
> 
> > I'm running Emacs 21.1.1 under WinME and using it to read mail.  This
> > version of emacs does not interpret MIME-encoded mail when under
> > windows, but simply displays it as an ASCII message.  (When I first
> > try and read mail, the status line says "feature rmail-mime not
> > supported").
> 
> [snip]
> I think that MH-E has MIME support, but I don't know any details.
> MH-E comes with Emacs.

Yes, but I have no idea how it works under Windows.  You first need a
working MH or nmh underneath.  We need a HOWTO if someone knows the
details.

-- 
Peter S. Galbraith, MH-E developer  <p.galbraith@globetrotter.net>
GPG key 1024/D2A913A1 - 97CE 866F F579 96EE  6E68 8170 35FF 799E
6623'rd GNU/Linux user at the Counter - http://counter.li.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]