From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: read a reply from the terminal Date: Sun, 15 Jul 2007 17:56:37 -0700 Message-ID: <200707160056.l6G0ueSI014366@oogie-boogie.ics.uci.edu> References: <200707140242.l6E2gpBC015778@oogie-boogie.ics.uci.edu> <200707150034.l6F0YYxT013883@oogie-boogie.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1184547556 10538 80.91.229.12 (16 Jul 2007 00:59:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2007 00:59:16 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 16 02:59:14 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IAEvi-0001Um-Gv for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2007 02:59:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAEvh-00024y-Qn for ged-emacs-devel@m.gmane.org; Sun, 15 Jul 2007 20:59:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IAEve-00024f-EM for emacs-devel@gnu.org; Sun, 15 Jul 2007 20:59:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IAEvd-00024T-Ux for emacs-devel@gnu.org; Sun, 15 Jul 2007 20:59:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAEvd-00024Q-O9 for emacs-devel@gnu.org; Sun, 15 Jul 2007 20:59:09 -0400 Original-Received: from oogie-boogie.ics.uci.edu ([128.195.1.41]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IAEvc-00041L-L3; Sun, 15 Jul 2007 20:59:08 -0400 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by oogie-boogie.ics.uci.edu (8.13.6/8.13.6) with ESMTP id l6G0ueSI014366; Sun, 15 Jul 2007 17:56:40 -0700 (PDT) In-Reply-To: (Richard Stallman's message of "Sun\, 15 Jul 2007 18\:53\:47 -0400") Original-Lines: 29 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: Solaris 9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:74869 Archived-At: Richard Stallman writes: > ! ;; Try to find out the type of terminal by sending a "Secondary > ! ;; Device Attributes (DA)" query. > ! (send-string-to-terminal "\e[>0c") > ! > ! ;; The reply should be of the form: \e [ > NUMBER1 ; NUMBER2 ; NUMBER3 c > ! (when (equal (read-event) ?\e) > ! (when (equal (read-event) 91) > > Is there any danger that some terminal programs won't implement > that query, and that these read-event calls will hang? It's not impossible, someone can implement a terminal emulator that does not support this type of query and still set TERM to xterm. Most applications won't care.. To be safe adding a timeout to the read-event call seems to be the right thing to do. > Perhaps the best thing to do is install the patch > and see if anyone complains. I'll do that. > + (defun xterm-turn-on-modifyOtherKeys () > > Please rename that to xterm-turn-on-modify-other-keys. > Likewise the following function. Sure.