all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joseph Xu <josephzxu@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
	"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: Multiple M-x shells sharing input ring
Date: Fri, 5 Sep 2014 00:33:57 -0700	[thread overview]
Message-ID: <CAGvvAh3Rz0i7BsjrQR1+=tFR15k74vprFcRZb2bkjJhdXFUyFA@mail.gmail.com> (raw)
In-Reply-To: <5aed63a6-1ff4-46f5-a417-f2db62251da5@default>

Thanks for all the feedback. Unfortunately I'm not very familiar with
elisp, and most of the discussion went over my head.

In the end I was able to get the behavior I wanted by just adding a hook to
comint-input-filter-functions that executes comint-read-input-ring, which
reloads the history ring from file after every command. This only works
because I use zsh and have SHARED_HISTORY on, so every executed command is
immediately written to ~/.history. Not very elegant, but I don't have to
hack elisp, and has the extra benefit of being able to share history with
other terminals.

Regards,
Joseph


  reply	other threads:[~2014-09-05  7:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04  8:54 Multiple M-x shells sharing input ring Joseph Xu
2014-09-04 14:58 ` Subhan Michael Tindall
2014-09-04 15:55   ` Joseph Xu
2014-09-04 19:46 ` Michael Heerdegen
2014-09-04 20:09   ` Drew Adams
2014-09-04 20:40     ` Michael Heerdegen
2014-09-04 20:58       ` Drew Adams
2014-09-04 21:21         ` Michael Heerdegen
2014-09-04 21:33           ` Drew Adams
2014-09-05  7:33             ` Joseph Xu [this message]
     [not found]       ` <mailman.8284.1409864361.1147.help-gnu-emacs@gnu.org>
2014-09-04 21:09         ` Stefan Monnier
2014-09-04 21:20           ` Drew Adams

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='CAGvvAh3Rz0i7BsjrQR1+=tFR15k74vprFcRZb2bkjJhdXFUyFA@mail.gmail.com' \
    --to=josephzxu@gmail.com \
    --cc=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=michael_heerdegen@web.de \
    /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.