From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Zimmerman Newsgroups: gmane.emacs.help Subject: display-buffer and save-current-buffer Date: Sun, 26 Jul 2015 08:47:48 -0700 Message-ID: <20150726152150.9742.22781254@ahiker.mooo.com> Reply-To: help-gnu-emacs@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1437925684 10346 80.91.229.3 (26 Jul 2015 15:48:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Jul 2015 15:48:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 26 17:48:03 2015 Return-path: Envelope-to: geh-help-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 1ZJO9h-0002Sb-Em for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Jul 2015 17:48:01 +0200 Original-Received: from localhost ([::1]:50377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJO9g-0008TU-O6 for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Jul 2015 11:48:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJO9X-0008Sp-Uj for help-gnu-emacs@gnu.org; Sun, 26 Jul 2015 11:47:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJO9W-00024E-TM for help-gnu-emacs@gnu.org; Sun, 26 Jul 2015 11:47:51 -0400 Original-Received: from disorder-1-pt.tunnel.tserv3.fmt2.ipv6.he.net ([2001:470:1f04:51a::2]:46103 helo=acedia.primate.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJO9W-00023z-L2 for help-gnu-emacs@gnu.org; Sun, 26 Jul 2015 11:47:50 -0400 Original-Received: from acedia.primate.net (localhost [127.0.0.1]) by acedia.primate.net (8.14.9/8.14.9/Debian-2) with ESMTP id t6QFln1m012201 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 26 Jul 2015 08:47:49 -0700 Original-Received: (from itz@localhost) by acedia.primate.net (8.14.9/8.14.9/Submit) id t6QFlndk012196 for help-gnu-emacs@gnu.org; Sun, 26 Jul 2015 08:47:49 -0700 X-Authentication-Warning: acedia.primate.net: itz set sender to itz@buug.org using -f Original-Received: from itz by ahiker.mooo.com with local (Exim 4.80) (envelope-from ) id 1ZJO9U-0002Yp-Up for help-gnu-emacs@gnu.org; Sun, 26 Jul 2015 08:47:48 -0700 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:470:1f04:51a::2 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106003 Archived-At: I was trying todo-mode ie. lisp/calendar/todo-mode.el in the emacs distribution. In the todo mode buffer I hit "t" which is bound to todo-top-priorities. Here is a bit of the code: (save-excursion (todo-show) (save-restriction (save-current-buffer (widen) (copy-to-buffer todo-print-buffer-name (point-min) (point-max)) (set-buffer todo-print-buffer-name) (too-much-junk-to-not-elide) ))) (when interactive (display-buffer todo-print-buffer-name)) (message "Type C-x 1 to remove %s window. M-C-v to scroll the help." todo-print-buffer-name) Clearly, the intention is to show the buffer which was temporarily selected within the save-current-buffer form. However no such thing happens; I get the message (with the expected buffer name interpolated) but the buffer is not shown, I'm still in the original window configuration with a single window showing the todo buffer. When I do M-x eval-expression (display-buffer todo-print-buffer-name) afterwards, it works as expected. Is there perhaps a known bug with the interaction of save-current-buffer and display-buffer in emacs 23.4 ? -- Please *no* private copies of mailing list or newsgroup messages. Rule 420: All persons more than eight miles high to leave the court.