bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11840: 24.1.50; nil keymap element on high priority overlay should f


From: Christopher Monsanto
Subject: bug#11840: 24.1.50; nil keymap element on high priority overlay should fallthrough to low priority overlay
Date: Sun, 01 Jul 2012 23:21:39 -0400

Currently, if one creates two overlapping overlays that both have a
keymap property, nil elements on the high priority keymap do not
fallthrough to the lower priority overlay keymap. From emacs -Q, put the
following code in, place point at beginning of buffer, and M-x eval
buffer.

(setq m (make-sparse-keymap))
(define-key m "k" '(lambda nil (interactive) (message "overlay 1")))

(setq m2 (make-sparse-keymap))
(define-key m2 "k" nil)

(let ((o (make-overlay 0 5))
      (o2 (make-overlay 0 5)))
  (overlay-put o 'keymap m)
  (overlay-put o 'priority 100)
  (overlay-put o2 'keymap m2)
  (overlay-put o2 'priority 9999))

Type k, and it will self insert instead of messaging overlay 1.

According to the Emacs manual, "The priority matters when two or more overlays 
cover the same character and both specify the same property; the one whose 
priority value is larger overrides the other." So this behavior may not 
strictly be a bug, but it is suboptimal in my opinion. I discovered this 
problem by running yasnippet and auto-complete-mode together. Yasnippet puts a 
low priority overlay to make tab go to the next snippet field; ac-mode puts a 
high priority overlay to handle tab to go to the next completion. If I hack 
around this by setting tab to nil on ac-mode's map when there are no 
completions, tab runs indent, instead of going to the next snippet field... 
making it very hard to compose the two programs.



In GNU Emacs 24.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
 of 2012-07-01 on linuxpimpbox
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  keyfreq-autosave-mode: t
  keyfreq-mode: t
  savehist-mode: t
  eproject-mode: t
  diff-auto-refine-mode: t
  TeX-PDF-mode: t
  nxhtml-menu-mode: t
  nxhtml-tag-do-also: t
  popcmp-group-alternatives: t
  popcmp-short-help-beside-alts: t
  mlinks-active-links: t
  paredit-mode: t
  eldoc-mode: t
  recentf-mode: t
  smex-mode: t
  ido-ubiquitous-mode: t
  ido-everywhere: t
  yas/global-mode: t
  yas/minor-mode: t
  global-auto-complete-mode: t
  auto-complete-mode: t
  shell-dirtrack-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  cua-mode: t
  mouse-wheel-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
  transient-mark-mode: t

Recent input:
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> C-x C-s <left> <left> ; <backspace> 6 <backspace> 
' <backspace> ; x C-x C-s <backspace> C-x C-s C-x k 
<return> C-b t <return> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <backspace> M-x <up> <return> k 
k <backspace> <backspace> <backspace> <down> <up> <down-mouse-1> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <drag-mouse-1> <backspace> <backspace> 
<down-mouse-1> <mouse-1> <backspace> <right> <backspace> 
<backspace> C-x C-s <down-mouse-1> <mouse-movement> 
<mouse-movement> <drag-mouse-1> <down-mouse-1> <mouse-1> 
<down-mouse-1> <mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <drag-mouse-1> <down-mouse-1> <mouse-1> 
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> 
<mouse-movement> <drag-mouse-1> <down-mouse-1> <mouse-1> 
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> 
<mouse-movement> <mouse-movement> <drag-mouse-1> <down-mouse-1> 
<mouse-1> M-x r e p o r t <return> K e y <backspace> 
<backspace> <backspace> O v e r l y <backspace> a y 
SPC p r o p e r t i e s <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
O V e <backspace> <backspace> <backspace> n i l SPC 
o v <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> O V r <backspace> <backspace> 
v r <backspace> e r l a y <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> n i 
l SPC <backspace> <backspace> <backspace> <backspace> 
K e y m a p s SPC f a l <backspace> <backspace> <backspace> 
<backspace> <backspace> SPC f a l l t h r o u g h SPC 
o n SPC h i g h SPC p n <backspace> r i o r i t y SPC 
o v e r l a y SPC s h o u l d SPC f <backspace> <backspace> 
SPC <help-echo> <help-echo> <down-mouse-1> <drag-mouse-1> 
<help-echo> <help-echo> <backspace> <down-mouse-1> 
<mouse-1> <down-mouse-1> <mouse-1> M-x <up> <retur
n>

Recent messages:
Saving file /home/monsanto/test.el...
Wrote /home/monsanto/test.el
Saving file /home/monsanto/test.el...
Wrote /home/monsanto/test.el
byte-code: Beginning of buffer [8 times]
backward-delete-char: Beginning of buffer
Saving file /home/monsanto/test.el...
Wrote /home/monsanto/test.el
Mark set [2 times]
Quit
user-error: Minibuffer window is not active

Load-path shadows:
/home/monsanto/.emacs.d/elisp/magit/.dir-locals hides 
/home/monsanto/.emacs.d/elisp/full-ack/.dir-locals
/home/monsanto/.emacs.d/elisp/bbdb/bbdb-migrate hides 
/usr/local/share/emacs/site-lisp/bbdb/bbdb-migrate
/home/monsanto/.emacs.d/elisp/bbdb/bbdb-com hides 
/usr/local/share/emacs/site-lisp/bbdb/bbdb-com
/home/monsanto/.emacs.d/elisp/bbdb/bbdb-rmail hides 
/usr/local/share/emacs/site-lisp/bbdb/bbdb-rmail
/home/monsanto/.emacs.d/elisp/bbdb/bbdb-mhe hides 
/usr/local/share/emacs/site-lisp/bbdb/bbdb-mhe
/home/monsanto/.emacs.d/elisp/bbdb/bbdb hides 
/usr/local/share/emacs/site-lisp/bbdb/bbdb
/home/monsanto/.emacs.d/elisp/bbdb/bbdb-gnus hides 
/usr/local/share/emacs/site-lisp/bbdb/bbdb-gnus
/home/monsanto/.emacs.d/elisp/bbdb/bbdb-print hides 
/usr/local/share/emacs/site-lisp/bbdb/bbdb-print
/home/monsanto/.emacs.d/elisp/w3m/w3m-bookmark hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-bookmark
/home/monsanto/.emacs.d/elisp/w3m/w3m-search hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-search
/home/monsanto/.emacs.d/elisp/w3m/w3m-dtree hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-dtree
/home/monsanto/.emacs.d/elisp/w3m/w3m-ucs hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-ucs
/home/monsanto/.emacs.d/elisp/w3m/w3m-image hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-image
/home/monsanto/.emacs.d/elisp/w3m/w3m-cookie hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-cookie
/home/monsanto/.emacs.d/elisp/w3m/mew-w3m hides 
/usr/local/share/emacs/site-lisp/w3m/mew-w3m
/home/monsanto/.emacs.d/elisp/w3m/w3m-lnum hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-lnum
/home/monsanto/.emacs.d/elisp/w3m/w3m-symbol hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-symbol
/home/monsanto/.emacs.d/elisp/w3m/w3m-form hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-form
/home/monsanto/.emacs.d/elisp/w3m/w3m-favicon hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-favicon
/home/monsanto/.emacs.d/elisp/w3m/w3m-proc hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-proc
/home/monsanto/.emacs.d/elisp/w3m/w3m-filter hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-filter
/home/monsanto/.emacs.d/elisp/w3m/w3m-perldoc hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-perldoc
/home/monsanto/.emacs.d/elisp/w3m/w3m-weather hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-weather
/home/monsanto/.emacs.d/elisp/w3m/w3m hides 
/usr/local/share/emacs/site-lisp/w3m/w3m
/home/monsanto/.emacs.d/elisp/w3m/w3m-hist hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-hist
/home/monsanto/.emacs.d/elisp/w3m/w3m-tabmenu hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-tabmenu
/home/monsanto/.emacs.d/elisp/w3m/w3m-util hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-util
/home/monsanto/.emacs.d/elisp/w3m/w3m-fb hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-fb
/home/monsanto/.emacs.d/elisp/w3m/w3m-ccl hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-ccl
/home/monsanto/.emacs.d/elisp/w3m/w3m-rss hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-rss
/home/monsanto/.emacs.d/elisp/w3m/w3m-bug hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-bug
/home/monsanto/.emacs.d/elisp/w3m/mime-w3m hides 
/usr/local/share/emacs/site-lisp/w3m/mime-w3m
/home/monsanto/.emacs.d/elisp/w3m/w3m-mail hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-mail
/home/monsanto/.emacs.d/elisp/w3m/w3m-ems hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-ems
/home/monsanto/.emacs.d/elisp/w3m/w3m-namazu hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-namazu
/home/monsanto/.emacs.d/elisp/w3m/bookmark-w3m hides 
/usr/local/share/emacs/site-lisp/w3m/bookmark-w3m
/home/monsanto/.emacs.d/elisp/w3m/octet hides 
/usr/local/share/emacs/site-lisp/w3m/octet
/home/monsanto/.emacs.d/elisp/w3m/w3m-antenna hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-antenna
/home/monsanto/.emacs.d/elisp/w3m/w3m-session hides 
/usr/local/share/emacs/site-lisp/w3m/w3m-session
/usr/local/share/emacs/site-lisp/reftex/reftex-vars hides 
/usr/local/share/emacs/24.1.50/lisp/textmodes/reftex-vars
/usr/local/share/emacs/site-lisp/reftex/reftex-global hides 
/usr/local/share/emacs/24.1.50/lisp/textmodes/reftex-global
/usr/local/share/emacs/site-lisp/reftex/reftex hides 
/usr/local/share/emacs/24.1.50/lisp/textmodes/reftex
/usr/local/share/emacs/site-lisp/reftex/reftex-cite hides 
/usr/local/share/emacs/24.1.50/lisp/textmodes/reftex-cite
/usr/local/share/emacs/site-lisp/reftex/reftex-toc hides 
/usr/local/share/emacs/24.1.50/lisp/textmodes/reftex-toc
/usr/local/share/emacs/site-lisp/reftex/reftex-parse hides 
/usr/local/share/emacs/24.1.50/lisp/textmodes/reftex-parse
/usr/local/share/emacs/site-lisp/reftex/reftex-ref hides 
/usr/local/share/emacs/24.1.50/lisp/textmodes/reftex-ref
/usr/local/share/emacs/site-lisp/reftex/reftex-auc hides 
/usr/local/share/emacs/24.1.50/lisp/textmodes/reftex-auc
/usr/local/share/emacs/site-lisp/reftex/reftex-sel hides 
/usr/local/share/emacs/24.1.50/lisp/textmodes/reftex-sel
/usr/local/share/emacs/site-lisp/reftex/reftex-index hides 
/usr/local/share/emacs/24.1.50/lisp/textmodes/reftex-index
/usr/local/share/emacs/site-lisp/reftex/reftex-dcr hides 
/usr/local/share/emacs/24.1.50/lisp/textmodes/reftex-dcr
/home/monsanto/.emacs.d/elisp/python/python hides 
/usr/local/share/emacs/24.1.50/lisp/progmodes/python
/home/monsanto/.emacs.d/elisp/nxhtml/util/org-odt hides 
/usr/local/share/emacs/24.1.50/lisp/org/org-odt
/home/monsanto/.emacs.d/elisp/magit/.dir-locals hides 
/usr/local/share/emacs/24.1.50/lisp/gnus/.dir-locals

Features:
(shadow sort gnus-msg emacsbug unsafep solarized-dark-theme solarized
writegood-mode align-by-current-symbol rainbow-mode ispell
twittering-mode keyfreq bm info saveplace savehist term disp-table ehelp
electric eproject-extras ibuf-macs ibuf-ext ibuffer eproject magit-blame
magit-bisect magit-key-mode magit esh-var esh-io esh-cmd esh-ext
esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util iswitchb
diff-mode log-edit pcvs-util add-log vc ediff-merg ediff-diff ediff-wind
ediff-help ediff-util ediff-mult ediff-init ediff vc-dispatcher pomodoro
dired-x diary-lib diary-loaddefs deft popwin dedicated w3m-wget wget
wget-sysdep w3m-lnum w3m-search w3m doc-view jka-compr image-mode
w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image
w3m-proc w3m-util browse-url bbdb timezone bbdb-autoloads gnus-gravatar
mail-extr gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime dig
gravatar url-cache url url-proxy url-privacy url-history url-cookie
url-domsuf nnir gnus-sum nntp gnus-group gnus-undo gnus-start gnus-spec
gnus-win nnimap nnmail gnus-int gnus-range mail-source parse-time tls
utf7 netrc nnoo gnus gnus-ems nnheader mailcap sendmail message rfc822
mml mml-sec mailabbrev mail-utils gmm-utils mailheader markdown-mode
bib-cite bibtex preview prv-emacs tex-buf latex-mode-expansions
auto-complete-auctex latex tex-style tex dbus tex-site auto-loads hie
haskell-navigate-imports haskell-sort-imports haskell-align-imports
haskell-indent haskell-package haskell-move-nested haskell-process
haskell-session haskell-string haskell-interactive-mode haskell-cabal
haskell-mode auto-complete-clang proof-site proof-autoloads pg-vars
ropemacs pymacs python-el-fgallina-expansions python rdebug rsense
ruby-mode-expansions ruby-mode sh-script smie executable gud
flymake-files flymakemsg nxhtml-autostart nxhtml-autoload majmodpri
vc-git nxhtml-menu udev-rinari udev-ecb flymake css-color
html-mode-expansions nxhtml-mode derived html-quote tidy-xhtml
html-imenu loadhist popcmp xhtml-help ourcomments-util mlinks url-expand
url-util url-methods url-parse url-vars mumamo html-toc xml html-pagetoc
appmenu-fold appmenu fold-dwim tex-mode compile org ob-emacs-lisp
ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys
ob ob-eval org-pcomplete org-list org-faces org-compat org-entities
org-macs noutline outline cal-menu calendar cal-loaddefs inlimg
html-write hideshow html-site gimpedit foldit dired web-vcs rx mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
cus-edit cus-start cus-load web-autoload nxhtml-base
nxml-mode-expansions rng-nxml rng-valid rng-loc rng-uri rng-parse
nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode
nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok
css-mode-expansions css-mode js json imenu thingatpt cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
autopair find-func paredit eldoc paren mic-paren table recentf
tree-widget wid-edit smex ido-ubiquitous ido server yasnippet help-mode
view easymenu auto-complete easy-mmode popup warnings browse-kill-ring
tramp-cache tramp tramp-compat auth-source eieio byte-opt bytecomp
byte-compile cconv gnus-util mm-util mail-prsvr password-cache shell
pcomplete comint ansi-color ring format-spec tramp-loaddefs undo-tree
diff edmacro kmacro cua-base expand-region expand-region-custom
expand-region-core advice advice-preload cua-rect rect ace-jump-mode
fastnav help-fns cl-macs gv cl cl-lib macroexp 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 dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]