From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Arni Magnusson" <arnima@hafro.is>
Cc: 2887@emacsbugs.donarmstrong.com
Subject: bug#2887: Suggestions for simple.el
Date: Sun, 05 Apr 2009 22:14:23 -0400 [thread overview]
Message-ID: <jwvk55yzgq9.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <13654.194.144.135.59.1238962672.squirrel@www.hafro.is> (Arni Magnusson's message of "Sun, 5 Apr 2009 20:17:52 -0000 (GMT)")
> The Emacs manual and the documentation of `kill-word' and
> `backward-kill-word' could mention that some users may prefer binding
> C-backspace to `backward-delete-word' and C-delete to `delete-word'.
The Emacs manual is already "too large" to contain all the info we want
to put in it, so mentioning such things is unlikely.
But it's probably a good idea to add those commands to misc.el.
Then the EmacsWiki can mention them.
> My commands that call pos-at-*-of-line work faster than I can blink my
> eyes, but I understand your concern.
Try them on 200MB buffers.
> To optimize the speed the functions would probably need to be
> implemented in C code, but that's beyond my programming
> capabilities.
The core loop is in goto-line and is already written in C.
> Still, if I'm not mistaken, Emacs Lisp programmers would
> have to use something just as expensive to perform this task, so
> pos-at-*-of-line would save them some typing and thinking.
The point is to force them to use goto-line explicitly, so as to
hopefully make the cost more obvious.
> It's a common task to delete everything between the point and another
> location. Zapping is best if that location contains a somewhat rare
> character, usually some kind of symbol or parenthesis. In my experience
> the character itself should usually not be deleted as well.
I tend to use C-s for that (as well as for movement). But I understand
that other people have other habits.
> Yes, it would be a nice improvement to upgrade the
> `delete-trailing-whitespace' command so it counts cleaned lines.
Feel free to provide a patch for it (tho, since we're in the pretest,
there's no hurry: it won't be installed right now).
> Files with mixed Unix/Dos line endings are sometimes created when people
> using different OS's work together on a project. Many programs choke on
> input files that contain mixed Unix/Dos line endings, often without
> helpful error messages.
I understand the problem, yes. I just don't know it enough to
understand which kind of solution is more handy. The few times I've had
such a thing, I just did M-% C-q C-m RET RET !. For such rare
occurrences, anything more specialized would be useless because
I wouldn't remember it. Obviously, if it happens commonly to you,
you'll want another solution.
> If the Emacs maintainers decide to make `delete-trailing-whitespace' also
> delete trailing ^M in mixed line-ending files, it would make me (and
> presumably many other users) happy, but it might create a
> backwards-compatibility issue.
It might, but I'm not sure it'd be such a big deal. The docstring
explicitly mentions that a form-feed is not considered as whitespace by
this function, so that might be taken to mean that "every other
whitespace-like chars" (such as C-m) would be considered as whitespace.
> These functions are used in a wide variety of situations (text, code,
> data), making guesswork practically hopeless. I use `delete-indentation'
> and `delete-indentation-nospace' a lot, and I'm not sure which one I use
> more frequently.
What bindings do you use?
>> This said, I think those new commands, unbound to any key, shouldn't
>> be placed in simple.el (which is preloaded) but into some other file.
>> I'm tempted to say "misc.el", where we could stuff any number of
>> "commands that users might like, but for which we couldn't come up
>> with a good key-binding".
> I would slip them into simple.el, since they load very fast and rhyme with
> what's already there.
As mentioned, simple.el is preloaded, so anything we add to it increases
the size of Emacs for everyone, whether they use it or not.
> Allow me to propose the following bindings that are
> undefined in Emacs 22.3.1:
There's a good reason why they're undefined: most of those keys can't be
pressed under a tty.
Stefan
next prev parent reply other threads:[~2009-04-06 2:14 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-04 13:32 bug#2887: Suggestions for simple.el Arni Magnusson
2009-04-04 14:21 ` Stefan Monnier
2009-04-04 23:35 ` Arni Magnusson
2009-04-05 3:27 ` Stefan Monnier
2009-04-05 14:26 ` Leo
2009-04-05 20:17 ` Arni Magnusson
2009-04-05 21:59 ` Lennart Borgman
2009-04-06 2:14 ` Stefan Monnier [this message]
2009-04-06 3:02 ` Drew Adams
2009-04-07 2:46 ` Arni Magnusson
2009-04-07 14:02 ` Stefan Monnier
2009-04-07 16:09 ` Drew Adams
2009-04-07 16:09 ` Drew Adams
2009-04-07 17:18 ` Stefan Monnier
2009-04-07 17:18 ` Stefan Monnier
2009-04-07 17:22 ` Chong Yidong
2009-04-07 17:22 ` Chong Yidong
2009-04-07 17:26 ` Drew Adams
2009-04-07 17:26 ` Drew Adams
2009-04-07 21:43 ` Stefan Monnier
2009-04-18 0:08 ` Arni Magnusson
2009-04-18 19:32 ` Stefan Monnier
2009-04-19 1:13 ` Arni Magnusson
2009-04-19 1:40 ` Arni Magnusson
2009-04-19 3:14 ` Stefan Monnier
2009-04-19 13:41 ` Arni Magnusson
2020-09-19 21:50 ` Lars Ingebrigtsen
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=jwvk55yzgq9.fsf-monnier+emacsbugreports@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=2887@emacsbugs.donarmstrong.com \
--cc=arnima@hafro.is \
/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.