all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Okam <okamsn+emacs-org@protonmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Making ielm behave like a shell (getting to previous commands using the up-arrow key)
Date: Thu, 17 Dec 2020 03:34:48 +0000	[thread overview]
Message-ID: <73f77f84-638c-c044-8012-154f08f28256@protonmail.com> (raw)
In-Reply-To: <trinity-1550ee92-c2e0-452c-9b29-ed5c18642c44-1608174131519@3c-app-mailcom-bs11>

On 12/16/20 10:02 PM, steve-humphreys@gmx.com wrote:
> 
> 
> I have started using ielm and would be useful for it to behave like a terminal
> That is enabling history on ielm to view all the previous executed commands
> using the Up Arrow Key.
> 
> Regards
> Steve
> 

If you're not already aware, many places in Emacs allow you to access 
your input history using "M-n" and "M-p". This works in IELM and Term, 
for example.

You can check what commands these keys run using the command 
`describe-key', which is bound to [F1 k] and "C-h k". You'll see that 
"M-n" and "M-p" run the commands `comint-next-input' and 
`comint-previous-input', respectively.

If you want to rebind [up] and [down] to cycle history instead of moving 
the cursor, you can do

   (define-key ielm-map (kbd "<up>") #'comint-previous-input)
   (define-key ielm-map (kbd "<down>") #'comint-next-input)

which applies only to IELM.  If you would like to have that behavior in 
every mode that uses Comint (such as Term, the inferior Python shell, 
etc.), then you can define the key in `comint-mode-map' instead.




  reply	other threads:[~2020-12-17  3:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17  3:02 Making ielm behave like a shell (getting to previous commands using the up-arrow key) steve-humphreys
2020-12-17  3:34 ` Okam [this message]
2020-12-17  4:27 ` Michael Heerdegen
2020-12-17  4:44   ` steve-humphreys
2020-12-17  5:02     ` Michael Heerdegen
2020-12-17  5:17       ` steve-humphreys
2020-12-17  9:06         ` Jean Louis
2020-12-17  9:13           ` Jean Louis
2020-12-17 22:29           ` Michael Heerdegen
2020-12-18  5:05             ` Jean Louis
2020-12-18  9:01               ` Michael Heerdegen
2020-12-18 11:19                 ` Jean Louis
2020-12-18 17:14                   ` Drew Adams
2020-12-18 18:36                     ` Jean Louis
2020-12-18 19:11                       ` Drew Adams
2020-12-18 19:53                         ` Jean Louis
2020-12-18 21:15                           ` Drew Adams
2020-12-19  2:07                   ` Michael Heerdegen
2020-12-19  2:51                     ` Drew Adams
2020-12-18 11:28                 ` Jean Louis
2020-12-19  1:55                   ` Michael Heerdegen
2020-12-19  2:45                     ` Drew Adams
2020-12-19  1:57               ` Michael Heerdegen
2020-12-17  8:22   ` Joost Kremers
2020-12-18 10:20     ` Philip K.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73f77f84-638c-c044-8012-154f08f28256@protonmail.com \
    --to=okamsn+emacs-org@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.