all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joost Kremers <joost.m.kremers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: goof in small function where???
Date: 22 Jul 2014 09:41:27 GMT	[thread overview]
Message-ID: <slrnlssce7.3ck.joost.m.kremers@j.kremers4.news.arnhem.chello.nl> (raw)
In-Reply-To: mailman.5851.1406020938.1147.help-gnu-emacs@gnu.org

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)


       reply	other threads:[~2014-07-22  9:41 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 ` Joost Kremers [this message]
2014-07-22 10:16   ` goof in small function where??? ken
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

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

  git send-email \
    --in-reply-to=slrnlssce7.3ck.joost.m.kremers@j.kremers4.news.arnhem.chello.nl \
    --to=joost.m.kremers@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.