From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#22616: 25.0.50; Change to lm-header breaks lm-header-multiline Date: Wed, 11 May 2016 03:00:22 +0300 Message-ID: <10d3267b-4566-dbe5-2bf6-7ae9893499b8@yandex.ru> References: <87ziv8o7zo.fsf@bernoul.li> <40c67906-d293-4af8-e3be-652fb6bf67d1@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1462924885 19348 80.91.229.3 (11 May 2016 00:01:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 May 2016 00:01:25 +0000 (UTC) To: Artur Malabarba , Jonas Bernoulli , 22616@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 11 02:01:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1b0HaR-0000tM-Qt for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 May 2016 02:01:12 +0200 Original-Received: from localhost ([::1]:49661 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0HaQ-0008Ln-HJ for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 May 2016 20:01:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0HaM-0008J5-Dk for bug-gnu-emacs@gnu.org; Tue, 10 May 2016 20:01:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0HaJ-0003pO-53 for bug-gnu-emacs@gnu.org; Tue, 10 May 2016 20:01:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0HaJ-0003pI-1O for bug-gnu-emacs@gnu.org; Tue, 10 May 2016 20:01:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b0HaI-0004FO-GZ for bug-gnu-emacs@gnu.org; Tue, 10 May 2016 20:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 May 2016 00:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22616 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22616-submit@debbugs.gnu.org id=B22616.146292483316283 (code B ref 22616); Wed, 11 May 2016 00:01:02 +0000 Original-Received: (at 22616) by debbugs.gnu.org; 11 May 2016 00:00:33 +0000 Original-Received: from localhost ([127.0.0.1]:46427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0HZo-0004EZ-Oo for submit@debbugs.gnu.org; Tue, 10 May 2016 20:00:32 -0400 Original-Received: from mail-wm0-f51.google.com ([74.125.82.51]:37293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0HZn-0004EM-Cu for 22616@debbugs.gnu.org; Tue, 10 May 2016 20:00:31 -0400 Original-Received: by mail-wm0-f51.google.com with SMTP id a17so54178763wme.0 for <22616@debbugs.gnu.org>; Tue, 10 May 2016 17:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=crKnAiOD7ezn0bsv7Ym3v81LYpz94PaxdLZh6GPfwbI=; b=RjAIN+ETsR4jiAK8Zk+eC/ZWqJIeFyaFN0aQMgL+AdkzGJ3GbMxMaHRIImRg3vy5pS 3vjYaKRcAPASLqUMPGX2YoGv9tdO8lFzYiX298njgcoKycMplZOvCnfr6o2phxBy6ysX jtY/dlZOfKQgnpLS8m2o6i/O3oK/KsRwuyRxNClGS0K+HyvwLBqQTfLNX/rnztMJ4uRQ NrYYqQ5ZQEz4qcBEKTTMUmFTv/kUXjudl6QDa205F04DOZ3PpenX/4t3ZuZmrlm2QIfV USrDg9SUo30OAzb/t5cXzVk+CNuPPd8xggF760ewPR6RL1w4zvdfc/eciPOwmEwfzDDL X/uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=crKnAiOD7ezn0bsv7Ym3v81LYpz94PaxdLZh6GPfwbI=; b=Pxlr2X4hrEHeDb82T+fURNd3s5BqBIj2B93VknSpJ2FnTbDvS41SzbK0o44Ad8aZNA yVqFCiRrtT7LsL/4xn33q6n2VPSRKL2MeAHLwmrM6m5HBa2cw700ZzNIzzxBHHKtvLBZ RQe4RfrmfVnNsaozZymmxTjrW6nvhwvknrvuBYCPASHBXm0KRd8okvvzU3KfV5faRi1y OOKfCZALLCFzptnkA2DScTVfWo5sbjW7vyhsx91+xXukinNwS3FTKJ+Y8s19xrhDaAwO 63I3NJmKbJiYYffVjmjm0VUQvZfDCNfe2aIq/h06iCaRYCIAkb4KOpoLFgmmMMoMhqlB BNcA== X-Gm-Message-State: AOPr4FWpudFEwQCjRWZnLInnAV7yXkbpfDnfa24LFyxHJSIukp89vRKoakKLMJEHYStCzw== X-Received: by 10.195.11.197 with SMTP id ek5mr271871wjd.58.1462924825569; Tue, 10 May 2016 17:00:25 -0700 (PDT) Original-Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id o73sm33006892wme.16.2016.05.10.17.00.23 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 May 2016 17:00:24 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:118096 Archived-At: On 05/09/2016 05:13 AM, Artur Malabarba wrote: > IIRC, I made this change because the previous behaviour caused > `package-install-from-buffer' to move point. Since I saw no reason for > lm-header to move point, I fixed the issue at its roots. Doesn't package-install-from-buffer currently move point anyway? It jumps to the end of the buffer. Moving save-excursion there does help. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 3f0e972..f481157 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1979,17 +1979,18 @@ package-install-from-buffer Downloads and installs required packages as needed." (interactive) (let* ((pkg-desc - (cond - ((derived-mode-p 'dired-mode) - ;; This is the only way a package-desc object with a `dir' - ;; desc-kind can be created. Such packages can't be - ;; uploaded or installed from archives, they can only be - ;; installed from local buffers or directories. - (package-dir-info)) - ((derived-mode-p 'tar-mode) - (package-tar-file-info)) - (t - (package-buffer-info)))) + (save-excursion + (cond + ((derived-mode-p 'dired-mode) + ;; This is the only way a package-desc object with a `dir' + ;; desc-kind can be created. Such packages can't be + ;; uploaded or installed from archives, they can only be + ;; installed from local buffers or directories. + (package-dir-info)) + ((derived-mode-p 'tar-mode) + (package-tar-file-info)) + (t + (package-buffer-info))))) (name (package-desc-name pkg-desc))) ;; Download and install the dependencies. (let* ((requires (package-desc-reqs pkg-desc))