unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: ken <gebser@mousecar.com>
To: Joost Kremers <joost.m.kremers@gmail.com>, help-gnu-emacs@gnu.org
Subject: Re: goof in small function where???
Date: Tue, 22 Jul 2014 06:16:25 -0400	[thread overview]
Message-ID: <53CE39F9.1020101@mousecar.com> (raw)
In-Reply-To: <slrnlssce7.3ck.joost.m.kremers@j.kremers4.news.arnhem.chello.nl>



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?





  reply	other threads:[~2014-07-22 10:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.5851.1406020938.1147.help-gnu-emacs@gnu.org>
2014-07-22  9:41 ` goof in small function where??? Joost Kremers
2014-07-22 10:16   ` ken [this message]
2014-07-22  9:21 ken
2014-07-22 10:02 ` Michael Heerdegen
2014-07-22 10:28   ` ken
2014-07-22 11:07     ` Michael Heerdegen
2014-07-22 10:33 ` Thorsten Jolitz
2014-07-22 10:52   ` Thorsten Jolitz
2014-07-22 11:09     ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53CE39F9.1020101@mousecar.com \
    --to=gebser@mousecar.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=joost.m.kremers@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).