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: package-install-from-buffer moves point Date: Sat, 7 Nov 2015 22:51:44 +0000 Message-ID: References: <55AA5AB3.1070505@eisentraut.org> <55ABCC84.4000400@eisentraut.org> <563E3D0E.3080503@eisentraut.org> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11405aea4d9e8b0523fb3412 X-Trace: ger.gmane.org 1446936728 21944 80.91.229.3 (7 Nov 2015 22:52:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Nov 2015 22:52:08 +0000 (UTC) Cc: emacs-devel To: Peter Eisentraut Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 07 23:52:03 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 1ZvCL3-0005HM-Vb for ged-emacs-devel@m.gmane.org; Sat, 07 Nov 2015 23:52:02 +0100 Original-Received: from localhost ([::1]:45445 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvCL3-0002OO-DA for ged-emacs-devel@m.gmane.org; Sat, 07 Nov 2015 17:52:01 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvCKp-0002OH-7C for emacs-devel@gnu.org; Sat, 07 Nov 2015 17:51:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvCKn-0006yt-Vc for emacs-devel@gnu.org; Sat, 07 Nov 2015 17:51:47 -0500 Original-Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]:33051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvCKn-0006yp-My for emacs-devel@gnu.org; Sat, 07 Nov 2015 17:51:45 -0500 Original-Received: by lffz63 with SMTP id z63so17926324lff.0 for ; Sat, 07 Nov 2015 14:51:44 -0800 (PST) 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=khYLFE8eqHvxdPkKocnYQx1IbGWuN2AHpoutxbVulnQ=; b=KE+t4fVmf/DLe8+2UnaQ/RPEO7CILrBJuQoOvCpXz8e8D0Wl56Gdl4921SMIS81rkO bIYglqtmNL/UGaV+kvbd24qY413gBWjqE3ALNhne7mNve6dC5UMFkGRvu6esVZ00tUm+ TpTr6cdfZAti5mmNlKBQ4km39AL35MuyVQ2i8cbb1rM0iSCj1XUHJMQTYwdSO1dzfvs8 +9RAm6r8l66MOsQ8ciNSa4+SRZ5NlhQ4BpNGiXH6L7H7nr7B5KHYD/ef7TukNb7wdoMh MKcDVIrkaEZOCzr3ndON63AIA1lwre2pT04mC/C+/Mcji8bbT3LR1hGrIPsuQtsTb01g kkHA== X-Received: by 10.25.21.70 with SMTP id l67mr5661299lfi.27.1446936704816; Sat, 07 Nov 2015 14:51:44 -0800 (PST) Original-Received: by 10.112.63.70 with HTTP; Sat, 7 Nov 2015 14:51:44 -0800 (PST) Original-Received: by 10.112.63.70 with HTTP; Sat, 7 Nov 2015 14:51:44 -0800 (PST) In-Reply-To: <563E3D0E.3080503@eisentraut.org> X-Google-Sender-Auth: L5YYmrfyLNCISqbjqsBBTGRdOtU X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c07::236 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:193569 Archived-At: --001a11405aea4d9e8b0523fb3412 Content-Type: text/plain; charset=UTF-8 2015-11-07 18:03 GMT+00:00 Peter Eisentraut : > > On 7/19/15 1:06 PM, Artur Malabarba wrote: > >>> This is due to calls to some `lm-*' functions inside > >>> `package-buffer-info' (possibly one of the calls I added myself > >>> yesterday). I can just wrap those in save-excursions, but I'm thinking > >>> that the `lm-*' functions themselves should not be moving the point. > >>> Shall I use save-excursion inside those functions instead? > >> > >> Well, there is also a goto-char call right at the top of > >> package-buffer-info. > > > > Clearly I should stop replying to messages on my phone where I can't > > look at the code first. :) > > > >> But I agree that the lm-* functions should > >> probably save the point themselves, too. There are some calls to > >> save-excursion in lisp-mnt.el, but it seems it's not applied consistently. > > > > Yes. `lm-header' always moves point to the header (besides returning > > it). All the others I looked through seem to be fine. > > Did you (or someone) have a chance to work on this? Regrettably, no. Feel free to do it if you'd like. It's really just a matter of fixing the tests that fail when you save excursion. --001a11405aea4d9e8b0523fb3412 Content-Type: text/html; charset=UTF-8

2015-11-07 18:03 GMT+00:00 Peter Eisentraut <peter@eisentraut.org>:
>
> On 7/19/15 1:06 PM, Artur Malabarba wrote:
> >>> This is due to calls to some `lm-*' functions inside
> >>> `package-buffer-info' (possibly one of the calls I added myself
> >>> yesterday). I can just wrap those in save-excursions, but I'm thinking
> >>> that the `lm-*' functions themselves should not be moving the point.
> >>> Shall I use save-excursion inside those functions instead?
> >>
> >> Well, there is also a goto-char call right at the top of
> >> package-buffer-info.
> >
> > Clearly I should stop replying to messages on my phone where I can't
> > look at the code first. :)
> >
> >> But I agree that the lm-* functions should
> >> probably save the point themselves, too. There are some calls to
> >> save-excursion in lisp-mnt.el, but it seems it's not applied consistently.
> >
> > Yes. `lm-header' always moves point to the header (besides returning
> > it). All the others I looked through seem to be fine.
>
> Did you (or someone) have a chance to work on this?

Regrettably, no.
Feel free to do it if you'd like. It's really just a matter of fixing the tests that fail when you save excursion.

--001a11405aea4d9e8b0523fb3412--