From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Danilo Segan Newsgroups: gmane.emacs.devel Subject: Re: Suggestion: Mapping of M-g should be goto-line Date: Thu, 25 Mar 2004 12:23:34 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <86brmldvbd.fsf@avet.kvota.net> References: <861xnhfee8.fsf@avet.kvota.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1080213767 26669 80.91.224.253 (25 Mar 2004 11:22:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 25 Mar 2004 11:22:47 +0000 (UTC) Cc: Juanma Barranquero , Lucas , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Mar 25 12:22:40 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B6Swa-0002U7-00 for ; Thu, 25 Mar 2004 12:22:40 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B6Swa-0000YV-00 for ; Thu, 25 Mar 2004 12:22:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B6Sw2-0006bO-SK for emacs-devel@quimby.gnus.org; Thu, 25 Mar 2004 06:22:06 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B6SvG-0006ZI-7p for emacs-devel@gnu.org; Thu, 25 Mar 2004 06:21:18 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B6Sui-0006NN-T1 for emacs-devel@gnu.org; Thu, 25 Mar 2004 06:21:16 -0500 Original-Received: from [217.65.194.38] (helo=avet.kvota.net) by monty-python.gnu.org with smtp (Exim 4.30) id 1B6Stc-0005yr-4f for emacs-devel@gnu.org; Thu, 25 Mar 2004 06:19:37 -0500 Original-Received: (qmail 31388 invoked by uid 1001); 25 Mar 2004 11:23:34 -0000 Original-To: jari.aalto@poboxes.com (Jari Aalto+mail.linux) In-Reply-To: (Jari Aalto's message of "Thu, 25 Mar 2004 12:32:38 +0200") User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20889 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20889 Hi Jari, Lucas, Juanma, Today at 11:32, Jari Aalto wrote: > * Thu 2004-03-25 Danilo Segan gmx.net> mail.default.spool > | Today at 7:11, Jari Aalto wrote: > | > | > If put side by side, "set face default" and goto-line, I would > | > estimate that the 99 % of the cases, there is more need for > | > goto-line. Therefore it would be better if the M-g was mapped > | > to it. > | > | Emacs tries hard to make goto-line unnecessary, AFAICT. Can you > | provide an example of when goto-line couldn't be replaced with a > | better functionality (such as using M-x next-error)? > > Only if user knows Emacs. He doesn't when he is a beginner. And even > long period of Emacs experience, people still run many, many programs > outside of emacs in their terminals. That's only a reason to educate them better, not to adjust behaviour. Emacs is not too friendly to beginners at all -- they'd need to relearn a lot of things, no matter what editor they used before (if it wasn't Emacs). This is only one minor point in all the effort they'll need to expend. At the same time, Lucas writes: > > > > FWIW, C-x ` is bound to next-error, and it's a big win in situations > > like this. > > And, ` is on AltGR 7 here, so basically absolutely unusable on French > keyboard layouts. Of course next-error is bound to something else Which would only go so far to recommend assigning M-g to next-error, perhaps? ;) Also, Jari mentioned this example: > Emacs is no substitute for all system tasks. It is a great companion, > but I believe only handful of people do _all_ from inside Emacs and > not ever open a single terminal. > > So, line numbers come from everywhere. You might be running 3-5 server > screen, shared samba mounts, then you see error in next screen and want > to view it in Emacs that contains the log file or configuration file ... > the needs are many. ...which complements what Juanma Barranquero wrote: > Some people, like me, doesn't do everything inside Emacs. I rarely, if > ever, use compile.el (I prefer to compile outside Emacs and search for > bugs the old way). Also, I compare sources with a visual tool and then > go to Emacs to edit, if needed. In these cases, M-x goto-line is very > useful (in fact, I bound it to H-S-left long time ago). I suggest you try "emacsclient -n +5 path/to/file" (of course, I've got the alias "ec" for "emacsclient"). If you're not working in Emacs all the time, this is a major gain -- you need not switch between windows or even workspaces while entering a line number, and you can look at it while you're typing it (with lots of numbers on the screen, I find it much easier to mechanically type, instead of trying to remember a number and enter it in Emacs directly). This way is much better -- terminal already has the right context (i.e. more suitable cwd), so you need not search the filename by full path in Emacs, or switch between buffers -- you've got all the data you need at your sight. (Of course, if the file is already opened in a buffer, emacsclient simply Does The Right Thing.) With all this, I rarely if ever need to use M-x goto-line. For those that are not willing to go the "better" path (of course, if it becomes a consensus that this is actually "better", I'm not insisting this is), they can always customize their keybindings. For "average joe", we want to make them learn the better way. With the examples you mentioned, it seems that you haven't made use of emacsclient so far; I recommend it, since it's been my $EDITOR for a long time. ;) [There's one catch to all this though: (server-start), required by emacsclient, is not run by default.] Cheers, Danilo