From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: request for hack: readline fixes Date: Sat, 30 Oct 2010 23:11:51 +0100 Message-ID: <87bp6bnxeg.fsf@ossau.uklinux.net> References: <8762wjpoxz.fsf@ossau.uklinux.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1288476731 19882 80.91.229.12 (30 Oct 2010 22:12:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 30 Oct 2010 22:12:11 +0000 (UTC) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Oct 31 00:12:07 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PCJed-0005xt-5h for guile-devel@m.gmane.org; Sun, 31 Oct 2010 00:12:03 +0200 Original-Received: from localhost ([127.0.0.1]:54632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCJec-0002WC-Ed for guile-devel@m.gmane.org; Sat, 30 Oct 2010 18:12:02 -0400 Original-Received: from [140.186.70.92] (port=35505 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCJeV-0002W3-FS for guile-devel@gnu.org; Sat, 30 Oct 2010 18:11:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PCJeU-0004kL-EM for guile-devel@gnu.org; Sat, 30 Oct 2010 18:11:55 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]:35609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PCJeU-0004kB-A2 for guile-devel@gnu.org; Sat, 30 Oct 2010 18:11:54 -0400 Original-Received: from arudy (unknown [78.149.124.242]) by mail3.uklinux.net (Postfix) with ESMTP id B14D11F6789; Sat, 30 Oct 2010 23:11:52 +0100 (BST) Original-Received: from neil-laptop (unknown [192.168.1.5]) by arudy (Postfix) with ESMTP id EC76438013; Sat, 30 Oct 2010 23:12:27 +0100 (BST) In-Reply-To: <8762wjpoxz.fsf@ossau.uklinux.net> (Neil Jerram's message of "Sat, 30 Oct 2010 16:30:20 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11091 Archived-At: Neil Jerram writes: > Subject: [PATCH] Expression-oriented readline history A couple more thoughts occurred to me. 1. I should add a `sans-surrounding-whitespace' call to that code (when appending to the history buffer). 2. An interesting different approach would be not to do the add-history here (i.e. in make-readline-port) at all, but instead in readline-repl-reader, by writing the expression that was read into a string, and adding that string with add-history. That would give a less verbatim kind of history, e.g. (I guess) "'a" would appear in the history as "(quote a)". But it would cope better with multiple expressions being entered at the same readline prompt. (With the posted patch, if the lines of input were (1 2) (3 4) I think there would be one line added to the history: (1 2) (3 4) ) Perhaps we could provide both approaches, with a switch to choose between them? (Or even all three, if we wanted to keep the current behaviour too.) Neil