From unknown Wed Aug 20 01:18:13 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#4463 <4463@debbugs.gnu.org> To: bug#4463 <4463@debbugs.gnu.org> Subject: Status: vc-do-command return value when using 'async Reply-To: bug#4463 <4463@debbugs.gnu.org> Date: Wed, 20 Aug 2025 08:18:13 +0000 retitle 4463 vc-do-command return value when using 'async reassign 4463 emacs submitter 4463 Dan Nicolaescu severity 4463 normal thanks From dann@godzilla.ics.uci.edu Thu Sep 17 08:45:23 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 17 Sep 2009 15:45:23 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.0 required=4.0 tests=AWL,FOURLA,MURPHY_DRUGS_REL8, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8HFjL83010263 for ; Thu, 17 Sep 2009 08:45:22 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MoJAf-00007k-1a for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2009 11:45:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MoJAa-00006n-5Y for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2009 11:45:20 -0400 Received: from [199.232.76.173] (port=38659 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoJAZ-00006k-So for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2009 11:45:15 -0400 Received: from sallyv2.ics.uci.edu ([128.195.1.120]:45601) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1MoJAZ-0003g1-Bf for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2009 11:45:15 -0400 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by sallyv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n8HFhao6003306 for ; Thu, 17 Sep 2009 08:43:36 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n8HFhaR1024941; Thu, 17 Sep 2009 08:43:36 -0700 (PDT) Date: Thu, 17 Sep 2009 08:43:36 -0700 (PDT) Message-Id: <200909171543.n8HFhaR1024941@godzilla.ics.uci.edu> From: Dan Nicolaescu To: bug-gnu-emacs Subject: vc-do-command return value when using 'async X-Debbugs-No-Ack: yes Lines: 39 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n8HFhao6003306 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) When passing 'async to vc-do-command there's no reliable way to determine the exit status for the command. When using (vc-do-command 'async BLAG) it is possible that by the time the next command is executed the process has finished and it's not possible to retrieve the process return value. The patch below change vc-do-command to return the process for the async case, that way the use has a handle to use in case the return value is needed. Index: lisp/vc-dispatcher.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/vc-dispatcher.el,v retrieving revision 1.69 diff -u -3 -p -r1.69 vc-dispatcher.el --- lisp/vc-dispatcher.el 7 Aug 2009 08:24:32 -0000 1.69 +++ lisp/vc-dispatcher.el 17 Sep 2009 05:58:06 -0000 @@ -330,13 +330,14 @@ that is inserted into the command line b (let ((process-connection-type nil)) (apply 'start-file-process command (current-buffer) command squeezed)))) - (if vc-command-messages - (message "Running %s in background..." full-command)) + (when vc-command-messages + (message "Running %s in background..." full-command)) ;;(set-process-sentinel proc (lambda (p msg) (delete-process p))) (set-process-filter proc 'vc-process-filter) - (vc-exec-after - `(if vc-command-messages - (message "Running %s in background... done" ',full-command)))) + (setq status proc) + (when vc-command-messages + (vc-exec-after + `(message "Running %s in background... done" ',full-command)))) ;; Run synchronously (when vc-command-messages (message "Running %s in foreground..." full-command)) From monnier@IRO.UMontreal.CA Thu Sep 17 11:05:59 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 17 Sep 2009 18:05:59 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.1 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8HI5wrA001283 for ; Thu, 17 Sep 2009 11:05:59 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MoLMj-0004go-Kl for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2009 14:05:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MoLMf-0004gc-Tg for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2009 14:05:57 -0400 Received: from [199.232.76.173] (port=53058 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoLMf-0004gZ-R3 for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2009 14:05:53 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:59618) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MoLMf-0001CB-DA for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2009 14:05:53 -0400 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n8HI5jAx019101; Thu, 17 Sep 2009 14:05:45 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 59C943A104; Thu, 17 Sep 2009 14:05:45 -0400 (EDT) From: Stefan Monnier To: Dan Nicolaescu Cc: 4463@debbugs.gnu.org, bug-gnu-emacs Subject: Re: bug#4463: vc-do-command return value when using 'async Message-ID: References: <200909171543.n8HFhaR1024941@godzilla.ics.uci.edu> Date: Thu, 17 Sep 2009 14:05:45 -0400 In-Reply-To: <200909171543.n8HFhaR1024941@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Thu, 17 Sep 2009 08:43:36 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3365=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-CrossAssassin-Score: 2 > When passing 'async to vc-do-command there's no reliable way to > determine the exit status for the command. > When using (vc-do-command 'async BLAG) it is possible that by the time > the next command is executed the process has finished and it's not > possible to retrieve the process return value. > The patch below change vc-do-command to return the process for the async > case, that way the use has a handle to use in case the return value is > needed. If you've checked that returning a process object won't trip up any of the callers, feel free to install the change. Stefan From lekktu@gmail.com Thu Oct 22 02:35:31 2009 Received: (at control) by emacsbugs.donarmstrong.com; 22 Oct 2009 09:35:32 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=AWL,MISSING_SUBJECT, MURPHY_DRUGS_REL8,NOSUBJECT,VALID_BTS_CONTROL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-fx0-f213.google.com (mail-fx0-f213.google.com [209.85.220.213]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9M9ZTNW004084 for ; Thu, 22 Oct 2009 02:35:31 -0700 Received: by fxm9 with SMTP id 9so9696363fxm.1 for ; Thu, 22 Oct 2009 02:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=8EmqKmTQZFxRHmBqMf0mAHPBq3MFliknc0lztWoJq6Y=; b=HxQYupT4FFltZz1ItMJj0h3XTFYNK5e7ryT0Cek2T3YESYQLNQM8G9V9i2CKiMAEbc EvYuLj8f7w1qApk14qvzihjcYCGQUOU+1DBevO5UhGKLQhzQ6+vBiuihHNGFYaXeeEYe kJYg0CmwEGM5xp9e/Qz4pt4br7Ml4TcpNJkWo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=Y5ybjjcxlLdLgAFAm7oQwPF4q6enZ/vhDgoBesbKLPsYfKZBy2gNxuVUArd1lZsA9C Mqc9bcUQhekOxrkhuBrM/oRLNjZDm8m0DPtCnEMhvvK6rKfs9H9j6QMJR6VObUwlfUeo 7VB35jQ8OYFrwvpcsbgPdQA8bmjmcb1XFRU14= MIME-Version: 1.0 Received: by 10.239.145.8 with SMTP id q8mr761204hba.122.1256204124158; Thu, 22 Oct 2009 02:35:24 -0700 (PDT) From: Juanma Barranquero Date: Thu, 22 Oct 2009 11:35:04 +0200 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 reassign 4326 emacs,ns merge 4261 4434 merge 1589 3359 4207 merge 3829 4077 tags 4781 + patch tags 4747 + patch tags 4579 + patch tags 4471 + patch tags 4434 + patch tags 4234 + patch tags 4221 + patch tags 4147 + patch tags 4144 + patch tags 4139 + patch tags 4023 + patch tags 4736 + moreinfo unreproducible tags 4547 + notabug tags 4451 + notabug tags 4448 + moreinfo tags 4427 + moreinfo tags 4373 + notabug tags 4360 + notabug tags 4271 + moreinfo tags 4236 + moreinfo tags 4143 + moreinfo unreproducible tags 4120 + moreinfo unreproducible tags 4070 + moreinfo unreproducible severity 4422 wishlist severity 4396 minor severity 4394 minor severity 4341 wishlist severity 4300 minor severity 4263 minor severity 4178 minor severity 4172 wishlist severity 4110 wishlist severity 4056 wishlist close 4772 close 4700 close 4599 close 4515 close 4463 close 4445 close 4395 close 4334 close 4289 close 4219 quit From unknown Wed Aug 20 01:18:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 19 Nov 2009 15:24:17 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator