unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12081: 24.1; buffer-predicate often not called
@ 2012-07-28 20:47 Dave Abrahams
  2012-07-29 13:56 ` martin rudalics
  0 siblings, 1 reply; 25+ messages in thread
From: Dave Abrahams @ 2012-07-28 20:47 UTC (permalink / raw)
  To: 12081

The report will be sent to bug-gnu-emacs@gnus.org

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':

1. Evaluate:

(set-frame-parameter 
   (selected-frame) 
   'buffer-predicate (lambda (b) (message "buffer predicate: %s" b)))

2. `C-x C-f /tmp/xx RET'

3. `C-x C-f /tmp/yy RET'

4. `C-x k RET'

5. `M-: (message "======")'

6. `C-x b *Messages* RET'

This shows that the buffer-predicate never called when deciding what
buffer to replace yy with.  The docs of course could be read as not
guaranteeing it will be called, but IMO this renders the
buffer-predicate not-very-useful.


In GNU Emacs 24.1.1 (x86_64-apple-darwin11.4.0, Carbon Version 1.6.0 AppKit 1138.47)
 of 2012-06-27 on pluto.luannocracy.com
Windowing system distributor `Apple Inc.', version 10.7.4
Configured using:
 `configure '--prefix=/opt/local' '--without-x' '--without-dbus'
 '--without-gconf' '--without-libotf' '--without-m17n-flt'
 '--without-gpm' '--infodir' '/opt/local/share/info/emacs24-macport'
 '--with-mac'
 '--enable-mac-app=/opt/local/var/macports/build/_Users_dave_Public_MacPorts_Portfiles_editors_emacs24-macport/emacs24-macport/work/destroot/Applications/MacPorts'
 'CC=/usr/bin/clang' 'CFLAGS=-pipe -O2 -arch x86_64'
 'LDFLAGS=-L/opt/local/lib -Wl,-no_pie -arch x86_64'
 'CPPFLAGS=-I/opt/local/include''

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: iso-latin-1-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  highlight-changes-visible-mode: t
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  recentf-mode: t
  pretty-control-l-mode: t
  Info-breadcrumbs-in-mode-line-mode: t
  workgroups-mode: t
  me-minor-mode: t
  show-paren-mode: t
  server-mode: t
  ido-everywhere: t
  global-ede-mode: t
  global-auto-revert-mode: t
  display-time-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  mac-mouse-wheel-mode: t
  menu-bar-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
  line-number-mode: t
  transient-mark-mode: t

