caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Configure utop to use rlwrap/emacs history keys?
@ 2017-04-14  6:40 Marshall
  2017-04-14 13:25 ` Francois BERENGER
  2017-04-14 13:46 ` Evgeny Roubinchtein
  0 siblings, 2 replies; 4+ messages in thread
From: Marshall @ 2017-04-14  6:40 UTC (permalink / raw)
  To: caml-list

Newbie question:

On OSX 10.11, I would like to configure utop so that Ctrl-P moves to the previously entered line of code, and so that Ctrl-N moves back down toward the most recent line.  According to what ‘man lambda-term-inputrc' and ‘lambda-term-actions’ say, it seems to me that I ought to be able to get this behavior by putting the following in .lambda-term-inputrc in my home directory:

[read-line]
C-p: next-line 
C-n: prev-line

However, this configuration to have no effect.  I can move up and down through command history using the arrow keys, as I could without the rc file, Ctrl-P and Ctrl-N still do nothing.

Thanks very much-

Marshall

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Configure utop to use rlwrap/emacs history keys?
  2017-04-14  6:40 [Caml-list] Configure utop to use rlwrap/emacs history keys? Marshall
@ 2017-04-14 13:25 ` Francois BERENGER
  2017-04-14 13:46 ` Evgeny Roubinchtein
  1 sibling, 0 replies; 4+ messages in thread
From: Francois BERENGER @ 2017-04-14 13:25 UTC (permalink / raw)
  To: caml-list

On 04/14/2017 01:40 AM, Marshall wrote:
> Newbie question:

M-n (Meta = Alt) and M-p are the keyboard shortcuts your are looking for
(plain GNU Emacs defaults I believe).

> On OSX 10.11, I would like to configure utop so that Ctrl-P moves to the previously entered line of code, and so that Ctrl-N moves back down toward the most recent line.  According to what ‘man lambda-term-inputrc' and ‘lambda-term-actions’ say, it seems to me that I ought to be able to get this behavior by putting the following in .lambda-term-inputrc in my home directory:

I.e. replace Ctrl by Alt and do not configure anything to get that 
Emacs-like behavior.

> [read-line]
> C-p: next-line
> C-n: prev-line
>
> However, this configuration to have no effect.  I can move up and down through command history using the arrow keys, as I could without the rc file, Ctrl-P and Ctrl-N still do nothing.
>
> Thanks very much-
>
> Marshall
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Configure utop to use rlwrap/emacs history keys?
  2017-04-14  6:40 [Caml-list] Configure utop to use rlwrap/emacs history keys? Marshall
  2017-04-14 13:25 ` Francois BERENGER
@ 2017-04-14 13:46 ` Evgeny Roubinchtein
  2017-04-14 15:06   ` Marshall
  1 sibling, 1 reply; 4+ messages in thread
From: Evgeny Roubinchtein @ 2017-04-14 13:46 UTC (permalink / raw)
  To: Marshall; +Cc: OCaml Mailing List

[-- Attachment #1: Type: text/plain, Size: 1308 bytes --]

I agree with your reading of lambda-term-inputrc man page, but I disagree
with your reading of the output of lambda-term-actions.  I think the
following stanza should give you the effect you want:

[read-line]
C-p: history-next
C-n: history-prev

-- 
Best,
Zhenya



On Fri, Apr 14, 2017 at 2:40 AM, Marshall <marshall@logical.net> wrote:

> Newbie question:
>
> On OSX 10.11, I would like to configure utop so that Ctrl-P moves to the
> previously entered line of code, and so that Ctrl-N moves back down toward
> the most recent line.  According to what ‘man lambda-term-inputrc' and
> ‘lambda-term-actions’ say, it seems to me that I ought to be able to get
> this behavior by putting the following in .lambda-term-inputrc in my home
> directory:
>
> [read-line]
> C-p: next-line
> C-n: prev-line
>
> However, this configuration to have no effect.  I can move up and down
> through command history using the arrow keys, as I could without the rc
> file, Ctrl-P and Ctrl-N still do nothing.
>
> Thanks very much-
>
> Marshall
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

[-- Attachment #2: Type: text/html, Size: 2035 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Configure utop to use rlwrap/emacs history keys?
  2017-04-14 13:46 ` Evgeny Roubinchtein
@ 2017-04-14 15:06   ` Marshall
  0 siblings, 0 replies; 4+ messages in thread
From: Marshall @ 2017-04-14 15:06 UTC (permalink / raw)
  To: OCaml Mailing List

[-- Attachment #1: Type: text/plain, Size: 2426 bytes --]

Thanks for all of the replies.

Zhenya, history-next/prev was the key.  Excellent!  Now I can work happily.  Thanks very much.

I noticed that caml-list emails have reply-to set to the person who posted.  Is it the convention to reply off-list for most followups of this kind?

(Francois, I checked and ^P and ^N actually are the Emacs previous/next line keys in my vanilla Emacs—it wasn’t just my fingers that thought so!  Meta-P and Meta-N are unbound.  (I have to use the uber-traditional Esc- prefix to get Meta, as Alt- and Apple- do other things by default for me.))

(Tao: Yeah, lately Apple sometimes seems to have a “if it’s not broken and is better than anything else, let’s mess it up” attitude.  I think the X is supposed to be Roman numeral 10, so maybe Apple is planning to increment X and doesn’t like "OSXI".)

Marshall

> On Apr 14, 2017, at 8:46 AM, Evgeny Roubinchtein <zhenya1007@gmail.com> wrote:
> 
> I agree with your reading of lambda-term-inputrc man page, but I disagree with your reading of the output of lambda-term-actions.  I think the following stanza should give you the effect you want:
> 
> [read-line]
> C-p: history-next
> C-n: history-prev
> 
> -- 
> Best,
> Zhenya
> 
> 
> 
> On Fri, Apr 14, 2017 at 2:40 AM, Marshall <marshall@logical.net <mailto:marshall@logical.net>> wrote:
> Newbie question:
> 
> On OSX 10.11, I would like to configure utop so that Ctrl-P moves to the previously entered line of code, and so that Ctrl-N moves back down toward the most recent line.  According to what ‘man lambda-term-inputrc' and ‘lambda-term-actions’ say, it seems to me that I ought to be able to get this behavior by putting the following in .lambda-term-inputrc in my home directory:
> 
> [read-line]
> C-p: next-line
> C-n: prev-line
> 
> However, this configuration to have no effect.  I can move up and down through command history using the arrow keys, as I could without the rc file, Ctrl-P and Ctrl-N still do nothing.
> 
> Thanks very much-
> 
> Marshall
> 
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list <https://sympa.inria.fr/sympa/arc/caml-list>
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners <http://groups.yahoo.com/group/ocaml_beginners>
> Bug reports: http://caml.inria.fr/bin/caml-bugs <http://caml.inria.fr/bin/caml-bugs>


[-- Attachment #2: Type: text/html, Size: 4146 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-14 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-14  6:40 [Caml-list] Configure utop to use rlwrap/emacs history keys? Marshall
2017-04-14 13:25 ` Francois BERENGER
2017-04-14 13:46 ` Evgeny Roubinchtein
2017-04-14 15:06   ` Marshall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).