[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Interprogram yanking of text with read-only text property.
From: |
Luc Teirlinck |
Subject: |
Interprogram yanking of text with read-only text property. |
Date: |
Fri, 27 Sep 2002 23:02:05 -0500 (CDT) |
If one kills text with a read-only property in emacs-21.3.50, say an
ielm prompt, and tries to yank it into another application, then for
certain applications, say an xterm, things work fine, but for other
applications, for instance gnome-terminal, the yanking fails, while
emacs prints:
ctext-pre-write-conversion: Text is read-only.
The following patch to mule.el seems to fix the problem.
(I am not terribly familiar with mule.el, but I believe that binding
inhibit-read-only to t is OK, since all the converting seems to happen
in a special or temporary buffer.)
Note that mule is pre-loaded, so for the fix to work in a newly
started emacs, mule has to be reloaded.
Change log:
2002-09-27 Luc Teirlinck <address@hidden>
* mule.el (ctext-pre-write-conversion): Bind inhibit-read-only
to t.
Patch (diff made with -c and -b options):
===File ~/mule-diff=========================================
*** /usr/local/share/emacs/21.3.50/lisp/international/muleold.el Fri Sep
13 14:17:53 2002
--- /usr/local/share/emacs/21.3.50/lisp/international/mule.el Fri Sep 27
22:29:32 2002
***************
*** 1455,1460 ****
--- 1455,1461 ----
If FROM is a string, or if the current buffer is not the one set up for us
by run_pre_post_conversion_on_str, generate a new temp buffer, insert the
text, and convert it in the temporary buffer. Otherwise, convert in-place."
+ (let ((inhibit-read-only t))
(cond ((and (string= (buffer-name) " *code-converting-work*")
(not (stringp from)))
; Minimize consing due to subsequent
insertions and deletions.
***************
*** 1513,1519 ****
(goto-char newpt))))
(set-buffer-multibyte t)
;; Must return nil, as build_annotations_2 expects that.
! nil)
;;; FILE I/O
--- 1514,1520 ----
(goto-char newpt))))
(set-buffer-multibyte t)
;; Must return nil, as build_annotations_2 expects that.
! nil))
;;; FILE I/O
============================================================
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Interprogram yanking of text with read-only text property.,
Luc Teirlinck <=