GNU bug report logs - #45795
27.1; prolog-mode prolog-system switch bug

Previous Next

Package: emacs;

Reported by: k3tu0isui <at> gmail.com

Date: Mon, 11 Jan 2021 17:10:02 UTC

Severity: normal

Tags: patch

Found in version 27.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: k3tu0isui <at> gmail.com
To: 45795 <at> debbugs.gnu.org
Subject: bug#45795: 27.1; prolog-mode prolog-system switch bug
Date: Mon, 11 Jan 2021 22:39:22 +0530
[Message part 1 (text/plain, inline)]
Switching between prolog systems is not supported properly.

Say I stated with (setq prolog-system 'swi) in my configuration, and I set (setq-local prolog-system 'gnu) in my working buffer. Now when I do `run-prolog` it is expected to run gprolog instead of swipl. But this is not happening, it still runs swipl.

The bug seems to be in `prolog-ensure-process` function. If the process is not running, a new process is created using make-comint-in-buffer whose program name is supplied using (prolog-program-name). But we have already shifted to the *prolog* buffer here, so whatever the value of prolog-system in our source buffer, the program started is still that of the global variable.

In my patch I just bound (prolog-program-name) and (prolog-program-switches) before switching to *prolog* buffer. This seems to work.
[0001-prolog-mode-prolog-system-switch-process-bug.patch (text/plain, attachment)]

This bug report was last modified 3 years and 294 days ago.

Previous Next


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