GNU bug report logs - #25964
26.0.50; byte-recompile-directory saving unrelated buffer

Previous Next

Package: emacs;

Reported by: Andreas Politz <politza <at> hochschule-trier.de>

Date: Sat, 4 Mar 2017 05:00:02 UTC

Severity: minor

Tags: fixed, patch

Merged with 25340, 26056

Found in version 26.0.50

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25964 in the body.
You can then email your comments to 25964 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25964; Package emacs. (Sat, 04 Mar 2017 05:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Politz <politza <at> hochschule-trier.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 04 Mar 2017 05:00:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Politz <politza <at> hochschule-trier.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; byte-recompile-directory saving unrelated buffer
Date: Sat, 04 Mar 2017 05:58:34 +0100
[Message part 1 (text/plain, inline)]
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:

[Message part 2 (text/x-diff, inline)]
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))
[Message part 3 (text/plain, inline)]
Thanks,
-ap

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25964; Package emacs. (Sat, 04 Mar 2017 05:08:02 GMT) Full text and rfc822 format available.

Message #8 received at 25964 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Andreas Politz <politza <at> hochschule-trier.de>
Cc: 25964 <at> debbugs.gnu.org
Subject: Re: bug#25964: 26.0.50;
 byte-recompile-directory saving unrelated buffer
Date: Sat, 04 Mar 2017 00:08:33 -0500
merge 25964 25340
quit

Andreas Politz <politza <at> hochschule-trier.de> writes:

> 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:

There is a similar patch in #25340, although it makes the behaviour
optional.




Merged 25340 25964. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sat, 04 Mar 2017 05:08:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25964; Package emacs. (Sat, 04 Mar 2017 10:10:02 GMT) Full text and rfc822 format available.

Message #13 received at 25964 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Politz <politza <at> hochschule-trier.de>
To: npostavs <at> users.sourceforge.net
Cc: 25964 <at> debbugs.gnu.org
Subject: Re: bug#25964: 26.0.50;
 byte-recompile-directory saving unrelated buffer
Date: Sat, 04 Mar 2017 11:08:43 +0100
Ok, thanks.




Merged 25340 25964 26056. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 12 Mar 2017 01:31:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25964; Package emacs. (Sat, 20 May 2017 22:28:02 GMT) Full text and rfc822 format available.

Message #18 received at 25964 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Andreas Politz <politza <at> hochschule-trier.de>
Cc: 25964 <at> debbugs.gnu.org
Subject: Re: bug#25964: 26.0.50;
 byte-recompile-directory saving unrelated buffer
Date: Sat, 20 May 2017 18:29:00 -0400
severity 25964 minor
tags 25340 fixed
close 25340 26.1
quit

npostavs <at> users.sourceforge.net writes:
>
> Andreas Politz <politza <at> hochschule-trier.de> writes:
>
>> 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:
>
> There is a similar patch in #25340, although it makes the behaviour
> optional.

It seems #25340 is stalled, so I've pushed your patch instead [1: f151eb0141].

[1: f151eb0141]: 2017-05-20 18:28:23 -0400
  Don't save unrelated buffers before recompiling directory (Bug#25964)
  http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=f151eb01418b80d102c767566e93ac332a8bf7c3




Severity set to 'minor' from 'normal' Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sat, 20 May 2017 22:28:02 GMT) Full text and rfc822 format available.

Added tag(s) fixed. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sat, 20 May 2017 22:28:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.1, send any further explanations to 25340 <at> debbugs.gnu.org and Nikolay Kudryavtsev <nikolay.kudryavtsev <at> gmail.com> Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sat, 20 May 2017 22:28:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 18 Jun 2017 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 304 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.