[Top][All Lists]

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

Re: lynx-dev file editing location

From: Klaus Weide
Subject: Re: lynx-dev file editing location
Date: Mon, 5 Jun 2000 10:25:48 -0500 (CDT)

On Mon, 5 Jun 2000 address@hidden wrote:

> In a recent note, Gottipati Aravind said:
> > Date: Sun, 4 Jun 2000 19:41:47 -0700
> > 
> >     Dont FLAME me for this but I love vim better than emacs, and I
> > would like to use lynx for my general working. I mean I would like to be
> > able to use lynx just like emacs works.. I want to open files with it,
> > edit them in vim and be able to browse the web, send  e-mail .. well.. u
> > know.. everything in general. I know (well.. am learning) hwo to set up
> > lynxexec and lynxprog commands. and now to my real Q.
> Many Lynx developers believe this should not be a design goal of Lynx.

... but it used to be, to some extent.  Otherwise there wouldn't be
dired, lynxexec, etc.

> >     I set up vim to behave differently based on the directory a file
> > is located in. but when I open a file in lynx and start to edit it, it
> > is copied to /tmp and the original file is updated or overwritten after
> > I finish editing.

How do you "open a file and start to edit it"?

If you mean the 'e' (EDIT) key command, lynx does not behave in the way
you describe.  It does not copy the file around, it just invokes the
configured editor command with the absolute pathname of the file as an

If you mean something else than 'e' - like using the editor for composing
mail - then lynx is indeed calling the configured editor command for
a temporary file.

I am talking about UNIX (and similar) systems here.  You didn't say
what OS you are using.  Or what version of lynx you are using.

> > I would like to edit a file in its current location,
> > i.e I want LYNX_TEMP_SPACE to point to the current directory lynx is in.

What do you mean with "current directory lynx is in"?
As far as the "current directory" (pwd) in terms of the OS is concerned,
lynx doesn't change that whatever you do, so it remains the directory
from which you started lynx.

So you _can_ point LYNX_TEMP_SPACE to the "current directory" in that
sense, by just setting LYNX_TEMP_SPACE before starting lynx (see pg's
suggestion below for TMPDIR), but somehow I doubt that that is what
you really want.

> > so that I can use my vim settings while editing. how do I do this?

It's not clear what you want; but maybe something like this:  Make a shell
script with the following content, and configure lynx to use it as the
   #! /bin/sh
   cd `dirname "$1"`
   vim "$1"

> On UNIX systems, I believe Lynx respects the setting of the environment
> variable TMPDIR, so in a POSIX shell try:
>     TMPDIR=`pwd` lynx
> or:
>     TMPDIR=$HOME lynx

But that should have no effect for the way lynx call the editor for 
the 'e' (EDIT) key, only for other uses of the editor.


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

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