From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: delete whole word (ssh) Date: Tue, 7 Oct 2008 08:42:50 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <29e46491-2388-4a4c-94f9-08faede555dd@k36g2000pri.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 1223397720 19770 80.91.229.12 (7 Oct 2008 16:42:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Oct 2008 16:42:00 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 07 18:42:56 2008 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 1KnFdp-0003lb-Cq for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Oct 2008 18:42:33 +0200 Original-Received: from localhost ([127.0.0.1]:52106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnFcl-0007Nf-RS for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Oct 2008 12:41:27 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!a2g2000prm.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 75 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1223394170 5652 127.0.0.1 (7 Oct 2008 15:42:50 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 7 Oct 2008 15:42:50 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a2g2000prm.googlegroups.com; posting-host=24.6.185.159; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:163143 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:58490 Archived-At: On Oct 7, 8:18 am, Rafal Kurcz wrote: > On 7 Pa=C2=BC, 04:10,Xah wrote: > > > > > On Oct 6, 7:14 am, Rafal Kurcz wrote: > > > > Hello > > > > The backspace didn't work in emacs on ssh session. > > > I put the following into my config file to use the backspace to delet= e > > > the character at the left side of a cursor: > > > > (keyboard-translate ?\C-h ?\C-?) > > > or > > > (global-set-key "\C-h" 'backward-delete-char) > > > > Unfortunately ctrl-backspace does not delete whole words but only one > > > character. > > > How can I force emacs to delete whole words on ssh session. > > > (1) are you using emacs in X-Windows, then running ssh within M-x > > term? > > > (2) Or, are you using a terminal app in X-windws, ssh to remote > > server, then launching emacs in the remote server? > > > The answer depends. For (2), it's likely your term app has a > > preference setting to that tells it what signal to send for the the > > backspace key. > > > For (1) it's a bit complex... perhaps you can just try this: > > > (global-set-key (kbd "C-") 'backward-kill-word) > > I am using the (2) option it is using ssh to connect to a remote > server and then launch emacs on it. > Could you give me more indications of how to solve this problem. I haven't been using X term on Linux/Unixes for few years... but my experiences on over a decade use of many terminal emulators on the Mac and Windows is that the app itself will have a preference setting where you can set what char code the Backspace key sends. What exactly the option is depends on the term app and often the option is not intuitive... that may go by several names or as config file... For example, on OS X 10.4.x's Terminal app, go to =E2=80=9CTerminal=E2=80= =A3Window Settings...=E2=80=9D then the Keyboard tab, there's =E2=80=9CDelete key sen= ds backspace=E2=80=9D checkbox. (Note: on Apple keyboard, the Delete key is th= e name for the Backspace key on the PC keybords... to compliate the issue, there's also the Delete key (aka Del) in the group of Home/End block.) I think you will need to give exactly which terminal emulation app and the exact OS for people to be more helpful. Also, as far as my experience goes this issue is rather complex... because even without connecting to remote server, but just using a terminal emulation such as unix shell, the backspace behavior also depends on your termcap settings (see http://en.wikipedia.org/wiki/Termcap )... Does (global-set-key (kbd "C-") 'backward-kill-word) work? so, i'd say give exact info on the OS, term app u are using... maybe people familiar with your setting can give more help. Xah =E2=88=91 http://xahlee.org/ =E2=98=84