From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Seeking advice on writing a "line-based" major mode Date: Thu, 18 Jun 2015 14:28:19 -0700 (PDT) Message-ID: <89335147-7ed9-4914-a3d1-36324181378a@default> References: <87wpzf9q38.fsf@mbork.pl> <2687fb9a-c314-4cf4-8c8a-d959e886ed14@default> <87fv5p30ff.fsf@mbork.pl> <894f3596-e513-4f5a-ba0b-f5638be50f9d@default> <87616k3lbt.fsf@mbork.pl> <633caaaf-5c11-4dc3-98aa-aa3e6e1529b3@default> <874mm43fwa.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1434662935 8812 80.91.229.3 (18 Jun 2015 21:28:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Jun 2015 21:28:55 +0000 (UTC) To: Marcin Borkowski , Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 18 23:28:40 2015 Return-path: Envelope-to: geh-help-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 1Z5hMV-0007kw-Gn for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Jun 2015 23:28:39 +0200 Original-Received: from localhost ([::1]:54993 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5hMU-00034W-Lr for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Jun 2015 17:28:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5hMI-00034C-Vv for help-gnu-emacs@gnu.org; Thu, 18 Jun 2015 17:28:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5hME-0005Z9-U2 for help-gnu-emacs@gnu.org; Thu, 18 Jun 2015 17:28:26 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:27625) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5hME-0005Z2-NB for help-gnu-emacs@gnu.org; Thu, 18 Jun 2015 17:28:22 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t5ILSLGM009851 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 18 Jun 2015 21:28:21 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t5ILSLMk007769 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 18 Jun 2015 21:28:21 GMT Original-Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t5ILSKEr024436; Thu, 18 Jun 2015 21:28:21 GMT In-Reply-To: <874mm43fwa.fsf@mbork.pl> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105043 Archived-At: > > `tabulated-list-get-entry': > > Return the Tabulated List entry at POS... > > `tabulated-list-get-id': > > Return the entry ID of the Tabulated List entry at POS... >=20 > Cool. Neither is mentioned in the Info manual, though... If you think it is important/useful, consider filing a doc bug: `M-x report-emacs-bug'. > So it seems that the main advantage of EWOC is better (i.e., more > comprehensive) manual... If you think so: `M-x report-emacs-bug'. > >> EWOC has the parts I didn't want to code myself already done. > > Understood (though it's not clear to me what those parts are). >=20 > Maily the get-item-at-point, which t-l-m seems to have, too... > Also, the sorting stuff, though this is not really relevant: I presume > that with t-l-m, I could do sorting "manually", i.e., on the underlying > data structure. Yes, you can sort the data any way you like. You can associate different sorts with different columns, so that when you hit return with point in a given column a given sort predicate is used. The SORT value specified in `tabulated-list-format' for each column:=20 - SORT specifies how to sort entries by this column. If nil, this column cannot be used for sorting. If t, sort by comparing the string value printed in the column. Otherwise, it should be a predicate function suitable for `sort', accepting arguments with the same form as the elements of `tabulated-list-entries'. What is passed to the sort function to compare are two rows of the table (not as displayed, but the underlying data), i.e., "elements of `tabulated-list-entries'". > All in all, it seems that (apart from the manual) EWOC has only one > advantage for me: I already have some working code using it... ;-) It may have other advantages too; dunno.