From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#2887: Suggestions for simple.el Date: Sun, 05 Apr 2009 22:14:23 -0400 Message-ID: References: <26172.194.144.135.59.1238851923.squirrel@www.hafro.is> <11531.194.144.135.59.1238888128.squirrel@www.hafro.is> <13654.194.144.135.59.1238962672.squirrel@www.hafro.is> Reply-To: Stefan Monnier , 2887@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1238984649 17344 80.91.229.12 (6 Apr 2009 02:24:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Apr 2009 02:24:09 +0000 (UTC) Cc: 2887@emacsbugs.donarmstrong.com To: "Arni Magnusson" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 06 04:25:27 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LqeWb-00020g-IP for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Apr 2009 04:25:26 +0200 Original-Received: from localhost ([127.0.0.1]:33514 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LqeVD-0008AM-Dk for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Apr 2009 22:23:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LqeV9-00089c-Ll for bug-gnu-emacs@gnu.org; Sun, 05 Apr 2009 22:23:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LqeV5-000890-0r for bug-gnu-emacs@gnu.org; Sun, 05 Apr 2009 22:23:55 -0400 Original-Received: from [199.232.76.173] (port=59245 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LqeV4-00088x-Ug for bug-gnu-emacs@gnu.org; Sun, 05 Apr 2009 22:23:50 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:53502) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LqeV4-000724-EP for bug-gnu-emacs@gnu.org; Sun, 05 Apr 2009 22:23:50 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n362NmfQ017846; Sun, 5 Apr 2009 19:23:48 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n362K3aG016678; Sun, 5 Apr 2009 19:20:03 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 06 Apr 2009 02:20:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2887 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 2887-submit@emacsbugs.donarmstrong.com id=B2887.123898407315278 (code B ref 2887); Mon, 06 Apr 2009 02:20:03 +0000 Original-Received: (at 2887) by emacsbugs.donarmstrong.com; 6 Apr 2009 02:14:33 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n362ETIw015270 for <2887@emacsbugs.donarmstrong.com>; Sun, 5 Apr 2009 19:14:31 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AowGAM8B2UlMCqib/2dsb2JhbACBUsYzhA8GhQk X-IronPort-AV: E=Sophos;i="4.39,327,1235970000"; d="scan'208";a="36474869" Original-Received: from 76-10-168-155.dsl.teksavvy.com (HELO pastel.home) ([76.10.168.155]) by ironport2-out.teksavvy.com with ESMTP; 05 Apr 2009 22:14:23 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 674C6807E; Sun, 5 Apr 2009 22:14:23 -0400 (EDT) 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)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sun, 05 Apr 2009 22:23:55 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:26927 Archived-At: > 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