From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?iso-8859-1?q?R=F6hler?= Newsgroups: gmane.emacs.devel Subject: Re: sh-script beg-end of function Date: Sat, 24 Nov 2007 14:45:25 +0100 Message-ID: <200711241445.25993.andreas.roehler@online.de> References: <200711192143.15056.andreas.roehler@online.de> <200711231633.37286.andreas.roehler@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1195912132 13795 80.91.229.12 (24 Nov 2007 13:48:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Nov 2007 13:48:52 +0000 (UTC) Cc: Stefan Monnier , Richard Stallman To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 24 14:48:59 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 1IvvNQ-0005ma-Ax for ged-emacs-devel@m.gmane.org; Sat, 24 Nov 2007 14:48:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvvNB-0003nD-La for ged-emacs-devel@m.gmane.org; Sat, 24 Nov 2007 08:48:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IvvN8-0003n7-DH for emacs-devel@gnu.org; Sat, 24 Nov 2007 08:48:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IvvN6-0003mu-TZ for emacs-devel@gnu.org; Sat, 24 Nov 2007 08:48:37 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvvN6-0003mr-Oe for emacs-devel@gnu.org; Sat, 24 Nov 2007 08:48:36 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.177]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IvvN1-0005s9-OJ; Sat, 24 Nov 2007 08:48:32 -0500 Original-Received: from noname (p54BE970B.dip0.t-ipconnect.de [84.190.151.11]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1IvvMy3wcA-0006GO; Sat, 24 Nov 2007 14:48:29 +0100 User-Agent: KMail/1.9.5 In-Reply-To: Content-Disposition: inline X-Provags-ID: V01U2FsdGVkX18hK2EY5u8xHEJaxNFv+rm32uaPU2PQg0FlIeC ORoRclVKLp8lBLybUPo6Oau7Wa1Pe4Ka7fAknp/YtEd7mP6s+g 9K2IL2Z5A7h2c2k5tsCYA== X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) 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:84048 Archived-At: Am Freitag, 23. November 2007 17:34 schrieb Stefan Monnier: > >> replacement should be at least as good. Most importantly: jumping to > >> the end of a real function should jump to the closing "}". > > > > Not, if exists usually no closing "}" while writing. I prefer to > > set closings last and manually - the reports I get then > > are more valuable than possible savings before. > > The case where a function is not yet completed is the rare exception and > shouldn't drive the decision as to what the main behavior should be. > > > Here a small diff to enable modes to set beginning-of-defun-function > > without disturbing each other: > > They can (and should/must) already do that by using > `make-local-variable'. Grep for beginning-of-defun-function in > lisp/**/*.el to see how other modes do it. > > >> - the docstring of `comment-beginning' says "Find the beginning of the > >> enclosing comment" so I'm wondering why you decided to use that in > >> a context where you have no idea whether or not you're inside > >> a comment. Why don't you just use (forward-comment (- (point-max))) > > > > Thanks. Simply wasn't aware of that. > > That's odd: seeing your posts on this list, you clearly spent a fair bit > of time dealing with `comment-beginning':=20 Sure? Can you prove this? Or better let's come to more serious questions:=20 Indeed I stumbled over commenting at a time quite early with Emacs. Estimate it's now two years I sent you as maintainer my concerns with newcomment.el. And still I think, as commenting (and fontifying) are basics for all editors, everyone would expect Emacs being strong here. But is not, rather bug-ridden, sometimes lacking basic-features. Just to give a visual impression: open an empty buffer in Emacs-lisp mode, write "foo" and M-x comment-dwim `comment-dwim' places a comment-sign in column 41. foo ; No one would expect that. DWIM could mean before or after, but not at column 41. Certainly there is more than one way to change that, I could spent 10 minutes, one or two hours or half a day digging trough newcomment.el. Probably I simply should set this or another variable. BTW, checked comment-column: is a variable defined in `newcomment.el'. Its value is 0 But that's all not the point: An Editor should meet expectations of a wider range of people first and than offer more. Emacs sometimes comes with a lot of more, missing the first. Notwithstanding I use Emacs with growing pleasure. I'm not criticing Emacs as such: idea is valid, Emacs Lisp is fine, altogether an excellent tool. So why not simply cure things?=20 Consider the amount of code spent to commenting in C-source already, simple.el deals with it a lot, then newcomment.el. Also we have "Comments in C" and probably in a lot of mode-files. The amount of code seems reciprocal to the outcome. Well, that's life. We all have experienced that situation. It's not your fault, not mine. Looking through the commenting-code I got the impression: fiddling one bug might be produce the next that way. Considering my decent Emacs Lisp knowledge, there was nothing to do for me this time. That may change slowly.=20 > the first thing you should do=20 > in such a case is read its docstring. > Sincerely Andreas R=F6hler