GNU bug report logs - #45338
prolog-mode: cursor jumps into inferior Prolog shell when consulting buffer

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: SB <progscriptclone@HIDDEN>; dated Sun, 20 Dec 2020 14:55:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 45338 <at> debbugs.gnu.org:


Received: (at 45338) by debbugs.gnu.org; 16 Jan 2021 11:14:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 16 06:14:18 2021
Received: from localhost ([127.0.0.1]:42488 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l0jX8-0005vI-Cv
	for submit <at> debbugs.gnu.org; Sat, 16 Jan 2021 06:14:18 -0500
Received: from mail-pl1-f177.google.com ([209.85.214.177]:34535)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <k3tu0isui@HIDDEN>) id 1l0jX5-0005v3-4A
 for 45338 <at> debbugs.gnu.org; Sat, 16 Jan 2021 06:14:17 -0500
Received: by mail-pl1-f177.google.com with SMTP id t6so6057040plq.1
 for <45338 <at> debbugs.gnu.org>; Sat, 16 Jan 2021 03:14:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=date:from:to:subject:message-id:mime-version:content-disposition;
 bh=MkYhOqQz43aO1vDUCKu4hUuHcbwPMZ5ovIecOQKdF7g=;
 b=oCZ6R2sRvTFCwlflRAykBOZLNT5fFEuovXzKpdp5AIgfdrFztdr5Pys0g+5BkPHx8N
 kVRHw+L/yhk1mj3oVhpCg60QAJKW1bYvafzds+3LLY0ZvpdmHBLtrMnzywFwAzU2Trqd
 00YbN8MUThrvV3nnBp4z8UEOxHEn/uTrqF3roeR5UrcM1o1KN5MqHZvtiLIetK6hB5xB
 PVr9lsolGmbprxdzQNT0LCJXmIOIyL9fEiv/ig8tadVrmRTSCDcXi62byza1GCgJjz+K
 3e62VAkvZntjco4PXQ8p3Qcn0/xzRrdny9ywiaXTeNlKVe0DOYYcyveUNyNGUbSxZVnr
 OjRg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:subject:message-id:mime-version
 :content-disposition;
 bh=MkYhOqQz43aO1vDUCKu4hUuHcbwPMZ5ovIecOQKdF7g=;
 b=eC26FkoM5IVVkuCfrF9zhSV0Z5yMZ3/9WG7O+ViqIj0g+fa4wzgcIVMHexxiZKtlU4
 sFXGxq1FcQ7H1+CJLSkGFE0sdBk4daIVTOkCziOHtuIGqx7KBvA7r6RxAg5i4LmWukcc
 na5RwJuEG9w6p97dAYj3b3AOQZD3Ph+JEhp6iH6Wv9XD/fI020SsYGRu2Hh7e+iTvsvU
 UpdN7nezTBv1NA1OHWD5CZV486TRz90+uQcIyd2Odi0wfA5Jd3W0ka0BBvjLZ/OQ7yqt
 Xvklv73fFQXUBvwp+53mGxyeuK0SChCOUozjpru/GQwAilD76O6rIi0Ge1+P1ESGgxuI
 8M6w==
X-Gm-Message-State: AOAM531O/Fn+9X5XC33e6URURpY85CS9ZYSEPI2ARj3ocKdhY4xK9n4G
 sO36Nasc/zA2X8PSILyjY32kpv3PJ0E=
X-Google-Smtp-Source: ABdhPJwwtd2DjfgN9xQE885830zSkOWkIv/pkkkP2XDfvfWRNIMI/MzSGK8n3bklSrQqmr5MwNevow==
X-Received: by 2002:a17:902:aa43:b029:dc:26a7:7391 with SMTP id
 c3-20020a170902aa43b02900dc26a77391mr17370067plr.51.1610795648659; 
 Sat, 16 Jan 2021 03:14:08 -0800 (PST)
