chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] readline egg v2.0 feedback


From: Alexej Magura
Subject: Re: [Chicken-users] readline egg v2.0 feedback
Date: Sun, 25 Jan 2015 13:43:56 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

lulz, you're the first person to reply to this thread.  :)

I'll see about implementing a reasonable solution.

On 01/25/2015 08:33 AM, address@hidden wrote:

Hi Alexej,

As a daily user of csi with readline I look forward to using your enhancements.  If it makes sense to do I would like to see the behavior change for a new install, currently the user has to touch the ~/.csi-history (?) file before history will be kept. I'd like it if that became unnecessary.

Thanks

Matt

Sent by MailWise – Your emails, with style.:)



-------- Original Message --------
From: Alexej Magura <address@hidden>
Sent: Monday, December 15, 2014 04:00 AM
To: address@hidden
Subject: [Chicken-users] readline egg v2.0 feedback

Hi, so as the new maintainer for the readline egg I wanted to reach out to the community and see if anybody had any hacks that they'd like to see included in the egg or if any old maintainers have uncommitted code? 

Also if you'd like to see a feature get implemented/added to the egg, please let me know.

Here's a list of the changes that will most likely be appearing (most of them are ready to go and will be available in the egg's trunk as soon as I get my repo creds working) in the next release.  If y'all would please read the changes and provide whatever feedback you feel like giving, I'd really appreciate it.

Version 2.0 Changes
  • module's exports use slightly different names: breaking compatibility with code relying on the previous release of the egg.
    • solution: legacy bindings?
  • better paren-bouncing: previous version did it from scratch; version 2.0 uses readline's built-in parenthesis bouncing abilities. 
    • Works with brackets (i.e. [ ] ) too.
  • A bunch of new functions:
    • (add-history STRING)
      • does what it sounds like.  Adds a string to current history-list.
    • (add-history-time STRING)
      • changes the timestamp associated with the most recent entry in history-list.
    • (history-entry-time OFFSET)
      • returns the timestamp (a c-string) for the entry at the specified offset in history-list
      • if there isn't a timestamp for the entry at offset or there isn't an entry there at all, the function returns #f.
    • (history-current-entry-line)
      • returns the line (a c-string) for the current entry in history-list.
    • (history-current-entry-time)
      • returns the timestamp for the current entry in history-list.
    • (history-goto-entry OFFSET #!optional RELATIVE)
      • returns a list consisting of '(line: STRING index: INTEGER)
      • if #t or an exp evaluating to #t is passed as RELATIVE, then OFFSET is relative to the current entry in history list.
    • (search-history STRING DIRECTION)
      • returns a list consisting of '(offset: OFFSET match: STRING index: POSITION) on match and #f on fail.
      • if direction is 0+ then it searches through subsequent entries
      • if direction is <0 then it searches through previous entries
    • (search-history-backward STRING)
      • binds to (search-history STRING -1)
    • (search-history-forward STRING)
      • binds to (search-history STRING 0)
    • (history-list-length)
      • returns the length of the history-list
    • (history-list)
      • returns the each history-list entry's `line' field as a list split on the newline.
    • (history-position #!optional POSITION)
      • returns the current position in history-list.
      • if POSITION is supplied, then it sets the current position in history-list.
Things I'd like to add sometime in the next release or two
  • paren highlighting.  The matching paren/brace for the currently selected one gets highlighted.  (Cool, Neato! :D)
    • if a paren/brace has no matching paren/brace, then it gets highlighted a different color.

Thank you for your feedback and merry Christmas!

-- 
Alexej Magura


reply via email to

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