From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#20484: bug#20202: Considered Harmful 73d213: 'Comint, term, and compile new set Emacs' Date: Sat, 9 Apr 2016 20:30:50 -0700 Organization: UCLA Computer Science Department Message-ID: <5709C8EA.6060502@cs.ucla.edu> References: <87oa9otixb.fsf@russet.org.uk> <8737qzso88.fsf@russet.org.uk> <57045765.4000309@cs.ucla.edu> <87r3ei8vz9.fsf@russet.org.uk> <5705B246.10201@cs.ucla.edu> <5706764D.2010708@cs.ucla.edu> <282e74a937853505fddfea446c9bc46e.squirrel@cloud103.planethippo.com> <57067BF6.6000700@cs.ucla.edu> <83bn5ll5i8.fsf@gnu.org> <83a8l5kypx.fsf@gnu.org> <837fg8lh49.fsf@gnu.org> <8360vsjdlc.fsf@gnu.org> <05e4d286de69c0d9858381f8af72835d.squirrel@cloud103.planethippo.com> <570992E3.4070109@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040904030408070902080907" X-Trace: ger.gmane.org 1460259076 24524 80.91.229.3 (10 Apr 2016 03:31:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Apr 2016 03:31:16 +0000 (UTC) Cc: Phillip Lord , 20484@debbugs.gnu.org, 20202@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 10 05:31:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ap65f-0002u8-L2 for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Apr 2016 05:31:11 +0200 Original-Received: from localhost ([::1]:33623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ap65e-0003ei-2h for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Apr 2016 23:31:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ap65a-0003dJ-V6 for bug-gnu-emacs@gnu.org; Sat, 09 Apr 2016 23:31:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ap65W-00049O-Sn for bug-gnu-emacs@gnu.org; Sat, 09 Apr 2016 23:31:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ap65W-00049K-Pi for bug-gnu-emacs@gnu.org; Sat, 09 Apr 2016 23:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ap65W-000258-Lo for bug-gnu-emacs@gnu.org; Sat, 09 Apr 2016 23:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Apr 2016 03:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20484 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20484-submit@debbugs.gnu.org id=B20484.14602590587986 (code B ref 20484); Sun, 10 Apr 2016 03:31:02 +0000 Original-Received: (at 20484) by debbugs.gnu.org; 10 Apr 2016 03:30:58 +0000 Original-Received: from localhost ([127.0.0.1]:56485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ap65S-00024e-9G for submit@debbugs.gnu.org; Sat, 09 Apr 2016 23:30:58 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:47270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ap65R-00024N-9F; Sat, 09 Apr 2016 23:30:57 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B0274161245; Sat, 9 Apr 2016 20:30:51 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id pYV-EWmBA3tO; Sat, 9 Apr 2016 20:30:50 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E24E716124A; Sat, 9 Apr 2016 20:30:50 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6xH4KOCkFTy7; Sat, 9 Apr 2016 20:30:50 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id B8125161245; Sat, 9 Apr 2016 20:30:50 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116298 Archived-At: This is a multi-part message in MIME format. --------------040904030408070902080907 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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. --------------040904030408070902080907 Content-Type: text/x-diff; name="prolog.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="prolog.diff" 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 --------------040904030408070902080907--