From: Ergus <spacibba@aol.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: help-gnu-emacs@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: Is Elisp really that slow?
Date: Wed, 15 May 2019 22:09:30 +0200 [thread overview]
Message-ID: <20190515200930.ltwwgjjfpnvpcjv6@Ergus> (raw)
In-Reply-To: <cf89db56-de27-4437-96f0-1e296a6ba3b0@default>
On Wed, May 15, 2019 at 12:53:43PM -0700, Drew Adams wrote:
>> >I agree with Oscar that `comment-dwim' and `comment-region'
>> >have different behaviors - so neither is a substitute
>> >for the other.
>> >
>> >In particular, `comment-region' lets you also
>> >uncomment, including unnest, comments.
>>
>> To no waste bindings we could just modify comment-region to accept
>> negative prefix to uncomment. So C-- M-; uncoments region, and M-;
>> comments it.
>
>I don't get your point. `comment-region' already
>uncomments, with plain `C-u'.
>
>> But now there will come another user saying that the dwim
>> version is better... we will never agree in anything this way.
>
>The point was that both `M-;' and `comment-region'
>are useful, and that neither substitutes for the other.
>It doesn't matter which one someone think is "better".
>They're both available.
>
>> >I use both, and I bind each to a short key sequence.
>> >
>> >More precisely, I leave `comment-dwim' on `M-;'
>> >and I bind `C-x C-;' to a command similar to
>> >`comment-region' but that I find more useful:
>> >`comment-region-lines'. It comments/uncomments
>> >whole lines.
>> >
>> >(So it too differs from `comment-region' - so it
>> >too is not an exact "replacement".)
>> >
>> >As for key bindings:
>> >
>> >Although I haven't bothered to change the binding of
>> >`M-;', I think it's a shame and a waste to sacrifice
>> >such a nice, short, _repeatable_ key sequence for a
>> >command that does _nothing_ when you repeat it.
>> >
>> >Far better to use `M-;' for some command that keeps
>> >doing something when repeated (just hold down `M-;').
>> >That's what Emacs should do eventually, IMHO. No
>> >urgency, but someday, when we find a really useful
>> >repeatable command...
>> >
>> >As for `comment-dwim': Since I use `C-x C-;'
>> >(`comment-region-lines') for block commenting and
>> >uncommenting, I never really use `M-;' for anything
>> >other than an end-of-line comment.
>> >
>> >`M-;' used to be bound to a command that did only
>> >that: `indent-for-comment'. And since that's all
>> >I really use `M-;' for, the rest of `comment-dwim'
>> >is, yes, wasted and replaceable by `comment-region'
>> >or my `comment-region-line'. `M-;' for eol comment,
>> >`C-x C-;' for commenting/uncommenting lines.
>> >
>> >(defun comment-region-lines (beg end &optional arg)
>> > "Like `comment-region', but comment/uncomment whole lines."
>> > (interactive "*r\nP")
>> > (when (> beg end)
>> > (setq beg (prog1 end (setq end beg))))
>> > (let ((bol (save-excursion
>> > (goto-char beg)
>> > (line-beginning-position)))
>> > (eol (save-excursion
>> > (goto-char end)
>> > (if (bolp) (point) (line-end-position)))))
>> > (comment-region bol eol arg)))
>>
>> This is the king of features I would really support. Enable line or
>> region by default. There is a package for that in melpa y find very
>> useful.
>
>I proposed it long ago to emacs-devel. Other,
>similar commands were also discussed. Emacs-devel
>decided not to go there (by adding such a command
>or by giving it - or even `comment-region' - a
>binding by default). Apparently it was thought
>that `M-;' is sufficient. Giving something a DWIM
>name makes it universally useful, I guess. ;-)
>
>Well, `comment-region' still does have a "key"
>binding in vanilla Emacs (at least in some modes),
>but not a _keyboard_ key binding:
>
But that's the point. The common features in emacs should have the same
base behavior independently of the mode (comment region, hungry deletion
indent region, send to terminal (compile and execute)/ send mail/ commit)
>comment-region is on <menu-bar> <emacs-lisp> <comment-region>
next prev parent reply other threads:[~2019-05-15 20:09 UTC|newest]
Thread overview: 298+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-14 23:54 Is Elisp really that slow? Ergus
2019-05-15 11:57 ` Emanuel Berg
2019-05-15 13:06 ` Dmitry Gutov
2019-05-15 13:25 ` Óscar Fuentes
2019-05-15 13:30 ` Dmitry Gutov
2019-05-15 14:18 ` Óscar Fuentes
2019-05-15 14:45 ` Dmitry Gutov
2019-05-15 15:14 ` Óscar Fuentes
2019-05-15 15:39 ` Dmitry Gutov
2019-05-15 15:51 ` Óscar Fuentes
2019-05-15 16:05 ` Óscar Fuentes
2019-05-15 16:07 ` Dmitry Gutov
2019-05-15 16:05 ` Dmitry Gutov
2019-05-15 16:12 ` Óscar Fuentes
2019-05-15 16:15 ` Dmitry Gutov
2019-05-15 20:23 ` Óscar Fuentes
2019-05-15 20:30 ` Dmitry Gutov
2019-05-15 15:42 ` Stefan Monnier
2019-05-15 17:29 ` Drew Adams
2019-05-15 19:38 ` Ergus
2019-05-15 19:53 ` Drew Adams
2019-05-15 20:09 ` Ergus [this message]
2019-05-15 23:24 ` Emanuel Berg
2019-05-15 20:46 ` Ergus
2019-05-15 23:30 ` Emanuel Berg
2019-05-15 23:12 ` Emanuel Berg
2019-05-15 19:47 ` Ergus
2019-05-15 19:45 ` Ergus
2019-05-15 15:18 ` Stefan Monnier
2019-05-15 15:34 ` Óscar Fuentes
2019-05-15 15:51 ` Stefan Monnier
2019-05-15 17:30 ` John Yates
2019-05-15 19:29 ` Ergus
2019-05-15 20:15 ` Ergus
2019-05-15 20:21 ` Dmitry Gutov
2019-05-15 20:57 ` Ergus
2019-05-15 21:00 ` Dmitry Gutov
2019-05-15 21:17 ` Ergus
2019-05-17 11:09 ` Dmitry Gutov
2019-05-15 15:07 ` Uniformity (was: Is Elisp really that slow?) Stefan Monnier
2019-05-15 15:24 ` Uniformity Óscar Fuentes
2019-05-15 15:45 ` Uniformity Stefan Monnier
2019-05-15 19:58 ` Uniformity (was: Is Elisp really that slow?) Ergus
2019-05-18 23:51 ` Emanuel Berg
2019-05-15 15:14 ` Is Elisp really that slow? Eli Zaretskii
2019-05-15 15:40 ` Óscar Fuentes
2019-05-15 16:14 ` Eli Zaretskii
2019-05-15 16:23 ` Tadeus Prastowo
2019-05-15 16:27 ` tomas
2019-05-15 17:00 ` Eli Zaretskii
2019-05-15 20:09 ` Óscar Fuentes
2019-05-16 13:12 ` Eli Zaretskii
2019-05-16 13:40 ` Óscar Fuentes
2019-05-16 14:06 ` Eli Zaretskii
2019-05-15 21:09 ` Ergus
2019-05-16 14:12 ` Eli Zaretskii
2019-05-16 16:14 ` Ergus
2019-05-16 17:46 ` Eli Zaretskii
2019-05-16 20:23 ` Ergus
2019-05-16 20:50 ` Óscar Fuentes
2019-05-16 22:46 ` Ergus
2019-05-16 23:19 ` Óscar Fuentes
2019-05-28 21:08 ` Emanuel Berg via help-gnu-emacs
2019-05-28 21:50 ` Drew Adams
2019-05-17 1:28 ` Jean-Christophe Helary
2019-05-17 2:26 ` Óscar Fuentes
2019-05-17 4:05 ` Jean-Christophe Helary
2019-05-17 6:08 ` Ergus
2019-05-17 9:21 ` tomas
2019-05-17 14:01 ` Óscar Fuentes
2019-05-17 14:16 ` Dmitry Gutov
2019-05-17 14:50 ` Óscar Fuentes
2019-05-17 18:19 ` Dmitry Gutov
2019-05-17 19:23 ` Óscar Fuentes
2019-05-17 20:51 ` Dmitry Gutov
2019-05-17 16:37 ` tomas
2019-05-17 16:50 ` Óscar Fuentes
2019-05-17 17:05 ` Óscar Fuentes
2019-05-17 18:11 ` Dmitry Gutov
2019-05-17 18:16 ` Dmitry Gutov
2019-05-17 18:14 ` Dmitry Gutov
2019-05-30 12:09 ` Emanuel Berg via help-gnu-emacs
2019-06-25 16:48 ` Jean Louis
2019-05-29 4:58 ` Emanuel Berg via help-gnu-emacs
2019-05-17 13:46 ` Óscar Fuentes
2019-05-29 4:26 ` Emanuel Berg via help-gnu-emacs
2019-05-17 5:52 ` Ergus
2019-05-17 9:01 ` Eli Zaretskii
2019-05-17 12:35 ` Ergus
2019-05-17 13:13 ` Eli Zaretskii
2019-05-17 13:22 ` Dmitry Gutov
2019-05-17 13:39 ` Eli Zaretskii
2019-05-17 15:07 ` Óscar Fuentes
2019-05-18 15:41 ` Dmitry Gutov
2019-05-17 15:39 ` Ergus
2019-05-17 15:47 ` Noam Postavsky
2019-05-17 15:48 ` Eli Zaretskii
2019-05-17 19:24 ` Ergus
2019-05-17 20:12 ` Eli Zaretskii
2019-05-19 13:38 ` Ergus
2019-05-19 13:42 ` Noam Postavsky
2019-06-06 3:24 ` Emanuel Berg via help-gnu-emacs
2019-06-05 6:05 ` Emanuel Berg via help-gnu-emacs
2019-06-05 4:44 ` Emanuel Berg via help-gnu-emacs
2019-06-06 21:06 ` Xavier Maillard
2019-06-07 19:01 ` Emanuel Berg via help-gnu-emacs
2019-05-31 15:50 ` Emanuel Berg via help-gnu-emacs
2019-05-31 17:57 ` Eli Zaretskii
2019-06-07 18:46 ` Emanuel Berg via help-gnu-emacs
2019-06-02 10:49 ` Stefan Huchler
2019-06-02 19:16 ` Marcin Borkowski
2019-06-02 22:49 ` Stefan Huchler
2019-06-07 18:55 ` Emanuel Berg via help-gnu-emacs
2019-06-07 18:53 ` Emanuel Berg via help-gnu-emacs
2019-05-17 14:21 ` Óscar Fuentes
2019-05-17 15:02 ` Drew Adams
2019-05-17 16:29 ` Stefan Huchler
2019-05-17 17:19 ` Ergus
2019-06-05 2:29 ` Emanuel Berg via help-gnu-emacs
2019-06-04 22:29 ` Emanuel Berg via help-gnu-emacs
2019-05-30 3:30 ` Emanuel Berg via help-gnu-emacs
2019-05-17 14:12 ` Óscar Fuentes
2019-05-17 8:54 ` Dmitry Gutov
2019-05-17 9:36 ` Eli Zaretskii
2019-05-17 11:09 ` Dmitry Gutov
2019-05-17 12:04 ` Eli Zaretskii
2019-05-17 12:56 ` Ergus
2019-05-17 13:31 ` Eli Zaretskii
2019-05-17 15:03 ` Drew Adams
2019-06-04 1:27 ` Emanuel Berg via help-gnu-emacs
2019-05-31 19:03 ` Emanuel Berg via help-gnu-emacs
2019-06-01 8:17 ` Jean Louis
2019-06-07 18:49 ` Emanuel Berg via help-gnu-emacs
2019-05-17 13:17 ` Dmitry Gutov
2019-05-17 13:35 ` Eli Zaretskii
2019-05-17 13:43 ` Dmitry Gutov
2019-05-17 14:36 ` Eli Zaretskii
2019-05-18 16:54 ` Dmitry Gutov
2019-05-18 17:17 ` Eli Zaretskii
2019-05-18 22:43 ` Dmitry Gutov
2019-05-18 23:54 ` Óscar Fuentes
2019-05-19 0:24 ` 조성빈
2019-05-19 5:24 ` Óscar Fuentes
2019-05-19 15:18 ` Stefan Huchler
2019-05-19 18:40 ` Óscar Fuentes
2019-05-20 6:47 ` tomas
2019-05-20 14:57 ` Drew Adams
2019-05-20 15:28 ` Óscar Fuentes
2019-06-06 5:16 ` Emanuel Berg via help-gnu-emacs
2019-05-21 12:19 ` Van L
2019-05-23 20:01 ` Robert Thorpe
2019-05-23 23:05 ` Stefan Huchler
2019-05-24 14:40 ` Robert Thorpe
2019-05-25 0:07 ` Stefan Huchler
2019-05-25 10:54 ` Robert Thorpe
2019-06-06 6:02 ` Emanuel Berg via help-gnu-emacs
2019-06-06 0:16 ` Emanuel Berg via help-gnu-emacs
2019-06-06 0:08 ` Emanuel Berg via help-gnu-emacs
2019-06-06 0:06 ` Emanuel Berg via help-gnu-emacs
2019-05-19 2:40 ` Eli Zaretskii
2019-05-31 21:04 ` Emanuel Berg via help-gnu-emacs
2019-05-31 15:05 ` Emanuel Berg via help-gnu-emacs
2019-05-17 14:40 ` Óscar Fuentes
2019-06-02 2:00 ` Emanuel Berg via help-gnu-emacs
2019-05-19 18:35 ` Stefan Monnier
2019-05-19 19:23 ` 조성빈
2019-05-20 6:53 ` tomas
2019-06-06 5:03 ` Emanuel Berg via help-gnu-emacs
2019-06-11 13:06 ` Ergus via help-gnu-emacs
2019-06-11 13:37 ` Óscar Fuentes
2019-06-12 1:08 ` Ergus via help-gnu-emacs
2019-05-30 21:30 ` Emanuel Berg via help-gnu-emacs
2019-05-30 21:25 ` Emanuel Berg via help-gnu-emacs
[not found] ` <<20190517055202.ted62gt6hqcip7xt@Ergus>
[not found] ` <<83mujlbgjh.fsf@gnu.org>
2019-05-17 15:03 ` Drew Adams
2019-06-04 1:20 ` Emanuel Berg via help-gnu-emacs
2019-06-04 1:50 ` Emanuel Berg via help-gnu-emacs
2019-05-28 23:16 ` Emanuel Berg via help-gnu-emacs
2019-05-17 9:05 ` tomas
2019-05-28 21:54 ` Emanuel Berg via help-gnu-emacs
2019-05-17 8:47 ` Dmitry Gutov
2019-05-17 15:22 ` Óscar Fuentes
2019-05-17 18:28 ` Dmitry Gutov
2019-05-17 19:55 ` Óscar Fuentes
2019-06-04 1:41 ` Emanuel Berg via help-gnu-emacs
2019-06-04 1:38 ` Emanuel Berg via help-gnu-emacs
2019-06-04 1:37 ` Emanuel Berg via help-gnu-emacs
2019-05-31 3:36 ` Emanuel Berg via help-gnu-emacs
2019-05-17 8:55 ` tomas
2019-05-17 15:02 ` Drew Adams
2019-05-31 4:52 ` Emanuel Berg via help-gnu-emacs
2019-05-27 14:30 ` Emanuel Berg via help-gnu-emacs
2019-05-29 5:02 ` Xavier Maillard
2019-06-07 18:40 ` Emanuel Berg via help-gnu-emacs
2019-05-17 6:24 ` Eli Zaretskii
2019-05-30 17:58 ` Emanuel Berg via help-gnu-emacs
2019-05-25 8:22 ` Emanuel Berg via help-gnu-emacs
2019-05-25 9:05 ` 조성빈 via help-gnu-emacs
2019-05-25 5:14 ` Emanuel Berg via help-gnu-emacs
2019-05-25 4:42 ` Emanuel Berg via help-gnu-emacs
2019-05-25 6:31 ` Eli Zaretskii
2019-06-07 18:34 ` Emanuel Berg via help-gnu-emacs
2019-06-07 20:21 ` Eli Zaretskii
2019-05-19 0:03 ` Emanuel Berg
2019-05-19 8:16 ` Van L
2019-05-19 10:35 ` 조성빈
2019-05-19 12:48 ` Van L
2019-05-19 13:13 ` Ergus
2019-06-06 2:54 ` Emanuel Berg via help-gnu-emacs
2019-05-19 13:00 ` Ergus
2019-05-19 14:57 ` 조성빈
2019-06-06 3:08 ` Emanuel Berg via help-gnu-emacs
2019-05-19 13:05 ` Ergus
2019-05-21 12:00 ` Van L
2019-06-06 3:20 ` Emanuel Berg via help-gnu-emacs
2019-06-06 0:52 ` Emanuel Berg via help-gnu-emacs
2019-06-06 0:53 ` Emanuel Berg via help-gnu-emacs
2019-05-19 14:32 ` Drew Adams
2019-05-21 12:09 ` Van L
2019-06-06 0:43 ` Emanuel Berg via help-gnu-emacs
2019-06-06 2:12 ` Drew Adams
2019-05-23 20:16 ` Robert Thorpe
2019-06-07 18:23 ` Emanuel Berg via help-gnu-emacs
2019-06-08 20:12 ` Robert Thorpe
2019-06-09 13:37 ` Tomas Nordin
2019-06-09 13:50 ` tomas
2019-06-10 22:55 ` Emanuel Berg via help-gnu-emacs
2019-06-12 9:16 ` [offtopic] " Van L
2019-06-12 9:28 ` tomas
2019-06-12 11:31 ` Van L
2019-06-12 11:44 ` tomas
2019-06-14 4:12 ` Xavier Maillard
2019-06-14 7:07 ` tomas
2019-06-12 11:16 ` [offtopic] " Jean-Christophe Helary
2019-06-12 13:28 ` Van L
2019-05-16 23:31 ` Emanuel Berg
-- strict thread matches above, loose matches on Subject: below --
2019-05-16 1:32 Ergus
2019-05-22 7:13 ` Emanuel Berg
2019-05-16 1:19 Ergus
2019-05-20 11:32 ` Emanuel Berg
2019-05-02 21:40 Why is Elisp slow? Ergus
2019-05-02 23:39 ` 조성빈
2019-05-03 0:44 ` Ergus
2019-05-10 13:14 ` Van L
2019-05-10 13:22 ` Michael Heerdegen
2019-05-11 0:38 ` Emanuel Berg
2019-05-11 7:32 ` Is Elisp really that slow? (was: Why is Elisp slow?) tomas
2019-05-11 7:42 ` 조성빈
2019-05-11 7:57 ` tomas
2019-05-11 23:09 ` Emanuel Berg
2019-05-12 7:54 ` tomas
2019-05-12 9:46 ` 조성빈
2019-05-12 14:21 ` Eli Zaretskii
2019-05-12 14:45 ` Is Elisp really that slow? Óscar Fuentes
2019-05-12 15:28 ` Eli Zaretskii
2019-05-12 15:46 ` Óscar Fuentes
2019-05-12 17:20 ` Eli Zaretskii
2019-05-12 18:37 ` Óscar Fuentes
2019-05-12 18:53 ` Eli Zaretskii
2019-05-13 1:44 ` Emanuel Berg
2019-05-12 21:18 ` Stefan Monnier
2019-05-12 22:22 ` Óscar Fuentes
2019-05-14 13:39 ` Stefan Monnier
2019-05-14 15:09 ` Óscar Fuentes
2019-05-13 0:57 ` Samuel Wales
2019-05-13 12:37 ` Stefan Monnier
2019-05-13 14:23 ` Emanuel Berg
2019-05-13 14:33 ` Emanuel Berg
2019-05-14 8:24 ` tomas
2019-05-14 13:21 ` Emanuel Berg
2019-05-14 14:44 ` tomas
2019-05-15 11:25 ` Emanuel Berg
2019-05-15 12:05 ` tomas
2019-05-15 23:02 ` Emanuel Berg
2019-05-16 6:48 ` tomas
2019-05-16 9:37 ` Noam Postavsky
2019-05-16 11:02 ` tomas
2019-05-23 14:23 ` Emanuel Berg
2019-05-24 1:33 ` Van L
2019-05-16 13:31 ` Eli Zaretskii
2019-05-23 14:28 ` Emanuel Berg
2019-05-23 14:54 ` Drew Adams
2019-05-23 14:55 ` Eli Zaretskii
2019-06-06 5:18 ` Emanuel Berg via help-gnu-emacs
2019-05-16 14:45 ` Stefan Monnier
2019-05-25 4:53 ` Emanuel Berg via help-gnu-emacs
2019-05-13 1:52 ` Emanuel Berg
2019-05-13 1:35 ` Emanuel Berg
2019-05-12 21:01 ` Stefan Monnier
2019-05-13 1:27 ` Emanuel Berg
2019-05-13 14:38 ` Eli Zaretskii
2019-05-13 15:00 ` Emanuel Berg
2019-05-13 15:25 ` Eli Zaretskii
2019-05-14 11:54 ` Emanuel Berg
2019-05-14 16:21 ` Eli Zaretskii
2019-05-14 17:05 ` Emanuel Berg
2019-05-14 18:30 ` Eli Zaretskii
2019-05-15 11:27 ` Emanuel Berg
2019-05-15 14:51 ` Eli Zaretskii
2019-05-16 23:19 ` Emanuel Berg
2019-05-17 6:41 ` Eli Zaretskii
2019-05-13 15:02 ` John Yates
2019-05-13 15:14 ` Eli Zaretskii
2019-05-13 22:40 ` Dmitry Gutov
2019-05-14 6:27 ` Paul W. Rankin
2019-05-14 13:10 ` Emanuel Berg
2019-05-13 15:42 ` Van L
2019-05-17 15:17 ` Ken Goldman
2019-06-04 1:36 ` Emanuel Berg via help-gnu-emacs
2019-06-08 0:26 ` Is Elisp really that slow? (was: Why is Elisp slow?) Samuel Wales
2019-06-08 8:52 ` tomas
2019-06-08 21:00 ` Samuel Wales
2019-06-08 21:14 ` tomas
2019-06-08 21:44 ` Is Elisp really that slow? Óscar Fuentes
2019-06-08 23:29 ` Emanuel Berg via help-gnu-emacs
2019-06-11 4:10 ` Xavier Maillard
[not found] <<878sv7sp3r.fsf@telefonica.net>
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=20190515200930.ltwwgjjfpnvpcjv6@Ergus \
--to=spacibba@aol.com \
--cc=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.