Package: emacs;
Reported by: Richard Stanton <stanton <at> haas.berkeley.edu>
Date: Wed, 2 May 2012 20:35:01 UTC
Severity: normal
Found in version 24.0.96
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11394 in the body.
You can then email your comments to 11394 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-gnu-emacs <at> gnu.org
:bug#11394
; Package emacs
.
(Wed, 02 May 2012 20:35:01 GMT) Full text and rfc822 format available.Richard Stanton <stanton <at> haas.berkeley.edu>
:bug-gnu-emacs <at> gnu.org
.
(Wed, 02 May 2012 20:35:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Richard Stanton <stanton <at> haas.berkeley.edu> To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org> Subject: 24.0.96; Sporadic pasting problem Date: Wed, 2 May 2012 13:32:35 -0700
This bug report will be sent to the Bug-GNU-Emacs mailing list and the GNU bug tracker at debbugs.gnu.org. Please check that the From: line contains a valid email address. After a delay of up to one day, you should receive an acknowledgement at that address. Please write in English if possible, as the Emacs maintainers usually do not have translators for other languages. Please describe exactly what actions triggered the bug, and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': I've been using Emacs with org-mode quite a lot over the last 24 hours to edit a file that will turn into a Beamer presentation. During the course of this editing, I've several times had the problem that when cutting and pasting text, when I press C-y, instead of doing what I ask, I get a message in the minibuffer telling me something like Quit: pasteboard doesn't contain valid data At this point, I seem to be completely unable to retrieve the text I had previously cut. To try and find out more, I have debug-on-error set to t, but Emacs doesn't enter the debugger when I press C-y; it just gives me that not very useful error message. This doesn't happen anywhere close to 100% of the time, and I have no way to recreate the problem systematically, but it happened probably 4 or 5 times during the last 24 hours. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /Applications/Emacs.app/Contents/Resources/etc/DEBUG. In GNU Emacs 24.0.96.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2012-04-27 on bob.porkrind.org Windowing system distributor `Apple', version 10.3.1138 Configured using: `configure '--host=x86_64-apple-darwin' '--build=i686-apple-darwin' '--with-ns' 'build_alias=i686-apple-darwin' 'host_alias=x86_64-apple-darwin' 'CC=gcc -mmacosx-version-min=10.5'' 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: nil value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: Org Minor modes in effect: TeX-PDF-mode: t TeX-source-correlate-mode: t display-time-mode: t shell-dirtrack-mode: t org-beamer-mode: t diff-auto-refine-mode: t recentf-mode: t ido-everywhere: 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 blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t visual-line-mode: t transient-mark-mode: t abbrev-mode: t Recent input: C-x C-s C-c C-e p C-c C-e d <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <right> <right> <right> 1 <backspace> C-a C-k C-y C-k C-y <down> <up> C-k C-k C-y C-@ <down> M-w C-y C-y C-y C-y C-y <down> <down> C-@ <down> <down> <down> C-k <up> <up> <up> C-k C-y C-k C-y <down> <down> <down> <down> C-k C-y C-k C-y <up> C-k C-y <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> C-k C-k C-k C-k <down> <down> <return> <return> <up> C-y C-x C-s C-c C-e p <down-mouse-1> <mouse-1> C-a C-e <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> <left> C-a C-k C-y <C-return> C-y <C-return> C-y <C-return> C-y <C-return> C-y <C-return> C-y <C-return> C-y <C-return> C-y <C-return> C-y <C-return> C-y <C-return> C-y <C-return> C-y <C-return> C-y <C-return> C-y <C-return> C-y C-x C-s <down-mouse-1> <mouse-1> M-x o r g - v e r SPC <return> C-x b * M e s <return> <down-mouse-1> <mouse-movement> <mouse-movement> <mouse-movement> <mouse-movement> <drag-mouse-1> M-c C-a C-k C-y <down-mouse-1> <mouse-1> C-x b <return> C-a <up> C-@ <down> <down> <down> <down> M-w <C-end> <return> C-y <down-mouse-1> <mouse-1> M-x e m a c s - b u g SPC <help-echo> <down-mouse-1> <mouse-1> <backspace> <backspace> <backspace> <backspace> <backspace> <backspace> <backspace> <backspace> <backspace> <backspace> <backspace> <backspace> <backspace> r e p o r t SPC SPC SPC <return> Recent messages: Wrote /Users/stanton/reviews/Stanford/ttt.tex LaTeX export done, pushed to kill ring and clipboard Processing LaTeX file /Users/stanton/reviews/Stanford/ttt.tex...done Exporting to PDF...done Mark set [15 times] Saving file /Users/stanton/reviews/Stanford/ttt.org... Wrote /Users/stanton/reviews/Stanford/ttt.org Org-mode version 7.8.09 (release_7.8.09-482-gf47915 @ /Applications/Emacs.app/Contents/Resources/site-lisp/org-mode/lisp/org-inst all.el) Mark set [4 times] delete-backward-char: Text is read-only [4 times] Load-path shadows: /Applications/Emacs.app/Contents/Resources/site-lisp/Pymacs-0.23/pymacs hides /Applications/Emacs.app/Contents/Resources/site-lisp/python-mode/pymacs /Applications/Emacs.app/Contents/Resources/site-lisp/dvc/lisp/ewoc hides /Applications/Emacs.app/Contents/Resources/site-lisp/dvc/lisp/contrib/ewoc /Applications/Emacs.app/Contents/Resources/site-lisp/org-mode/.dir-locals hides /Applications/Emacs.app/Contents/Resources/lisp/gnus/.dir-locals /Applications/Emacs.app/Contents/Resources/site-lisp/dvc/lisp/ewoc hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/ewoc Features: (shadow sort gnus-util mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader tabify reftex-vcr reftex-dcr bib-cite flyspell ispell preview prv-emacs tex-buf font-latex latex tex-style tex latexenc help-mode view vc-hg vc-bzr bzr-dvc tla smerge-mode newcomment dvc-state dvc-config diff tla-gnus dvc-gnus dvc-cmenu dvc-about dvc-version bzr dvc-annotate dvc-revlist dvc-diff dvc-fileinfo bzr-core tla-core pp tla-autoconf tla-defs dvc-log vc vc-dispatcher dvc-unified dvc-tips dired-x dired ffap ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff xdarcs-core xgit-core xhg-core xmtn-minimal reftex-parse reftex reftex-vars org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-info org-gnus org-docview org-bibtex bibtex org-bbdb time cus-start cus-load python-mode skeleton derived rx shell compile org-latex org-export-latex org-beamer org-exp ob-exp org-exp-blocks org-agenda footnote ob-C cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ob-perl ob-R ob-python org byte-opt warnings bytecomp byte-compile cconv macroexp ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys ob ob-eval org-pcomplete pcomplete comint ansi-color org-list org-faces org-compat org-entities org-macs noutline outline format-spec find-func cal-menu calendar cal-loaddefs org-install preview-latex tex-site auto-loads server dvc-autoloads dvc-core dvc-lisp dvc-buffers dvc-ui dvc-register dvc-utils dvc-emacs ewoc dvc-defs dvc-site magit-bisect magit-key-mode assoc magit diff-mode log-edit easy-mmode ring pcvs-util add-log color-theme edmacro kmacro cl sendmail regexp-opt rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils reporter package tabulated-list recentf tree-widget wid-edit uniquify advice help-fns advice-preload ido info easymenu time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs)
bug-gnu-emacs <at> gnu.org
:bug#11394
; Package emacs,ns
.
(Thu, 03 May 2012 02:05:02 GMT) Full text and rfc822 format available.Message #8 received at 11394 <at> debbugs.gnu.org (full text, mbox):
From: Chong Yidong <cyd <at> gnu.org> To: Richard Stanton <stanton <at> haas.berkeley.edu> Cc: 11394 <at> debbugs.gnu.org Subject: Re: bug#11394: 24.0.96; Sporadic pasting problem Date: Thu, 03 May 2012 10:02:53 +0800
Richard Stanton <stanton <at> haas.berkeley.edu> writes: > I've been using Emacs with org-mode quite a lot over the last 24 hours > to edit a file that will turn into a Beamer presentation. During the > course of this editing, I've several times had the problem that when > cutting and pasting text, when I press C-y, instead of doing what I ask, I > get a > message in the minibuffer telling me something like > > Quit: pasteboard doesn't contain valid data My suspicion is the fix for Bug#11315 (revno 107896 on emacs-24 branch). Please recompile with the following patch (which reverts the above fix) and see if the problem goes away. === modified file 'lisp/select.el' *** lisp/select.el 2012-04-24 05:34:50 +0000 --- lisp/select.el 2012-05-03 01:42:31 +0000 *************** *** 213,237 **** (defun xselect--int-to-cons (n) (cons (ash n -16) (logand n 65535))) ! (defun xselect--encode-string (type str &optional can-modify) ! (when str ! ;; If TYPE is nil, this is a local request; return STR as-is. ! (if (null type) ! str ! ;; Otherwise, encode STR. ! (let ((coding (or next-selection-coding-system ! selection-coding-system))) (if coding (setq coding (coding-system-base coding))) (let ((inhibit-read-only t)) ;; Suppress producing escape sequences for compositions. - ;; But avoid modifying the string if it's a buffer name etc. - (unless can-modify (setq str (substring str 0))) (remove-text-properties 0 (length str) '(composition nil) str) - ;; TEXT is a polymorphic target. Select the actual type - ;; from `UTF8_STRING', `COMPOUND_TEXT', `STRING', and - ;; `C_STRING'. (if (eq type 'TEXT) (if (not (multibyte-string-p str)) (setq type 'C_STRING) (let (non-latin-1 non-unicode eight-bit) --- 213,242 ---- (defun xselect--int-to-cons (n) (cons (ash n -16) (logand n 65535))) ! (defun xselect-convert-to-string (_selection type value) ! (let (str coding) ! ;; Get the actual string from VALUE. ! (cond ((stringp value) ! (setq str value)) ! ((setq value (xselect--selection-bounds value)) ! (with-current-buffer (nth 2 value) ! (setq str (buffer-substring (nth 0 value) ! (nth 1 value)))))) ! (when str ! ;; If TYPE is nil, this is a local request, thus return STR as ! ;; is. Otherwise, encode STR. ! (if (not type) ! str ! (setq coding (or next-selection-coding-system selection-coding-system)) (if coding (setq coding (coding-system-base coding))) (let ((inhibit-read-only t)) ;; Suppress producing escape sequences for compositions. (remove-text-properties 0 (length str) '(composition nil) str) (if (eq type 'TEXT) + ;; TEXT is a polymorphic target. We must select the + ;; actual type from `UTF8_STRING', `COMPOUND_TEXT', + ;; `STRING', and `C_STRING'. (if (not (multibyte-string-p str)) (setq type 'C_STRING) (let (non-latin-1 non-unicode eight-bit) *************** *** 274,287 **** (setq next-selection-coding-system nil) (cons type str)))) - (defun xselect-convert-to-string (_selection type value) - (let ((str (cond ((stringp value) value) - ((setq value (xselect--selection-bounds value)) - (with-current-buffer (nth 2 value) - (buffer-substring (nth 0 value) - (nth 1 value))))))) - (xselect--encode-string type str t))) - (defun xselect-convert-to-length (_selection _type value) (let ((len (cond ((stringp value) (length value)) --- 279,284 ---- *************** *** 314,320 **** (defun xselect-convert-to-filename (_selection _type value) (when (setq value (xselect--selection-bounds value)) ! (xselect--encode-string 'TEXT (buffer-file-name (nth 2 value))))) (defun xselect-convert-to-charpos (_selection _type value) (when (setq value (xselect--selection-bounds value)) --- 311,317 ---- (defun xselect-convert-to-filename (_selection _type value) (when (setq value (xselect--selection-bounds value)) ! (buffer-file-name (nth 2 value)))) (defun xselect-convert-to-charpos (_selection _type value) (when (setq value (xselect--selection-bounds value)) *************** *** 340,352 **** (xselect--int-to-cons (max beg end)))))))) (defun xselect-convert-to-os (_selection _type _size) ! (xselect--encode-string 'TEXT (symbol-name system-type))) (defun xselect-convert-to-host (_selection _type _size) ! (xselect--encode-string 'TEXT (system-name))) (defun xselect-convert-to-user (_selection _type _size) ! (xselect--encode-string 'TEXT (user-full-name))) (defun xselect-convert-to-class (_selection _type _size) "Convert selection to class. --- 337,349 ---- (xselect--int-to-cons (max beg end)))))))) (defun xselect-convert-to-os (_selection _type _size) ! (symbol-name system-type)) (defun xselect-convert-to-host (_selection _type _size) ! (system-name)) (defun xselect-convert-to-user (_selection _type _size) ! (user-full-name)) (defun xselect-convert-to-class (_selection _type _size) "Convert selection to class.
bug-gnu-emacs <at> gnu.org
:bug#11394
; Package emacs,ns
.
(Thu, 03 May 2012 03:23:02 GMT) Full text and rfc822 format available.Message #11 received at 11394 <at> debbugs.gnu.org (full text, mbox):
From: Chong Yidong <cyd <at> gnu.org> To: Richard Stanton <stanton <at> haas.berkeley.edu> Cc: 11394 <at> debbugs.gnu.org Subject: Re: bug#11394: 24.0.96; Sporadic pasting problem Date: Thu, 03 May 2012 11:18:06 +0800
> Richard Stanton <stanton <at> haas.berkeley.edu> writes: > >> I've been using Emacs with org-mode quite a lot over the last 24 >> hours to edit a file that will turn into a Beamer >> presentation. During the course of this editing, I've several times >> had the problem that when cutting and pasting text, when I press C-y, >> instead of doing what I ask, I get a message in the minibuffer >> telling me something like >> >> Quit: pasteboard doesn't contain valid data > > My suspicion is the fix for Bug#11315 (revno 107896 on emacs-24 branch). OK, I think I know where the problem lies. Here are two things I'd like you to try before using the patch I posted in my earlier message (which just reverts select.el to an earlier version). 1. Try a bit to reproduce this (in an unpatched version of the pretest), by copying and pasting non-ASCII text like some of the text in the HELLO buffer displayed by C-h H. If you can reproduce the problem, that is much more convenient than waiting for the problem to occur sporadically. 2. Please apply the following patch and see if the problem goes away. Please try my earlier patch instead (the one which reverts to an earlier version) only if the problem still occurs after (2). Waiting for your reply; thanks in advance! === modified file 'lisp/select.el' *** lisp/select.el 2012-04-24 05:34:50 +0000 --- lisp/select.el 2012-05-03 02:27:09 +0000 *************** *** 228,251 **** ;; But avoid modifying the string if it's a buffer name etc. (unless can-modify (setq str (substring str 0))) (remove-text-properties 0 (length str) '(composition nil) str) ! ;; TEXT is a polymorphic target. Select the actual type ! ;; from `UTF8_STRING', `COMPOUND_TEXT', `STRING', and ! ;; `C_STRING'. ! (if (eq type 'TEXT) ! (if (not (multibyte-string-p str)) ! (setq type 'C_STRING) ! (let (non-latin-1 non-unicode eight-bit) ! (mapc #'(lambda (x) ! (if (>= x #x100) ! (if (< x #x110000) ! (setq non-latin-1 t) ! (if (< x #x3FFF80) ! (setq non-unicode t) ! (setq eight-bit t))))) ! str) ! (setq type (if non-unicode 'COMPOUND_TEXT ! (if non-latin-1 'UTF8_STRING ! (if eight-bit 'C_STRING 'STRING))))))) (cond ((eq type 'UTF8_STRING) (if (or (not coding) --- 228,256 ---- ;; But avoid modifying the string if it's a buffer name etc. (unless can-modify (setq str (substring str 0))) (remove-text-properties 0 (length str) '(composition nil) str) ! ;; For X selections, TEXT is a polymorphic target. Select ! ;; the actual type from `UTF8_STRING', `COMPOUND_TEXT', ! ;; `STRING', and `C_STRING'. ! (when (eq type 'TEXT) ! (cond ! ((featurep 'ns) ! (setq type 'UTF8_STRING)) ! ((not (multibyte-string-p str)) ! (setq type 'C_STRING)) ! (t ! (let (non-latin-1 non-unicode eight-bit) ! (mapc #'(lambda (x) ! (if (>= x #x100) ! (if (< x #x110000) ! (setq non-latin-1 t) ! (if (< x #x3FFF80) ! (setq non-unicode t) ! (setq eight-bit t))))) ! str) ! (setq type (if non-unicode 'COMPOUND_TEXT ! (if non-latin-1 'UTF8_STRING ! (if eight-bit 'C_STRING ! 'STRING)))))))) (cond ((eq type 'UTF8_STRING) (if (or (not coding)
Chong Yidong <cyd <at> gnu.org>
to control <at> debbugs.gnu.org
.
(Sat, 07 Jul 2012 09:45:02 GMT) Full text and rfc822 format available.Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Sat, 04 Aug 2012 11:24:12 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.