From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: IELM prompt Date: Sun, 25 Apr 2004 14:35:45 -0500 (CDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200404251935.i3PJZj019931@raven.dms.auburn.edu> References: <20040425021531.5172.LEKTU@mi.madritel.es> <200404250127.i3P1RVD17278@raven.dms.auburn.edu> <20040425183218.FB44.LEKTU@mi.madritel.es> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1082922157 21201 80.91.224.253 (25 Apr 2004 19:42:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Apr 2004 19:42:37 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Apr 25 21:42:29 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BHpWH-0008UT-00 for ; Sun, 25 Apr 2004 21:42:29 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BHpWH-00006D-00 for ; Sun, 25 Apr 2004 21:42:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BHpTd-0002ru-BK for emacs-devel@quimby.gnus.org; Sun, 25 Apr 2004 15:39:45 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BHpTX-0002qW-S0 for emacs-devel@gnu.org; Sun, 25 Apr 2004 15:39:39 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BHpSu-0002da-Tj for emacs-devel@gnu.org; Sun, 25 Apr 2004 15:39:33 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BHpSu-0002bQ-KD for emacs-devel@gnu.org; Sun, 25 Apr 2004 15:39:00 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id i3PJctTS008886; Sun, 25 Apr 2004 14:38:56 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id i3PJZj019931; Sun, 25 Apr 2004 14:35:45 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: lektu@mi.madritel.es In-reply-to: <20040425183218.FB44.LEKTU@mi.madritel.es> (message from Juanma Barranquero on Sun, 25 Apr 2004 18:34:10 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22135 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22135 I now believe there is a problem with your latest patch to ielm.el. If one is working in an *ielm* buffer, then switch to other buffers, then do M-x ielm to return to the *ielm* buffer, one does usually _not_ want point to move to the end, without even having a marker set to go back. You can do RET on any prompt. In the case of reenabling ielm after it was interrupted, the probability of the user wanting to go to the end is bigger, but not equal to 1. The behavior _before_ your patch did not make sense either. If one did M-x ielm on an interrupted process, one went to the end if and only if the ielm buffer is not current at the time one does M-x ielm. But it is exactly when the ielm buffer is _not_ current that one might want to see where point used to be after switching to the *ielm* buffer. No mark is set, so that information is irretrievable lost. I believe that if one switches back to an active ielm process, point should stay where it is. For an interrupted process, two possible solutions are to always stay, or to always move to the end, but setting the mark, so the user can easily go back. The patch below implements the latter. I could commit if there are no objections. ===File ~/ielm.el-diff====================================== *** ielm.el 25 Apr 2004 12:14:17 -0500 1.39 --- ielm.el 25 Apr 2004 14:02:34 -0500 *************** *** 547,559 **** "Interactively evaluate Emacs Lisp expressions. Switches to the buffer `*ielm*', or creates it if it does not exist." (interactive) ! (if (comint-check-proc "*ielm*") ! nil ! (save-excursion ! (set-buffer (get-buffer-create "*ielm*")) ! (inferior-emacs-lisp-mode))) ! (pop-to-buffer "*ielm*") ! (goto-char (point-max))) (provide 'ielm) --- 547,559 ---- "Interactively evaluate Emacs Lisp expressions. Switches to the buffer `*ielm*', or creates it if it does not exist." (interactive) ! (let (old-point) ! (unless (comint-check-proc "*ielm*") ! (with-current-buffer (get-buffer-create "*ielm*") ! (unless (eq (buffer-size) 0) (setq old-point (point))) ! (inferior-emacs-lisp-mode))) ! (pop-to-buffer "*ielm*") ! (when old-point (push-mark old-point)))) (provide 'ielm) ============================================================