Recent input:
: <C-return> M-: ( s e t - f r a m e - p a r a m e 
t e r SPC ' b u f f e r - p r e d i c a t e SPC ( l 
a m b d a SPC ( b ) SPC ( m e s s a g e SPC " b u f 
f e r SPC p r e d i c a t e : SPC % s ) <backspace> 
" SPC b ) ) ) <return> C-p C-p C-n C-n C-. <return> 
<C-return> <C-return> q M-: M-p C-. C-. C-. SPC ( s 
e l e c t e d - f r a m e ) C-e <return> <C-return> 
C-x C-f / t m p / x x <return> C-x C-f y y <return> 
C-x C-k C-x b * M e s s <return> C-r v u <backspace> 
<backspace> p r e d i c a t e C-r M-x o t h e r - b 
u f f <tab> C-g M-: ( o t h e r - b u f f e r ) <return> 
M-x r e p o r t - e m a c s C-g C-g M-x d e b b u g 
<tab> - s e <tab> a <tab> <return> b u f f e r - p 
r e d i c a t e <return> <return> C-e C-a <return> 
C-n C-n C-n C-n C-p C-p C-p C-p q C-n C-e C-n C-n C-a 
<return> q C-n <return> q C-n <return> q C-p C-p C-p 
C-p C-p C-p q M-x r e p o r t - b <backspace> e m b 
<backspace> a c s - b u f <backspace> g <return>

Recent messages:
buffer predicate: *Emacs Bugs*
buffer predicate: *Group*
buffer predicate: *Emacs Bugs*
buffer predicate: *Group*
buffer predicate: *Emacs Bugs*
buffer predicate: *Group*
buffer predicate: *Emacs Bugs*
buffer predicate: *Group*
buffer predicate: *Emacs Bugs*
buffer predicate: *Group*
byte-code: Beginning of buffer

Load-path shadows:
/Users/dave/.emacs.d/el-get/package/elpa/xml-rpc-1.6.7/xml-rpc hides /Users/dave/.emacs.d/el-get/xml-rpc-el/xml-rpc
/Users/dave/.emacs.d/el-get/package/elpa/weblogger-1.4.3/weblogger hides /Users/dave/.emacs.d/el-get/weblogger-el/weblogger
/Users/dave/.emacs.d/el-get/wl-gravatar/gravatar hides /Users/dave/.emacs.d/el-get/nognus/lisp/gravatar
/Users/dave/.emacs.d/el-get/org-mode/.dir-locals hides /Users/dave/.emacs.d/el-get/nognus/lisp/.dir-locals
/Users/dave/.emacs.d/el-get/org-mode/.dir-locals hides /Users/dave/.emacs.d/el-get/magit/.dir-locals
/Users/dave/.emacs.d/el-get/wl-gravatar/gravatar hides /Users/dave/.emacs.d/el-get/gravatar/gravatar
/Users/dave/.emacs.d/el-get/auto-complete/fuzzy hides /Users/dave/.emacs.d/el-get/fuzzy/fuzzy
/Users/dave/.emacs.d/el-get/auto-complete/popup hides /Users/dave/.emacs.d/el-get/popup/popup
/Users/dave/.emacs.d/el-get/wanderlust/utils/wl-mailto hides /Users/dave/.emacs.d/el-get/wanderlust/site-lisp/wl/wl-mailto
/Users/dave/.emacs.d/el-get/wanderlust/utils/wl-complete hides /Users/dave/.emacs.d/el-get/wanderlust/site-lisp/wl/wl-complete
/Users/dave/.emacs.d/el-get/wanderlust/utils/wl-addrbook hides /Users/dave/.emacs.d/el-get/wanderlust/site-lisp/wl/wl-addrbook
/Users/dave/.emacs.d/el-get/nognus/lisp/utf7 hides /Users/dave/.emacs.d/el-get/wanderlust/site-lisp/wl/utf7
/Users/dave/.emacs.d/el-get/wanderlust/utils/ssl hides /Users/dave/.emacs.d/el-get/wanderlust/site-lisp/wl/ssl
/Users/dave/.emacs.d/el-get/wanderlust/utils/rfc2368 hides /Users/dave/.emacs.d/el-get/wanderlust/site-lisp/wl/rfc2368
/Users/dave/.emacs.d/el-get/wanderlust/utils/im-wl hides /Users/dave/.emacs.d/el-get/wanderlust/site-lisp/wl/im-wl
/Users/dave/.emacs.d/el-get/nognus/lisp/smime hides /Users/dave/.emacs.d/el-get/semi/site-lisp/semi/smime
/Users/dave/.emacs.d/el-get/nognus/lisp/sha1 hides /Users/dave/.emacs.d/el-get/flim/site-lisp/flim/sha1
/Users/dave/.emacs.d/el-get/nognus/lisp/sasl hides /Users/dave/.emacs.d/el-get/flim/site-lisp/flim/sasl
/Users/dave/.emacs.d/el-get/nognus/lisp/sasl-ntlm hides /Users/dave/.emacs.d/el-get/flim/site-lisp/flim/sasl-ntlm
/Users/dave/.emacs.d/el-get/nognus/lisp/sasl-digest hides /Users/dave/.emacs.d/el-get/flim/site-lisp/flim/sasl-digest
/Users/dave/.emacs.d/el-get/nognus/lisp/sasl-cram hides /Users/dave/.emacs.d/el-get/flim/site-lisp/flim/sasl-cram
/Users/dave/.emacs.d/el-get/nognus/lisp/ntlm hides /Users/dave/.emacs.d/el-get/flim/site-lisp/flim/ntlm
/Users/dave/.emacs.d/el-get/nognus/lisp/md4 hides /Users/dave/.emacs.d/el-get/flim/site-lisp/flim/md4
/Users/dave/.emacs.d/el-get/nognus/lisp/hmac-md5 hides /Users/dave/.emacs.d/el-get/flim/site-lisp/flim/hmac-md5
/Users/dave/.emacs.d/el-get/nognus/lisp/hmac-def hides /Users/dave/.emacs.d/el-get/flim/site-lisp/flim/hmac-def
/Users/dave/.emacs.d/el-get/nognus/lisp/hex-util hides /Users/dave/.emacs.d/el-get/flim/site-lisp/flim/hex-util
/Users/dave/.emacs.d/el-get/org-mode/.dir-locals hides /Users/dave/.emacs.d/el-get/el-get/.dir-locals
/Users/dave/.emacs.d/el-get/xcscope/xcscope hides /opt/local/share/emacs/site-lisp/xcscope
/Users/dave/.emacs.d/el-get/cmake-mode/cmake-mode hides /opt/local/share/emacs/site-lisp/cmake-mode
/Users/dave/.emacs.d/el-get/nognus/lisp/password-cache hides /opt/local/share/emacs/24.1/lisp/password-cache
/Users/dave/.emacs.d/el-get/nognus/lisp/md4 hides /opt/local/share/emacs/24.1/lisp/md4
/Users/dave/.emacs.d/el-get/nognus/lisp/hex-util hides /opt/local/share/emacs/24.1/lisp/hex-util
/Users/dave/.emacs.d/el-get/nognus/lisp/format-spec hides /opt/local/share/emacs/24.1/lisp/format-spec
/Users/dave/.emacs.d/el-get/nognus/lisp/color hides /opt/local/share/emacs/24.1/lisp/color
/Users/dave/.emacs.d/el-get/dwamacs/site-lisp/ediff-util hides /opt/local/share/emacs/24.1/lisp/vc/ediff-util
/Users/dave/.emacs.d/el-get/nognus/lisp/dns-mode hides /opt/local/share/emacs/24.1/lisp/textmodes/dns-mode
/Users/dave/.emacs.d/el-get/dwamacs/site-lisp/compile hides /opt/local/share/emacs/24.1/lisp/progmodes/compile
/Users/dave/.emacs.d/el-get/org-mode/lisp/org hides /opt/local/share/emacs/24.1/lisp/org/org
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-xoxo hides /opt/local/share/emacs/24.1/lisp/org/org-xoxo
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-wl hides /opt/local/share/emacs/24.1/lisp/org/org-wl
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-w3m hides /opt/local/share/emacs/24.1/lisp/org/org-w3m
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-vm hides /opt/local/share/emacs/24.1/lisp/org/org-vm
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-timer hides /opt/local/share/emacs/24.1/lisp/org/org-timer
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-taskjuggler hides /opt/local/share/emacs/24.1/lisp/org/org-taskjuggler
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-table hides /opt/local/share/emacs/24.1/lisp/org/org-table
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-src hides /opt/local/share/emacs/24.1/lisp/org/org-src
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-special-blocks hides /opt/local/share/emacs/24.1/lisp/org/org-special-blocks
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-rmail hides /opt/local/share/emacs/24.1/lisp/org/org-rmail
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-remember hides /opt/local/share/emacs/24.1/lisp/org/org-remember
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-publish hides /opt/local/share/emacs/24.1/lisp/org/org-publish
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-protocol hides /opt/local/share/emacs/24.1/lisp/org/org-protocol
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-plot hides /opt/local/share/emacs/24.1/lisp/org/org-plot
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-pcomplete hides /opt/local/share/emacs/24.1/lisp/org/org-pcomplete
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-odt hides /opt/local/share/emacs/24.1/lisp/org/org-odt
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-mouse hides /opt/local/share/emacs/24.1/lisp/org/org-mouse
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-mobile hides /opt/local/share/emacs/24.1/lisp/org/org-mobile
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-mks hides /opt/local/share/emacs/24.1/lisp/org/org-mks
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-mhe hides /opt/local/share/emacs/24.1/lisp/org/org-mhe
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-mew hides /opt/local/share/emacs/24.1/lisp/org/org-mew
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-macs hides /opt/local/share/emacs/24.1/lisp/org/org-macs
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-mac-message hides /opt/local/share/emacs/24.1/lisp/org/org-mac-message
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-lparse hides /opt/local/share/emacs/24.1/lisp/org/org-lparse
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-list hides /opt/local/share/emacs/24.1/lisp/org/org-list
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-latex hides /opt/local/share/emacs/24.1/lisp/org/org-latex
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-jsinfo hides /opt/local/share/emacs/24.1/lisp/org/org-jsinfo
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-irc hides /opt/local/share/emacs/24.1/lisp/org/org-irc
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-install hides /opt/local/share/emacs/24.1/lisp/org/org-install
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-inlinetask hides /opt/local/share/emacs/24.1/lisp/org/org-inlinetask
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-info hides /opt/local/share/emacs/24.1/lisp/org/org-info
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-indent hides /opt/local/share/emacs/24.1/lisp/org/org-indent
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-id hides /opt/local/share/emacs/24.1/lisp/org/org-id
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-icalendar hides /opt/local/share/emacs/24.1/lisp/org/org-icalendar
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-html hides /opt/local/share/emacs/24.1/lisp/org/org-html
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-habit hides /opt/local/share/emacs/24.1/lisp/org/org-habit
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-gnus hides /opt/local/share/emacs/24.1/lisp/org/org-gnus
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-freemind hides /opt/local/share/emacs/24.1/lisp/org/org-freemind
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-footnote hides /opt/local/share/emacs/24.1/lisp/org/org-footnote
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-feed hides /opt/local/share/emacs/24.1/lisp/org/org-feed
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-faces hides /opt/local/share/emacs/24.1/lisp/org/org-faces
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-exp hides /opt/local/share/emacs/24.1/lisp/org/org-exp
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-exp-blocks hides /opt/local/share/emacs/24.1/lisp/org/org-exp-blocks
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-eshell hides /opt/local/share/emacs/24.1/lisp/org/org-eshell
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-entities hides /opt/local/share/emacs/24.1/lisp/org/org-entities
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-docview hides /opt/local/share/emacs/24.1/lisp/org/org-docview
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-docbook hides /opt/local/share/emacs/24.1/lisp/org/org-docbook
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-datetree hides /opt/local/share/emacs/24.1/lisp/org/org-datetree
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-ctags hides /opt/local/share/emacs/24.1/lisp/org/org-ctags
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-crypt hides /opt/local/share/emacs/24.1/lisp/org/org-crypt
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-compat hides /opt/local/share/emacs/24.1/lisp/org/org-compat
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-colview hides /opt/local/share/emacs/24.1/lisp/org/org-colview
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-clock hides /opt/local/share/emacs/24.1/lisp/org/org-clock
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-capture hides /opt/local/share/emacs/24.1/lisp/org/org-capture
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-bibtex hides /opt/local/share/emacs/24.1/lisp/org/org-bibtex
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-beamer hides /opt/local/share/emacs/24.1/lisp/org/org-beamer
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-bbdb hides /opt/local/share/emacs/24.1/lisp/org/org-bbdb
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-attach hides /opt/local/share/emacs/24.1/lisp/org/org-attach
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-ascii hides /opt/local/share/emacs/24.1/lisp/org/org-ascii
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-archive hides /opt/local/share/emacs/24.1/lisp/org/org-archive
/Users/dave/.emacs.d/el-get/org-mode/lisp/org-agenda hides /opt/local/share/emacs/24.1/lisp/org/org-agenda
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob hides /opt/local/share/emacs/24.1/lisp/org/ob
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-tangle hides /opt/local/share/emacs/24.1/lisp/org/ob-tangle
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-table hides /opt/local/share/emacs/24.1/lisp/org/ob-table
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-sqlite hides /opt/local/share/emacs/24.1/lisp/org/ob-sqlite
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-sql hides /opt/local/share/emacs/24.1/lisp/org/ob-sql
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-shen hides /opt/local/share/emacs/24.1/lisp/org/ob-shen
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-sh hides /opt/local/share/emacs/24.1/lisp/org/ob-sh
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-screen hides /opt/local/share/emacs/24.1/lisp/org/ob-screen
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-scheme hides /opt/local/share/emacs/24.1/lisp/org/ob-scheme
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-sass hides /opt/local/share/emacs/24.1/lisp/org/ob-sass
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-ruby hides /opt/local/share/emacs/24.1/lisp/org/ob-ruby
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-ref hides /opt/local/share/emacs/24.1/lisp/org/ob-ref
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-R hides /opt/local/share/emacs/24.1/lisp/org/ob-R
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-python hides /opt/local/share/emacs/24.1/lisp/org/ob-python
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-plantuml hides /opt/local/share/emacs/24.1/lisp/org/ob-plantuml
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-picolisp hides /opt/local/share/emacs/24.1/lisp/org/ob-picolisp
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-perl hides /opt/local/share/emacs/24.1/lisp/org/ob-perl
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-org hides /opt/local/share/emacs/24.1/lisp/org/ob-org
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-octave hides /opt/local/share/emacs/24.1/lisp/org/ob-octave
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-ocaml hides /opt/local/share/emacs/24.1/lisp/org/ob-ocaml
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-mscgen hides /opt/local/share/emacs/24.1/lisp/org/ob-mscgen
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-maxima hides /opt/local/share/emacs/24.1/lisp/org/ob-maxima
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-matlab hides /opt/local/share/emacs/24.1/lisp/org/ob-matlab
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-lob hides /opt/local/share/emacs/24.1/lisp/org/ob-lob
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-lisp hides /opt/local/share/emacs/24.1/lisp/org/ob-lisp
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-lilypond hides /opt/local/share/emacs/24.1/lisp/org/ob-lilypond
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-ledger hides /opt/local/share/emacs/24.1/lisp/org/ob-ledger
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-latex hides /opt/local/share/emacs/24.1/lisp/org/ob-latex
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-keys hides /opt/local/share/emacs/24.1/lisp/org/ob-keys
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-js hides /opt/local/share/emacs/24.1/lisp/org/ob-js
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-java hides /opt/local/share/emacs/24.1/lisp/org/ob-java
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-haskell hides /opt/local/share/emacs/24.1/lisp/org/ob-haskell
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-gnuplot hides /opt/local/share/emacs/24.1/lisp/org/ob-gnuplot
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-fortran hides /opt/local/share/emacs/24.1/lisp/org/ob-fortran
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-exp hides /opt/local/share/emacs/24.1/lisp/org/ob-exp
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-eval hides /opt/local/share/emacs/24.1/lisp/org/ob-eval
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-emacs-lisp hides /opt/local/share/emacs/24.1/lisp/org/ob-emacs-lisp
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-dot hides /opt/local/share/emacs/24.1/lisp/org/ob-dot
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-ditaa hides /opt/local/share/emacs/24.1/lisp/org/ob-ditaa
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-css hides /opt/local/share/emacs/24.1/lisp/org/ob-css
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-comint hides /opt/local/share/emacs/24.1/lisp/org/ob-comint
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-clojure hides /opt/local/share/emacs/24.1/lisp/org/ob-clojure
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-calc hides /opt/local/share/emacs/24.1/lisp/org/ob-calc
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-C hides /opt/local/share/emacs/24.1/lisp/org/ob-C
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-awk hides /opt/local/share/emacs/24.1/lisp/org/ob-awk
/Users/dave/.emacs.d/el-get/org-mode/lisp/ob-asymptote hides /opt/local/share/emacs/24.1/lisp/org/ob-asymptote
/Users/dave/.emacs.d/el-get/tramp/share/emacs/site-lisp/trampver hides /opt/local/share/emacs/24.1/lisp/net/trampver
/Users/dave/.emacs.d/el-get/tramp/share/emacs/site-lisp/tramp hides /opt/local/share/emacs/24.1/lisp/net/tramp
/Users/dave/.emacs.d/el-get/tramp/share/emacs/site-lisp/tramp-uu hides /opt/local/share/emacs/24.1/lisp/net/tramp-uu
/Users/dave/.emacs.d/el-get/tramp/share/emacs/site-lisp/tramp-smb hides /opt/local/share/emacs/24.1/lisp/net/tramp-smb
/Users/dave/.emacs.d/el-get/tramp/share/emacs/site-lisp/tramp-sh hides /opt/local/share/emacs/24.1/lisp/net/tramp-sh
/Users/dave/.emacs.d/el-get/tramp/share/emacs/site-lisp/tramp-loaddefs hides /opt/local/share/emacs/24.1/lisp/net/tramp-loaddefs
/Users/dave/.emacs.d/el-get/tramp/share/emacs/site-lisp/tramp-gw hides /opt/local/share/emacs/24.1/lisp/net/tramp-gw
/Users/dave/.emacs.d/el-get/tramp/share/emacs/site-lisp/tramp-ftp hides /opt/local/share/emacs/24.1/lisp/net/tramp-ftp
/Users/dave/.emacs.d/el-get/tramp/share/emacs/site-lisp/tramp-compat hides /opt/local/share/emacs/24.1/lisp/net/tramp-compat
/Users/dave/.emacs.d/el-get/tramp/share/emacs/site-lisp/tramp-cmds hides /opt/local/share/emacs/24.1/lisp/net/tramp-cmds
/Users/dave/.emacs.d/el-get/tramp/share/emacs/site-lisp/tramp-cache hides /opt/local/share/emacs/24.1/lisp/net/tramp-cache
/Users/dave/.emacs.d/el-get/nognus/lisp/tls hides /opt/local/share/emacs/24.1/lisp/net/tls
/Users/dave/.emacs.d/el-get/nognus/lisp/sasl hides /opt/local/share/emacs/24.1/lisp/net/sasl
/Users/dave/.emacs.d/el-get/nognus/lisp/sasl-ntlm hides /opt/local/share/emacs/24.1/lisp/net/sasl-ntlm
/Users/dave/.emacs.d/el-get/nognus/lisp/sasl-digest hides /opt/local/share/emacs/24.1/lisp/net/sasl-digest
/Users/dave/.emacs.d/el-get/nognus/lisp/sasl-cram hides /opt/local/share/emacs/24.1/lisp/net/sasl-cram
/Users/dave/.emacs.d/el-get/nognus/lisp/ntlm hides /opt/local/share/emacs/24.1/lisp/net/ntlm
/Users/dave/.emacs.d/el-get/nognus/lisp/netrc hides /opt/local/share/emacs/24.1/lisp/net/netrc
/Users/dave/.emacs.d/el-get/nognus/lisp/hmac-md5 hides /opt/local/share/emacs/24.1/lisp/net/hmac-md5
/Users/dave/.emacs.d/el-get/nognus/lisp/hmac-def hides /opt/local/share/emacs/24.1/lisp/net/hmac-def
/Users/dave/.emacs.d/el-get/nognus/lisp/dns hides /opt/local/share/emacs/24.1/lisp/net/dns
/Users/dave/.emacs.d/el-get/nognus/lisp/dig hides /opt/local/share/emacs/24.1/lisp/net/dig
/Users/dave/.emacs.d/el-get/nognus/lisp/uudecode hides /opt/local/share/emacs/24.1/lisp/mail/uudecode
/Users/dave/.emacs.d/el-get/wanderlust/utils/rfc2368 hides /opt/local/share/emacs/24.1/lisp/mail/rfc2368
/Users/dave/.emacs.d/el-get/nognus/lisp/hashcash hides /opt/local/share/emacs/24.1/lisp/mail/hashcash
/Users/dave/.emacs.d/el-get/nognus/lisp/binhex hides /opt/local/share/emacs/24.1/lisp/mail/binhex
/Users/dave/.emacs.d/el-get/nognus/lisp/yenc hides /opt/local/share/emacs/24.1/lisp/gnus/yenc
/Users/dave/.emacs.d/el-get/nognus/lisp/utf7 hides /opt/local/share/emacs/24.1/lisp/gnus/utf7
/Users/dave/.emacs.d/el-get/nognus/lisp/starttls hides /opt/local/share/emacs/24.1/lisp/gnus/starttls
/Users/dave/.emacs.d/el-get/nognus/lisp/spam hides /opt/local/share/emacs/24.1/lisp/gnus/spam
/Users/dave/.emacs.d/el-get/nognus/lisp/spam-wash hides /opt/local/share/emacs/24.1/lisp/gnus/spam-wash
/Users/dave/.emacs.d/el-get/nognus/lisp/spam-stat hides /opt/local/share/emacs/24.1/lisp/gnus/spam-stat
/Users/dave/.emacs.d/el-get/nognus/lisp/spam-report hides /opt/local/share/emacs/24.1/lisp/gnus/spam-report
/Users/dave/.emacs.d/el-get/nognus/lisp/smime hides /opt/local/share/emacs/24.1/lisp/gnus/smime
/Users/dave/.emacs.d/el-get/nognus/lisp/smiley hides /opt/local/share/emacs/24.1/lisp/gnus/smiley
/Users/dave/.emacs.d/el-get/nognus/lisp/sieve hides /opt/local/share/emacs/24.1/lisp/gnus/sieve
/Users/dave/.emacs.d/el-get/nognus/lisp/sieve-mode hides /opt/local/share/emacs/24.1/lisp/gnus/sieve-mode
/Users/dave/.emacs.d/el-get/nognus/lisp/sieve-manage hides /opt/local/share/emacs/24.1/lisp/gnus/sieve-manage
/Users/dave/.emacs.d/el-get/nognus/lisp/shr hides /opt/local/share/emacs/24.1/lisp/gnus/shr
/Users/dave/.emacs.d/el-get/nognus/lisp/shr-color hides /opt/local/share/emacs/24.1/lisp/gnus/shr-color
/Users/dave/.emacs.d/el-get/nognus/lisp/score-mode hides /opt/local/share/emacs/24.1/lisp/gnus/score-mode
/Users/dave/.emacs.d/el-get/nognus/lisp/rtree hides /opt/local/share/emacs/24.1/lisp/gnus/rtree
/Users/dave/.emacs.d/el-get/nognus/lisp/rfc2231 hides /opt/local/share/emacs/24.1/lisp/gnus/rfc2231
/Users/dave/.emacs.d/el-get/nognus/lisp/rfc2104 hides /opt/local/share/emacs/24.1/lisp/gnus/rfc2104
/Users/dave/.emacs.d/el-get/nognus/lisp/rfc2047 hides /opt/local/share/emacs/24.1/lisp/gnus/rfc2047
/Users/dave/.emacs.d/el-get/nognus/lisp/rfc2045 hides /opt/local/share/emacs/24.1/lisp/gnus/rfc2045
/Users/dave/.emacs.d/el-get/nognus/lisp/rfc1843 hides /opt/local/share/emacs/24.1/lisp/gnus/rfc1843
/Users/dave/.emacs.d/el-get/nognus/lisp/registry hides /opt/local/share/emacs/24.1/lisp/gnus/registry
/Users/dave/.emacs.d/el-get/nognus/lisp/qp hides /opt/local/share/emacs/24.1/lisp/gnus/qp
/Users/dave/.emacs.d/el-get/nognus/lisp/pop3 hides /opt/local/share/emacs/24.1/lisp/gnus/pop3
/Users/dave/.emacs.d/el-get/nognus/lisp/plstore hides /opt/local/share/emacs/24.1/lisp/gnus/plstore
/Users/dave/.emacs.d/el-get/nognus/lisp/nnweb hides /opt/local/share/emacs/24.1/lisp/gnus/nnweb
/Users/dave/.emacs.d/el-get/nognus/lisp/nnvirtual hides /opt/local/share/emacs/24.1/lisp/gnus/nnvirtual
/Users/dave/.emacs.d/el-get/nognus/lisp/nntp hides /opt/local/share/emacs/24.1/lisp/gnus/nntp
/Users/dave/.emacs.d/el-get/nognus/lisp/nnspool hides /opt/local/share/emacs/24.1/lisp/gnus/nnspool
/Users/dave/.emacs.d/el-get/nognus/lisp/nnrss hides /opt/local/share/emacs/24.1/lisp/gnus/nnrss
/Users/dave/.emacs.d/el-get/nognus/lisp/nnregistry hides /opt/local/share/emacs/24.1/lisp/gnus/nnregistry
/Users/dave/.emacs.d/el-get/nognus/lisp/nnoo hides /opt/local/share/emacs/24.1/lisp/gnus/nnoo
/Users/dave/.emacs.d/el-get/nognus/lisp/nnnil hides /opt/local/share/emacs/24.1/lisp/gnus/nnnil
/Users/dave/.emacs.d/el-get/nognus/lisp/nnml hides /opt/local/share/emacs/24.1/lisp/gnus/nnml
/Users/dave/.emacs.d/el-get/nognus/lisp/nnmh hides /opt/local/share/emacs/24.1/lisp/gnus/nnmh
/Users/dave/.emacs.d/el-get/nognus/lisp/nnmbox hides /opt/local/share/emacs/24.1/lisp/gnus/nnmbox
/Users/dave/.emacs.d/el-get/nognus/lisp/nnmairix hides /opt/local/share/emacs/24.1/lisp/gnus/nnmairix
/Users/dave/.emacs.d/el-get/nognus/lisp/nnmaildir hides /opt/local/share/emacs/24.1/lisp/gnus/nnmaildir
/Users/dave/.emacs.d/el-get/nognus/lisp/nnmail hides /opt/local/share/emacs/24.1/lisp/gnus/nnmail
/Users/dave/.emacs.d/el-get/nognus/lisp/nnir hides /opt/local/share/emacs/24.1/lisp/gnus/nnir
/Users/dave/.emacs.d/el-get/nognus/lisp/nnimap hides /opt/local/share/emacs/24.1/lisp/gnus/nnimap
/Users/dave/.emacs.d/el-get/nognus/lisp/nnheader hides /opt/local/share/emacs/24.1/lisp/gnus/nnheader
/Users/dave/.emacs.d/el-get/nognus/lisp/nngateway hides /opt/local/share/emacs/24.1/lisp/gnus/nngateway
/Users/dave/.emacs.d/el-get/nognus/lisp/nnfolder hides /opt/local/share/emacs/24.1/lisp/gnus/nnfolder
/Users/dave/.emacs.d/el-get/nognus/lisp/nneething hides /opt/local/share/emacs/24.1/lisp/gnus/nneething
/Users/dave/.emacs.d/el-get/nognus/lisp/nndraft hides /opt/local/share/emacs/24.1/lisp/gnus/nndraft
/Users/dave/.emacs.d/el-get/nognus/lisp/nndoc hides /opt/local/share/emacs/24.1/lisp/gnus/nndoc
/Users/dave/.emacs.d/el-get/nognus/lisp/nndir hides /opt/local/share/emacs/24.1/lisp/gnus/nndir
/Users/dave/.emacs.d/el-get/nognus/lisp/nndiary hides /opt/local/share/emacs/24.1/lisp/gnus/nndiary
/Users/dave/.emacs.d/el-get/nognus/lisp/nnbabyl hides /opt/local/share/emacs/24.1/lisp/gnus/nnbabyl
/Users/dave/.emacs.d/el-get/nognus/lisp/nnagent hides /opt/local/share/emacs/24.1/lisp/gnus/nnagent
/Users/dave/.emacs.d/el-get/nognus/lisp/mml2015 hides /opt/local/share/emacs/24.1/lisp/gnus/mml2015
/Users/dave/.emacs.d/el-get/nognus/lisp/mml1991 hides /opt/local/share/emacs/24.1/lisp/gnus/mml1991
/Users/dave/.emacs.d/el-get/nognus/lisp/mml hides /opt/local/share/emacs/24.1/lisp/gnus/mml
/Users/dave/.emacs.d/el-get/nognus/lisp/mml-smime hides /opt/local/share/emacs/24.1/lisp/gnus/mml-smime
/Users/dave/.emacs.d/el-get/nognus/lisp/mml-sec hides /opt/local/share/emacs/24.1/lisp/gnus/mml-sec
/Users/dave/.emacs.d/el-get/nognus/lisp/mm-view hides /opt/local/share/emacs/24.1/lisp/gnus/mm-view
/Users/dave/.emacs.d/el-get/nognus/lisp/mm-uu hides /opt/local/share/emacs/24.1/lisp/gnus/mm-uu
/Users/dave/.emacs.d/el-get/nognus/lisp/mm-util hides /opt/local/share/emacs/24.1/lisp/gnus/mm-util
/Users/dave/.emacs.d/el-get/nognus/lisp/mm-url hides /opt/local/share/emacs/24.1/lisp/gnus/mm-url
/Users/dave/.emacs.d/el-get/nognus/lisp/mm-partial hides /opt/local/share/emacs/24.1/lisp/gnus/mm-partial
/Users/dave/.emacs.d/el-get/nognus/lisp/mm-extern hides /opt/local/share/emacs/24.1/lisp/gnus/mm-extern
/Users/dave/.emacs.d/el-get/nognus/lisp/mm-encode hides /opt/local/share/emacs/24.1/lisp/gnus/mm-encode
/Users/dave/.emacs.d/el-get/nognus/lisp/mm-decode hides /opt/local/share/emacs/24.1/lisp/gnus/mm-decode
/Users/dave/.emacs.d/el-get/nognus/lisp/mm-bodies hides /opt/local/share/emacs/24.1/lisp/gnus/mm-bodies
/Users/dave/.emacs.d/el-get/nognus/lisp/messcompat hides /opt/local/share/emacs/24.1/lisp/gnus/messcompat
/Users/dave/.emacs.d/el-get/nognus/lisp/message hides /opt/local/share/emacs/24.1/lisp/gnus/message
/Users/dave/.emacs.d/el-get/nognus/lisp/mailcap hides /opt/local/share/emacs/24.1/lisp/gnus/mailcap
/Users/dave/.emacs.d/el-get/nognus/lisp/mail-source hides /opt/local/share/emacs/24.1/lisp/gnus/mail-source
/Users/dave/.emacs.d/el-get/nognus/lisp/mail-prsvr hides /opt/local/share/emacs/24.1/lisp/gnus/mail-prsvr
/Users/dave/.emacs.d/el-get/nognus/lisp/mail-parse hides /opt/local/share/emacs/24.1/lisp/gnus/mail-parse
/Users/dave/.emacs.d/el-get/nognus/lisp/legacy-gnus-agent hides /opt/local/share/emacs/24.1/lisp/gnus/legacy-gnus-agent
/Users/dave/.emacs.d/el-get/nognus/lisp/ietf-drums hides /opt/local/share/emacs/24.1/lisp/gnus/ietf-drums
/Users/dave/.emacs.d/el-get/nognus/lisp/html2text hides /opt/local/share/emacs/24.1/lisp/gnus/html2text
/Users/dave/.emacs.d/el-get/nognus/lisp/gssapi hides /opt/local/share/emacs/24.1/lisp/gnus/gssapi
/Users/dave/.emacs.d/el-get/wl-gravatar/gravatar hides /opt/local/share/emacs/24.1/lisp/gnus/gravatar
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus hides /opt/local/share/emacs/24.1/lisp/gnus/gnus
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-win hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-win
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-vm hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-vm
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-uu hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-uu
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-util hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-util
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-undo hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-undo
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-topic hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-topic
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-sync hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-sync
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-sum hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-sum
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-start hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-start
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-srvr hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-srvr
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-spec hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-spec
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-sieve hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-sieve
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-setup hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-setup
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-score hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-score
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-salt hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-salt
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-registry hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-registry
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-range hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-range
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-picon hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-picon
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-msg hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-msg
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-mlspl hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-mlspl
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-ml hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-ml
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-mh hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-mh
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-logic hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-logic
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-kill hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-kill
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-int hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-int
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-html hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-html
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-group hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-group
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-gravatar hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-gravatar
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-fun hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-fun
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-ems hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-ems
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-eform hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-eform
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-dup hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-dup
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-draft hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-draft
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-dired hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-dired
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-diary hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-diary
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-demon hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-demon
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-delay hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-delay
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-cus hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-cus
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-cite hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-cite
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-cache hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-cache
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-bookmark hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-bookmark
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-bcklg hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-bcklg
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-async hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-async
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-art hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-art
/Users/dave/.emacs.d/el-get/nognus/lisp/gnus-agent hides /opt/local/share/emacs/24.1/lisp/gnus/gnus-agent
/Users/dave/.emacs.d/el-get/nognus/lisp/gmm-utils hides /opt/local/share/emacs/24.1/lisp/gnus/gmm-utils
/Users/dave/.emacs.d/el-get/nognus/lisp/flow-fill hides /opt/local/share/emacs/24.1/lisp/gnus/flow-fill
/Users/dave/.emacs.d/el-get/nognus/lisp/ecomplete hides /opt/local/share/emacs/24.1/lisp/gnus/ecomplete
/Users/dave/.emacs.d/el-get/nognus/lisp/deuglify hides /opt/local/share/emacs/24.1/lisp/gnus/deuglify
/Users/dave/.emacs.d/el-get/nognus/lisp/compface hides /opt/local/share/emacs/24.1/lisp/gnus/compface
/Users/dave/.emacs.d/el-get/nognus/lisp/canlock hides /opt/local/share/emacs/24.1/lisp/gnus/canlock
/Users/dave/.emacs.d/el-get/nognus/lisp/auth-source hides /opt/local/share/emacs/24.1/lisp/gnus/auth-source
/Users/dave/.emacs.d/el-get/org-mode/.dir-locals hides /opt/local/share/emacs/24.1/lisp/gnus/.dir-locals
/Users/dave/.emacs.d/el-get/dwamacs/site-lisp/ert hides /opt/local/share/emacs/24.1/lisp/emacs-lisp/ert
/Users/dave/.emacs.d/el-get/dwamacs/site-lisp/ert-x hides /opt/local/share/emacs/24.1/lisp/emacs-lisp/ert-x
/Users/dave/.emacs.d/el-get/nognus/lisp/time-date hides /opt/local/share/emacs/24.1/lisp/calendar/time-date
/Users/dave/.emacs.d/el-get/nognus/lisp/parse-time hides /opt/local/share/emacs/24.1/lisp/calendar/parse-time
/Users/dave/.emacs.d/el-get/semi/site-lisp/semi/pgg hides /opt/local/share/emacs/24.1/lisp/obsolete/pgg
/Users/dave/.emacs.d/el-get/semi/site-lisp/semi/pgg-pgp5 hides /opt/local/share/emacs/24.1/lisp/obsolete/pgg-pgp5
/Users/dave/.emacs.d/el-get/semi/site-lisp/semi/pgg-pgp hides /opt/local/share/emacs/24.1/lisp/obsolete/pgg-pgp
/Users/dave/.emacs.d/el-get/semi/site-lisp/semi/pgg-parse hides /opt/local/share/emacs/24.1/lisp/obsolete/pgg-parse
/Users/dave/.emacs.d/el-get/semi/site-lisp/semi/pgg-gpg hides /opt/local/share/emacs/24.1/lisp/obsolete/pgg-gpg
/Users/dave/.emacs.d/el-get/semi/site-lisp/semi/pgg-def hides /opt/local/share/emacs/24.1/lisp/obsolete/pgg-def

Features:
(shadow emacsbug debug wg-bufs hl-line find-dired grep+ grep-ed
hilit-chg grep image-file novice dabbrev man make-mode ediff-merg
ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff
timezone nnregistry gnus-html tramp-sh cal-china lunar solar cal-dst
cal-bahai cal-islam cal-hebrew holidays hol-loaddefs diary-lib
diary-loaddefs cal-iso bookmark tabify org-magit org-capture org-mks
magit-bisect magit-key-mode magit diff-mode log-edit pcvs-util vc-git
conf-mode unsafep nndoc crm debbugs-gnu debbugs soap-client url-queue
shr-color color dired-aux ede/dired gnus-dired tramp-cache tramp
tramp-compat tramp-loaddefs flow-fill dot-org-el org-checklist ob-python
ob-R ox-redmine ox-org org-x ox-plugin org-devonthink org-habit
org-agenda org-info org-id ob-sh shell 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 pcomplete org-list org-faces org-compat org-entities
org-macs noutline outline cal-menu calendar cal-loaddefs nnfolder
canlock compile+ compile compile- python-21 python comint recentf
tree-widget newcomment compface gnus-fun shr browse-url sort smiley
ansi-color mule-util qp gnus-async gnus-bcklg gnus-salt gnus-dup gnus-ml
nnir mm-archive url-http url-gw url-auth url-handlers nnrss mm-url
multi-isearch gnus-topic nndraft nnmh utf-7 epa-file epa epg gnutls
network-stream nnimap parse-time tls utf7 netrc gnus-agent gnus-srvr
gnus-score score-mode nnvirtual nntp gnus-cache dot-gnus-el
mail-settings gnus-cite w3m-load spam spam-stat gnus-uu yenc gnus-msg
gnus-gravatar mail-extr gravatar url-cache gnus-registry registry
gnus-art rfc1843 mm-uu mml2015 epg-config mm-view mml-smime smime dig
gnus-sum nnoo gnus-group gnus-undo nnmail mail-source gnus-start
gnus-spec gnus-win gnus-int gnus-range pgg pgg-parse mel path-util
mime-def mcharset mcs-20 mcs-e20 pces pces-e20 pces-20 pcustom pccl
pccl-20 ccl broken poe pgg-def luna calist alist pym static apel-ver
product starttls gnus-harvest message idna format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader mailalias sendmail rfc2047 rfc2045 ietf-drums gnus
gnus-ems gnus-compat url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-util url-parse auth-source password-cache
url-vars mailcap nnheader gnus-util mail-utils mm-util mail-prsvr
company-autoloads weblogger-autoloads xml-rpc-autoloads maxframe session
per-window-point page-ext disp-table pp-c-l ws-trim ffap info+ fit-frame
strings misc-fns thingatpt+ osx-plist xml dot-passwd-el .loaddefs
xcscope workgroups php-mode add-log etags cc-langs org-install gnus-load
mo-git-blame eproject-extras ibuf-macs ibuf-ext ibuffer iswitchb
eproject ring esh-var esh-io esh-cmd esh-ext esh-proc esh-arg eldoc
esh-groups eshell esh-module esh-mode esh-util edg cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
yasnippet dropdown-list derived edmacro kmacro initsplit warnings advice
advice-preload cus-edit find-func diminish cmake-mode thingatpt el-get
el-get-autoloads el-get-list-packages el-get-notify help-mode view
el-get-dependencies el-get-build el-get-status pp el-get-recipes
el-get-byte-compile el-get-methods el-get-fossil el-get-svn
el-get-pacman el-get-github-zip el-get-github-tar el-get-http-zip
el-get-http-tar el-get-hg el-get-git-svn el-get-fink el-get-emacswiki
el-get-http el-get-emacsmirror el-get-github el-get-git el-get-elpa
package tabulated-list el-get-darcs el-get-cvs el-get-bzr el-get-brew
el-get-builtin el-get-apt-get el-get-custom el-get-core autoload
help-fns cl dired-x dired regexp-opt easy-mmode jka-compr info ede/linux
ede/emacs ede/cpp-root paren server ido ede/speedbar ede/files ede
ede/base ede/auto ede/source eieio-base eieio-speedbar speedbar sb-image
ezimage dframe easymenu assoc eieio-custom wid-edit eieio byte-opt
bytecomp byte-compile cconv macroexp cedet autorevert time delsel
cus-start cus-load elhome time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel mac-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 mac multi-tty make-network-process
emacs)

-- 
Dave Abrahams
BoostPro Computing                  Software Development        Training
http://www.boostpro.com             Clang/LLVM/EDG Compilers  C++  Boost






^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-28 20:47 bug#12081: 24.1; buffer-predicate often not called Dave Abrahams
@ 2012-07-29 13:56 ` martin rudalics
  2012-07-29 15:05   ` Dave Abrahams
  0 siblings, 1 reply; 25+ messages in thread
From: martin rudalics @ 2012-07-29 13:56 UTC (permalink / raw)
  To: Dave Abrahams; +Cc: 12081

 > 1. Evaluate:
 >
 > (set-frame-parameter
 >    (selected-frame)
 >    'buffer-predicate (lambda (b) (message "buffer predicate: %s" b)))
 >
 > 2. `C-x C-f /tmp/xx RET'
 >
 > 3. `C-x C-f /tmp/yy RET'
 >
 > 4. `C-x k RET'
 >
 > 5. `M-: (message "======")'
 >
 > 6. `C-x b *Messages* RET'
 >
 > This shows that the buffer-predicate never called when deciding what
 > buffer to replace yy with.

Not so here: *Messages* contains the three lines fragment below

=====
"====="
buffer predicate: *scratch*

martin





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-29 13:56 ` martin rudalics
@ 2012-07-29 15:05   ` Dave Abrahams
  2012-07-29 17:08     ` martin rudalics
  0 siblings, 1 reply; 25+ messages in thread
From: Dave Abrahams @ 2012-07-29 15:05 UTC (permalink / raw)
  To: martin rudalics; +Cc: 12081


on Sun Jul 29 2012, martin rudalics <rudalics-AT-gmx.at> wrote:

>> 1. Evaluate:
>>
>> (set-frame-parameter
>>    (selected-frame)
>>    'buffer-predicate (lambda (b) (message "buffer predicate: %s" b)))
>
>>
>> 2. `C-x C-f /tmp/xx RET'
>>
>> 3. `C-x C-f /tmp/yy RET'
>>
>> 4. `C-x k RET'
>>
>> 5. `M-: (message "======")'
>>
>> 6. `C-x b *Messages* RET'
>>
>> This shows that the buffer-predicate never called when deciding what
>> buffer to replace yy with.
>
> Not so here: *Messages* contains the three lines fragment below
>
> =====
> "====="
> buffer predicate: *scratch*

Actually that shows exactly what I claimed.  There's a reason I added
step 5.  The buffer predicate is not called until we try to switch to
the *Messages* buffer.  IMO it should be called when yy is killed.

-- 
Dave Abrahams
BoostPro Computing                  Software Development        Training
http://www.boostpro.com             Clang/LLVM/EDG Compilers  C++  Boost





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-29 15:05   ` Dave Abrahams
@ 2012-07-29 17:08     ` martin rudalics
  2012-07-29 17:31       ` Alp Aker
  0 siblings, 1 reply; 25+ messages in thread
From: martin rudalics @ 2012-07-29 17:08 UTC (permalink / raw)
  To: Dave Abrahams; +Cc: 12081

 >>> 1. Evaluate:
 >>>
 >>> (set-frame-parameter
 >>>    (selected-frame)
 >>>    'buffer-predicate (lambda (b) (message "buffer predicate: %s" b)))
 >>> 2. `C-x C-f /tmp/xx RET'
 >>>
 >>> 3. `C-x C-f /tmp/yy RET'
 >>>
 >>> 4. `C-x k RET'
 >>>
 >>> 5. `M-: (message "======")'
 >>>
 >>> 6. `C-x b *Messages* RET'
 >>>
 >>> This shows that the buffer-predicate never called when deciding what
 >>> buffer to replace yy with.
 >> Not so here: *Messages* contains the three lines fragment below
 >>
 >> =====
 >> "====="
 >> buffer predicate: *scratch*
 >
 > Actually that shows exactly what I claimed.  There's a reason I added
 > step 5.  The buffer predicate is not called until we try to switch to
 > the *Messages* buffer.  IMO it should be called when yy is killed.

I see.  But `kill-buffer' calls `replace-buffer-in-windows' which
doesn't call `other-buffer'.  Only if the buffer to be killed is still
current after that, `kill-buffer' calls `other-buffer'.  In the scenario
above it is not called.

Why is showing the buffer visiting /tmp/xx bad in your scenario?  Can
you give a scenario where the present behavior really hurts you?  In
that case we can try to ignore such a buffer in `switch-to-prev-buffer'.

martin





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-29 17:08     ` martin rudalics
@ 2012-07-29 17:31       ` Alp Aker
  2012-07-29 18:24         ` Dave Abrahams
                           ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Alp Aker @ 2012-07-29 17:31 UTC (permalink / raw)
  To: martin rudalics; +Cc: Dave Abrahams, 12081

On Sun, Jul 29, 2012 at 1:08 PM, martin rudalics <rudalics@gmx.at> wrote:
> I see.  But `kill-buffer' calls `replace-buffer-in-windows' which
> doesn't call `other-buffer'.  Only if the buffer to be killed is still
> current after that, `kill-buffer' calls `other-buffer'.  In the scenario
> above it is not called.
>
> Why is showing the buffer visiting /tmp/xx bad in your scenario?  Can
> you give a scenario where the present behavior really hurts you?  In
> that case we can try to ignore such a buffer in `switch-to-prev-buffer'.

Well, note that it's a regression:  replace-buffer-in-windows used to
call other-window (via window-loop).

As for how it hurts not to check buffer predicates in
swtich-to-prev-buffer:  Buffer predicates are supposed to provide a
way of exercising some control over what buffers are automatically
selected for display.  But if kill-buffer doesn't respect buffer
predicates, then there's not much point to setting up a buffer
predicate at all:  why bother filtering buffers chosen for display, if
the filter isn't respected by one of the most common ways in which a
buffer is chosen for the user?

It seems like something like the following would restore the old functionality:

=== modified file 'lisp/window.el'
--- lisp/window.el	2012-07-18 10:02:54 +0000
+++ lisp/window.el	2012-07-29 16:59:18 +0000
@@ -2679,10 +2679,12 @@
 	 (old-buffer (window-buffer window))
 	 ;; Save this since it's destroyed by `set-window-buffer'.
 	 (next-buffers (window-next-buffers window))
+         (pred (frame-parameter frame 'buffer-predicate))
 	 entry new-buffer killed-buffers visible)
     (when (window-dedicated-p window)
       (error "Window %s is dedicated to buffer %s" window old-buffer))

+    (unless
     (catch 'found
       ;; Scan WINDOW's previous buffers first, skipping entries of next
       ;; buffers.
@@ -2692,6 +2694,7 @@
 		       (not (setq killed-buffers
 				  (cons new-buffer killed-buffers))))
 		   (not (eq new-buffer old-buffer))
+                   (or (null pred) (funcall pred new-buffer))
                    (or bury-or-kill
 		       (not (memq new-buffer next-buffers))))
 	  (if (and (not switch-to-visible-buffer)
@@ -2713,6 +2716,7 @@
 	(when (and (buffer-live-p buffer)
 		   (not (eq buffer old-buffer))
 		   (not (eq (aref (buffer-name buffer) 0) ?\s))
+                   (or (null pred) (funcall pred buffer))
 		   (or bury-or-kill (not (memq buffer next-buffers))))
 	  (if (get-buffer-window buffer frame)
 	      ;; Try to avoid showing a buffer visible in some other window.
@@ -2731,16 +2735,22 @@
 			 (not (setq killed-buffers
 				    (cons buffer killed-buffers))))
 		     (not (eq buffer old-buffer))
+                     (or (null pred) (funcall pred buffer))
 		     (setq entry (assq buffer (window-prev-buffers window))))
 	    (setq new-buffer buffer)
 	    (set-window-buffer-start-and-point
 	     window new-buffer (nth 1 entry) (nth 2 entry))
-	    (throw 'found t))))
-
-      ;; Show a buffer visible in another window.
-      (when visible
-	(setq new-buffer visible)
-	(set-window-buffer-start-and-point window new-buffer)))
+	    (throw 'found t)))))
+
+      ;; If we reach this, then either: (1) we have a
+      ;; candidate buffer that was skipped because it was already visible on
+      ;; the frame, in which case we switch to it now, or (2) no candidate
+      ;; was found, in which case we switch to *scratch*.
+      (if visible
+          (setq new-buffer visible)
+        (setq new-buffer (get-buffer-create "*scratch*")))
+      (set-window-buffer-start-and-point window new-buffer))
+

     (if bury-or-kill
 	;; Remove `old-buffer' from WINDOW's previous and (restored list
@@ -2773,10 +2783,12 @@
 	 (frame (window-frame window))
 	 (old-buffer (window-buffer window))
 	 (next-buffers (window-next-buffers window))
+         (pred (frame-parameter frame 'buffer-predicate))
 	 new-buffer entry killed-buffers visible)
     (when (window-dedicated-p window)
       (error "Window %s is dedicated to buffer %s" window old-buffer))

+    (unless
     (catch 'found
       ;; Scan WINDOW's next buffers first.
       (dolist (buffer next-buffers)
@@ -2784,6 +2796,7 @@
 		       (not (setq killed-buffers
 				  (cons buffer killed-buffers))))
 		   (not (eq buffer old-buffer))
+                   (or (null pred) (funcall pred buffer))
 		   (setq entry (assq buffer (window-prev-buffers window))))
 	  (setq new-buffer buffer)
 	  (set-window-buffer-start-and-point
@@ -2794,6 +2807,7 @@
       (dolist (buffer (buffer-list frame))
 	(when (and (buffer-live-p buffer) (not (eq buffer old-buffer))
 		   (not (eq (aref (buffer-name buffer) 0) ?\s))
+                   (or (null pred) (funcall pred buffer))
 		   (not (assq buffer (window-prev-buffers window))))
 	  (if (get-buffer-window buffer frame)
 	      ;; Try to avoid showing a buffer visible in some other window.
@@ -2808,6 +2822,7 @@
 		   (or (buffer-live-p new-buffer)
 		       (not (setq killed-buffers
 				  (cons new-buffer killed-buffers))))
+                   (or (null pred) (funcall pred new-buffer))
 		   (not (eq new-buffer old-buffer)))
 	  (if (and (not switch-to-visible-buffer)
 		   (get-buffer-window new-buffer frame))
@@ -2816,12 +2831,17 @@
 		(setq visible new-buffer))
 	    (set-window-buffer-start-and-point
 	     window new-buffer (nth 1 entry) (nth 2 entry))
-	    (throw 'found t))))
-
-      ;; Show a buffer visible in another window.
-      (when visible
-	(setq new-buffer visible)
-	(set-window-buffer-start-and-point window new-buffer)))
+	    (throw 'found t)))))
+
+      ;; If we reach this, then either: (1) we have a candidate buffer that
+      ;; was skipped because it was already visible on the frame, in which
+      ;; case we switch to it now, or (2) no candidate was found, in which
+      ;; case we switch to *scratch*.
+      (if visible
+          (setq new-buffer visible)
+        (setq new-buffer (get-buffer-create "*scratch*")))
+      (set-window-buffer-start-and-point window new-buffer))
+

     ;; Remove `new-buffer' from and restore WINDOW's next buffers.
     (set-window-next-buffers window (delq new-buffer next-buffers))





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-29 17:31       ` Alp Aker
@ 2012-07-29 18:24         ` Dave Abrahams
  2012-07-29 21:37         ` Dave Abrahams
  2012-07-30  9:13         ` martin rudalics
  2 siblings, 0 replies; 25+ messages in thread
From: Dave Abrahams @ 2012-07-29 18:24 UTC (permalink / raw)
  To: Alp Aker; +Cc: 12081


on Sun Jul 29 2012, Alp Aker <alptekin.aker-AT-gmail.com> wrote:

> On Sun, Jul 29, 2012 at 1:08 PM, martin rudalics <rudalics@gmx.at> wrote:
>> I see.  But `kill-buffer' calls `replace-buffer-in-windows' which
>> doesn't call `other-buffer'.  Only if the buffer to be killed is still
>> current after that, `kill-buffer' calls `other-buffer'.  In the scenario
>> above it is not called.
>>
>> Why is showing the buffer visiting /tmp/xx bad in your scenario?  Can
>> you give a scenario where the present behavior really hurts you?  In
>> that case we can try to ignore such a buffer in `switch-to-prev-buffer'.
>
> Well, note that it's a regression:  replace-buffer-in-windows used to
> call other-window (via window-loop).
>
> As for how it hurts not to check buffer predicates in
> swtich-to-prev-buffer:  Buffer predicates are supposed to provide a
> way of exercising some control over what buffers are automatically
> selected for display.  But if kill-buffer doesn't respect buffer
> predicates, then there's not much point to setting up a buffer
> predicate at all:  why bother filtering buffers chosen for display, if
> the filter isn't respected by one of the most common ways in which a
> buffer is chosen for the user?

Which is what I meant by "this renders the buffer-predicate
not-very-useful."

Thanks for explaining all that for me, Alp, and for your suggested fix.
As for my use-case, it's all in
https://github.com/dabrahams/workgroups.el/commit/88a605d2a6ba47ea7a918ee8650441317826cddb
(Workgroups with buffer affinity).

>
> It seems like something like the following would restore the old functionality:
>
> === modified file 'lisp/window.el'
> --- lisp/window.el	2012-07-18 10:02:54 +0000
> +++ lisp/window.el	2012-07-29 16:59:18 +0000
> @@ -2679,10 +2679,12 @@
>  	 (old-buffer (window-buffer window))
>  	 ;; Save this since it's destroyed by `set-window-buffer'.
>  	 (next-buffers (window-next-buffers window))
> +         (pred (frame-parameter frame 'buffer-predicate))
>  	 entry new-buffer killed-buffers visible)
>      (when (window-dedicated-p window)
>        (error "Window %s is dedicated to buffer %s" window old-buffer))
>
> +    (unless
>      (catch 'found
>        ;; Scan WINDOW's previous buffers first, skipping entries of next
>        ;; buffers.
> @@ -2692,6 +2694,7 @@
>  		       (not (setq killed-buffers
>  				  (cons new-buffer killed-buffers))))
>  		   (not (eq new-buffer old-buffer))
> +                   (or (null pred) (funcall pred new-buffer))
>                     (or bury-or-kill
>  		       (not (memq new-buffer next-buffers))))
>  	  (if (and (not switch-to-visible-buffer)
> @@ -2713,6 +2716,7 @@
>  	(when (and (buffer-live-p buffer)
>  		   (not (eq buffer old-buffer))
>  		   (not (eq (aref (buffer-name buffer) 0) ?\s))
> +                   (or (null pred) (funcall pred buffer))
>  		   (or bury-or-kill (not (memq buffer next-buffers))))
>  	  (if (get-buffer-window buffer frame)
>  	      ;; Try to avoid showing a buffer visible in some other window.
> @@ -2731,16 +2735,22 @@
>  			 (not (setq killed-buffers
>  				    (cons buffer killed-buffers))))
>  		     (not (eq buffer old-buffer))
> +                     (or (null pred) (funcall pred buffer))
>  		     (setq entry (assq buffer (window-prev-buffers window))))
>  	    (setq new-buffer buffer)
>  	    (set-window-buffer-start-and-point
>  	     window new-buffer (nth 1 entry) (nth 2 entry))
> -	    (throw 'found t))))
> -
> -      ;; Show a buffer visible in another window.
> -      (when visible
> -	(setq new-buffer visible)
> -	(set-window-buffer-start-and-point window new-buffer)))
> +	    (throw 'found t)))))
> +
> +      ;; If we reach this, then either: (1) we have a
> +      ;; candidate buffer that was skipped because it was already visible on
> +      ;; the frame, in which case we switch to it now, or (2) no candidate
> +      ;; was found, in which case we switch to *scratch*.
> +      (if visible
> +          (setq new-buffer visible)
> +        (setq new-buffer (get-buffer-create "*scratch*")))
> +      (set-window-buffer-start-and-point window new-buffer))
> +
>
>      (if bury-or-kill
>  	;; Remove `old-buffer' from WINDOW's previous and (restored list
> @@ -2773,10 +2783,12 @@
>  	 (frame (window-frame window))
>  	 (old-buffer (window-buffer window))
>  	 (next-buffers (window-next-buffers window))
> +         (pred (frame-parameter frame 'buffer-predicate))
>  	 new-buffer entry killed-buffers visible)
>      (when (window-dedicated-p window)
>        (error "Window %s is dedicated to buffer %s" window old-buffer))
>
> +    (unless
>      (catch 'found
>        ;; Scan WINDOW's next buffers first.
>        (dolist (buffer next-buffers)
> @@ -2784,6 +2796,7 @@
>  		       (not (setq killed-buffers
>  				  (cons buffer killed-buffers))))
>  		   (not (eq buffer old-buffer))
> +                   (or (null pred) (funcall pred buffer))
>  		   (setq entry (assq buffer (window-prev-buffers window))))
>  	  (setq new-buffer buffer)
>  	  (set-window-buffer-start-and-point
> @@ -2794,6 +2807,7 @@
>        (dolist (buffer (buffer-list frame))
>  	(when (and (buffer-live-p buffer) (not (eq buffer old-buffer))
>  		   (not (eq (aref (buffer-name buffer) 0) ?\s))
> +                   (or (null pred) (funcall pred buffer))
>  		   (not (assq buffer (window-prev-buffers window))))
>  	  (if (get-buffer-window buffer frame)
>  	      ;; Try to avoid showing a buffer visible in some other window.
> @@ -2808,6 +2822,7 @@
>  		   (or (buffer-live-p new-buffer)
>  		       (not (setq killed-buffers
>  				  (cons new-buffer killed-buffers))))
> +                   (or (null pred) (funcall pred new-buffer))
>  		   (not (eq new-buffer old-buffer)))
>  	  (if (and (not switch-to-visible-buffer)
>  		   (get-buffer-window new-buffer frame))
> @@ -2816,12 +2831,17 @@
>  		(setq visible new-buffer))
>  	    (set-window-buffer-start-and-point
>  	     window new-buffer (nth 1 entry) (nth 2 entry))
> -	    (throw 'found t))))
> -
> -      ;; Show a buffer visible in another window.
> -      (when visible
> -	(setq new-buffer visible)
> -	(set-window-buffer-start-and-point window new-buffer)))
> +	    (throw 'found t)))))
> +
> +      ;; If we reach this, then either: (1) we have a candidate buffer that
> +      ;; was skipped because it was already visible on the frame, in which
> +      ;; case we switch to it now, or (2) no candidate was found, in which
> +      ;; case we switch to *scratch*.
> +      (if visible
> +          (setq new-buffer visible)
> +        (setq new-buffer (get-buffer-create "*scratch*")))
> +      (set-window-buffer-start-and-point window new-buffer))
> +
>
>      ;; Remove `new-buffer' from and restore WINDOW's next buffers.
>      (set-window-next-buffers window (delq new-buffer next-buffers))

-- 
Dave Abrahams
BoostPro Computing                  Software Development        Training
http://www.boostpro.com             Clang/LLVM/EDG Compilers  C++  Boost





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-29 17:31       ` Alp Aker
  2012-07-29 18:24         ` Dave Abrahams
@ 2012-07-29 21:37         ` Dave Abrahams
  2012-07-29 23:30           ` Alp Aker
  2012-07-30  9:13         ` martin rudalics
  2 siblings, 1 reply; 25+ messages in thread
From: Dave Abrahams @ 2012-07-29 21:37 UTC (permalink / raw)
  To: Alp Aker; +Cc: 12081


on Sun Jul 29 2012, Alp Aker <alptekin.aker-AT-gmail.com> wrote:

> It seems like something like the following would restore the old functionality:
>
> === modified file 'lisp/window.el'
> --- lisp/window.el	2012-07-18 10:02:54 +0000
> +++ lisp/window.el	2012-07-29 16:59:18 +0000
> @@ -2679,10 +2679,12 @@

<schnipp>

Alp, I tried applying your patch (**) and the most curious thing
happens: if I just run my test, it fails.  However, if the first thing I
do is `M-x load-library window RET', it passes.  This is true whether I
byte-compile window.el.gz or not.

(**) well; a slightly adjusted one for my version of Emacs
(https://gist.github.com/9504f1ae730f4db4c741) but I have confidence
because only line numbers were changed and it otherwise applied cleanly.

-- 
Dave Abrahams
BoostPro Computing                  Software Development        Training
http://www.boostpro.com             Clang/LLVM/EDG Compilers  C++  Boost





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-29 21:37         ` Dave Abrahams
@ 2012-07-29 23:30           ` Alp Aker
  2012-07-29 23:53             ` Dave Abrahams
  0 siblings, 1 reply; 25+ messages in thread
From: Alp Aker @ 2012-07-29 23:30 UTC (permalink / raw)
  To: Dave Abrahams; +Cc: 12081

> Alp, I tried applying your patch (**) and the most curious thing
> happens: if I just run my test, it fails.  However, if the first thing I
> do is `M-x load-library window RET', it passes.  This is true whether I
> byte-compile window.el.gz or not.

You need to redump emacs, since your current binary already
incorporates the old windows.el.





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-29 23:30           ` Alp Aker
@ 2012-07-29 23:53             ` Dave Abrahams
  0 siblings, 0 replies; 25+ messages in thread
From: Dave Abrahams @ 2012-07-29 23:53 UTC (permalink / raw)
  To: Alp Aker; +Cc: 12081


on Sun Jul 29 2012, Alp Aker <alptekin.aker-AT-gmail.com> wrote:

>> Alp, I tried applying your patch (**) and the most curious thing
>> happens: if I just run my test, it fails.  However, if the first thing I
>> do is `M-x load-library window RET', it passes.  This is true whether I
>> byte-compile window.el.gz or not.
>
> You need to redump emacs, since your current binary already
> incorporates the old windows.el.

I had no idea it was built into the binary; thanks!

-- 
Dave Abrahams
BoostPro Computing                  Software Development        Training
http://www.boostpro.com             Clang/LLVM/EDG Compilers  C++  Boost





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-29 17:31       ` Alp Aker
  2012-07-29 18:24         ` Dave Abrahams
  2012-07-29 21:37         ` Dave Abrahams
@ 2012-07-30  9:13         ` martin rudalics
  2012-07-30  9:35           ` Dave Abrahams
  2012-07-30 16:22           ` Alp Aker
  2 siblings, 2 replies; 25+ messages in thread
From: martin rudalics @ 2012-07-30  9:13 UTC (permalink / raw)
  To: Alp Aker; +Cc: Dave Abrahams, 12081

 >> Why is showing the buffer visiting /tmp/xx bad in your scenario?  Can
 >> you give a scenario where the present behavior really hurts you?  In
 >> that case we can try to ignore such a buffer in `switch-to-prev-buffer'.
 >
 > Well, note that it's a regression:  replace-buffer-in-windows used to
 > call other-window (via window-loop).

This doesn't explain why showing the buffer visiting /tmp/xx is bad
here.  If you show a buffer A in a window, then show a buffer B in that
window and subsequently kill B, the most natural thing is to show A
again in that window.  In particular so, if B was used to display some
temporary information.

 > As for how it hurts not to check buffer predicates in
 > swtich-to-prev-buffer:  Buffer predicates are supposed to provide a
 > way of exercising some control over what buffers are automatically
 > selected for display.

In Dave's scenario neither of the file visiting buffers was shown
automatically but under the user's control.

 > But if kill-buffer doesn't respect buffer
 > predicates, then there's not much point to setting up a buffer
 > predicate at all:  why bother filtering buffers chosen for display, if
 > the filter isn't respected by one of the most common ways in which a
 > buffer is chosen for the user?

`other-buffer' is used in many places for different reasons, so it's by
no means obvious that it's about "filtering buffers chosen for display".
It has been used in `replace-buffer-in-windows' because there was no
better alternative.  And it might have been a good idea to not call this
parameter "buffer-predicate" in the first place but something more
indicative.  Also the manual text

 > `buffer-predicate'
 >      The buffer-predicate function for this frame.  The function
 >      `other-buffer' uses this predicate (from the selected frame) to
 >      decide which buffers it should consider, if the predicate is not
 >      `nil'.  It calls the predicate with one argument, a buffer, once
 >      for each buffer; if the predicate returns a non-`nil' value, it
 >      considers that buffer.

is misleading: Neither `other-buffer' nor `replace-buffer-in-windows'
necessarily care about which frame is selected when they get called.
When killing a buffer `replace-buffer-in-windows' obviously has to act
on all windows on all frames.

 > It seems like something like the following would restore the old functionality:

What's the reason for doing

 > +      ;; If we reach this, then either: (1) we have a
 > +      ;; candidate buffer that was skipped because it was already visible on
 > +      ;; the frame, in which case we switch to it now, or (2) no candidate
 > +      ;; was found, in which case we switch to *scratch*.
 > +      (if visible
 > +          (setq new-buffer visible)
 > +        (setq new-buffer (get-buffer-create "*scratch*")))
 > +      (set-window-buffer-start-and-point window new-buffer))
 > +
[...]
 > +      ;; If we reach this, then either: (1) we have a candidate buffer that
 > +      ;; was skipped because it was already visible on the frame, in which
 > +      ;; case we switch to it now, or (2) no candidate was found, in which
 > +      ;; case we switch to *scratch*.
 > +      (if visible
 > +          (setq new-buffer visible)
 > +        (setq new-buffer (get-buffer-create "*scratch*")))
 > +      (set-window-buffer-start-and-point window new-buffer))
 > +

IIUC these changes are not related to the issue we're discussing here.
Apart from that I see no problems applying your patch.

martin





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-30  9:13         ` martin rudalics
@ 2012-07-30  9:35           ` Dave Abrahams
  2012-07-30 17:42             ` martin rudalics
  2012-07-30 16:22           ` Alp Aker
  1 sibling, 1 reply; 25+ messages in thread
From: Dave Abrahams @ 2012-07-30  9:35 UTC (permalink / raw)
  To: martin rudalics; +Cc: Alp Aker, 12081


on Mon Jul 30 2012, martin rudalics <rudalics-AT-gmx.at> wrote:

>>> Why is showing the buffer visiting /tmp/xx bad in your scenario?  Can
>>> you give a scenario where the present behavior really hurts you?  In
>>> that case we can try to ignore such a buffer in `switch-to-prev-buffer'.
>>
>> Well, note that it's a regression:  replace-buffer-in-windows used to
>> call other-window (via window-loop).
>
> This doesn't explain why showing the buffer visiting /tmp/xx is bad
> here.  

<sigh>

It's only bad because the documentation led me to believe that I could
control what would be shown after kill-buffer by using buffer-predicate.
This is a *manufactured* test case, because my real use case is a lot
more complicated to set up.  But I gave references to the actual case if
you really care about the motivation.

> If you show a buffer A in a window, then show a buffer B in that
> window and subsequently kill B, the most natural thing is to show A
> again in that window.  In particular so, if B was used to display some
> temporary information.

I don't think anyone disputes that the current behavior is a good
default.  But Emacs is all about customization, and overriding defaults
is an important part of that.

>> As for how it hurts not to check buffer predicates in
>> swtich-to-prev-buffer:  Buffer predicates are supposed to provide a
>> way of exercising some control over what buffers are automatically
>> selected for display.
>
> In Dave's scenario neither of the file visiting buffers was shown
> automatically but under the user's control.

True, but I'm not sure what your point is here.  I expected to be able
to exercise some control, but couldn't.

>> But if kill-buffer doesn't respect buffer
>> predicates, then there's not much point to setting up a buffer
>> predicate at all:  why bother filtering buffers chosen for display, if
>> the filter isn't respected by one of the most common ways in which a
>> buffer is chosen for the user?
>
> `other-buffer' is used in many places for different reasons, so it's by
> no means obvious that it's about "filtering buffers chosen for
> display".

The intended use of "buffer-predicate" has no obvious (to me) connection
with the places or reasons that other-buffer is used.

> It has been used in `replace-buffer-in-windows' because there was no
> better alternative.  And it might have been a good idea to not call
> this parameter "buffer-predicate" in the first place but something
> more indicative.  

Indicative of what?

> Also the manual text
>
>> `buffer-predicate'
>>      The buffer-predicate function for this frame.  The function
>>      `other-buffer' uses this predicate (from the selected frame) to
>>      decide which buffers it should consider, if the predicate is not
>>      `nil'.  It calls the predicate with one argument, a buffer, once
>>      for each buffer; if the predicate returns a non-`nil' value, it
>>      considers that buffer.
>
> is misleading: 

> Neither `other-buffer' nor `replace-buffer-in-windows' necessarily
> care about which frame is selected when they get called.  When killing
> a buffer `replace-buffer-in-windows' obviously has to act on all
> windows on all frames.

IMO this means the result of (selected-frame) will be temporarily set,
during the call to buffer-predicate, for each frame that needs to be
changed, and buffer-predicate will be called for each such frame.  Those
are the only semantics that make sense as long as buffer-predicate takes
one argument.

-- 
Dave Abrahams
BoostPro Computing                  Software Development        Training
http://www.boostpro.com             Clang/LLVM/EDG Compilers  C++  Boost





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-30  9:13         ` martin rudalics
  2012-07-30  9:35           ` Dave Abrahams
@ 2012-07-30 16:22           ` Alp Aker
  2012-07-30 16:33             ` Alp Aker
  2012-07-30 17:42             ` martin rudalics
  1 sibling, 2 replies; 25+ messages in thread
From: Alp Aker @ 2012-07-30 16:22 UTC (permalink / raw)
  To: martin rudalics; +Cc: Dave Abrahams, 12081

On Mon, Jul 30, 2012 at 5:13 AM, martin rudalics <rudalics@gmx.at> wrote:
>
> What's the reason for doing
>
>> +      ;; If we reach this, then either: (1) we have a
>> +      ;; candidate buffer that was skipped because it was already visible
>> on
>> +      ;; the frame, in which case we switch to it now, or (2) no
>> candidate
>> +      ;; was found, in which case we switch to *scratch*.
>> +      (if visible
>> +          (setq new-buffer visible)
>> +        (setq new-buffer (get-buffer-create "*scratch*")))
>> +      (set-window-buffer-start-and-point window new-buffer))
>
> IIUC these changes are not related to the issue we're discussing here.

Adding a buffer predicate test creates a new edge case, which the
above code is intended to handle.

With the existing code, it's guaranteed that either (1) we switch to a
new buffer while scanning the next buffers or the prev buffers, or (2)
we finish those scans with `visible' set to a buffer we can switch to.
 By adding a buffer predicate test to the loops, we break that
guarantee; it becomes possible to finish the scan without switching to
a new buffer and without setting `visible' to a candidate new buffer.
This would break the function unless we provide for that case.

The question then becomes, how to deal with such a case (when the scan
of prev and next buffers does not switch to a new buffer and does not
set `visible').  One obvious option is:  Do nothing, and adjust the
rest of the function to accomodate that possibility.  Another is to
choose *scratch* as the fallback value for `new-buffer', when no other
buffer passes all the tests.  The latter seemed to me to be
preferable, as it makes replace-buffer-in-windows and
replace_buffer_in_windows_safely have similar fallback behavior, and
agrees with the fallback behavior of other-buffer as well.





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-30 16:22           ` Alp Aker
@ 2012-07-30 16:33             ` Alp Aker
  2012-07-30 17:42               ` martin rudalics
  2012-07-30 17:42             ` martin rudalics
  1 sibling, 1 reply; 25+ messages in thread
From: Alp Aker @ 2012-07-30 16:33 UTC (permalink / raw)
  To: martin rudalics; +Cc: 12081

On Mon, Jul 30, 2012 at 12:22 PM, Alp Aker <alptekin.aker@gmail.com> wrote:

> With the existing code, it's guaranteed that either (1) we switch to a
> new buffer while scanning the next buffers or the prev buffers, or (2)
> we finish those scans with `visible' set to a buffer we can switch to.

Actually, it appears I'm wrong about that.  The existing code doesn't
make such a guarantee.  Still, it seems to me preferable to have
replace-buffer-in-windows and replace_buffer_in_windows_safely agree
on what to do as a last resort; that creates a more consistent user
experience.





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-30  9:35           ` Dave Abrahams
@ 2012-07-30 17:42             ` martin rudalics
  2012-07-30 20:13               ` Dave Abrahams
  0 siblings, 1 reply; 25+ messages in thread
From: martin rudalics @ 2012-07-30 17:42 UTC (permalink / raw)
  To: Dave Abrahams; +Cc: Alp Aker, 12081

 >> This doesn't explain why showing the buffer visiting /tmp/xx is bad
 >> here.
 >
 > <sigh>
 >
 > It's only bad because the documentation led me to believe that I could
 > control what would be shown after kill-buffer by using buffer-predicate.
 > This is a *manufactured* test case, because my real use case is a lot
 > more complicated to set up.  But I gave references to the actual case if
 > you really care about the motivation.

The reference you gave is entitled "Associate buffers with the last
frame in which they appeared" and I didn't see how the current behavior
which "associates windows with the last buffer they showed" would
contradict it.  Maybe there's some bug in `switch-to-prev-buffer' which
inhibits it to behave as you want without having to customize some other
option.  An example might have helped to sort out such a case.

 > The intended use of "buffer-predicate" has no obvious (to me) connection
 > with the places or reasons that other-buffer is used.

That's most unfortunate.  The documentation explicitly says that the
predicate affects `other-buffer'.  It nowhere says that it affects
`kill-buffer'.

 >> It has been used in `replace-buffer-in-windows' because there was no
 >> better alternative.  And it might have been a good idea to not call
 >> this parameter "buffer-predicate" in the first place but something
 >> more indicative.
 >
 > Indicative of what?

Of its intended use or impact.

 >> Also the manual text
 >>
 >>> `buffer-predicate'
 >>>      The buffer-predicate function for this frame.  The function
 >>>      `other-buffer' uses this predicate (from the selected frame) to
 >>>      decide which buffers it should consider, if the predicate is not
 >>>      `nil'.  It calls the predicate with one argument, a buffer, once
 >>>      for each buffer; if the predicate returns a non-`nil' value, it
 >>>      considers that buffer.
 >> is misleading:
 >
 >> Neither `other-buffer' nor `replace-buffer-in-windows' necessarily
 >> care about which frame is selected when they get called.  When killing
 >> a buffer `replace-buffer-in-windows' obviously has to act on all
 >> windows on all frames.
 >
 > IMO this means the result of (selected-frame) will be temporarily set,
 > during the call to buffer-predicate, for each frame that needs to be
 > changed, and buffer-predicate will be called for each such frame.  Those
 > are the only semantics that make sense as long as buffer-predicate takes
 > one argument.

`other-buffer' does not select a frame when calling buffer-predicate.

martin





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-30 16:22           ` Alp Aker
  2012-07-30 16:33             ` Alp Aker
@ 2012-07-30 17:42             ` martin rudalics
  1 sibling, 0 replies; 25+ messages in thread
From: martin rudalics @ 2012-07-30 17:42 UTC (permalink / raw)
  To: Alp Aker; +Cc: Dave Abrahams, 12081

 > Adding a buffer predicate test creates a new edge case, which the
 > above code is intended to handle.

It doesn't.  The edge case is already here.

 > With the existing code, it's guaranteed that either (1) we switch to a
 > new buffer while scanning the next buffers or the prev buffers, or (2)
 > we finish those scans with `visible' set to a buffer we can switch to.

No.  Try killing *scratch* with *scratch* the only buffer one can switch
to.

 >  By adding a buffer predicate test to the loops, we break that
 > guarantee; it becomes possible to finish the scan without switching to
 > a new buffer and without setting `visible' to a candidate new buffer.
 > This would break the function unless we provide for that case.

Let's hope not.

 > The question then becomes, how to deal with such a case (when the scan
 > of prev and next buffers does not switch to a new buffer and does not
 > set `visible').  One obvious option is:  Do nothing, and adjust the
 > rest of the function to accomodate that possibility.  Another is to
 > choose *scratch* as the fallback value for `new-buffer', when no other
 > buffer passes all the tests.  The latter seemed to me to be
 > preferable, as it makes replace-buffer-in-windows and
 > replace_buffer_in_windows_safely have similar fallback behavior, and
 > agrees with the fallback behavior of other-buffer as well.

With Emacs 23 I had a scenario (which is much too complicated to repeat
here) to crash Emacs by repeatedly trying to kill all buffers.  That's
why I wrote replace_buffer_in_windows_safely which relies on
other_buffer_safely to reliably recreate *scratch* if needed.  I don't
want to play with Elisp code called by C code recreating the buffer the
C code is just about to delete.  Let's keep other_buffer_safely the only
routine allowed to auto-recreate *scratch* and let's not call routines
like replace_buffer_in_windows_safely and other_buffer_safely from
Elisp.

If you really experience problems after applying the rest of the patch,
we'll find a solution ;-)

martin





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-30 16:33             ` Alp Aker
@ 2012-07-30 17:42               ` martin rudalics
  2012-07-31  6:59                 ` Alp Aker
  0 siblings, 1 reply; 25+ messages in thread
From: martin rudalics @ 2012-07-30 17:42 UTC (permalink / raw)
  To: Alp Aker; +Cc: 12081

 > Actually, it appears I'm wrong about that.  The existing code doesn't
 > make such a guarantee.  Still, it seems to me preferable to have
 > replace-buffer-in-windows and replace_buffer_in_windows_safely agree
 > on what to do as a last resort; that creates a more consistent user
 > experience.

When `replace-buffer-in-windows' fails to replace the buffer,
replace_buffer_in_windows_safely will kick in and automatically do what
you mean.  The user should not notice that.

martin





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-30 17:42             ` martin rudalics
@ 2012-07-30 20:13               ` Dave Abrahams
  2012-07-31  8:39                 ` martin rudalics
  0 siblings, 1 reply; 25+ messages in thread
From: Dave Abrahams @ 2012-07-30 20:13 UTC (permalink / raw)
  To: martin rudalics; +Cc: Alp Aker, 12081


on Mon Jul 30 2012, martin rudalics <rudalics-AT-gmx.at> wrote:

>>> This doesn't explain why showing the buffer visiting /tmp/xx is bad
>>> here.
>>
>> <sigh>
>>
>> It's only bad because the documentation led me to believe that I could
>> control what would be shown after kill-buffer by using buffer-predicate.
>> This is a *manufactured* test case, because my real use case is a lot
>> more complicated to set up.  But I gave references to the actual case if
>> you really care about the motivation.
>
> The reference you gave is entitled "Associate buffers with the last
> frame in which they appeared" and I didn't see how the current behavior
> which "associates windows with the last buffer they showed" would
> contradict it.  

That's because the title is wrong; It should say "Associate buffers with
the last workgroup in which they appeared."  It is a patch to
workgroups.el, which you need to understand to understand the use-case.
When I kill a buffer in a particular workgroup, I want the replacement
buffer to be one that appeared recently in that workgroup, rather than
just something that's been seen recently in this frame.

> Maybe there's some bug in `switch-to-prev-buffer' which inhibits it to
> behave as you want without having to customize some other option.  An
> example might have helped to sort out such a case.

Sorry, I don't know what you're talking about here.

>> The intended use of "buffer-predicate" has no obvious (to me) connection
>> with the places or reasons that other-buffer is used.
>
> That's most unfortunate.  The documentation explicitly says that the
> predicate affects `other-buffer'.  It nowhere says that it affects
> `kill-buffer'.

Yes, I realized that only after I had implemented this.  But as
mentioned elsewhere:

1. there are no obvious uses for buffer-predicate if it doesn't also
   work for kill-buffer

2. IIUC it used to work for kill-buffer, probably because kill-buffer
   used to call other-buffer. 

>>> Also the manual text
>>>
>>>> `buffer-predicate'
>>>>      The buffer-predicate function for this frame.  The function
>>>>      `other-buffer' uses this predicate (from the selected frame) to
>>>>      decide which buffers it should consider, if the predicate is not
>>>>      `nil'.  It calls the predicate with one argument, a buffer, once
>>>>      for each buffer; if the predicate returns a non-`nil' value, it
>>>>      considers that buffer.
>>> is misleading:
>>
>>> Neither `other-buffer' nor `replace-buffer-in-windows' necessarily
>>> care about which frame is selected when they get called.  When killing
>>> a buffer `replace-buffer-in-windows' obviously has to act on all
>>> windows on all frames.
>>
>> IMO this means the result of (selected-frame) will be temporarily set,
>> during the call to buffer-predicate, for each frame that needs to be
>> changed, and buffer-predicate will be called for each such frame.  Those
>> are the only semantics that make sense as long as buffer-predicate takes
>> one argument.
>
> `other-buffer' does not select a frame when calling buffer-predicate.

Then I think that should be considered a (design) bug.

-- 
Dave Abrahams
BoostPro Computing                  Software Development        Training
http://www.boostpro.com             Clang/LLVM/EDG Compilers  C++  Boost





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-30 17:42               ` martin rudalics
@ 2012-07-31  6:59                 ` Alp Aker
  2012-07-31  8:40                   ` martin rudalics
  2012-08-31 17:15                   ` martin rudalics
  0 siblings, 2 replies; 25+ messages in thread
From: Alp Aker @ 2012-07-31  6:59 UTC (permalink / raw)
  To: martin rudalics; +Cc: 12081

On Mon, Jul 30, 2012 at 1:42 PM, martin rudalics <rudalics@gmx.at> wrote:
> When `replace-buffer-in-windows' fails to replace the buffer,
> replace_buffer_in_windows_safely will kick in and automatically do what
> you mean.

Yes, I realized that about kill_buffer; my concern was whether other
users of replace-buffer-in-windows should need to provide fallback
behavior.  I'll defer to your judgment :)

So, would something like the following patch be ok (after adding
appropriate documentation changes)?  Note that with these changes,
there might still be some potentially odd behavior.  Here's a
contrived example.  From Emacs -Q, evaluating the following in
*scratch*:

(progn
  (set-frame-parameter nil 'buffer-predicate (lambda (x) nil))
  (switch-to-buffer (get-buffer-create "foo"))
  (switch-to-prev-buffer))

will leave buffer "foo" displayed in the selected window, but the
return value of of `switch-to-prev-buffer' will be #<buffer
*scratch*>, because `next-buffer' was assigned during the scan of the
previous buffers even though we did not switch to it.  Is such a
misleading return value ok?  (I realize this could be a considered a
variant of my earlier concern, which you argued was misplaced, but I
thought I should mention it nonetheless.)


=== modified file 'lisp/window.el'
--- lisp/window.el	2012-07-18 10:02:54 +0000
+++ lisp/window.el	2012-07-31 03:10:31 +0000
@@ -2679,6 +2679,7 @@
 	 (old-buffer (window-buffer window))
 	 ;; Save this since it's destroyed by `set-window-buffer'.
 	 (next-buffers (window-next-buffers window))
+         (pred (frame-parameter frame 'buffer-predicate))
 	 entry new-buffer killed-buffers visible)
     (when (window-dedicated-p window)
       (error "Window %s is dedicated to buffer %s" window old-buffer))
@@ -2692,6 +2693,7 @@
 		       (not (setq killed-buffers
 				  (cons new-buffer killed-buffers))))
 		   (not (eq new-buffer old-buffer))
+                   (or (null pred) (funcall pred new-buffer))
                    (or bury-or-kill
 		       (not (memq new-buffer next-buffers))))
 	  (if (and (not switch-to-visible-buffer)
@@ -2713,6 +2715,7 @@
 	(when (and (buffer-live-p buffer)
 		   (not (eq buffer old-buffer))
 		   (not (eq (aref (buffer-name buffer) 0) ?\s))
+                   (or (null pred) (funcall pred buffer))
 		   (or bury-or-kill (not (memq buffer next-buffers))))
 	  (if (get-buffer-window buffer frame)
 	      ;; Try to avoid showing a buffer visible in some other window.
@@ -2731,6 +2734,7 @@
 			 (not (setq killed-buffers
 				    (cons buffer killed-buffers))))
 		     (not (eq buffer old-buffer))
+                     (or (null pred) (funcall pred buffer))
 		     (setq entry (assq buffer (window-prev-buffers window))))
 	    (setq new-buffer buffer)
 	    (set-window-buffer-start-and-point
@@ -2773,6 +2777,7 @@
 	 (frame (window-frame window))
 	 (old-buffer (window-buffer window))
 	 (next-buffers (window-next-buffers window))
+         (pred (frame-parameter frame 'buffer-predicate))
 	 new-buffer entry killed-buffers visible)
     (when (window-dedicated-p window)
       (error "Window %s is dedicated to buffer %s" window old-buffer))
@@ -2784,6 +2789,7 @@
 		       (not (setq killed-buffers
 				  (cons buffer killed-buffers))))
 		   (not (eq buffer old-buffer))
+                   (or (null pred) (funcall pred buffer))
 		   (setq entry (assq buffer (window-prev-buffers window))))
 	  (setq new-buffer buffer)
 	  (set-window-buffer-start-and-point
@@ -2794,6 +2800,7 @@
       (dolist (buffer (buffer-list frame))
 	(when (and (buffer-live-p buffer) (not (eq buffer old-buffer))
 		   (not (eq (aref (buffer-name buffer) 0) ?\s))
+                   (or (null pred) (funcall pred buffer))
 		   (not (assq buffer (window-prev-buffers window))))
 	  (if (get-buffer-window buffer frame)
 	      ;; Try to avoid showing a buffer visible in some other window.
@@ -2808,6 +2815,7 @@
 		   (or (buffer-live-p new-buffer)
 		       (not (setq killed-buffers
 				  (cons new-buffer killed-buffers))))
+                   (or (null pred) (funcall pred new-buffer))
 		   (not (eq new-buffer old-buffer)))
 	  (if (and (not switch-to-visible-buffer)
 		   (get-buffer-window new-buffer frame))





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-30 20:13               ` Dave Abrahams
@ 2012-07-31  8:39                 ` martin rudalics
  2012-08-13 22:13                   ` Dave Abrahams
  0 siblings, 1 reply; 25+ messages in thread
From: martin rudalics @ 2012-07-31  8:39 UTC (permalink / raw)
  To: Dave Abrahams; +Cc: Alp Aker, 12081

 > When I kill a buffer in a particular workgroup, I want the replacement
 > buffer to be one that appeared recently in that workgroup, rather than
 > just something that's been seen recently in this frame.

So a workgroup specifies a subset of all live buffers and the
buffer-predicate you run on any of the buffers `switch-to-prev-buffer'
proposes, sanctions the argument buffer iff it's part of that workgroup.
Is that correct?

This gives you little space in choosing the most suitable buffer from
that workgroup.  Wouldn't it make more sense to provide a
`switch-to-prev-buffer-function' with the window as argument and, if
that function returns a live buffer which is not the same as the
window's current buffer, use that buffer to replace the current one?

Or maybe better: Give each window a `prev-buffer' window parameter such
that

(1) if it is a function, have `switch-to-prev-buffer' call that function
     and use its return value (in your case, the function would choose
     the buffer from the workgroup),

(2) if it is a regexp or a list of buffers or names, try to use that
     list for determining the buffer to switch to (in your case, that
     list would be the buffers of the workgroup sorted acording to some
     criteria).  If a buffer name in that list has no associated buffer,
     `switch-to-prev-buffer' could create one if needed.

 >> Maybe there's some bug in `switch-to-prev-buffer' which inhibits it to
 >> behave as you want without having to customize some other option.  An
 >> example might have helped to sort out such a case.
 >
 > Sorry, I don't know what you're talking about here.

I meant that `switch-to-prev-buffer' might have a bug independently from
whether it respects buffer-predicate or not and your example would have
helped us find such a bug.

 >>> The intended use of "buffer-predicate" has no obvious (to me) connection
 >>> with the places or reasons that other-buffer is used.
 >> That's most unfortunate.  The documentation explicitly says that the
 >> predicate affects `other-buffer'.  It nowhere says that it affects
 >> `kill-buffer'.
 >
 > Yes, I realized that only after I had implemented this.  But as
 > mentioned elsewhere:
 >
 > 1. there are no obvious uses for buffer-predicate if it doesn't also
 >    work for kill-buffer

If the buffer predicate affects _only_ what `kill-buffer', `bury-buffer'
or `replace-buffer-in-windows' do, then this should be reflected in the
name of the parameter and `other-buffer' probably should not even care
about this parameter.

 > 2. IIUC it used to work for kill-buffer, probably because kill-buffer
 >    used to call other-buffer.

I think so.  And it would have been easier to avoid the problem we
discuss here if the parameter had a better name and/or description.

martin





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-31  6:59                 ` Alp Aker
@ 2012-07-31  8:40                   ` martin rudalics
  2012-08-31 17:15                   ` martin rudalics
  1 sibling, 0 replies; 25+ messages in thread
From: martin rudalics @ 2012-07-31  8:40 UTC (permalink / raw)
  To: Alp Aker; +Cc: 12081

 > So, would something like the following patch be ok (after adding
 > appropriate documentation changes)?

Sure.  Can you write a ChangeLog entry, one additional sentence for the
doc-strings and a more useful documentation of buffer-predicate for the
Elisp manual?

 > Note that with these changes,
 > there might still be some potentially odd behavior.  Here's a
 > contrived example.  From Emacs -Q, evaluating the following in
 > *scratch*:
 >
 > (progn
 >   (set-frame-parameter nil 'buffer-predicate (lambda (x) nil))
 >   (switch-to-buffer (get-buffer-create "foo"))
 >   (switch-to-prev-buffer))
 >
 > will leave buffer "foo" displayed in the selected window, but the
 > return value of of `switch-to-prev-buffer' will be #<buffer
 > *scratch*>, because `next-buffer' was assigned during the scan of the
 > previous buffers even though we did not switch to it.  Is such a
 > misleading return value ok?

No.  It's an obvious bug not related to `buffer-predicate'.  It went
unnoticed so far because the return value of `switch-to-prev-buffer' is
neither documented nor used anywhere.  But in the case you describe
`switch-to-prev-buffer' should return nil just as in all other cases
resulting from

       (dolist (entry (window-prev-buffers window))
	(when (and (setq new-buffer (car entry))

when new-buffer is rejected.  I hope I fixed that now.  Please have a
look.

Thanks, martin





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-31  8:39                 ` martin rudalics
@ 2012-08-13 22:13                   ` Dave Abrahams
  2012-08-14  9:09                     ` martin rudalics
  0 siblings, 1 reply; 25+ messages in thread
From: Dave Abrahams @ 2012-08-13 22:13 UTC (permalink / raw)
  To: martin rudalics; +Cc: Alp Aker, 12081


on Tue Jul 31 2012, martin rudalics <rudalics-AT-gmx.at> wrote:

>> When I kill a buffer in a particular workgroup, I want the replacement
>> buffer to be one that appeared recently in that workgroup, rather than
>> just something that's been seen recently in this frame.
>
> So a workgroup specifies a subset of all live buffers and the
> buffer-predicate you run on any of the buffers `switch-to-prev-buffer'
> proposes, sanctions the argument buffer iff it's part of that workgroup.
> Is that correct?

Almost.  When a buffer is displayed, it is associated with the current
workgroup via a buffer-local variable.  The buffer-predicate returns
true for any buffer associated with the current workgroup and returns
false for any others.

> This gives you little space in choosing the most suitable buffer from
> that workgroup.  

True.  I figure Emacs already has a heuristic for "most suitable," and
I just want it to apply that to the set of buffers whose last appearance
was in the current workgroup.

> Wouldn't it make more sense to provide a
> `switch-to-prev-buffer-function' with the window as argument and, if
> that function returns a live buffer which is not the same as the
> window's current buffer, use that buffer to replace the current one?
>
> Or maybe better: Give each window a `prev-buffer' window parameter such
> that
>
> (1) if it is a function, have `switch-to-prev-buffer' call that function
>     and use its return value (in your case, the function would choose
>     the buffer from the workgroup),
>
> (2) if it is a regexp or a list of buffers or names, try to use that
>     list for determining the buffer to switch to (in your case, that
>     list would be the buffers of the workgroup sorted acording to some
>     criteria).  If a buffer name in that list has no associated buffer,
>     `switch-to-prev-buffer' could create one if needed.

Well, yeah, all these things make sense if you're going to go so far as
to redesign or extend Emacs itself.  I was looking for a less-intrusive
solution, and to me, it seemed that the buffer predicate was simply not
working as it was supposed to.

>> Yes, I realized that only after I had implemented this.  But as
>> mentioned elsewhere:
>>
>> 1. there are no obvious uses for buffer-predicate if it doesn't also
>>    work for kill-buffer
>
> If the buffer predicate affects _only_ what `kill-buffer', `bury-buffer'
> or `replace-buffer-in-windows' do, then this should be reflected in the
> name of the parameter 

OK

> and `other-buffer' probably should not even care about this parameter.

Why not?

>> 2. IIUC it used to work for kill-buffer, probably because kill-buffer
>>    used to call other-buffer.
>
> I think so.  And it would have been easier to avoid the problem we
> discuss here if the parameter had a better name and/or description.

Probably.

-- 
Dave Abrahams
BoostPro Computing                  Software Development        Training
http://www.boostpro.com             Clang/LLVM/EDG Compilers  C++  Boost





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-08-13 22:13                   ` Dave Abrahams
@ 2012-08-14  9:09                     ` martin rudalics
  2012-08-14 16:07                       ` Dave Abrahams
  0 siblings, 1 reply; 25+ messages in thread
From: martin rudalics @ 2012-08-14  9:09 UTC (permalink / raw)
  To: Dave Abrahams; +Cc: Alp Aker, 12081

 >> and `other-buffer' probably should not even care about this parameter.
 >
 > Why not?

Do you need it apart from `kill-buffer', `bury-buffer' and
`replace-buffer-in-windows'?

martin





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-08-14  9:09                     ` martin rudalics
@ 2012-08-14 16:07                       ` Dave Abrahams
  0 siblings, 0 replies; 25+ messages in thread
From: Dave Abrahams @ 2012-08-14 16:07 UTC (permalink / raw)
  To: martin rudalics; +Cc: Alp Aker, 12081


on Tue Aug 14 2012, martin rudalics <rudalics-AT-gmx.at> wrote:

>>> and `other-buffer' probably should not even care about this parameter.
>>
>> Why not?
>
> Do you need it apart from `kill-buffer', `bury-buffer' and
> `replace-buffer-in-windows'?

I don't know.  I guess in part that depends on which other parts of
emacs call those functions, and whether that set is guaranteed to be
stable over time.  I don't think it's currently documented or stable,
which is why this probably seemed to the person who implemented the
other-buffer functionality to "work" in some useful way.

-- 
Dave Abrahams
BoostPro Computing                  Software Development        Training
http://www.boostpro.com             Clang/LLVM/EDG Compilers  C++  Boost





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-07-31  6:59                 ` Alp Aker
  2012-07-31  8:40                   ` martin rudalics
@ 2012-08-31 17:15                   ` martin rudalics
  2012-09-05 14:30                     ` martin rudalics
  1 sibling, 1 reply; 25+ messages in thread
From: martin rudalics @ 2012-08-31 17:15 UTC (permalink / raw)
  To: Alp Aker; +Cc: 12081

> So, would something like the following patch be ok (after adding
> appropriate documentation changes)?

I applied your patch now (with some minor modifications due to recent
changes in the trunk).  Please have a look.

martin





^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#12081: 24.1; buffer-predicate often not called
  2012-08-31 17:15                   ` martin rudalics
@ 2012-09-05 14:30                     ` martin rudalics
  0 siblings, 0 replies; 25+ messages in thread
From: martin rudalics @ 2012-09-05 14:30 UTC (permalink / raw)
  To: 12081-done; +Cc: Alp Aker

Alp's patch is in trunk with revision 109831.  Bug closed.

Thanks, martin





^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2012-09-05 14:30 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-28 20:47 bug#12081: 24.1; buffer-predicate often not called Dave Abrahams
2012-07-29 13:56 ` martin rudalics
2012-07-29 15:05   ` Dave Abrahams
2012-07-29 17:08     ` martin rudalics
2012-07-29 17:31       ` Alp Aker
2012-07-29 18:24         ` Dave Abrahams
2012-07-29 21:37         ` Dave Abrahams
2012-07-29 23:30           ` Alp Aker
2012-07-29 23:53             ` Dave Abrahams
2012-07-30  9:13         ` martin rudalics
2012-07-30  9:35           ` Dave Abrahams
2012-07-30 17:42             ` martin rudalics
2012-07-30 20:13               ` Dave Abrahams
2012-07-31  8:39                 ` martin rudalics
2012-08-13 22:13                   ` Dave Abrahams
2012-08-14  9:09                     ` martin rudalics
2012-08-14 16:07                       ` Dave Abrahams
2012-07-30 16:22           ` Alp Aker
2012-07-30 16:33             ` Alp Aker
2012-07-30 17:42               ` martin rudalics
2012-07-31  6:59                 ` Alp Aker
2012-07-31  8:40                   ` martin rudalics
2012-08-31 17:15                   ` martin rudalics
2012-09-05 14:30                     ` martin rudalics
2012-07-30 17:42             ` martin rudalics

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).