From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: save-excursion and the mark Date: Sat, 25 Apr 2015 15:19:02 +0100 Message-ID: References: Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1429971568 14026 80.91.229.3 (25 Apr 2015 14:19:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Apr 2015 14:19:28 +0000 (UTC) Cc: Stefan Monnier , emacs-devel To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 25 16:19:19 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 1Ym0vN-00067x-29 for ged-emacs-devel@m.gmane.org; Sat, 25 Apr 2015 16:19:17 +0200 Original-Received: from localhost ([::1]:48498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ym0vM-0000Dv-00 for ged-emacs-devel@m.gmane.org; Sat, 25 Apr 2015 10:19:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ym0vA-0000Dq-Ea for emacs-devel@gnu.org; Sat, 25 Apr 2015 10:19:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ym0v9-0003Qe-Kw for emacs-devel@gnu.org; Sat, 25 Apr 2015 10:19:04 -0400 Original-Received: from mail-lb0-x232.google.com ([2a00:1450:4010:c04::232]:36849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ym0v9-0003QX-CH for emacs-devel@gnu.org; Sat, 25 Apr 2015 10:19:03 -0400 Original-Received: by lbbqq2 with SMTP id qq2so54895178lbb.3 for ; Sat, 25 Apr 2015 07:19:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=nouYg3474ghx/MrczqH/MVNQfFQ4sNJECB63HGvdDz4=; b=J9DoKUz93kuv9hJUpVtLgPMFcZhDZdu59wyfF7U1JEJd4LeWfDTh79Uh9zUuHaTRpS YRdeOCHUK1jOT0kSTOjaTlgozNCSNHSuz4xexQZWe7FwxaemEhtX2eE8fj/uZRpRRKqt /iivYpfc9T/KTV9Z5kHJ3krWh7E6JDcK8kuHUkML0oLmcLNiyTDHaucN7ChnRvTve8m2 M9thUrIDk+4WdvFCI67FXGeu1nnkaclHiCWEKrhDpeBgWVl5WIYeONnc2qM5XEyvd5VN Xelzny9sxhm/8wuOAX4RHlxI2k8mGVLlWcH0kzdu1hpKNGVaNU1p96iklDMTICZBPcAl IsLQ== X-Received: by 10.152.5.164 with SMTP id t4mr277842lat.16.1429971542603; Sat, 25 Apr 2015 07:19:02 -0700 (PDT) Original-Received: by 10.25.150.1 with HTTP; Sat, 25 Apr 2015 07:19:02 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: fCFj1PUmiSbmUW8DnySRiPizb00 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::232 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:185868 Archived-At: >>> (cl-letf (((mark))) ...) might do the trick. >> >> Thanks; that kinda cryptic incantation seems to do the trick > > Actually, it just made things break in a different way. > (Since the X-Hashcash header is inserted before the mark.) That is, the > numerical value of the mark doesn't change, so it visually moves > backwards in the buffer, since text has been inserted before the mark. Try using (cl-letf (((mark-marker))) ...) instead. It should preseve the mark's marker position, instead of numeric position.