From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: key map entry for shift-return? Date: Thu, 9 Jul 2009 10:56:15 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <961bb7e9-56d4-40d5-b0dc-4c15e0da722b@x25g2000prf.googlegroups.com> <878wiykk2r.fsf@catnip.gol.com> <1648be38-5e41-4d7b-98d8-1f6e6494d2a2@g7g2000prg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1247198581 13962 80.91.229.12 (10 Jul 2009 04:03:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Jul 2009 04:03:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 10 06:02:54 2009 Return-path: Envelope-to: geh-help-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 1MP7K1-0002EZ-Vu for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Jul 2009 06:02:54 +0200 Original-Received: from localhost ([127.0.0.1]:44133 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MP7K1-0005Do-Gh for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Jul 2009 00:02:53 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!y10g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 65 Original-NNTP-Posting-Host: 76.102.12.87 Original-X-Trace: posting.google.com 1247162175 3576 127.0.0.1 (9 Jul 2009 17:56:15 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 9 Jul 2009 17:56:15 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y10g2000prf.googlegroups.com; posting-host=76.102.12.87; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.33 Safari/530.5, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:170703 comp.emacs:98373 X-Mailman-Approved-At: Fri, 10 Jul 2009 00:00:59 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:65920 Archived-At: On Jul 9, 10:21 am, des...@verizon.net wrote: > Xah Lee writes: > > On Jul 9, 7:27 am, Miles Bader wrote: > >> Alan Mackenzie writes: > >> > Hey, stop being so enigmatic! I think the OP only wants Shift Retur= n > >> > for his own use, which should be OK. So please tell him (and me) wh= at > >> > this other complexity is. > > >> He's just looking for an excuse to flog his screeds... > > > Well, perhaps just a sentence or two to answer Alan. > > > Basically, for good or bad, emacs does not capture the key by itself, > > but goes thru ascii representation in its implementation... my > > phrasing here is not exactl but don't want to spend too much time > > writing this. Basically, the end result is that when people want to > > map keys like Tab, Return, or with modifiers, it has many > > complexities. Many threads asked or discussed these in the past year > > or two here.... another example comes to mind is that emacs is unable > > to capture Ctrl+Shift+key combos in terminal. Perhaps historically > > justifiable... but today's apps that goes thru network don't have this > > limitation... > > I'm not sure what this is all about, I never saw the original post. > But binding something to shift return doesn't seem to be a big problem. > Try evaling this: > > (define-key global-map [(S-return)] 'compile) > > It works for me. > > I don't expect it would work in a TTY, but that's an issue with the TTY > not emacs. For some TTY programs even that can be fixed. Yes. That touches the point. here's a example to illustarte what i was saying: Try: (define-key global-map (kbd "RET") 'forward-word) now press Ctrl+m, you see that it also does forward-word. To a emacs geek, perhaps this is natural, however, to any average programer or logically, pressing Return key certainly is not the same as pressing Ctrl+m. This is what i was saying about keybindings involving Return, Tab (and few others) has some rather unexpected complexities in emacs, and, i was saying, these complexities has to do with how emacs implemented the key capture, and i was saying that in modern apps, usually they don't have this problem. emacs being a old app, is what it is. I'm trying to communicate a few facts here as mentioned by this thread. This emacs issue, certainly is not optimal. I don't know if it is worthy a fix. But i feel it should be known. Xah =E2=88=91 http://xahlee.org/ =E2=98=84