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: Sun, 19 Jul 2015 18:06:26 +0100 Message-ID: References: <55AA5AB3.1070505@eisentraut.org> <55ABCC84.4000400@eisentraut.org> 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 1437325595 1296 80.91.229.3 (19 Jul 2015 17:06:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Jul 2015 17:06:35 +0000 (UTC) Cc: emacs-devel To: Peter Eisentraut Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 19 19:06:34 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 1ZGs2q-00040X-NB for ged-emacs-devel@m.gmane.org; Sun, 19 Jul 2015 19:06:32 +0200 Original-Received: from localhost ([::1]:52154 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGs2p-0002KN-QU for ged-emacs-devel@m.gmane.org; Sun, 19 Jul 2015 13:06:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGs2m-0002KI-VK for emacs-devel@gnu.org; Sun, 19 Jul 2015 13:06:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGs2m-0007ea-2c for emacs-devel@gnu.org; Sun, 19 Jul 2015 13:06:28 -0400 Original-Received: from mail-lb0-x22b.google.com ([2a00:1450:4010:c04::22b]:33076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGs2l-0007eG-Q1 for emacs-devel@gnu.org; Sun, 19 Jul 2015 13:06:27 -0400 Original-Received: by lbbyj8 with SMTP id yj8so83798130lbb.0 for ; Sun, 19 Jul 2015 10:06:26 -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=hy+xughFoHv3JVQopFOhoxFnvanZlt1H2x2gOiLY/AA=; b=pjKkdwDjJhdnUZd6SxYk2eSZJig2h7E3Lk79UDethIjii+xRUZ9kbze4UrQhPdLg2O X2fP+tRCIhPJsfOKqdqPQK7+se0FTA1rn197aL+qR6OKAR+zvevqOEwxvFfan8bypgL5 mQ1N6qHIKhNVZjSCyagrqRB7EsJx6sFu53zkT+YumJgxApAmAbKxiDn1V2e5SnzJlztX 55Xjm/TSts8mC9he71b7OnCA3Q8652AV1txAXpKcu09j+/hDw18nkYay2lj8PG0/q121 nFbygGG+T43dJjlYHwsLxzqbSFRsX3lElo3dr6nJx+bHyDiUlEZMAfhTYiLpaDLZXbuH VWRA== X-Received: by 10.112.139.103 with SMTP id qx7mr23895528lbb.73.1437325586180; Sun, 19 Jul 2015 10:06:26 -0700 (PDT) Original-Received: by 10.25.134.139 with HTTP; Sun, 19 Jul 2015 10:06:26 -0700 (PDT) In-Reply-To: <55ABCC84.4000400@eisentraut.org> X-Google-Sender-Auth: iAu3UcuT3kPxIJVbNjCqO-R2OaI X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22b 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:187996 Archived-At: >> 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.