From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: PEDRO ANDRES ARANDA GUTIERREZ Newsgroups: gmane.emacs.devel Subject: Re: Just a thought about comment-line Date: Mon, 1 Jun 2020 07:18:12 +0200 Message-ID: References: <306c7cf5-6cfc-436e-a902-8ad4560b32d1@default> <47fc942f-62e1-4efc-9d67-db292177044e@default> <608b0cf8-ee1b-4c16-b15c-2eb7ac56d652@default> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000080c70e05a6feec25" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="112926"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuri Khan , emacs-devel@gnu.org, Dmitry Gutov To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jun 01 07:19:20 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfcqz-000TA8-Fs for ged-emacs-devel@m.gmane-mx.org; Mon, 01 Jun 2020 07:19:17 +0200 Original-Received: from localhost ([::1]:51306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfcqy-00045g-Hg for ged-emacs-devel@m.gmane-mx.org; Mon, 01 Jun 2020 01:19:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfcqB-0003aL-Vg for emacs-devel@gnu.org; Mon, 01 Jun 2020 01:18:27 -0400 Original-Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:36133) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfcq9-0005M7-TJ for emacs-devel@gnu.org; Mon, 01 Jun 2020 01:18:27 -0400 Original-Received: by mail-lj1-x230.google.com with SMTP id a25so6547476ljp.3 for ; Sun, 31 May 2020 22:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=it.uc3m.es; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9tCAZudIVJCUwEeJlVTfUoDlGsUaKo1Hv3tsDVHgleI=; b=lJ93yuKsmACyb1hrGLoyG5u4QymQ4yWGoa9zSCk6zdegs8P7Ja7teFMvIgdZFba7a6 Gj9/obBUIDt20RzEXmkuQxFmtBFX5aoin9+icoeseilwUYsMTdK/Ttp0Ta/MQN326ABd 60yewFy9hkrwoIKReK9W4vhiNkTPxbuaXISIQr8+P5TVGYHVl/ETOyIdxhDA6zBK5eq1 EK3JpmMNE+VL09/ZwYb5DaaXK1BqOFncvsFpNT+ePnfAdwsZXTuaPOlaozpkU3ks8zNI D+mQ3kjtQH2Wh/87+cgtCkkL72zLqB/pXICMZqvsYuFtCdN/93R/pzPOFj3SNTGxU4Rq Vs2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9tCAZudIVJCUwEeJlVTfUoDlGsUaKo1Hv3tsDVHgleI=; b=KMBwNiEVa+6qsKv9HMVYGWyJOxumSUl81EzdYUcZjDP3ZoW2tbS45yCStGODOeBAlG +FTfh7Ivy9RBFh8946Q9EbRu9dLuAadfYGWWImVVqdBTW+h3vqZxQAfrnXQkwkDgZJ8y tp/4md3uya2jB12RvZY/itXzLdGzpy0U3tF/973jEHh3iTviq4EWzgRhwB/nS7lTm0mv P4ibUR3Wzigz2ek/k+pgzEpTdZHaq7999lSoXT5CT/q5vwzfnypA8k2wOU8ZHLC2uHv3 WFi107CiAddtkIHyu1rOLp6OgioEKlMkP/fAgbuqNIA9YZtu8Dxxm/k+uj5OlLSf1D2L 0O3g== X-Gm-Message-State: AOAM530kXrrZ69hu1JkkSiQjPyNahtw1kNVrHqlzkPdOcdd2lM7pniqg uV6SMP7IiV5VFouSooN0gAimWPOs8UvUV7fJdYOJFw== X-Google-Smtp-Source: ABdhPJzDegFxQNNxxOhF2sdu2UXtiIyc+g8jxKnNlFmF3dhJc5gNtREQ8gpB9cUI5o46j/tsEydbXM7GtpjB7ynVRas= X-Received: by 2002:a05:651c:c9:: with SMTP id 9mr3008252ljr.365.1590988703312; Sun, 31 May 2020 22:18:23 -0700 (PDT) In-Reply-To: <608b0cf8-ee1b-4c16-b15c-2eb7ac56d652@default> Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=paranda@it.uc3m.es; helo=mail-lj1-x230.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251708 Archived-At: --00000000000080c70e05a6feec25 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey, thanks for all the answers so far. It's nice to see people getting passionate about this. I too had my code to deal with (bol-p end-of-region) and I'm passing it on to people, but I started writing a short introduction for students who get interested in Emacs by seeing how I use it and well, it'd be so much better for Emacs if I could get one of the FAQ answered by something like 'customise variable so-and-so to get your desired behaviour' instead of 'include in your .emacs.d/functions.el and bind function sensible-comment-lines to M-;' I hope the discussion crystallises in some better future :-) Best, /PA PS: and as my signature translates ;-) "questions exist to be made, not to be answered" El dom., 31 may. 2020 a las 23:54, Drew Adams () escribi=C3=B3: > > > You're fairly sure for whom? For you? Not for me. > > > > The only complaints against comment-dwim I have seen > > I wasn't complaining about `comment-dwim'. > I was saying that it's not the be-all and > end-all. I use it for end-of-line comments. > And I use something else for block commenting. > > It doesn't matter to me if you use `M-;' for > everything. If you're happy that way, great. > > > were along the lines "I want to micromanage > > how comments are made", > > I see. If someone says your one-size-fits-all > dream command doesn't fit all then their idea > for doing something additional or different > just wastes your time. Sorry to hear that. > > > and not "this code-writing scenario becomes > > suboptimal". > > > > Are you still writing code? I'm surprised, > > Surprise! And irrelevant. > > > > Tell me why Common Lisp behavior for block comments > > > (#|...|#) is missing? I don't mean that those macro > > > chars are missing, but that the block-commenting > > > behavior (nesting, unnesting) is missing. > > > > You might want to elaborate. > > I think I did. Maybe you can show us how > `comment-dwim' provides the same behavior. > > > It definitely can create nested comments (i.e. in > > the cases they are really needed, when you call it > > on a region containing both commented and > > non-commented lines). > > A bit of a tautology. I can leap over buildings > in a single bound, in the cases where that's > really needed, which is when the buildings are > at most 1-foot tall. > > Anyway. The point of this thread is the problem > with `comment-line' raised by the OP. If you're > curious why `comment-line' was added, since we > already had `comment-dwim', see the thread I > pointed to, where `comment-line' was discussed > and added. > --=20 --- PEDRO ANDRES ARANDA GUTIERREZ Universidad Carlos III de Madrid "Fragen sind nicht da um beantwortet zu werden. Fragen sind da, um gestellt zu werden" Georg Kreisler --00000000000080c70e05a6feec25 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey,

