From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: shell-CLI for Emacs Date: Sat, 24 Aug 2013 02:37:25 +0200 Message-ID: <87zjs7diuy.fsf@zigzag.favinet> References: <87zjs8kozg.fsf@nl106-137-194.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1377304496 7754 80.91.229.3 (24 Aug 2013 00:34:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Aug 2013 00:34:56 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Emanuel Berg Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 24 02:34:58 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VD1of-0004D8-SI for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Aug 2013 02:34:57 +0200 Original-Received: from localhost ([::1]:39232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VD1of-00008w-76 for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Aug 2013 20:34:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VD1oQ-00008L-2T for help-gnu-emacs@gnu.org; Fri, 23 Aug 2013 20:34:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VD1oK-0002QE-7s for help-gnu-emacs@gnu.org; Fri, 23 Aug 2013 20:34:42 -0400 Original-Received: from smtp207.alice.it ([82.57.200.103]:48693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VD1oJ-0002Ot-Ti for help-gnu-emacs@gnu.org; Fri, 23 Aug 2013 20:34:36 -0400 Original-Received: from zigzag.favinet (82.58.3.108) by smtp207.alice.it (8.6.060.28) id 51F281020649D6D9; Sat, 24 Aug 2013 02:34:32 +0200 Original-Received: from ttn by zigzag.favinet with local (Exim 4.72) (envelope-from ) id 1VD1rC-0000Ye-DS; Sat, 24 Aug 2013 02:37:34 +0200 In-Reply-To: <87zjs8kozg.fsf@nl106-137-194.student.uu.se> (Emanuel Berg's message of "Sat, 24 Aug 2013 00:42:50 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.103 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93074 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () Emanuel Berg () Sat, 24 Aug 2013 00:42:50 +0200 But that's getting tedious if it has to be done for a lot of functions... Maybe you can play w/ =E2=80=98call-interactively=E2=80=99 and =E2=80=98unr= ead-command-events=E2=80=99. Split the line as before but instead of =E2=80=98apply=E2=80=99ing the comm= and to the args, push the args (character by character, in reverse order) onto =E2=80=98unread-command-events=E2=80=99, preceding each arg (set) with =E2= =80=98C-j=E2=80=99 (newline). Here's a test command: (defun zow (string symbol number) (interactive "sString: \nSSymbol: \nnNumber: ") (message "got: %S" (list string symbol number))) Invoked like: zow not quite 42 it should display: got: ("not" quite 42) in the echo area. Of course, this technique loses w/ certain (stealthy) =E2=80=98interactive=E2=80=99 specs, regions, stateful (history var) defaul= ts, args that include a space, etc, but it might be fun to try, anyway. That's the primary benefit of all DWIM hacking, after all, for both you and Emacs! =2D-=20 Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) =3D> nil --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlIYAEgACgkQZwMiJEyAdQLc3wCcC6s+UVJw3aIZn6MFGzyNrDEj UvEAn0aFwcvufU3HdqqYIAJtwKWPfxC0 =Y1t+ -----END PGP SIGNATURE----- --=-=-=--