🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #62011

Re: slrn: keeping default settings between sessions?

#62011
From: Dawn Owens-Nicholson
Date: Wed, 31 May 2000 00:00
37 lines
2978 bytes
Sylvan Butler wrote:
> As a minimum, it should remember the
> previous entry into the field and use that as a default the next time.
> E.g. when forwarding via e-mail an article to someone, instead of always
> a blank address prompt, it should default to the last address.

This can be done with macros, but there is probably a far more elegant and
easier approach to be done with a patch.  Macros would involve wrapping
every intrinsic that uses prompts where you can recall previously entered
values so the previous value can be put into the prompt and the new value
saved to a text file somewhere.  All this intrinsic wrapping leads to
problems down the road.

> A step above the minimum would be a default to the last address, but a
> scrollable history list (using the arrows by default for up/down ?)
> would remember the last N used addresses.  (Obviously the keys and the
> number remembered should be configurable.  When N is one it would act as
> the minimum mentioned above.)

This is the more difficult part to do with macros.  It's usefulness is so
limited, I'm not sure this is worth doing in this way.  Doing this with a
macro would require essentially recreating the read_mini() and no echo
version where every keystroke is captured and handled appropriately.  The
upshot of this is vi/emacs/etc. keymaps become possible.  Unfortunately the
intrinsics wouldn't use this look-alike function so you'd be back to square
one when you're using the intrinsics.

Another approach would be to make the prompts extensible via hooks--if you
call for a previously entered value a hook is run and if it returns a value,
that value is used for the recalled value.  If there is no returned value
the current recall functionality is there to recall the thing you entered in
this session.  Maybe one would be able to use setkey for readline to call
functions and make the cursor do things (move around & delete/insert
characters).  Something along these lines would make all the
readline-related wishes implementable via macros.

Technical Details
Message-ID: <slrn8jb1iq.gre.bluemoon@ux6.cso.uiuc.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <x3932038F@bc.org> <slrn8jaal4.mv.bluemoon@ux6.cso.uiuc.edu> <slrn8jalcq.52u.nospam+_no_Zs__0005@hpb13799z.zboi.hpz.com.invalid>

Show Full Headers
Complete Article Headers
Message-ID: <slrn8jb1iq.gre.bluemoon@ux6.cso.uiuc.edu>
Subject: Re: slrn: keeping default settings between sessions?
Date: Wed, 31 May 2000 00:00:00 +0000
From: bluemoon@ux6.cso.uiuc.edu (Dawn Owens-Nicholson)
References: <x3932038F@bc.org> <slrn8jaal4.mv.bluemoon@ux6.cso.uiuc.edu> <slrn8jalcq.52u.nospam+_no_Zs__0005@hpb13799z.zboi.hpz.com.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 629630238
X-Complaints-To: abuse@uiuc.edu
X-Trace: vixen.cso.uiuc.edu 959809089 128.174.5.9 (Wed, 31 May 2000 16:38:09 CDT)
Organization: University of Illinois at Urbana-Champaign
User-Agent: slrn/0.9.6.2 (HP-UX)
NNTP-Posting-Date: Wed, 31 May 2000 16:38:09 CDT
Newsgroups: news.software.readers