thanks for all the answ= ers so far. It's nice to see people getting passionate about this.
I too had my code to deal with (bol-p end-of-region) and I'm pass= ing it on to people,
but I started writing a short introduction f= or students who get interested in Emacs by
seeing how I use it an= d well, it'd be so much better for Emacs if I could get one of the
FAQ answered by something like 'customise variable so-and-so to g= et your desired
behaviour' instead of 'include <listin= g 100> in your .emacs.d/functions.el and bind function
sensibl= e-comment-lines to M-;'

I hope the discuss= ion crystallises in some better future :-)

Best, /= PA
PS: and as my signature translates ;-) "questions exist t= o be made, not to be answered"

El dom., 31 may. 2020 a las 23= :54, Drew Adams (<drew.adams@or= acle.com>) escribi=C3=B3:
> > You're fairly sure for whom?=C2=A0 For you?= =C2=A0 Not for me.
>
> The only complaints against comment-dwim I have seen

I wasn't complaining about `comment-dwim'.
I was saying that it's not the be-all and
end-all.=C2=A0 I use it for end-of-line comments.
And I use something else for block commenting.

It doesn't matter to me if you use `M-;' for
everything.=C2=A0 If you're happy that way, great.

> were along the lines "I want to micromanage
> how comments are made",

I see.=C2=A0 If someone says your one-size-fits-all
dream command doesn't fit all then their idea
for doing something additional or different
just wastes your time.=C2=A0 Sorry to hear that.

> and not "this code-writing scenario becomes
> suboptimal".
>
> Are you still writing code? I'm surprised,

Surprise!=C2=A0 And irrelevant.

> > Tell me why Common Lisp behavior for block comments
> > (#|...|#) is missing?=C2=A0 I don't mean that those macro
> > chars are missing, but that the block-commenting
> > behavior (nesting, unnesting) is missing.
>
> You might want to elaborate.

I think I did.=C2=A0 Maybe you can show us how
`comment-dwim' provides the same behavior.

> It definitely can create nested comments (i.e. in
> the cases they are really needed, when you call it
> on a region containing both commented and
> non-commented lines).

A bit of a tautology.=C2=A0 I can leap over buildings
in a single bound, in the cases where that's
really needed, which is when the buildings are
at most 1-foot tall.

Anyway.=C2=A0 The point of this thread is the problem
with `comment-line' raised by the OP.=C2=A0 If you're
curious why `comment-line' was added, since we
already had `comment-dwim', see the thread I
pointed to, where `comment-line' was discussed
and added.


--
---
PEDRO ANDRES ARANDA GUT= IERREZ
Universidad Carlos III de Madrid

"F= ragen sind nicht da um beantwortet zu werden.
Fragen sind da, um = gestellt zu werden" Georg Kreisler
--00000000000080c70e05a6feec25--