From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Richard Kim Newsgroups: gmane.emacs.bugs Subject: bug#41888: further explanation of the patch against gud.el Date: Sat, 20 Jun 2020 07:57:53 -0700 Message-ID: References: <87366vv7yn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000096eff505a8853c4d" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="59266"; mail-complaints-to="usenet@ciao.gmane.io" To: 41888@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 20 16:59:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jmexZ-000FHq-FJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Jun 2020 16:59:09 +0200 Original-Received: from localhost ([::1]:57620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmexY-00038J-34 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Jun 2020 10:59:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmexS-00037y-3N for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2020 10:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47074) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jmexR-00078g-RB for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2020 10:59:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jmexR-0003og-Pa for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2020 10:59:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87366vv7yn.fsf@gmail.com> Resent-From: Richard Kim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Jun 2020 14:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41888 X-GNU-PR-Package: emacs Original-Received: via spool by 41888-submit@debbugs.gnu.org id=B41888.159266509214605 (code B ref 41888); Sat, 20 Jun 2020 14:59:01 +0000 Original-Received: (at 41888) by debbugs.gnu.org; 20 Jun 2020 14:58:12 +0000 Original-Received: from localhost ([127.0.0.1]:58620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmewe-0003nV-Bj for submit@debbugs.gnu.org; Sat, 20 Jun 2020 10:58:12 -0400 Original-Received: from mail-io1-f54.google.com ([209.85.166.54]:40413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmewc-0003nI-8u for 41888@debbugs.gnu.org; Sat, 20 Jun 2020 10:58:10 -0400 Original-Received: by mail-io1-f54.google.com with SMTP id q8so14673565iow.7 for <41888@debbugs.gnu.org>; Sat, 20 Jun 2020 07:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=M2AgyXETPjn29wwTxwbRYoLPeM6LzvQg3U0/mYAYbqA=; b=O3EdgXC6Ptp6uXA6LTKM4D2gB3rOwsbqKvGlqFB3nf194plV3qOi4r2SzD6p+ntOo7 VLOUwsfcrXKLo8pjR+J6Qk1q0I/UsqjBMmjHpU5TqcdfE2LDFJDV7S1SUBC+Wk7ooJp2 0UTTdZ95mgbIJPG3MCgMxJhoZe80JPGBZSf/vHKCG26oEAoNOQyoe8HHOGpKJYWbzrR+ BDTQ9/flCsqH41HL11dMdafFONwWopjYtBJ5oOq7TK7gjCzxJ8HlTfnFYo+KsATMEp0s yqaunZW3NX+U/M8Hwi6xjxwhyokjONeZ7HS/pKo5JPEcSki32dzkIbNblm22yJ0+xMir 2+jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=M2AgyXETPjn29wwTxwbRYoLPeM6LzvQg3U0/mYAYbqA=; b=LT3AI1K3QaeHZKSVwz5OGLhYF/bbkh0wF97i0d27GFHvfdRDdyivfm5moGaivQRbi3 dBVa8Dc+uqENFsMWls+y3KU5oXtwNaLh0UVC8YvZ/aRBtbwzSxOdQkPit6rsImD1Vn1Q dXEziS1Wh9P+oYcVpLt5+GVDkPWQ+PC6fuvJqyspVKQxxIA66KfrBo82AgGWV7vD7dLY 70yiW9bWlWhkpnM0hg6I+rI3tYw355FIo8dOQKx6LrnZyt2DWgCK3YENTVCzDreIugOo bQd1nfaGFNE/B4txWuuTdos81k+9crJ64Ad9tZtYfgBHqga7m5u+B9k8LmAKblNGUXdt mZgw== X-Gm-Message-State: AOAM531h08grnbedbcvvmeQI6ebzJSpbAdS3a7TGHi/vd+ZxUbk3zBE6 cdUv8y1GxmAKjFRTAg863pDpoghWLBDNpX9DkRhown69 X-Google-Smtp-Source: ABdhPJwqN5Dt4c0fYMuZ7kV51bJPV0Ug2rps1QwmhBgWZfzCMRF/bUKKpmi7ahnr5qihyqVc2UQBXVQRoQI3i2nfCcQ= X-Received: by 2002:a02:a401:: with SMTP id c1mr8643076jal.55.1592665084193; Sat, 20 Jun 2020 07:58:04 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182207 Archived-At: --00000000000096eff505a8853c4d Content-Type: text/plain; charset="UTF-8" Let me explain my understanding of the problem and my rationale for the patch I emailed to emacs list. Emacs 27 has the following code in `gud.el' starting around line 2622: ,---- | (display-buffer | (get-buffer-create (concat "*gud" filepart "*")) | '(display-buffer-reuse-window | display-buffer-in-previous-window | display-buffer-same-window display-buffer-pop-up-window)) `---- The patch I emailed to emacs list is to add extra pair of parenthesis like this: ,---- | (display-buffer | (get-buffer-create (concat "*gud" filepart "*")) | '((display-buffer-reuse-window | display-buffer-in-previous-window | display-buffer-same-window display-buffer-pop-up-window))) `---- The change affects the second argument passed to `display-buffer' function, i.e., the `ACTION' argument. The doc-string for this argument is quoted here: Optional argument ACTION, if non-nil, should specify a buffer display action of the form (FUNCTIONS . ALIST). FUNCTIONS is either an "action function" or a possibly empty list of action functions. ALIST is a possibly empty "action alist". The question is the syntax of `FUNCTIONS' portion of `ACTION' argument. The doc-string clearly says that `FUNCITONS' is either a function or a list of functions. If `FUNCTIONS' is a list such as `(f1 f2 f3)', then `ACTION' should be something like `((f1 f2 f3))' assuming that `ALIST' is `nil'. Well the list of functions is surrounded by two pairs of parenthesis rather than one pair. This observation along with the fact that adding the extra pair of parenthesis allows me to launch `gdb' is the reason why I sent the patch to emacs list. --00000000000096eff505a8853c4d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Let me explain my understanding of the problem and my rati= onale for the
patch I emailed to emacs list.

