From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#31951: 27.0.50; [PATCH] server-save-buffers-kill-terminal should respect save-some-buffers-default-predicate Date: Wed, 27 Jun 2018 14:20:54 +0100 Message-ID: <87r2ksl615.fsf@gmail.com> References: <87y3f5mq07.fsf@gmail.com> <87vaa8pap5.fsf@gmail.com> <87muvklysn.fsf@gmail.com> <87r2kvq5f9.fsf@gmail.com> <8736xbm8ep.fsf@gmail.com> <87d0wepb2u.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1530106114 28133 195.159.176.226 (27 Jun 2018 13:28:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2018 13:28:34 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 31951@debbugs.gnu.org, 31951-done@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 27 15:28:29 2018 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 1fYAUm-0007E9-Ij for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jun 2018 15:28:28 +0200 Original-Received: from localhost ([::1]:59229 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYAWt-0003yb-Qs for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jun 2018 09:30:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYAOb-0005G7-6a for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2018 09:22:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYAOY-0002Yp-HN for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2018 09:22:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57310) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYAOY-0002Yh-Ej for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2018 09:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fYAOY-00071X-8x for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2018 09:22:02 -0400 Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jun 2018 13:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 31951 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 31951@debbugs.gnu.org, joaotavora@gmail.com, joaotavora@gmail.com Original-Received: via spool by 31951-done@debbugs.gnu.org id=D31951.153010566826919 (code D ref 31951); Wed, 27 Jun 2018 13:22:02 +0000 Original-Received: (at 31951-done) by debbugs.gnu.org; 27 Jun 2018 13:21:08 +0000 Original-Received: from localhost ([127.0.0.1]:36969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYANg-000706-Fu for submit@debbugs.gnu.org; Wed, 27 Jun 2018 09:21:08 -0400 Original-Received: from mail-wm0-f52.google.com ([74.125.82.52]:52965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYANc-0006zD-P5; Wed, 27 Jun 2018 09:21:05 -0400 Original-Received: by mail-wm0-f52.google.com with SMTP id e69-v6so2886505wme.2; Wed, 27 Jun 2018 06:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=2AOZCDPPe8Rq+Q5EXpRxCcZA/7P7ROmvXSeqDXcQO5A=; b=CEGT72yD9b1y167QA9HLC0ed4bnHG4cTnGyy34dOLOwXxKC4Si1judJT98PZdlhVL8 hTMRKArRzbnd+W/Bgj5w4jg2JyqoYsppue3Qrzs0pzO+v3lWnZmCuPc3kqq+23OZWEEf +tpcAWnzk2vWYYEeheqRTPGVPFAZEk2RfVtYhTo2Em4hUx33GEXV56VekyE+7becrIdC eZLB+brd1Fdho45DNC7Waz60ZPHh876CyAYpYjTJhCo1QJKnGoy3Qj9Pu7SHSGVv/aJU SVCg0c37s1YzECtHaq2mR/635xO2xw+fy5e3mEh0Ho15ZtjQMfmPNN9tbRSD1+2hh1mj gRLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=2AOZCDPPe8Rq+Q5EXpRxCcZA/7P7ROmvXSeqDXcQO5A=; b=WXcvvCds+0mN4pF8DQbENYvaqzjDnx42U26ZwiK9HHU7uCyhO6PpH47e8ASPUeuY7y o/MDENjB12KGN1SZfwdIruE/QV41zPx8tDxIPWmorf9BCBUGO9OShbD3NQSuNb3hu7/l Ll/Q8QSDVOs9MNhx6rGZFAiJnU4vWqwghBDtTRzfU4c1womnGZSxnLJ6FhJpzyO5pNGE ZHhw6k3lBGANSi+CIWOKYggyP5l5eOyPu7Aci67jHF+Arb+K2SqTlhLlkv1yFLoCfXxs SSM2Rd+Dxi/fk2ytui9ZX5SHu0XnSZci8We4U7JJTGo3WyB721VzNqTbE1AZhCOylKu/ xE4A== X-Gm-Message-State: APt69E0NVa2fmgDru7pYg0WjJHvpfMG5lAI0Ies1iUgx4DxmSosr0kH3 e64/TUMmUy0z2Q4J1z/R0rC2JVBa1lE= X-Google-Smtp-Source: AAOMgpc8FzFGf1CNJ6LouPUF5xcJIFK7TDRIP2TX1lz/Ye4TEkmrpr87xo19pBhhXj0k1PpzBh1hjg== X-Received: by 2002:a1c:c8:: with SMTP id 191-v6mr4882846wma.115.1530105658632; Wed, 27 Jun 2018 06:20:58 -0700 (PDT) Original-Received: from lolita.yourcompany.com ([194.117.2.109]) by smtp.gmail.com with ESMTPSA id e188-v6sm15965924wmf.21.2018.06.27.06.20.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Jun 2018 06:20:57 -0700 (PDT) In-Reply-To: <87d0wepb2u.fsf@gmail.com> (Noam Postavsky's message of "Mon, 25 Jun 2018 21:53:45 -0400") 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:147865 Archived-At: Noam Postavsky writes: > Jo=C3=A3o T=C3=A1vora writes: > >> I tried to make it terser, but couldn't. > > Hmm, maybe just concentrate on the save-some-buffers-default-predicate > thing. I think the original comment pretty much redundantly repeats > what the doc string (and the code itself) say. > > --- i/lisp/server.el > +++ w/lisp/server.el > @@ -1639,13 +1639,15 @@ server-save-buffers-kill-terminal > (save-buffers-kill-emacs arg))) > ((processp proc) > (let ((buffers (process-get proc 'buffers))) > - ;; If client is bufferless, emulate a normal Emacs exit > - ;; and offer to save all buffers. Otherwise, offer to > - ;; save only the buffers belonging to the client. > (save-some-buffers > arg (if buffers > - (lambda () (memq (current-buffer) buffers)) > - t)) > + ;; Only files from emacsclient file list. > + (lambda () (memq (current-buffer) buffers)) > + ;; No emacsclient file list: don't override > + ;; `save-some-buffers-default-predicate' (unless > + ;; ARGS is non-nil), since we're not killing > + ;; Emacs (unlike `save-buffers-kill-emacs'). > + (and arg t))) > (server-delete-client proc))) > (t (error "Invalid client frame"))))) >=20=20 Pushed as ce54573dacaeb234ac006b71cbaafe1c543515f1. Thanks, Jo=C3=A3o