From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stuart D. Herring" Newsgroups: gmane.emacs.devel Subject: Recursive edits in `save-excursion' Date: Sun, 24 Sep 2006 20:57:09 -0700 (PDT) Message-ID: <31098.128.165.0.81.1159156629.squirrel@webmail.lanl.gov> Reply-To: herring@lanl.gov NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1159156649 18468 80.91.229.2 (25 Sep 2006 03:57:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Sep 2006 03:57:29 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 25 05:57:27 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GRhau-0000AU-Rt for ged-emacs-devel@m.gmane.org; Mon, 25 Sep 2006 05:57:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GRhau-0006uM-Fi for ged-emacs-devel@m.gmane.org; Sun, 24 Sep 2006 23:57:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GRhal-0006uF-5O for emacs-devel@gnu.org; Sun, 24 Sep 2006 23:57:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GRhai-0006u3-Fh for emacs-devel@gnu.org; Sun, 24 Sep 2006 23:57:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GRhai-0006u0-BF for emacs-devel@gnu.org; Sun, 24 Sep 2006 23:57:12 -0400 Original-Received: from [192.65.95.54] (helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GRhf2-0003GE-Gg for emacs-devel@gnu.org; Mon, 25 Sep 2006 00:01:40 -0400 Original-Received: from mailrelay3.lanl.gov (mailrelay3.lanl.gov [128.165.4.104]) by mailwasher-b.lanl.gov (8.13.6/8.13.6/(ccn-5)) with ESMTP id k8P3v9sh018985 for ; Sun, 24 Sep 2006 21:57:09 -0600 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay3.lanl.gov (8.13.6/8.13.6/(ccn-5)) with ESMTP id k8P3v97w020951 for ; Sun, 24 Sep 2006 21:57:09 -0600 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id k8P3v9gk020380 for ; Sun, 24 Sep 2006 21:57:09 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id k8P3v9FF020378; Sun, 24 Sep 2006 20:57:09 -0700 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.0.81 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Sun, 24 Sep 2006 20:57:09 -0700 (PDT) Original-To: emacs-devel@gnu.org User-Agent: SquirrelMail/1.4.6-7.el3.7lanl X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60192 Archived-At: I find that I get unexpected results from multiple recursive edits in `save-excursion' forms in one command (e.g., evaluating (list (save-excursion (recursive-edit) (current-buffer)) (save-excursion (recursive-edit) (current-buffer))) and, during each recursive edit, selecting some different buffer). The first time, `current-buffer' returns the buffer selected during the recursive edit, but the second time the buffer that was current when the evaluation began is returned. Similar things happen with `point-marker' in place of `current-buffer', which is how I found this. Is this a bug, or is it just some consequence of interaction between the (recursive) command loop and `save-excursion' that I don't understand? Thanks, Davis PS - The "Recent Input" below is everything from "emacs -Q", so can be used as a precise test case. In GNU Emacs 22.0.50.1 (i686-pc-linux-gnu, Motif Version 2.2.2) of 2006-09-24 on callahan X server distributor `The XFree86 Project, Inc', version 11.0.40300000 configured using `configure '--with-x-toolkit=motif' '--with-xpm' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png' '--with-x'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 locale-coding-system: utf-8 default-enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t line-number-mode: t Recent input: C-x b a C-x b b C-x b * s c r ( l i s t SPC ( s a v e - e x c u r s i o n SPC ( r e c u r s i v e - e d i t ) S-SPC ( c u r r e n t - b u f f e r ) ) C-- C-M-k C-y SPC C-y ) C-x C-e C-x b a C-M-c C-x b b C-M-c Recent messages: (emacs -Q) For information about the GNU Project and its goals, type C-h C-p. Mark set [2 times] (# #) Loading emacsbug... Loading regexp-opt...done Loading emacsbug...done -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.