From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: michael@cadilhac.name (=?iso-8859-1?Q?Micha=EBl?= Cadilhac) Newsgroups: gmane.emacs.devel Subject: Re: keep|flush-lines, how-many to be used backward. Date: Fri, 28 Sep 2007 11:32:07 +0200 Organization: Epita/LRDE Message-ID: <87lkardtk8.fsf@cadilhac.name> References: <87d4w8ujux.fsf@cadilhac.name> <871wcmjx8s.fsf@cadilhac.name> <871wcmxy4j.fsf@jurta.org> <87sl52ihmj.fsf@cadilhac.name> <871wcmquw6.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0572462200==" X-Trace: sea.gmane.org 1190972053 23983 80.91.229.12 (28 Sep 2007 09:34:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Sep 2007 09:34:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 28 11:34:08 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IbCEY-0004HF-JK for ged-emacs-devel@m.gmane.org; Fri, 28 Sep 2007 11:34:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IbCEU-0000qx-GM for ged-emacs-devel@m.gmane.org; Fri, 28 Sep 2007 05:34:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IbCEN-0000nY-MC for emacs-devel@gnu.org; Fri, 28 Sep 2007 05:33:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IbCEM-0000mN-S4 for emacs-devel@gnu.org; Fri, 28 Sep 2007 05:33:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IbCEM-0000mB-En for emacs-devel@gnu.org; Fri, 28 Sep 2007 05:33:54 -0400 Original-Received: from smtp3-g19.free.fr ([212.27.42.29]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IbCEL-0005CL-TO for emacs-devel@gnu.org; Fri, 28 Sep 2007 05:33:54 -0400 Original-Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id 78DC517B574; Fri, 28 Sep 2007 11:33:50 +0200 (CEST) Original-Received: from localhost (ivr94-6-82-230-255-91.fbx.proxad.net [82.230.255.91]) by smtp3-g19.free.fr (Postfix) with ESMTP id CC09B17B58E; Fri, 28 Sep 2007 11:33:49 +0200 (CEST) In-Reply-To: <871wcmquw6.fsf@jurta.org> (Juri Linkov's message of "Wed, 26 Sep 2007 00:49:09 +0300") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) X-Website: http://michael.cadilhac.name Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAYFBMVEUWCwUyFQk6JBNLGglQK BVRMiRkHQtwMBZuOCRyRi1iQiZyUUCFNxuIPCKRTC2mVTSpZTqVVS2SW0OYZkixb0qraE/KeU7EcT +4h2bPhVfQkm7hlnDkvZjYqIjrwJnzwqB5+4wZAAAACXBIWXMAAAsTAAALEwEAmpwYAAAACXZwQWc AAAAwAAAAMADO7oxXAAADvUlEQVRIx32Wi5ajIAyGRcCAchErVqu27/+W+wfbs724i3Mcz5n/S0JI wlTbyXrs+zrFEL1zPuIdY7xO6+PBf6u27f4DrFPO3jvoQYRYFoj9CXyu+7ZPEWrXUNM0zpEfgjuY9 RTY1hyg5qUNgMb44Dwiiz5OZ8DCwVCjpdLaGNOVtw+M+Lz+AlNwRAhGSamh1abrtFKmG0DkmL8BhE +GdCNlreChBaO7DpjpIvbv/fr4AnqErhoYF6KI4aPrLIeFQLGj6RO4JWLjtd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devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:79987 Archived-At: --===============0572462200== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Juri Linkov writes: >>> What do you think about using a negative argument to operate before poi= nt? >>> Many Emacs commands change their direction when the argument is negativ= e, >>> e.g. for `kill-sexp' the negative arg means kill sexps before point, et= c. >> >> Well, on the one hand, I understand what 18 kill-sexp does. It kills 18 >> sexps, and this is fine if you want to kill that much sexps. On the >> other hand, what does 18 how-many means? >> >> You're asking for a differentiation between a positive and a negative >> argument, but what is the *purpose* of the value of this argument? > > My purpose was to propose to reserve C-u for other possible future uses. I fully understand that a prefix argument changes the behavior of a function=A0; I fully understand that a numeric prefix argument repeats the action that much time, or by modifying N times its behavior. What I fail to agree with, is that a prefix argument can be a three-state boolean=A0: present, negative or positive. I think it's just a hack, and should not be used like that. A user that sees that C-u and C-- has different behavior will try to figure out what C-9 will do, but it'd be nonsense. Don't you agree? > Using C-u now to change the direction will prevent these commands from > extending to do more useful things in future. If I continue in your way, I think you are suggesting that we don't use the prefix value 2 in M-x search because it can be used for future features. It's a little bit extreme, but wanting to differentiate =3D 0, <= 0 and > 0 will eventually lead to this. To sum up, I think the prefix argument has only two use cases=A0: =2D As a boolean (present/absent), =2D As a number. Wanting to mix those two is, to me, a hack. If we're going to camp on our positions=A0:-) does someone else have an opinion=A0? >>> keep|flush-lines, how-many could do the same, e.g. `M-- M-x keep-lines'. >> >> M-- puts a prefix of -1, so M-- M-x keep-lines would be the same as M-u >> M-x keep-lines. > > `M-- M-x keep-lines' is the same as `C-u - M-x keep-lines' > (see `prefix-numeric-value'). I was saying that, with the first proposal, C-- would have the same behavior than C-u. > Please also note that usually the command should have parameters it reads > in its function arguments. So it's better to change > (defun keep-lines (regexp &optional rstart rend interactive direction) Well, this is another matter. I want to do the following with those three functions=A0: =2D Remove the `interactive' flag (it's silly), =2D Remove the `optional'. That way, `direction' is not needed, as the caller should provide rstart and rend (like in nearly all the functions that take a region -- as a first count, 90%). The direction is just an interactive help. =2D-=20 | Micha=EBl `Micha' Cadilhac | The second-degree, = | | http://michael.cadilhac.name | is kind of = | | JID/MSN: | the semantic back slang. = | `---- michael.cadilhac@gmail.com | - = --' --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.2 (GNU/Linux) iD8DBQFG/MoXUJhDmOfFA3URAtg9AKCbdGJwN+2Lh82yN8wa2/yOHL+muwCgv7Xu 994lpslqCYB3PEHx6RTR5n0= =w1cw -----END PGP SIGNATURE----- --=-=-=-- --===============0572462200== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --===============0572462200==--