[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
`insert' deactivates active region
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Thu, 07 Jul 2005 18:08:54 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 08264
Hi,
Please read and try the following Lisp code. In the *testing*
buffer, you may see you cannot activate the region by using
C-SPC and C-f, etc. Furthermore, M-w cannot be used to copy
text, either.
(let ((buffer (get-buffer-create "*testing*")))
(pop-to-buffer buffer)
(erase-buffer)
(insert "Hello World\n")
(goto-char (point-min))
(set (make-local-variable 'transient-mark-mode) t)
(add-hook 'post-command-hook
(lambda nil
(with-temp-buffer
(insert "foo")
))
nil t))
One of the ways to solve the problem I found is to remove the
`(insert "foo")' line. This problem occurs not only with Emacs
22, but also 21 and 20. A similar code is used in emacs-w3m and
we are discussing the solution which is effective on all Emacs
versions (there's already a promising solution).
Regards,