From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: C-x C-e with prefix arg Date: Sun, 5 May 2013 07:23:05 -0700 Message-ID: References: <4D5891EF34DF42D3A479CF83CAF1E43E@us.oracle.com> <87zjw97qo7.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1367763804 8219 80.91.229.3 (5 May 2013 14:23:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 May 2013 14:23:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Juri Linkov'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 05 16:23:23 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UYzqT-0004K0-7P for ged-emacs-devel@m.gmane.org; Sun, 05 May 2013 16:23:21 +0200 Original-Received: from localhost ([::1]:36786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYzqS-0001OU-PR for ged-emacs-devel@m.gmane.org; Sun, 05 May 2013 10:23:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYzqP-0001OC-HF for emacs-devel@gnu.org; Sun, 05 May 2013 10:23:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYzqO-0005EN-6n for emacs-devel@gnu.org; Sun, 05 May 2013 10:23:17 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:17937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYzqN-0005EI-WA for emacs-devel@gnu.org; Sun, 05 May 2013 10:23:16 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r45ENDow029953 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 5 May 2013 14:23:14 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r45ENDjN018116 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 5 May 2013 14:23:13 GMT Original-Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r45ENDWK003416; Sun, 5 May 2013 14:23:13 GMT Original-Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 05 May 2013 07:23:12 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87zjw97qo7.fsf@mail.jurta.org> Thread-Index: Ac5JbskhueALiDP8RpSAqzESzCY1HgAJkA0w X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:159338 Archived-At: > Why a numeric prefix arg? A numeric prefix usually defines > countable elements, No. And even if you actually checked all the source code and counted and proved that, yes, it is used to define countable elements more than 50% of the time, I'd say "So what?". An Emacs prefix arg can be used to do anything we want. We should pick the most appropriate, most useful prefix-arg behavior _for the particular command_. Argue for a different, better behavior wrt this command, if you like. But "usually" doesn't, by itself, convince me (for one) when it comes to prefix arg behavior. > e.g. for this case it could define the number of values to > insert to the buffer or the depth of list nesting to print. It could, but it doesn't. If you want to propose either of those, go for it. * Negative in this case is mnemonic for "less". It hints at the elision/abbreviation. * Plain C-u, which is probably what most people who have been using a prefix arg for this command have been using, now prints the full value, which is the most useful behavior most of the time, I think. Those were the two reasons behind the behavior I proposed. Likewise wrt a negative prefix arg for `eval-print-last-sexp'. > Otherwise, a better prefix to toggle would be `C-u' or `M-0'. Toggle? What do you want to toggle here? I would not want any prefix arg here to toggle, so that every other time it had some opposite behavior. What for? > Consider the prefixes of the related commands that > > 1. insert to the buffer > C-u M-x shell-command RET > C-u M-x eval-last-sexp RET > M-x eval-print-last-sexp RET > > 2. print full information > C-u M-x what-cursor-position RET > M-0 M-x dired-copy-filename-as-kill RET > M-0 M-x Info-copy-current-node-name RET > M-x eval-last-sexp RET M-x eval-last-sexp RET > M-x eval-expression RET > > Perhaps `M-0' is more suitable than `C-u' to print full > information (or the full value) where the mnemonics of > `M-0' could be "Reset `eval-expression-print-length' > to nil". If you want to propose something different, please go for it. Send a patch or whatever. But be prepared for someone like Juri L. to reply that `M-0' is "usually" for counting and should mean only zero inserts or zeroth print level, not print full information. ;-) IMHO, the proposal I made is better, but I really don't care. I never use either `eval-last-sexp' or `eval-print-last-sexp', personally. I use `pp-eval-last-sexp' instead (and my own version of it), and I use *scratch* in Emacs-Lisp mode (so C-j is not `eval-print-last-sexp'). BTW, for my patch, and something perhaps to keep in mind for yours as well: (emacs) `Lisp Eval' should be updated to remove this sentence: "The argument's value does not matter." I believe that is the only doc change needed, but I could be wrong. I searched only the Emacs and Elisp manuals, and only for `C-x C-e', `M-:', and `C-j'.