unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: Phillip Lord <phillip.lord@russet.org.uk>,
	20484@debbugs.gnu.org, 20202@debbugs.gnu.org
Subject: bug#20484: bug#20202: Considered Harmful 73d213: 'Comint, term, and compile new set Emacs'
Date: Sat, 9 Apr 2016 20:30:50 -0700	[thread overview]
Message-ID: <5709C8EA.6060502@cs.ucla.edu> (raw)
In-Reply-To: <jwvbn5i496n.fsf-monnier+Inbox@gnu.org>

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

Stefan Monnier wrote:
> "Do the trick" to get what, exactly?

It causes the predicate 'current_prolog_flag(emacs_inferior_process, X)' to 
succeed with X=true, and it causes SWI-Prolog to not attempt to put the terminal 
into raw mode. Although the former doesn't seem to do much of anything, latter 
affects the UI, notably the debugger. For example, SWI-Prolog 7.2.3 in Emacs 24 
under M-x run-prolog:

?- trace, member(X, [a,b,c]).
    Call: (8) lists:member(_G2, [a, b, c]) ? a
% Execution Aborted
?-

The same interaction in emacs-25 now:

1 ?- trace, member(X, [a,b,c]).
    Call: (8) lists:member(_G2, [a, b, c]) ? a
abort
% Execution Aborted
2 ?-

I suppose the differences might be annoying to someone who does a lot of Prolog 
debugging. To give some perspective, although I am annoyed whenever I have to 
debug GNU Prolog under Emacs due to gprolog's mishandling of tty modes under 
Emacs, this is something I've never gotten sufficiently annoyed at to fix, even 
though it's been ten years since I first ran afoul of it.

One possible workaround would be something like the attached patch, which relies 
on SWI-Prolog's behavior of assuming GNU Emacs when INFERIOR=yes in the environment.

