* Re: 23.0.60; A combination of PC Selection, Visual Lines and emacsclient redefines C-backspace
@ 2009-01-20 3:40 Chong Yidong
2009-01-20 16:18 ` Dan Nicolaescu
2009-01-20 16:18 ` Dan Nicolaescu
0 siblings, 2 replies; 9+ messages in thread
From: Chong Yidong @ 2009-01-20 3:40 UTC (permalink / raw)
To: emacs-devel; +Cc: pent, rfrancoise, 1960
Simplified recipe for bug#1960:
1. Put (pc-selection-mode 1) in .emacs
2. emacs --daemon
3. emacsclient -c
4. C-h k C-backspace
<C-backspace> runs the command kill-line, which is an interactive
compiled Lisp function in `simple.el'.
5. C-x C-c
6. emacsclient -c
7. C-h k C-backspace
<C-backspace> runs the command backward-kill-word, which is an
interactive compiled Lisp function in `simple.el'.
PC-selection mode binds [C-delete] to kill-line. My guess is that some
code for distinguishing delete from DEL isn't run when Emacs is started
as a daemon. It's only run sometime after the first client frame is
created, which is why C-backspace works properly for the second client
frame.
Could someone take a closer look?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: 23.0.60; A combination of PC Selection, Visual Lines and emacsclient redefines C-backspace
2009-01-20 3:40 23.0.60; A combination of PC Selection, Visual Lines and emacsclient redefines C-backspace Chong Yidong
@ 2009-01-20 16:18 ` Dan Nicolaescu
2009-01-21 16:02 ` Chong Yidong
2009-01-21 16:02 ` bug#1960: " Chong Yidong
2009-01-20 16:18 ` Dan Nicolaescu
1 sibling, 2 replies; 9+ messages in thread
From: Dan Nicolaescu @ 2009-01-20 16:18 UTC (permalink / raw)
To: Chong Yidong; +Cc: pent, rfrancoise, 1960, emacs-devel
Chong Yidong <cyd@stupidchicken.com> writes:
> Simplified recipe for bug#1960:
>
> 1. Put (pc-selection-mode 1) in .emacs
> 2. emacs --daemon
> 3. emacsclient -c
> 4. C-h k C-backspace
>
> <C-backspace> runs the command kill-line, which is an interactive
> compiled Lisp function in `simple.el'.
>
> 5. C-x C-c
> 6. emacsclient -c
> 7. C-h k C-backspace
>
> <C-backspace> runs the command backward-kill-word, which is an
> interactive compiled Lisp function in `simple.el'.
What happens when repeating steps 5,6 and 7?
I am guessing that the <C-backspace> binding would toggle between
kill-line and backward-kill-word.
If that's indeed the case, then there's probably some problem with
pc-selection-mode and the way it interacts with
normal-erase-is-backspace.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: 23.0.60; A combination of PC Selection, Visual Lines and emacsclient redefines C-backspace
2009-01-20 16:18 ` Dan Nicolaescu
@ 2009-01-21 16:02 ` Chong Yidong
2009-01-22 6:21 ` bug#1960: " Dan Nicolaescu
2009-01-22 6:21 ` Dan Nicolaescu
2009-01-21 16:02 ` bug#1960: " Chong Yidong
1 sibling, 2 replies; 9+ messages in thread
From: Chong Yidong @ 2009-01-21 16:02 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: pent, rfrancoise, 1960, emacs-devel
Dan Nicolaescu <dann@tensilica.com> writes:
> there's probably some problem with pc-selection-mode and the way it
> interacts with normal-erase-is-backspace.
The problem is not pc-selection mode, but how Emacs does
normal-erase-is-backspace in multi-tty situations. Here's an even
simpler recipe, not involving pc-selection-mode or the daemon:
1. Add the following line to .emacs:
(global-set-key [C-delete] 'kill-line)
2. emacs -nw -f server-start
3. emacsclient -c
4. C-h k C-backspace
=> <C-backspace> runs the command kill-line
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#1960: 23.0.60; A combination of PC Selection, Visual Lines and emacsclient redefines C-backspace
2009-01-21 16:02 ` Chong Yidong
@ 2009-01-22 6:21 ` Dan Nicolaescu
2009-01-22 6:21 ` Dan Nicolaescu
1 sibling, 0 replies; 9+ messages in thread
From: Dan Nicolaescu @ 2009-01-22 6:21 UTC (permalink / raw)
To: Chong Yidong; +Cc: pent, rfrancoise, 1960, emacs-devel
> > there's probably some problem with pc-selection-mode and the way it
> > interacts with normal-erase-is-backspace.
>
> The problem is not pc-selection mode, but how Emacs does
> normal-erase-is-backspace in multi-tty situations. Here's an even
> simpler recipe, not involving pc-selection-mode or the daemon:
>
> 1. Add the following line to .emacs:
>
> (global-set-key [C-delete] 'kill-line)
>
> 2. emacs -nw -f server-start
> 3. emacsclient -c
> 4. C-h k C-backspace
>
> => <C-backspace> runs the command kill-line
This happens because:
(defun normal-erase-is-backspace-setup-frame (&optional frame)
"Set up `normal-erase-is-backspace-mode' on FRAME, if necessary."
(unless frame (setq frame (selected-frame)))
(unless (terminal-parameter nil 'normal-erase-is-backspace)
(normal-erase-is-backspace-mode
(if (if (eq normal-erase-is-backspace 'maybe)
When using "emacs -nw -f server-start" the "(unless (terminal-parameter"
test passes and `normal-erase-is-backspace' is run.
When using "emacs -f server-start" the `terminal-parameter' call returns
non-ni, so `normal-erase-is-backspace' is not run.
It seems that terminal-parameters are copied from the first frame
created...
Not sure how normal-erase-is-backspace is supposed to work...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: 23.0.60; A combination of PC Selection, Visual Lines and emacsclient redefines C-backspace
2009-01-21 16:02 ` Chong Yidong
2009-01-22 6:21 ` bug#1960: " Dan Nicolaescu
@ 2009-01-22 6:21 ` Dan Nicolaescu
1 sibling, 0 replies; 9+ messages in thread
From: Dan Nicolaescu @ 2009-01-22 6:21 UTC (permalink / raw)
To: Chong Yidong; +Cc: pent, rfrancoise, 1960, emacs-devel
> > there's probably some problem with pc-selection-mode and the way it
> > interacts with normal-erase-is-backspace.
>
> The problem is not pc-selection mode, but how Emacs does
> normal-erase-is-backspace in multi-tty situations. Here's an even
> simpler recipe, not involving pc-selection-mode or the daemon:
>
> 1. Add the following line to .emacs:
>
> (global-set-key [C-delete] 'kill-line)
>
> 2. emacs -nw -f server-start
> 3. emacsclient -c
> 4. C-h k C-backspace
>
> => <C-backspace> runs the command kill-line
This happens because:
(defun normal-erase-is-backspace-setup-frame (&optional frame)
"Set up `normal-erase-is-backspace-mode' on FRAME, if necessary."
(unless frame (setq frame (selected-frame)))
(unless (terminal-parameter nil 'normal-erase-is-backspace)
(normal-erase-is-backspace-mode
(if (if (eq normal-erase-is-backspace 'maybe)
When using "emacs -nw -f server-start" the "(unless (terminal-parameter"
test passes and `normal-erase-is-backspace' is run.
When using "emacs -f server-start" the `terminal-parameter' call returns
non-ni, so `normal-erase-is-backspace' is not run.
It seems that terminal-parameters are copied from the first frame
created...
Not sure how normal-erase-is-backspace is supposed to work...
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#1960: 23.0.60; A combination of PC Selection, Visual Lines and emacsclient redefines C-backspace
2009-01-20 16:18 ` Dan Nicolaescu
2009-01-21 16:02 ` Chong Yidong
@ 2009-01-21 16:02 ` Chong Yidong
1 sibling, 0 replies; 9+ messages in thread
From: Chong Yidong @ 2009-01-21 16:02 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: pent, rfrancoise, 1960, emacs-devel
Dan Nicolaescu <dann@tensilica.com> writes:
> there's probably some problem with pc-selection-mode and the way it
> interacts with normal-erase-is-backspace.
The problem is not pc-selection mode, but how Emacs does
normal-erase-is-backspace in multi-tty situations. Here's an even
simpler recipe, not involving pc-selection-mode or the daemon:
1. Add the following line to .emacs:
(global-set-key [C-delete] 'kill-line)
2. emacs -nw -f server-start
3. emacsclient -c
4. C-h k C-backspace
=> <C-backspace> runs the command kill-line
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#1960: 23.0.60; A combination of PC Selection, Visual Lines and emacsclient redefines C-backspace
2009-01-20 3:40 23.0.60; A combination of PC Selection, Visual Lines and emacsclient redefines C-backspace Chong Yidong
2009-01-20 16:18 ` Dan Nicolaescu
@ 2009-01-20 16:18 ` Dan Nicolaescu
1 sibling, 0 replies; 9+ messages in thread
From: Dan Nicolaescu @ 2009-01-20 16:18 UTC (permalink / raw)
To: Chong Yidong; +Cc: pent, rfrancoise, 1960, emacs-devel
Chong Yidong <cyd@stupidchicken.com> writes:
> Simplified recipe for bug#1960:
>
> 1. Put (pc-selection-mode 1) in .emacs
> 2. emacs --daemon
> 3. emacsclient -c
> 4. C-h k C-backspace
>
> <C-backspace> runs the command kill-line, which is an interactive
> compiled Lisp function in `simple.el'.
>
> 5. C-x C-c
> 6. emacsclient -c
> 7. C-h k C-backspace
>
> <C-backspace> runs the command backward-kill-word, which is an
> interactive compiled Lisp function in `simple.el'.
What happens when repeating steps 5,6 and 7?
I am guessing that the <C-backspace> binding would toggle between
kill-line and backward-kill-word.
If that's indeed the case, then there's probably some problem with
pc-selection-mode and the way it interacts with
normal-erase-is-backspace.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#1960: 23.0.60; A combination of PC Selection, Visual Lines and emacsclient redefines C-backspace
@ 2009-01-20 3:40 Chong Yidong
0 siblings, 0 replies; 9+ messages in thread
From: Chong Yidong @ 2009-01-20 3:40 UTC (permalink / raw)
To: emacs-devel; +Cc: pent, rfrancoise, 1960
Simplified recipe for bug#1960:
1. Put (pc-selection-mode 1) in .emacs
2. emacs --daemon
3. emacsclient -c
4. C-h k C-backspace
<C-backspace> runs the command kill-line, which is an interactive
compiled Lisp function in `simple.el'.
5. C-x C-c
6. emacsclient -c
7. C-h k C-backspace
<C-backspace> runs the command backward-kill-word, which is an
interactive compiled Lisp function in `simple.el'.
PC-selection mode binds [C-delete] to kill-line. My guess is that some
code for distinguishing delete from DEL isn't run when Emacs is started
as a daemon. It's only run sometime after the first client frame is
created, which is why C-backspace works properly for the second client
frame.
Could someone take a closer look?
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#1960: 23.0.60; A combination of PC Selection, Visual Lines and emacsclient redefines C-backspace
@ 2009-01-19 21:22 pent
0 siblings, 0 replies; 9+ messages in thread
From: pent @ 2009-01-19 21:22 UTC (permalink / raw)
To: emacs-pretest-bug; +Cc: rfrancoise
1) Run emacs
2) Hit C-h k C-backspace
It replies (expected):
<C-backspace> runs the command backward-kill-word, which is an
interactive compiled Lisp function.
It is bound to <C-backspace>.
(backward-kill-word arg)
Kill characters backward until encountering the beginning of a word.
With argument arg, do this that many times.
3) Exit emacs
4) Run emacs --daemon
5) Run emacsclient -c
6) Hit C-h k C-backspace
It tells (unexpected):
<C-backspace> runs the command kill-visual-line, which is an
interactive compiled Lisp function.
It is bound to <deleteline>, <C-backspace>, C-k.
(kill-visual-line &optional arg)
Kill the rest of the visual line.
If there are only whitespace characters there, kill through the
newline as well.
...
The problem is not reproduced with emacs -Q. However, I could trace
down the problematic line in my .emacs (see listing below). The
problem is triggered by '(pc-selection-mode t) statement.
Please note that *do* like the [other] effects of PC Selection and
Visual Lines modes and I've turned them on on purpose.
My .emacs customizations:
;; --- Customized ---
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(TeX-PDF-mode t)
'(TeX-output-view-style (quote (("^dvi$" ("^landscape$" "^pstricks$\\|^pst-\\|^psfrag$") "%(o?)dvips -t landscape %d -o && gv %f") ("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$" "%(o?)dvips %d -o && gv %f") ("^dvi$" ("^\\(?:a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4\\)$" "^landscape$") "%(o?)xdvi %dS -paper a4r -s 0 %d") ("^dvi$" "^\\(?:a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4\\)$" "%(o?)xdvi %dS -paper a4 %d") ("^dvi$" ("^\\(?:a5\\(?:comb\\|paper\\)\\)$" "^landscape$") "%(o?)xdvi %dS -paper a5r -s 0 %d") ("^dvi$" "^\\(?:a5\\(?:comb\\|paper\\)\\)$" "%(o?)xdvi %dS -paper a5 %d") ("^dvi$" "^b5paper$" "%(o?)xdvi %dS -paper b5 %d") ("^dvi$" "^letterpaper$" "%(o?)xdvi %dS -paper us %d") ("^dvi$" "^legalpaper$" "%(o?)xdvi %dS -paper legal %d") ("^dvi$" "^executivepaper$" "%(o?)xdvi %dS -paper 7.25x10.5in
%d") ("^dvi$" "." "%(o?)xdvi %dS %d") ("^pdf$" "." "evince %o") ("^html?$" "." "firefox %o"))))
'(TeX-save-query nil)
'(case-fold-search t)
'(column-number-mode t)
'(csv-align-style (quote right))
'(current-language-environment "UTF-8")
'(debian-bug-From-address "Andrey <cmr.Pent@gmail.com>")
'(debian-bug-use-From-address t)
'(dictionary-create-buttons nil)
'(dictionary-default-dictionary "ru-en--en-ru")
'(dictionary-server "dict.dvo.ru")
'(dired-listing-switches "-l --group-directories-first")
'(ediff-split-window-function (quote split-window-horizontally))
'(ediff-window-setup-function (quote ediff-setup-windows-plain))
'(global-visual-line-mode t)
'(gnus-select-method (quote (nntp "news.gmane.org")))
'(ibuffer-enable t)
'(ibuffer-never-show-predicates (quote ("^\\*.*")) nil (ibuf-ext))
'(kill-whole-line t)
'(list-directory-brief-switches "-CF --group-directories-first")
'(list-directory-verbose-switches "-l --group-directories-first")
'(mouse-wheel-mode t)
'(org-insert-mode-line-in-empty-file t)
'(pc-selection-mode t)
'(scroll-conservatively 50)
'(scroll-margin 5)
'(scroll-preserve-screen-position t)
'(show-paren-mode t)
'(svn-status-default-export-directory "~/study")
'(svn-status-preserve-window-configuration t)
'(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
'(tool-bar-mode nil)
'(truncate-lines t)
'(use-dialog-box nil)
'(w3m-coding-system (quote utf-8))
'(w3m-default-coding-system (quote utf-8))
'(w3m-file-coding-system (quote utf-8))
'(w3m-file-name-coding-system (quote utf-8))
'(w3m-terminal-coding-system (quote utf-8))
'(w3m-use-cookies t)
'(x-select-enable-clipboard t)
'(x-select-request-type (quote UTF8_STRING) t))
I'm ready to provide any additional info,
Andrey
In GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11)
of 2009-01-18 on elegiac, modified by Debian
(emacs-snapshot package, version 1:20090118-1)
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.60/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ru_RU.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
delete-selection-mode: t
show-paren-mode: t
pc-selection-mode: t
shell-dirtrack-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
global-visual-line-mode: t
visual-line-mode: t
transient-mark-mode: t
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-01-22 6:21 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20 3:40 23.0.60; A combination of PC Selection, Visual Lines and emacsclient redefines C-backspace Chong Yidong
2009-01-20 16:18 ` Dan Nicolaescu
2009-01-21 16:02 ` Chong Yidong
2009-01-22 6:21 ` bug#1960: " Dan Nicolaescu
2009-01-22 6:21 ` Dan Nicolaescu
2009-01-21 16:02 ` bug#1960: " Chong Yidong
2009-01-20 16:18 ` Dan Nicolaescu
-- strict thread matches above, loose matches on Subject: below --
2009-01-20 3:40 Chong Yidong
2009-01-19 21:22 pent
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.