From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.bugs Subject: bug#25964: 26.0.50; byte-recompile-directory saving unrelated buffer Date: Sat, 04 Mar 2017 05:58:34 +0100 Message-ID: <87pohxd4ed.fsf@luca> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1488603614 4258 195.159.176.226 (4 Mar 2017 05:00:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Mar 2017 05:00:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: 25964@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 04 06:00:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ck1nb-0000Vr-Oq for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Mar 2017 06:00:07 +0100 Original-Received: from localhost ([::1]:33945 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ck1nh-0006Fr-Pm for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Mar 2017 00:00:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ck1nc-0006EP-35 for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2017 00:00:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ck1nX-0002Qk-9g for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2017 00:00:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40849) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ck1nX-0002QF-7C for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2017 00:00:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ck1nW-000783-V6 for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2017 00:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Politz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Mar 2017 05:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25964 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.148860354727264 (code B ref -1); Sat, 04 Mar 2017 05:00:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Mar 2017 04:59:07 +0000 Original-Received: from localhost ([127.0.0.1]:39048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ck1md-00075g-4e for submit@debbugs.gnu.org; Fri, 03 Mar 2017 23:59:07 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ck1ma-000752-Vm for submit@debbugs.gnu.org; Fri, 03 Mar 2017 23:59:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ck1mU-00026a-QZ for submit@debbugs.gnu.org; Fri, 03 Mar 2017 23:58:59 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48349) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ck1mU-00026R-Nj for submit@debbugs.gnu.org; Fri, 03 Mar 2017 23:58:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ck1mT-00062b-Au for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2017 23:58:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ck1mO-00024H-G5 for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2017 23:58:57 -0500 Original-Received: from gateway-a.fh-trier.de ([143.93.54.181]:44736) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ck1mO-00023C-55 for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2017 23:58:52 -0500 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier (RZ/HT)] Original-Received: from localhost (ip5f5bdeea.dynamic.kabel-deutschland.de [95.91.222.234]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id 91249179B058 for ; Sat, 4 Mar 2017 05:58:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=hochschule-trier.de; s=default; t=1488603515; bh=bchxCi7Qx63BTSukZWUuv2Dy+5E=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=YmIqsWDdE2LvJ3tqxUyvIdJVD5qZCVF8eQ3pmGtCcTc2cmFHmSnR/T8czrrw1uWnI TzPadSVAfscea04FcCi5tnHTcPlz+psPv9oJ1q8BG2e+XZJRPm0ENdgsKGktsfrIij ps+Zf1GWdaBoRB+6UvD/VV7E77dLddK2iYfuC+X8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:130148 Archived-At: --=-=-= Content-Type: text/plain I think it is somewhat annoying when I install a Lisp package and it asks me whether I want to save a completely unrelated buffer in some other project. This is especially true, if this unrelated buffer has a function like check-parens on its after-save-hook, which may signal an error, and in turn will abort the whole package installation. The buffer saving happens in byte-recompile-directory via save-some-buffer. So I wonder, if this can be made more selective, like so: --=-=-= Content-Type: text/x-diff Content-Disposition: inline Content-Description: save-some-less-buffers diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 25513bd024..86b1617fd7 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1661,7 +1661,12 @@ byte-recompile-directory (if arg (setq arg (prefix-numeric-value arg))) (if noninteractive nil - (save-some-buffers) + (save-some-buffers + nil (lambda () + (let ((file (buffer-file-name))) + (and file + (string-match-p emacs-lisp-file-regexp file) + (file-in-directory-p file directory))))) (force-mode-line-update)) (with-current-buffer (get-buffer-create byte-compile-log-buffer) (setq default-directory (expand-file-name directory)) --=-=-= Content-Type: text/plain Thanks, -ap --=-=-=--