From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#16524: 24.3.50; read-string executes minibuffer-exit-hook *before* exiting minibuffer Date: Wed, 22 Jan 2014 20:52:13 -0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1390452795 19362 80.91.229.3 (23 Jan 2014 04:53:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Jan 2014 04:53:15 +0000 (UTC) To: 16524@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 23 05:53:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W6CI4-0003xb-6L for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Jan 2014 05:53:20 +0100 Original-Received: from localhost ([::1]:38903 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6CI3-00088p-J7 for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Jan 2014 23:53:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6CHu-00088g-O2 for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2014 23:53:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6CHn-0007mN-1l for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2014 23:53:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6CHm-0007mJ-UI for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2014 23:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W6CHm-0007Ai-C8 for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2014 23:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Jan 2014 04:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16524 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.139045275827530 (code B ref -1); Thu, 23 Jan 2014 04:53:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Jan 2014 04:52:38 +0000 Original-Received: from localhost ([127.0.0.1]:32896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W6CHN-00079x-J6 for submit@debbugs.gnu.org; Wed, 22 Jan 2014 23:52:38 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40570) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W6CHK-00079m-I0 for submit@debbugs.gnu.org; Wed, 22 Jan 2014 23:52:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6CHE-0007iI-1j for submit@debbugs.gnu.org; Wed, 22 Jan 2014 23:52:34 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:43725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6CHD-0007iE-Ud for submit@debbugs.gnu.org; Wed, 22 Jan 2014 23:52:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6CH8-000864-AO for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2014 23:52:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6CH2-0007g0-BX for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2014 23:52:22 -0500 Original-Received: from cobb.liquidweb.com ([50.28.13.150]:34615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6CH2-0007ft-2q for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2014 23:52:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date; bh=sVPqDcQXt12IgBAUfE5PmAVB59CJu7qXaFPC/HYN94E=; b=PkXbdNfdQpHSkQS9M2YBI7KDJ+1nmCa7rSH6a+ZyJsuHtXAsH7XL0J2FW949NJ4E2Pn3aJh6cv6WQ1IIrkO2vXeJPaYDmKo3aA8OP7M+CQyiDPheuSGBiewGG8HhRh9L; Original-Received: from cpe-75-85-5-102.socal.res.rr.com ([75.85.5.102]:55639 helo=MP.local) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from ) id 1W6CGw-0003Pv-5E for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2014 23:52:10 -0500 User-Agent: / () / () APEL/10.8 Emacs/24.3.50 (x86_64-apple-darwin10.8.0) MULE/6.0 (HANACHIRUSATO) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry: lawlist|lawlist.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:83905 Archived-At: I started a thread on Stackoverflow thinking there was something I'm missing, but I'm pretty sure it's a bug: http://stackoverflow.com/questions/21299074/how-to-use-a-minibuffer-exit-hook-with-read-string The documentation for the minibuffer-exit-hook says it runs *after* exiting the minibuffer. However, the function `minibufferp` reveals that this is not true with read-string. It should be possible to use `minibufferp` and it should not return as positive when exiting the read-string function. Essentially, I have one function that I'd like to use for a variety of situations that looks like this -- however, I would need to add it manually after every appearance of `read-string` in my setup unless this particular issue is resolved: (defun lawlist-modeline-setup-two () (cond ((minibufferp) (set-face-attribute 'mode-line nil :height 160 :foreground "gray70" :background "black" :box '(:line-width 1 :color "black")) (set-face-attribute 'minibuffer-prompt nil :background "black" :foreground "cyan") (set (make-local-variable 'face-remapping-alist) '((default :background "black" :foreground "yellow")))) ((or save-as-variable multi-extract-variable multi-attach-variable) (set-face-attribute 'mode-line nil :height 160 :foreground "black" :background "#eab700" :box nil)) ((and (featurep 'multiple-cursors) multiple-cursors-mode) (set-face-attribute 'mode-line nil :height 160 :foreground "black" :background "cyan" :box nil)) ((eq major-mode 'lawlist-calculator-mode) (set-face-attribute 'mode-line nil :height 160 :foreground "black" :background "firebrick" :box nil)) (t (set-face-attribute 'mode-line nil :height 160 :foreground "black" :background "gray70" :box nil) (set-face-attribute 'minibuffer-prompt nil :background "black" :foreground "gray70")) )) Thanks, Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 24.3.50.1 (x86_64-apple-darwin10.8.0, NS apple-appkit-1038.36) of 2014-01-19 on MP.local Repository revision: 116074 rudalics@gmx.at-20140119165951-u43soyrpvzsqubr1 Windowing system distributor `Apple', version 10.3.1038 Configured using: `configure --with-ns' Important settings: locale-coding-system: utf-8-unix Major mode: Dired by name Minor modes in effect: hl-line-mode: t global-lawlist-scroll-bar-mode: t lawlist-scroll-bar-mode: t delete-selection-mode: t shell-dirtrack-mode: t desktop-save-mode: t tabbar-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t buffer-read-only: t transient-mark-mode: t Recent input: r y SPC 2 6 , SPC 2 0 1 4 b l a n k SPC a n d c o m p e l t e d l e t e d SPC a n d SPC I n c o m SPC e SPC a n d SPC E x p e n s e SPC D e c l a r a t i o n SPC [ F L - 1 5 0 ] s-x ; SPC s-v D e c l a r a t i o n SPC o f SPC J i z SPC P e n g SPC F e i ; SPC SPC e x h i b i t s ; SPC s-z s-o x e m a c s - r e p o r t - b u g r e p o r t - e m a c s - b u g Recent messages: Saving file /Users/HOME/.0.data/.0.emacs/.scratch... Wrote /Users/HOME/.0.data/.0.emacs/.scratch Saving file /Users/HOME/.0.data/.0.emacs/.scratch... Wrote /Users/HOME/.0.data/.0.emacs/.scratch Undo... Undo! Saving file /Users/HOME/.0.data/.0.emacs/.scratch... Wrote /Users/HOME/.0.data/.0.emacs/.scratch *beep* Focus is still in the minibuffer: *Minibuf-1* [2 times] Load-path shadows: /Users/HOME/.0.data/.0.emacs/elpa/flim/md4 hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/md4 /Users/HOME/.0.data/.0.emacs/elpa/flim/hex-util hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/hex-util /Users/HOME/.0.data/.0.emacs/elpa/flim/sasl hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/net/sasl /Users/HOME/.0.data/.0.emacs/elpa/flim/sasl-ntlm hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/net/sasl-ntlm /Users/HOME/.0.data/.0.emacs/elpa/flim/sasl-digest hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/net/sasl-digest /Users/HOME/.0.data/.0.emacs/elpa/flim/sasl-cram hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/net/sasl-cram /Users/HOME/.0.data/.0.emacs/elpa/flim/ntlm hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/net/ntlm /Users/HOME/.0.data/.0.emacs/elpa/flim/hmac-md5 hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/net/hmac-md5 /Users/HOME/.0.data/.0.emacs/elpa/flim/hmac-def hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/net/hmac-def /Users/HOME/.0.data/.0.emacs/elpa/wanderlust/rfc2368 hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/mail/rfc2368 /Users/HOME/.0.data/.0.emacs/elpa/wanderlust/utf7 hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/gnus/utf7 /Users/HOME/.0.data/.0.emacs/elpa/semi/smime hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/gnus/smime /Users/HOME/.0.data/.0.emacs/elpa/semi/pgg hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/obsolete/pgg /Users/HOME/.0.data/.0.emacs/elpa/semi/pgg-pgp5 hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/obsolete/pgg-pgp5 /Users/HOME/.0.data/.0.emacs/elpa/semi/pgg-pgp hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/obsolete/pgg-pgp /Users/HOME/.0.data/.0.emacs/elpa/semi/pgg-parse hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/obsolete/pgg-parse /Users/HOME/.0.data/.0.emacs/elpa/semi/pgg-gpg hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/obsolete/pgg-gpg /Users/HOME/.0.data/.0.emacs/elpa/semi/pgg-def hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/obsolete/pgg-def /Users/HOME/.0.data/.0.emacs/elpa/utilities/longlines hides /Users/HOME/.0.data/.0.emacs/Emacs_01_19_2014.app/Contents/Resources/lisp/obsolete/longlines Features: (shadow wl-mime mime-edit pgg-parse pccl pccl-20 signature mime-setup mail-mime-setup semi-setup mime-pgp pgg-def mime-play filename mime-image modb-standard elmo-imap4 time-stamp emacsbug server init-wl wl-demo wl-draft eword-encode wl-template sendmail elmo-net elmo-cache elmo-map elmo-dop wl-news wl-address wl-thread wl-folder wl wl-e21 wl-spam wl-action wl-summary wl-refile wl-util pp elmo-flag elmo-localdir wl-message elmo-mime mmelmo-buffer mmelmo-imap mime-view mime-conf calist semi-def mmimap mime-parse mmbuffer mmgeneric elmo-multi elmo-spam elsp-header elsp-generic elmo elmo-signal wl-highlight wl-vars wl-version epg-config elmo-msgdb modb modb-generic modb-entity luna mime elmo-util emu invisible inv-23 poem poem-e20 poem-e20_3 utf7 eword-decode mel mime-def alist std11 mcharset mcs-20 mcs-e20 pces pces-e20 pces-20 broken pcustom elmo-date elmo-vars elmo-version path-util poe pym static apel-ver product w3m-load mime-w3m w3m browse-url doc-view jka-compr image-mode w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util disp-table whitespace linum hl-line multiple-cursors-autoloads package bbdb-autoloads delsel savehist lawlist-calculator ps-print ps-def lpr flyspell ispell auto-save-buffers-enhanced bbdb timezone dired-aux dired yasnippet help-mode multiple-cursors mc-separate-operations rectangular-region-mode mc-mark-more thingatpt mc-cycle-cursors mc-edit-lines multiple-cursors-core rect saveplace lawlist-tex-mode pcase compile shell pcomplete comint ansi-color ring skeleton compare-w desktop frameset init-tabbar tabbar lawlist-org lawlist-calendar advice edmacro kmacro derived org-toodledo mailcap-toodledo lawlist-tls http-post-simple url-http tls url-auth url-gw url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core password-cache url-vars mailcap json xml w3mexcerpt noutline outline easy-mmode find-func gnus-sum nnoo gnus-group gnus-undo nnmail mail-source gnus-start gnus-spec gnus-int gnus-range message cl-macs gv format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems nnheader gnus-util mail-utils mm-util help-fns mail-prsvr wid-edit cl cl-loaddefs cl-lib highlight-parentheses redo time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-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 nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process cocoa ns multi-tty emacs)