* delete whole word (ssh) @ 2008-10-06 14:14 Rafal Kurcz 2008-10-07 2:10 ` Xah 2008-10-07 16:11 ` Nikolaj Schumacher 0 siblings, 2 replies; 6+ messages in thread From: Rafal Kurcz @ 2008-10-06 14:14 UTC (permalink / raw) To: help-gnu-emacs Hello The backspace didn't work in emacs on ssh session. I put the following into my config file to use the backspace to delete 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. Thanks ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: delete whole word (ssh) 2008-10-06 14:14 delete whole word (ssh) Rafal Kurcz @ 2008-10-07 2:10 ` Xah 2008-10-07 15:18 ` Rafal Kurcz 2008-10-07 16:11 ` Nikolaj Schumacher 1 sibling, 1 reply; 6+ messages in thread From: Xah @ 2008-10-07 2:10 UTC (permalink / raw) To: help-gnu-emacs On Oct 6, 7:14 am, Rafal Kurcz <pawlac...@yahoo.com> 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 delete > 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-<backspace>") 'backward-kill-word) Xah ∑ http://xahlee.org/ ☄ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: delete whole word (ssh) 2008-10-07 2:10 ` Xah @ 2008-10-07 15:18 ` Rafal Kurcz 2008-10-07 15:42 ` Xah 0 siblings, 1 reply; 6+ messages in thread From: Rafal Kurcz @ 2008-10-07 15:18 UTC (permalink / raw) To: help-gnu-emacs On 7 Paź, 04:10, Xah <xah...@gmail.com> wrote: > On Oct 6, 7:14 am, Rafal Kurcz <pawlac...@yahoo.com> 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 delete > > 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-<backspace>") '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. Great thanks for help. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: delete whole word (ssh) 2008-10-07 15:18 ` Rafal Kurcz @ 2008-10-07 15:42 ` Xah 2008-10-08 13:34 ` Rafal Kurcz 0 siblings, 1 reply; 6+ messages in thread From: Xah @ 2008-10-07 15:42 UTC (permalink / raw) To: help-gnu-emacs On Oct 7, 8:18 am, Rafal Kurcz <pawlac...@yahoo.com> wrote: > On 7 Pa¼, 04:10,Xah<xah...@gmail.com> wrote: > > > > > On Oct 6, 7:14 am, Rafal Kurcz <pawlac...@yahoo.com> 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 delete > > > 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-<backspace>") '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 “Terminal‣Window Settings...” then the Keyboard tab, there's “Delete key sends backspace” checkbox. (Note: on Apple keyboard, the Delete key is the 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-<backspace>") '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 ∑ http://xahlee.org/ ☄ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: delete whole word (ssh) 2008-10-07 15:42 ` Xah @ 2008-10-08 13:34 ` Rafal Kurcz 0 siblings, 0 replies; 6+ messages in thread From: Rafal Kurcz @ 2008-10-08 13:34 UTC (permalink / raw) To: help-gnu-emacs On 7 Paź, 17:42, Xah <xah...@gmail.com> wrote: > On Oct 7, 8:18 am, Rafal Kurcz <pawlac...@yahoo.com> wrote: > > > > > On 7 Pa¼, 04:10,Xah<xah...@gmail.com> wrote: > > > > On Oct 6, 7:14 am, Rafal Kurcz <pawlac...@yahoo.com> 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 delete > > > > 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-<backspace>") '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 “Terminal‣Window > Settings...” then the Keyboard tab, there's “Delete key sends > backspace” checkbox. (Note: on Apple keyboard, the Delete key is the > 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 (seehttp://en.wikipedia.org/wiki/Termcap > )... > > Does (global-set-key (kbd "C-<backspace>") 'backward-kill-word) work? Unfortunately it does not 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. I'm using Gentoo Linux, xterm-235 and openssh-4.7_p1-r6. Esc-backspace works fine but ctrl-backspace does not work. Great THANSK to all of You for help. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: delete whole word (ssh) 2008-10-06 14:14 delete whole word (ssh) Rafal Kurcz 2008-10-07 2:10 ` Xah @ 2008-10-07 16:11 ` Nikolaj Schumacher 1 sibling, 0 replies; 6+ messages in thread From: Nikolaj Schumacher @ 2008-10-07 16:11 UTC (permalink / raw) To: Rafal Kurcz; +Cc: help-gnu-emacs Rafal Kurcz <pawlaczus@yahoo.com> wrote: > Unfortunately ctrl-backspace does not delete whole words but only one > character. I think that's the default behavior. Meta-backspace usually deletes whole words. > How can I force emacs to delete whole words on ssh session. I think that in a terminal Emacs can't distinguish between backspace and control-backspace. regards, Nikolaj Schumacher ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-10-08 13:34 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-10-06 14:14 delete whole word (ssh) Rafal Kurcz 2008-10-07 2:10 ` Xah 2008-10-07 15:18 ` Rafal Kurcz 2008-10-07 15:42 ` Xah 2008-10-08 13:34 ` Rafal Kurcz 2008-10-07 16:11 ` Nikolaj Schumacher
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).