Received: from sildranDT.localdomain
 ([2401:4900:27c5:e7d9:7910:d66e:875a:8b88])
 by smtp.gmail.com with ESMTPSA id mw15sm10271105pjb.34.2021.01.16.03.14.06
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 16 Jan 2021 03:14:07 -0800 (PST)
Date: Sat, 16 Jan 2021 16:44:03 +0530
From: k3tu0isui@HIDDEN
To: 45338 <at> debbugs.gnu.org
Subject: cursors jumps can be disabled by a flag
Message-ID: <20210116111403.2jjzkvnctutoenvq@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45338
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

There is support for the feature you want. Check out the variable "prolog-use-standard-consult-compile-method-flag". Setting this to "nil" enables the behaviour you like.

If the value of this variable is "t", prolog-mode uses prolog-old-process-* functions all of which do the switch. Otherwise, prolog-consult-compile* functions are used that do not have this behaviour.

Since this behavious is expected, it is not a bug. Just do (setq prolog-use-standard-consult-compile-method-flag nil).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45338; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 20 Dec 2020 14:54:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 20 09:54:18 2020
Received: from localhost ([127.0.0.1]:44000 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kr06D-0006A9-QW
	for submit <at> debbugs.gnu.org; Sun, 20 Dec 2020 09:54:18 -0500
Received: from lists.gnu.org ([209.51.188.17]:58862)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <progscriptclone@HIDDEN>) id 1kqsv5-0007OC-K2
 for submit <at> debbugs.gnu.org; Sun, 20 Dec 2020 02:14:22 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:51238)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <progscriptclone@HIDDEN>)
 id 1kqsv5-0005GT-DQ
 for bug-gnu-emacs@HIDDEN; Sun, 20 Dec 2020 02:14:19 -0500
Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]:32974)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <progscriptclone@HIDDEN>)
 id 1kqsv3-00061J-Hx
 for bug-gnu-emacs@HIDDEN; Sun, 20 Dec 2020 02:14:19 -0500
Received: by mail-io1-xd2f.google.com with SMTP id w18so6072266iot.0
 for <bug-gnu-emacs@HIDDEN>; Sat, 19 Dec 2020 23:14:16 -0800 (PST)
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=2yYxU/+VcqGNlUlXIQJvsZl3t8LXaFGypgS8EQwTf7I=;
 b=f4O+3utWrvu7EIuR3+N0q96sAe2/fvAJAlThU4NbOK/UJzE1GMH5l6qddLxbRSE3yL
 /fIEt+3bBQPzgHrrowefmEVoNjAAOqnw3UiE1DuO1ymCe5TICkJyqtOGdDqc6KWT7VjE
 tl+BNmGkCW1VSsI4lLtIawqVIfO2qWy1oNVAKrNDj6oKImzJML4tzl9OELyFrtmp0Ffc
 SISRX6IZsF7F8iUFkhY5/O6cIE60zdUTL89acptUbzZnNSGVO7TOQjiAJHqJb3KnM6oC
 mFjNcacVbbC85LaKP9fB170Qx9fs5Y2xAY4WsLKGV762a/O6sCngXCxa1xnjjmi4+IMG
 drew==
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=2yYxU/+VcqGNlUlXIQJvsZl3t8LXaFGypgS8EQwTf7I=;
 b=qR7p/Vh4rjuQYeFLio9Wx3wSZ55/GGJLlzMVOM8I05MNoqW4cdbclCqDFJ55iJqIx7
 VMY+82aTY98+f6qh1lUr7uEdjiJSq4F7GDL6I3Asted+q0+To6oWYimmqtRHNroqrKiz
 vZN2C3PAjnehD1EUCIwGlW7XtC+a2fQweID3GWuIC9SIQYbYjiS7Dw1Eys+Te4hz0p/J
 G1hs4OqlkMihse/rLWsQiQJFV2UehN3hfSFtCIprC04QVRWoJyznePAlqvBLBLdP0g7k
 fWaM88p5ZUyMVsFuG4KkcWwdQ6RBMpQjfw8rZQLYfp2rcqjlndTLkShrX29ZGM/f1tgz
 Uxrg==
X-Gm-Message-State: AOAM5308cy8jkY5Uay8hmiKhjmnLPW6KalkeE3shhEq+AujmN4smV2BC
 pWZglXq9FuMHAo9OAdHUqQZZou5sOtLS04U5KpGSQsn4R18=
