all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@online.de>
To: emacs-devel@gnu.org
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
	Richard Stallman <rms@gnu.org>
Subject: Re: sh-script beg-end of function
Date: Sat, 24 Nov 2007 14:45:25 +0100	[thread overview]
Message-ID: <200711241445.25993.andreas.roehler@online.de> (raw)
In-Reply-To: <jwvbq9k6i2f.fsf-monnier+emacs@gnu.org>

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': 

Sure? Can you prove this? Or better let's come to more
serious questions: 

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? 

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. 

> the first thing you should do 
> in such a case is read its docstring.
>


Sincerely

Andreas Röhler

  reply	other threads:[~2007-11-24 13:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19 20:43 sh-script beg-end of function Andreas Röhler
2007-11-21 12:05 ` Richard Stallman
2007-11-21 15:52   ` Andreas Röhler
2007-11-22  8:22     ` Richard Stallman
2007-11-21 20:19   ` Stefan Monnier
2007-11-22  7:26     ` Andreas Röhler
2007-11-22 17:39       ` Stefan Monnier
2007-11-22 18:56         ` Andreas Röhler
2007-11-22 21:49           ` Stefan Monnier
2007-11-23 15:33             ` Andreas Röhler
2007-11-23 16:34               ` Stefan Monnier
2007-11-24 13:45                 ` Andreas Röhler [this message]
2007-11-23 15:56             ` Andreas Röhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200711241445.25993.andreas.roehler@online.de \
    --to=andreas.roehler@online.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.