Package: emacs;
Reported by: Simon Law <sfllaw <at> sfllaw.ca>
Date: Sat, 19 May 2012 20:10:01 UTC
Severity: normal
Found in version 24.1.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
View this message in rfc822 format
From: help-debbugs <at> gnu.org (GNU bug Tracking System) To: Stefan Monnier <monnier <at> iro.umontreal.ca> Cc: tracker <at> debbugs.gnu.org Subject: bug#11520: closed (24.1.50; delete-selection-mode conflicts with electric-pair-mode) Date: Mon, 22 Oct 2012 12:49:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 22 Oct 2012 08:46:39 -0400 with message-id <jwvbofvxklv.fsf-monnier+emacs <at> gnu.org> and subject line Re: bug#11520: 24.1.50; delete-selection-mode conflicts with electric-pair-mode has caused the debbugs.gnu.org bug report #11520, regarding 24.1.50; delete-selection-mode conflicts with electric-pair-mode to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs <at> gnu.org.) -- 11520: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11520 GNU Bug Tracking System Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Simon Law <sfllaw <at> sfllaw.ca> To: bug-gnu-emacs <at> gnu.org Subject: 24.1.50; delete-selection-mode conflicts with electric-pair-mode Date: Sat, 19 May 2012 16:07:56 -0400delete-selection-mode clobbers text before electric-pair-mode can get to it. Since they are both built-in to Emacs, the modes should be aware of each other. Reproduction steps: $ emacs -Q M-x electric-pair-mode M-x delete-selection-mode ;; Type "a line of text"" C-SPC C-a ;; At this point, you should have the line of text selected ( Expected result: (a line of text) Actual result: )( In GNU Emacs 24.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.2.0) of 2012-05-10 on charichuelo, modified by Debian (emacs-snapshot package, version 2:20120510-1~ppa1~oneiric1) Windowing system distributor `The X.Org Foundation', version 11.0.11004000 Configured using: `configure '--build' 'x86_64-linux-gnu' '--host' 'x86_64-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/24.1.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1.50/site-lisp:/usr/share/emacs/site-lisp' '--without-compress-info' '--with-crt-dir=/usr/lib/x86_64-linux-gnu/' '--with-x=yes' '--with-x-toolkit=gtk3' '--with-imagemagick=yes' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed -znocombreloc' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: en_CA.UTF-8 value of $LC_CTYPE: en_CA.UTF-8 value of $LC_MESSAGES: en_CA.UTF-8 value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_CA.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: outline-minor-mode: t whitespace-mode: t flyspell-mode: t fci-mode: t ido-ubiquitous-mode: t helm-dired-mode: Enable helm completion in Dired functions. Bindings affected are C, R, S, H. This is deprecated for Emacs24+ users, use `helm-mode' instead. helm-match-plugin-mode: t projectile-mode: t projectile-global-mode: t yas/global-mode: t yas/minor-mode: t icomplete-mode: t volatile-highlights-mode: t show-paren-mode: t shell-dirtrack-mode: t recentf-mode: t savehist-mode: t electric-pair-mode: t global-auto-revert-mode: t prelude-mode: t prelude-global-mode: t which-function-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: n t a x SPC - t a b l e <M-backspace> <M-backspace> c u r r e n t - s y n t a <M-backspace> <M-backspace> l i s p - m o d e - s y n <return> <down-mouse-1> <mouse-movement> <mouse-1> C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v M-< <help-echo> <down-mouse-1> <mouse-1> C-s ( C-n C-n C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v M-v M-v C-x b <return> C-s s y n t a x - t a b l e C-s C-n C-p C-n C-p C-p C-x o C-h v s y n t a x - t a b l e C-g C-g C-n C-x o M-< C-s s y n t a x - t a b l e C-s C-n C-p C-x o C-h f s y n t a x - t a b l e <return> C-x o q C-x o C-x o M-: M-( a r e f M-b C-b C-k l a s t - c o m m a n d - e v e n t <return> <help-echo> M-: M-p C-k ( a r e f SPC ( s y n t a x - t a b l e ) SPC ? ( <backspace> \ ( <return> C-x o C-n C-n C-n C-n C-p C-p C-p M-v M-v C-v C-v C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-n C-v C-v M-v M-v <down-mouse-1> <mouse-movement> <mouse-1> <M-backspace> M-x r e p o r t - b u g <return> C-g C-g M-x r e p o r t - e m a c s - b u g <return> Recent messages: byte-code: End of buffer Mark set Mark saved where search started (No changes need to be saved) Type "q" in help window to restore its previous buffer. (No changes need to be saved) 13 (#o15, #xd) Character to escape: ( (4 . 41) Quit Quit Load-path shadows: /usr/share/emacs/24.1.50/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /home/sfllaw/.emacs.d/elpa/python-20120430/python hides /usr/share/emacs/24.1.50/lisp/progmodes/python /home/sfllaw/.emacs.d/elpa/magit-20120507/.dir-locals hides /usr/share/emacs/24.1.50/lisp/gnus/.dir-locals Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail cua-base jka-compr cus-start cus-load add-log flymake-cursor debug hippie-exp multi-isearch rainbow-mode eldoc paredit prelude-emacs-lisp-autoloads prelude-lisp prelude-lisp-autoloads autoload find-func pp python mule-util executable time-stamp vc-git mail-utils network-stream starttls url-http tls mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw url-cache url-auth noutline outline whitespace flyspell ispell melpa multi-term term disp-table ehelp python-el-fgallina-expansions flymake fill-column-indicator ido-ubiquitous prelude-global-keybindings prelude-editor re-builder midnight helm-projectile helm-config helm-misc helm-files image-dired dired-x dired-aux ffap helm-tags helm-bookmark helm-adaptative helm-info helm-net browse-url xml url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse url-vars mailcap helm-plugin helm-locate helm-help helm-match-plugin helm-grep helm-regexp grep helm-external helm-buffers rx helm-elscreen helm-utils dired compile helm projectile yasnippet help-mode view assoc expand-region expand-region-custom expand-region-core icomplete ido etags volatile-highlights hl-line paren windmove tramp-cache tramp-sh tramp tramp-compat auth-source gnus-util mm-util mail-prsvr password-cache shell pcomplete comint ansi-color ring format-spec tramp-loaddefs recentf tree-widget wid-edit savehist saveplace uniquify electric autorevert delsel prelude-mode easy-mmode easymenu edmacro kmacro prelude-core repeat thingatpt prelude-ui zenburn-theme prelude-packages ack-and-a-half-autoloads expand-region-autoloads flymake-css-autoloads flymake-cursor-autoloads gist-autoloads gh-autoloads eieio helm-projectile-autoloads helm-autoloads ido-ubiquitous-autoloads less-css-mode-autoloads logito-autoloads magithub-autoloads magit-autoloads markdown-mode-autoloads mediawiki-autoloads melpa-autoloads byte-opt warnings bytecomp byte-compile cconv macroexp advice help-fns advice-preload multi-term-autoloads paredit-autoloads pcache-autoloads finder-inf pony-mode-autoloads prelude-programming-autoloads which-func imenu projectile-autoloads python-autoloads python-magic-autoloads rainbow-mode-autoloads volatile-highlights-autoloads yasnippet-autoloads zenburn-theme-autoloads package cl time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment 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 dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) -- Cheers, Simon - http://ca.linkedin.com/in/sfllaw/
[Message part 3 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca> To: Simon Law <sfllaw <at> sfllaw.ca> Cc: Chong Yidong <cyd <at> gnu.org>, 11520-done <at> debbugs.gnu.org Subject: Re: bug#11520: 24.1.50; delete-selection-mode conflicts with electric-pair-mode Date: Mon, 22 Oct 2012 08:46:39 -0400> Attached is a patch against trunk. Thanks, I really appreciate the addition of docstrings. it's got a few cosmetic problems, so I've installed it and then installed a subsequent patch on top of it. Here are the issues I noticed: - a hook is a symbol whose value contains a list of functions (modulo a few subtleties). The functions themselves are not hooks. E.g. delete-selection-pre-hook is not a hook, just a function that's typically added on a particular hook. And the symbol symbol is named with "-hook" (rather than with "-hooks") for normal hooks and "-functions" for abnormal hooks. - symbols in docstrings are written `foo' rather than 'foo. - docstrings normally don't end with a line-separator (i.e. the closing " should not be on its own line). - there's no self-insert-iso in Emacs, so I'd rather not touch it. - use the imperative for the first line of a docstring. - `keep' is not a value handled specially by delete-selection-helper, so it is handled as a hook, luckily there's no function on this hook (an unbound symbol is treated by `run-hook' as a symbol bound to nil) so it ends up behaving like nil, which is indeed what we need; so the end behavior is correct, but only "by accident". Stefan
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.