X-Google-Smtp-Source: ABdhPJxuriId8cj2MUh7qmeuqVQEGrRhMYFKLVtd4Cy+qRXn13kvsONSOn+BDx5AoLZviyyJgHlv4alg5bpigKLJlgs=
X-Received: by 2002:a02:354a:: with SMTP id y10mr10816240jae.126.1608448455933; 
 Sat, 19 Dec 2020 23:14:15 -0800 (PST)
MIME-Version: 1.0
From: SB <progscriptclone@HIDDEN>
Date: Sun, 20 Dec 2020 15:32:47 +0800
Message-ID: <CAMpLh3ZwWQNga26F9jkHisg_-530cWBLwnk3x8WP6Ujherk6Bg@HIDDEN>
Subject: prolog-mode: cursor jumps into inferior Prolog shell when consulting
 buffer
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="000000000000db029b05b6e01619"
Received-SPF: pass client-ip=2607:f8b0:4864:20::d2f;
 envelope-from=progscriptclone@HIDDEN; helo=mail-io1-xd2f.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 20 Dec 2020 09:54:16 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--000000000000db029b05b6e01619
Content-Type: text/plain; charset="UTF-8"

How to reproduce:
Suppose I have started the inferior Prolog shell using M-x run-prolog. If I
"consult" a Prolog mode buffer using M-x prolog-consult-buffer, the Emacs
cursor ends up in the inferior Prolog shell.

Expected behaviour:
The cursor should remain inside the Prolog mode buffer when consulting the
buffer. The existing behaviour is inconsistent with just about every other
inferior shell for other programming languages (lisp, python, scheme, etc.).

Further details:
I've noticed that the current implementation of "prolog-consult-buffer" calls
"prolog-goto-prolog-process-buffer", which is responsible tor making the
cursor go to inferior Prolog shell.

Questions:
* Feature request: Would the maintainers consider adding an option to
disable this behaviour?
* What should I currently add to my ~/.emacs file as a temporary measure to
make the cursor remain in the Prolog mode buffer instead of jumping into
the inferior Prolog shell?
<https://github.com/emacs-mirror/emacs/blob/emacs-27/lisp/progmodes/prolog.el#L2610-L2614>

--000000000000db029b05b6e01619
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>How to reproduce:<br></div><div>Suppose I have starte=
d the inferior Prolog shell using M-x run-prolog. If I &quot;consult&quot; =
a Prolog mode buffer using M-x prolog-consult-buffer, the Emacs cursor ends=
 up in the inferior Prolog shell.</div><div><br></div><div>Expected behavio=
ur:</div><div>The cursor should remain inside the Prolog mode buffer when c=
onsulting the buffer. The existing behaviour is inconsistent with just abou=
t every other inferior shell for other programming languages (lisp, python,=
 scheme, etc.).</div><div><br></div><div>Further details:</div><div>I&#39;v=
e noticed that the current implementation of &quot;prolog-consult-buffer&qu=
ot;<span style=3D"font-family:arial,sans-serif"> <code><span style=3D"font-=
family:arial,sans-serif">calls &quot;prolog-goto-prolog-process-buffer&quot=
;, which is responsible tor making the cursor go to inferior Prolog shell.<=
/span></code></span></div><div><br></div><div>Questions:</div><div>* Featur=
e request: Would the maintainers consider adding an option to disable this =
behaviour?</div><div>* What should I currently add to my ~/.emacs file as a=
 temporary measure to make the cursor remain in the Prolog mode buffer inst=
ead of jumping into the inferior Prolog shell?</div><div></div><div><a href=
=3D"https://github.com/emacs-mirror/emacs/blob/emacs-27/lisp/progmodes/prol=
og.el#L2610-L2614" rel=3D"nofollow noreferrer"><code></code></a></div></div=
>

--000000000000db029b05b6e01619--




Acknowledgement sent to SB <progscriptclone@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#45338; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 16 Jan 2021 11:15:02 UTC

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