From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: goof in small function where??? Date: 22 Jul 2014 09:41:27 GMT Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1406022325 12300 80.91.229.3 (22 Jul 2014 09:45:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jul 2014 09:45:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 22 11:45:18 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 1X9WdJ-0000mg-C4 for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Jul 2014 11:45:17 +0200 Original-Received: from localhost ([::1]:38280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9WdJ-00047g-1B for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Jul 2014 05:45:17 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-X-Trace: individual.net 0m1Huo1kwbATxE5BhvrvpQ2QsujW+PoNkvoDyTTlKzhfQS7JBm Cancel-Lock: sha1:Bj2rXq4UtfBiB7jydRV/P4lwSLU= Mail-Copies-To: nobody X-Editor: Emacs of course! User-Agent: slrn/pre1.0.0-18 (Linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:206619 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:98891 Archived-At: 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 [1] Thanks, Drew. (Sincerely.) -- Joost Kremers joostkremers@fastmail.fm Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9)