From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: Which Function mode and Python mode Date: Sun, 1 Jul 2007 00:11:16 +0300 Message-ID: <200707010011.17127.pogonyshev@gmx.net> References: <200706300110.12506.pogonyshev@gmx.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1183237045 4140 80.91.229.12 (30 Jun 2007 20:57:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 30 Jun 2007 20:57:25 +0000 (UTC) Cc: Stefan Monnier To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 30 22:57:18 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 1I4k0M-0003gS-2a for ged-emacs-devel@m.gmane.org; Sat, 30 Jun 2007 22:57:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I4k0L-0003pj-Oy for ged-emacs-devel@m.gmane.org; Sat, 30 Jun 2007 16:57:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I4k0H-0003pe-Oh for emacs-devel@gnu.org; Sat, 30 Jun 2007 16:57:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I4k0G-0003pQ-Cf for emacs-devel@gnu.org; Sat, 30 Jun 2007 16:57:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I4k0G-0003pN-7E for emacs-devel@gnu.org; Sat, 30 Jun 2007 16:57:12 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1I4k0F-0006RY-L1 for emacs-devel@gnu.org; Sat, 30 Jun 2007 16:57:11 -0400 Original-Received: (qmail invoked by alias); 30 Jun 2007 20:57:10 -0000 Original-Received: from unknown (EHLO [80.94.234.178]) [80.94.234.178] by mail.gmx.net (mp049) with SMTP; 30 Jun 2007 22:57:10 +0200 X-Authenticated: #16844820 X-Provags-ID: V01U2FsdGVkX18IgCd2PWQIBNgFgMYRGbswQlvOb0a25YOCaCaao+ AwqIbK6WMPZEzH User-Agent: KMail/1.7.2 In-Reply-To: Content-Disposition: inline X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:74073 Archived-At: Stefan Monnier wrote: > > This short patch adds support for Which Function minor mode to Python > > mode. It also adds Python mode to the default list of modes where > > Which Function mode is in effect. > > How does your code compare to the result you get with the default which-func > support, which relies on imenu's data? class SomeClass (object): class Nested (object): def __init__(self): pass Put the point on `pass' line. With my code: "SomeClass.Nested.__init__". With original imenu-dependent code: " class SomeClass". I personally see this as an improvement. With imenu approach it is necessary to regenerate the menu, as far as I understand. I personally see little value in having "class X" in mode line, I'm more interested in which exactly method of that classn the point is. Finally, "class" is probably redundant, because at least with standard Python naming scheme, it is very easy to tell classes and methods/functions just by their names. Still, I agree it is somewhat of code duplication. I was not aware there was imenu approach. It never manifested itself on my Python buffers mode lines... Paul