unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45338: prolog-mode: cursor jumps into inferior Prolog shell when consulting buffer
@ 2020-12-20  7:32 SB
  2021-01-16 11:14 ` bug#45338: cursors jumps can be disabled by a flag k3tu0isui
  0 siblings, 1 reply; 3+ messages in thread
From: SB @ 2020-12-20  7:32 UTC (permalink / raw)
  To: 45338

[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]

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>

[-- Attachment #2: Type: text/html, Size: 1418 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#45338: cursors jumps can be disabled by a flag
  2020-12-20  7:32 bug#45338: prolog-mode: cursor jumps into inferior Prolog shell when consulting buffer SB
@ 2021-01-16 11:14 ` k3tu0isui
  2022-05-09 13:56   ` bug#45338: prolog-mode: cursor jumps into inferior Prolog shell when consulting buffer Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: k3tu0isui @ 2021-01-16 11:14 UTC (permalink / raw)
  To: 45338

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).





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#45338: prolog-mode: cursor jumps into inferior Prolog shell when consulting buffer
  2021-01-16 11:14 ` bug#45338: cursors jumps can be disabled by a flag k3tu0isui
@ 2022-05-09 13:56   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-09 13:56 UTC (permalink / raw)
  To: k3tu0isui; +Cc: 45338

k3tu0isui@gmail.com writes:

> 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).

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Since this doesn't look like it's a bug, I'm closing it now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-09 13:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-20  7:32 bug#45338: prolog-mode: cursor jumps into inferior Prolog shell when consulting buffer SB
2021-01-16 11:14 ` bug#45338: cursors jumps can be disabled by a flag k3tu0isui
2022-05-09 13:56   ` bug#45338: prolog-mode: cursor jumps into inferior Prolog shell when consulting buffer Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).