[-- Attachment #2: prolog.diff --]
[-- Type: text/x-diff, Size: 740 bytes --]

diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 9ee405b..fffa7cc 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -1374,8 +1374,10 @@ prolog-ensure-process
       ()
     (with-current-buffer (get-buffer-create "*prolog*")
       (prolog-inferior-mode)
-      (apply 'make-comint-in-buffer "prolog" (current-buffer)
-             (prolog-program-name) nil (prolog-program-switches))
+      (let ((process-environment
+             (cons "INFERIOR=yes" process-environment)))
+        (apply 'make-comint-in-buffer "prolog" (current-buffer)
+               (prolog-program-name) nil (prolog-program-switches)))
       (unless prolog-system
         ;; Setup auto-detection.
         (setq-local

  reply	other threads:[~2016-04-10  3:30 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87oa9otixb.fsf@russet.org.uk>
     [not found] ` <5703E15B.7080601@cs.ucla.edu>
     [not found]   ` <87k2kcovt8.fsf@russet.org.uk>
     [not found]     ` <5704233B.4020103@cs.ucla.edu>
     [not found]       ` <8737qzso88.fsf@russet.org.uk>
     [not found]         ` <57045765.4000309@cs.ucla.edu>
     [not found]           ` <87r3ei8vz9.fsf@russet.org.uk>
     [not found]             ` <5705B246.10201@cs.ucla.edu>
     [not found]               ` <74bf15b3e1a5afeb41cf6b39d5247e8b.squirrel@cloud103.planethippo.com>
2016-04-07 14:57                 ` bug#20202: Considered Harmful 73d213: 'Comint, term, and compile new set Emacs' Paul Eggert
     [not found]               ` <c32b8d04f5c78203f06c4e48e03b37b0.squirrel@cloud103.planethippo.com>
2016-04-07 15:01                 ` Paul Eggert
2016-04-07 15:18                   ` Phillip Lord
2016-04-07 15:25                     ` Paul Eggert
2016-04-07 16:01                       ` Glenn Morris
2016-04-07 16:07                       ` Phillip Lord
2016-04-07 16:26                         ` bug#20484: " Paul Eggert
2016-04-07 19:55                           ` Phillip Lord
2016-04-07 22:20                             ` bug#20484: " Stefan Monnier
2016-04-08  7:05                               ` Eli Zaretskii
2016-04-08 13:09                               ` Phillip Lord
2016-04-08 20:50                                 ` Paul Eggert
2016-04-08 21:20                                   ` Phillip Lord
2016-04-08  7:03                             ` bug#20484: " Eli Zaretskii
2016-04-08  7:34                             ` Andreas Schwab
2016-04-08 13:12                               ` bug#20484: " Phillip Lord
2016-04-07 21:42                           ` Phillip Lord
2016-04-08  7:01                             ` Eli Zaretskii
2016-04-08 16:49                               ` bug#20202: " Stefan Monnier
2016-04-08 18:12                                 ` Phillip Lord
2016-04-07 16:51                       ` Stefan Monnier
2016-04-07 16:59                         ` bug#20202: " Eli Zaretskii
2016-04-07 18:58                           ` Stefan Monnier
2016-04-07 19:25                             ` Eli Zaretskii
2016-04-07 22:01                               ` Stefan Monnier
2016-04-08  7:00                                 ` bug#20202: " Eli Zaretskii
2016-04-08 15:32                                   ` Glenn Morris
2016-04-08 15:59                                     ` Eli Zaretskii
2015-05-01 23:36                                       ` bug#20484: 25.0.50; Directory tracking in ansi-term broken Jacob Oursland
2015-05-02  2:17                                         ` Glenn Morris
2015-05-02  2:43                                           ` Glenn Morris
2015-05-02 19:33                                             ` Jacob Oursland
2015-05-03  5:45                                               ` Stefan Monnier
2015-05-03  6:15                                                 ` Jacob Oursland
2015-05-03 16:29                                                 ` Richard Stallman
2015-05-03 17:36                                                   ` Jacob Oursland
2015-05-04  2:06                                                   ` Stefan Monnier
2015-05-04 16:15                                                     ` Richard Stallman
2015-05-03 17:57                                                 ` Glenn Morris
2015-05-03 19:09                                                   ` Jacob Oursland
2015-05-04  2:07                                                   ` Stefan Monnier
2016-03-23 22:15                                         ` Paul Eggert
2016-04-08 18:47                                         ` bug#20484: Bash 4.4-rc1 incompatibility with future Emacs $EMACS Paul Eggert
2016-04-09  2:24                                         ` bug#20484: bug#20202: Considered Harmful 73d213: 'Comint, term, and compile new set Emacs' Glenn Morris
2016-04-09  8:43                                           ` Phillip Lord
2016-04-09 13:43                                           ` bug#20202: " Stefan Monnier
2016-04-09 21:56                                             ` Phillip Lord
2016-04-09 23:40                                               ` bug#20202: " Paul Eggert
2016-04-10  0:08                                                 ` Stefan Monnier
2016-04-10  3:30                                                   ` Paul Eggert [this message]
2016-04-10 13:57                                                     ` Stefan Monnier
2016-04-11  5:50                                                       ` bug#20202: " Paul Eggert
2016-04-10  8:26                                                   ` bug#20484: " Phillip Lord
2016-04-10 13:59                                                     ` Stefan Monnier
2016-04-11 12:32                                                       ` bug#20484: " Phillip Lord
2016-04-10  8:25                                                 ` Phillip Lord
2015-03-25 21:44                                                   ` bug#20202: 24.3; Comint mode sets a bad $EMACS Eli Barzilay
2015-03-26  0:46                                                     ` Stefan Monnier
2015-03-28 15:27                                                       ` Eli Barzilay
2015-04-09 15:02                                                         ` Stefan Monnier
2016-04-10 12:18                                                     ` bug#20202: bug#20484: bug#20202: Considered Harmful 73d213: 'Comint, term, and compile new set Emacs' Markus Triska
2016-04-11 12:38                                                       ` Phillip Lord
2018-05-24 20:46                                                     ` bug#20202: EMACS=t Joy and Happiness Phillip Lord
2016-04-10  7:13                                               ` bug#20202: bug#20484: bug#20202: Considered Harmful 73d213: 'Comint, term, and compile new set Emacs' Michael Albinus
2016-04-10  8:51                                                 ` Phillip Lord
2016-04-10  9:31                                                   ` Michael Albinus
2016-04-08 16:46                                   ` Stefan Monnier
2016-04-08 17:12                                     ` Paul Eggert
2016-04-08 18:14                                       ` bug#20202: " Phillip Lord
2016-04-08 17:47                                     ` Phillip Lord
2016-04-08 13:15                               ` Phillip Lord
2016-04-08 13:40                                 ` Eli Zaretskii
2016-04-08 15:45                                   ` bug#20202: " Glenn Morris
2016-04-08 16:01                                     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5709C8EA.6060502@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=20202@debbugs.gnu.org \
    --cc=20484@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=phillip.lord@russet.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).