From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stuart D. Herring" Newsgroups: gmane.emacs.devel Subject: Re: transpose-sexps Date: Mon, 8 Jan 2007 13:22:37 -0800 (PST) Message-ID: <40435.128.165.123.18.1168291357.squirrel@webmail.lanl.gov> References: <200701042334.59847.pogonyshev@gmx.net> <200701052202.39990.pogonyshev@gmx.net> <39982.128.165.123.18.1168279569.squirrel@webmail.lanl.gov> <200701082316.03059.pogonyshev@gmx.net> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1168291400 29882 80.91.229.12 (8 Jan 2007 21:23:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 8 Jan 2007 21:23:20 +0000 (UTC) Cc: Andreas Schwab , Miles Bader , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 08 22:23:17 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 1H41xP-0005AS-GX for ged-emacs-devel@m.gmane.org; Mon, 08 Jan 2007 22:23:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H41xO-0004UU-U7 for ged-emacs-devel@m.gmane.org; Mon, 08 Jan 2007 16:23:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H41xB-0004Tm-02 for emacs-devel@gnu.org; Mon, 08 Jan 2007 16:22:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H41x8-0004Sw-Tz for emacs-devel@gnu.org; Mon, 08 Jan 2007 16:22:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H41x8-0004Sm-QH for emacs-devel@gnu.org; Mon, 08 Jan 2007 16:22:46 -0500 Original-Received: from [192.65.95.54] (helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H41x2-0000ZP-OK; Mon, 08 Jan 2007 16:22:41 -0500 Original-Received: from mailrelay2.lanl.gov (mailrelay2.lanl.gov [128.165.4.103]) by mailwasher-b.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l08LMcEF028705; Mon, 8 Jan 2007 14:22:38 -0700 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay2.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l08LMb4Y024316; Mon, 8 Jan 2007 14:22:37 -0700 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id l08LMbYU018791; Mon, 8 Jan 2007 14:22:37 -0700 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id l08LMbe7018789; Mon, 8 Jan 2007 13:22:37 -0800 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.18 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Mon, 8 Jan 2007 13:22:37 -0800 (PST) In-Reply-To: <200701082316.03059.pogonyshev@gmx.net> Original-To: "Paul Pogonyshev" User-Agent: SquirrelMail/1.4.8-2.el3.7lanl X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 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:65013 Archived-At: >> > It is probably possible to ask current major mode if we are in a >> string. >> > If it is not possible, than it is probably worth it to invent a >> consistent >> > interface that major modes would implement. I agree that it is not to >> be >> > done now, of course. (And while I'm at it, it's a pity that "now" >> spans >> > the last two years or so.) >> >> Again, this is not a question of inventiveness, consistency, or any >> other >> kind of design or programming at all. It's a mathematical question, >> really: it is easy to ask the question and to devise a mechanism for >> doing >> so, but it is algorithmically non-trivial to determine the answer. > > According to Stefan Monier, you can already ask `syntax-ppss'. And that > function already does some caching if I was to say from its code. > > Paul The half of my message you did not include more or less said precisely that, although I did not name but rather described the function. The point is that I don't know whether `syntax-ppss' is always accurate enough and fast enough for us to want to include it in every call to `transpose-sexps'; I believe it is still somewhat "beta". The point is also that the solution you initially proposed ("to invent a consistent interface that major modes would implement" if there was not already one) seems to imply that the problem is one of providing a useful interface to obvious, extant, simple functionality rather than of implementing/applying a parser with a complicated time-space tradeoff. I thought you would want to know that there was a reason for the status quo, even if it was merely "the alternatives are impractical", instead of it merely being an oversight or coding bug. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.