From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Nikolay Kudryavtsev Newsgroups: gmane.emacs.bugs Subject: bug#25340: Save-some-buffers gets called when installing packages. Date: Sat, 7 Jan 2017 21:06:18 +0300 Message-ID: <240fc1ee-a0b8-c95b-4353-9e6bf26db940@gmail.com> References: <0467624a-368b-6b61-e08d-97a34c8c25fa@gmail.com> <87zij63z0j.fsf@users.sourceforge.net> <8a717ff8-c5f7-2b3e-33d0-0a0403dbddf5@gmail.com> <87fukw5381.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------3A817FEAC47967CEEF2AE646" X-Trace: blaine.gmane.org 1483812437 27561 195.159.176.226 (7 Jan 2017 18:07:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 7 Jan 2017 18:07:17 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 Cc: 25340@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 07 19:07:13 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 1cPvOW-0005qr-7V for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jan 2017 19:07:08 +0100 Original-Received: from localhost ([::1]:58605 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPvOa-0003QH-DO for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jan 2017 13:07:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPvOT-0003Na-7m for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2017 13:07:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPvOQ-0008Ro-32 for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2017 13:07:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59030) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cPvOP-0008RY-VN for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2017 13:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cPvOP-0006qs-Mq for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2017 13:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Nikolay Kudryavtsev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Jan 2017 18:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25340 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 25340-submit@debbugs.gnu.org id=B25340.148381238926286 (code B ref 25340); Sat, 07 Jan 2017 18:07:01 +0000 Original-Received: (at 25340) by debbugs.gnu.org; 7 Jan 2017 18:06:29 +0000 Original-Received: from localhost ([127.0.0.1]:46196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPvNs-0006pt-Qa for submit@debbugs.gnu.org; Sat, 07 Jan 2017 13:06:29 -0500 Original-Received: from mail-lf0-f53.google.com ([209.85.215.53]:36030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPvNq-0006pf-8M for 25340@debbugs.gnu.org; Sat, 07 Jan 2017 13:06:26 -0500 Original-Received: by mail-lf0-f53.google.com with SMTP id o140so17306136lff.3 for <25340@debbugs.gnu.org>; Sat, 07 Jan 2017 10:06:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to; bh=NwSXD/846LH3MoDnjnXw8jptDjyXnbR4bnB3S+oV6GI=; b=dYfNQ/SxbnCTsLpVVMPTZAjmf0ucGakATwKL19C8JqWOmZrIm5X/N3ReE0GcakKqsx MnLoELy+kDRQRJCIqxS9kScJUX0JNh5NpQJLvcSLnuSgbRFSrKdJFWHlDRY+JjRsp9pQ jvzmCkI1JfM0bBbS8mThoywncUfhfz+DZY0c2X+Raizk+5jv+zzKDzH9Uhv62Yxn9okj vI6YFXBX/CsLTxTtUxJM6M+FXsBRvDQq0AiafnqD5LHqkqwZbMmw9uhONBfzzpUG6oLg vu1bepUwwqiNtw2ZedQCvg/tG+Us/dAdpHZDzyto5KzBC27JknZEISVUroW0uTcRy8Be afhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to; bh=NwSXD/846LH3MoDnjnXw8jptDjyXnbR4bnB3S+oV6GI=; b=ttiUWf0PV6p/3ADrXjvtMc3+zrqjl92PldT00FD2yYXtfaggUwi4FFZ39mAr32xjrx T/oKFTjPfKpdAaSLlDVvAeIADVJ682GtW/gNxWTBQw7+83XmdAwn1fGrSxu+EkixR7ob R2TdY5Ru5GGM0U1WxGxS6XIaRPa5TFfkJMyWsDdaduTRfpvSCcKuDHcnxvofuSaQvq08 Y6HnM2r2ahUQiUSamKIWWB6nZKNLgZG/lV1/ieC6iIwOXTvApvv8XCSNC79rzqllddMo wugRPtTM+zhxLeBtXWQa3TCz7lBC5XcBqkS01WLwSNAXlU17mbVuayiu+AHvvS598kyM Kb1A== X-Gm-Message-State: AIkVDXKtR8LfZqjh2rHYJj1EPqKXT/vBpA6W/G7mmntgo9nMoOaKQiYPFdYrc9YXsreYAQ== X-Received: by 10.25.67.9 with SMTP id q9mr24999487lfa.6.1483812380299; Sat, 07 Jan 2017 10:06:20 -0800 (PST) Original-Received: from [192.168.1.73] ([37.19.36.146]) by smtp.gmail.com with ESMTPSA id z26sm20038959lja.49.2017.01.07.10.06.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jan 2017 10:06:19 -0800 (PST) X-Google-Original-From: Nikolay Kudryavtsev In-Reply-To: <87fukw5381.fsf@users.sourceforge.net> 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:127884 Archived-At: This is a multi-part message in MIME format. --------------3A817FEAC47967CEEF2AE646 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit I had the idea of doing this: (defun byte-recompile-directory (directory &optional arg force limit-buffer-saving) ... If forth argument LIMIT-BUFFER-SAVING is 'directory, only files within DIRECTORY would be saved. When LIMIT-BUFFER-SAVING is t no existing buffers would be checked for modification. But I found out out that having LIMIT-BUFFER-SAVING with value t like this would not work without an accompanying change to byte-recompile-file - since byte-recompile-file already checks whether there's a buffer for that file and that buffer is modified. So, since I don't think that doing changes to byte-recompile-file is the best idea, here's my current version. Also, note that the check in byte-recompile-file actually makes calling save-some-buffers somewhat redundant. -- Best Regards, Nikolay Kudryavtsev --------------3A817FEAC47967CEEF2AE646 Content-Type: text/plain; charset=UTF-8; name="0001-Prevent-package-install-from-asking-to-save-buffers.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0="0001-Pr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