From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexis Newsgroups: gmane.emacs.devel Subject: Re: save-excursion and the mark Date: Tue, 24 Feb 2015 13:31:19 +1100 Message-ID: <877fv8niq0.fsf@gmail.com> References: <87bnkklv44.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: ger.gmane.org 1424745097 32031 80.91.229.3 (24 Feb 2015 02:31:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Feb 2015 02:31:37 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 24 03:31:36 2015 Return-path: Envelope-to: ged-emacs-devel@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 1YQ5Hc-0007nZ-GB for ged-emacs-devel@m.gmane.org; Tue, 24 Feb 2015 03:31:36 +0100 Original-Received: from localhost ([::1]:46524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQ5Hb-0003Vm-Oa for ged-emacs-devel@m.gmane.org; Mon, 23 Feb 2015 21:31:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQ5HX-0003Sv-M9 for emacs-devel@gnu.org; Mon, 23 Feb 2015 21:31:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQ5HT-0003Pk-W7 for emacs-devel@gnu.org; Mon, 23 Feb 2015 21:31:31 -0500 Original-Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]:45230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQ5HT-0003PF-N5 for emacs-devel@gnu.org; Mon, 23 Feb 2015 21:31:27 -0500 Original-Received: by pablf10 with SMTP id lf10so32149817pab.12 for ; Mon, 23 Feb 2015 18:31:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:from:to:subject:date:message-id:mime-version :content-type; bh=EMZ/CGSD0uTvDKz7V4x8nIhqrda+cdvPzKyZNR78Nm8=; b=okvV3bbD+QTbIbqiVz1avu1F7HaZiaOBHSMjTKWj9BkmP2vfOX34VT8pbp4ZlZQDgb jZZEvanQnFk2IZg7YWiHyrsT2C8jcEeK98MaZbBQHT1ADM135xLIdHyZOo17e+lxv671 ZOcdZDYeEebv+LPzqO0UGAqCikastaHbIgdHTrURUKj/eErjNTsDR7SpR9g5v6YeilgS 9pkYr9BaT8/foYtsAzyh9AkUKmEVjF9ID2oYn7cr/WLqKNnwBg3Z+7cwQWp1RfVtQn1E L1anPWGfbv4TA2gh47HykLosG39G+qEWG6fD8Nh7m2jtyNHJk8+fyQJORS4oDglM6eSC p4gA== X-Received: by 10.70.13.68 with SMTP id f4mr24281297pdc.115.1424745085947; Mon, 23 Feb 2015 18:31:25 -0800 (PST) Original-Received: from localhost (ppp118-209-226-212.lns20.mel8.internode.on.net. [118.209.226.212]) by mx.google.com with ESMTPSA id f8sm34405718pdm.68.2015.02.23.18.31.23 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 23 Feb 2015 18:31:24 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183437 Archived-At: Stefan Monnier writes: > `save-excursion' is defined to save&restore the mark (as well as > its being active or not). > > But I'm having a hard time finding a piece of code where we > actually make use of this. Can someone point me to such code > (either in Emacs or in some external package)? I.e. point me to > code which would misbehave if save-excursion were to stop > saving&restoring the mark (and/or its activation status). My `org-vcard` package on MELPA makes use of `save-excursion` in a few places, but mostly out of politeness towards the user (i.e. restoring point after my code has done its thing). At any rate, since the usage is so limited, i'd be happy to manually save point and the mark, if it's felt that it would be generally beneficial for `save-excursion` to not do so itself. Alexis.