From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: goof in small function where??? Date: Tue, 22 Jul 2014 06:16:25 -0400 Message-ID: <53CE39F9.1020101@mousecar.com> References: Reply-To: gebser@mousecar.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1406024228 3603 80.91.229.3 (22 Jul 2014 10:17:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jul 2014 10:17:08 +0000 (UTC) To: Joost Kremers , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 22 12:17:03 2014 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 1X9X82-0000Y7-OY for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Jul 2014 12:17:02 +0200 Original-Received: from localhost ([::1]:38393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9X82-0003NV-9K for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Jul 2014 06:17:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9X7i-0003LX-Ha for help-gnu-emacs@gnu.org; Tue, 22 Jul 2014 06:16:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9X7a-00025z-4X for help-gnu-emacs@gnu.org; Tue, 22 Jul 2014 06:16:42 -0400 Original-Received: from mout.perfora.net ([74.208.4.196]:56894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9X7Z-00025k-Uo for help-gnu-emacs@gnu.org; Tue, 22 Jul 2014 06:16:34 -0400 Original-Received: from dellap.mousecar.net (clev-static1-cs17.static.dslohio.net [66.219.160.17]) by mrelay.perfora.net (node=mreueus001) with ESMTP (Nemesis) id 0MBkrR-1XGvdL2mQh-00Apq3; Tue, 22 Jul 2014 12:16:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: X-Provags-ID: V02:K0:puL93JfiItP2g9WAprfke2yL+8TxxjL8/5Z4nCC2gn9 g+fj4cm2tIfKYyWVd6gMPMDF9caDRtNX9yeYvDqb411EtDelL5 UcB4nZjKrECUUpk8wV/Bitlc6rFkGxCIDhKLtn1jLXPHSgFSzT COzuVnRx4BJF7RpiZuVTJVxxCuJIAtnbazHQNtMHpfg2NZLdz4 +j3F5aO5AQYX9uhf4FMS2rHJyaow47cfOXlKprVNYLdiMGlRb1 3fYbebq9xwnOkh/nfywEwlTYuq26uAdMVcDphPKoNMbAFH2sJ9 6eALfg79Bxm1ddBK6J3ZpbRtn/pa+iszrnEs3gYEjU2LLrkExK oIb8Mp/eG1oZmGnOOJo0KCgOxZtAqipErEo1Yi1Yd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 74.208.4.196 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:98893 Archived-At: On 07/22/2014 05:41 AM Joost Kremers wrote: > ken wrote: >> The function below half works: it does put the buffer-file-name into the >> kill ring, but nothing is displayed in the minibuffer. Why? And how to >> fix this? >> >> (defun file-name-into-kill-buffer () >> "Put path/filename of current buffer onto kill-ring so to paste >> into an X application. Also display it in minibuffer." >> (interactive) >> (let ((str (buffer-file-name))) >> (and str >> (kill-new str) >> (message "Copied filename %s to kill ring" str))) >> ) > > Works for me. You're probably doing something (or Emacs does something) > that makes the message disappear right away. (Messages in the minibuffer > disappear as soon as you press a key or even hit a cursor key.) > > Check the *Messages* buffer if the message is there (`C-h e` or mouse-1 > in the minibuffer.[1]) > > HTH > > Joost Thanks, Joost. But "Copied filename..." isn't anywhere in *Messages* buffer. If, however, I do in a file: (message "Hello Message")C-x C-e I do see "Hello Message" in the minibuffer and (some seconds later) in *Messages*. Very weird! How could this be?