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, 18 Jul 2015 16:13:45 +0100 Message-ID: References: <55AA5AB3.1070505@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 1437232443 10682 80.91.229.3 (18 Jul 2015 15:14:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jul 2015 15:14:03 +0000 (UTC) Cc: emacs-devel To: Peter Eisentraut Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 18 17:14: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 1ZGToP-0004Nf-Ic for ged-emacs-devel@m.gmane.org; Sat, 18 Jul 2015 17:14:01 +0200 Original-Received: from localhost ([::1]:48581 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGToO-0003KI-Mn for ged-emacs-devel@m.gmane.org; Sat, 18 Jul 2015 11:14:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGToC-0003K8-E7 for emacs-devel@gnu.org; Sat, 18 Jul 2015 11:13:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGToB-000235-Bc for emacs-devel@gnu.org; Sat, 18 Jul 2015 11:13:48 -0400 Original-Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:35530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGToB-00022h-3o for emacs-devel@gnu.org; Sat, 18 Jul 2015 11:13:47 -0400 Original-Received: by lblf12 with SMTP id f12so74826392lbl.2 for ; Sat, 18 Jul 2015 08:13:45 -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=cvEetqSQCIuJnCaure6X0//LHx+mEpmd4Sp20g+rpbs=; b=HAOJL+NQBWle0G4CqL3YRbZD9jDONmqVW9ngjMzl3PEHNqqErGs2fVFIrIgTk7QT7R WwA+scgmNM2bXg6RJKYVv3J+JIlE7cr2dfxCeJB6rew4XwaLlIp1Vqk6gZBGE/iWsbw2 Tsm6UmPLdnsF5vfs0JIqvZ0k+jIIF1mn8f8BVT7aZepseVTERPMhCOVUCAZ+IbDpdJn2 rnDU7V/d4QcOkTHllZ0AAOGVG/xCDfzt3lV+X3xgTnaFIdsIoO2VNeSHymrirLXCVxrw sFko7lWRMSG6BfVDMbZ7jiuFl3edxtt+pu9SC4xSOsvr2uvKZznrzYLcuCvDy+vu2gab PNpA== X-Received: by 10.112.139.103 with SMTP id qx7mr19534268lbb.73.1437232425542; Sat, 18 Jul 2015 08:13:45 -0700 (PDT) Original-Received: by 10.25.134.139 with HTTP; Sat, 18 Jul 2015 08:13:45 -0700 (PDT) In-Reply-To: <55AA5AB3.1070505@eisentraut.org> X-Google-Sender-Auth: MvwYtYF5RwNzx8hZFbK9IluK8Gs X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::229 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:187949 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? 2015-07-18 14:54 GMT+01:00 Peter Eisentraut : > package-install-from-buffer moves the point to somewhere in the package > header, because it moves around there as it parses the header entries. > This is pretty annoying when developing and testing a package. > > This could be fixed by wrapping the body of package-buffer-info into > save-excursion. This worked well for me, but it somehow broke several > tests in package-test.el in ways that I don't understand. E.g., > > Test package-test-describe-package condition: > (wrong-type-argument number-or-marker-p "Trace/BPT trap: 5") > FAILED 4/19 package-test-describe-package > > Any ideas? >