Emacs 27 has the fol= lowing code in `gud.el' starting around line 2622:

,----
| = =C2=A0 =C2=A0 =C2=A0(display-buffer
| =C2=A0 =C2=A0 =C2=A0 (get-buffer-c= reate (concat "*gud" filepart "*"))
| =C2=A0 =C2=A0 = =C2=A0 '(display-buffer-reuse-window
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 d= isplay-buffer-in-previous-window
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 display-b= uffer-same-window display-buffer-pop-up-window))
`----

The patch = I emailed to emacs list is to add extra pair of parenthesis
like this:
,----
| =C2=A0 =C2=A0 =C2=A0(display-buffer
| =C2=A0 =C2=A0 =C2= =A0 (get-buffer-create (concat "*gud" filepart "*"))| =C2=A0 =C2=A0 =C2=A0 '((display-buffer-reuse-window
| =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0display-buffer-in-previous-window
| =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0display-buffer-same-window display-buffer-pop-up-wi= ndow)))
`----

The change affects the second argument passed to `d= isplay-buffer'
function, i.e., the `ACTION' argument. The doc-st= ring for this argument
is quoted here:

=C2=A0 =C2=A0 =C2=A0 Optio= nal argument ACTION, if non-nil, should specify a
=C2=A0 =C2=A0 =C2=A0 b= uffer display action of the form (FUNCTIONS . ALIST).
=C2=A0 =C2=A0 =C2= =A0 FUNCTIONS is either an "action function" or a possibly empty<= br>=C2=A0 =C2=A0 =C2=A0 list of action functions. ALIST is a possibly empty= "action
=C2=A0 =C2=A0 =C2=A0 alist".

The question is t= he syntax of `FUNCTIONS' portion of `ACTION' argument.
The doc-s= tring clearly says that `FUNCITONS' is either a function or a
list o= f functions. If `FUNCTIONS' is a list such as `(f1 f2 f3)', then`ACTION' should be something like `((f1 f2 f3))' assuming that `AL= IST'
is `nil'. Well the list of functions is surrounded by two p= airs of
parenthesis rather than one pair.

This observation along = with the fact that adding the extra pair of
parenthesis allows me to lau= nch `gdb' is the reason why I sent the patch
to emacs list.
--00000000000096eff505a8853c4d--