unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
Subject: Re: Filename of buffer into kill-ring functionality
Date: Thu, 31 Aug 2006 14:40:33 +0200	[thread overview]
Message-ID: <v91wqxkri6.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: 9ofyfdql0b.fsf@gonzo.vircinity

On Thu, Aug 31 2006, Marco Wahl wrote:

> is there already a function in emacs that puts the
> absolute filename belonging to a buffer into the
> kill-ring?  

I'm not aware of any predefined function for this.  You might use this
one:

(defun rs-kill-ring-save-buffer-file-name ()
  "Add `buffer-file-name' in the kill ring."
  (interactive)
  (if (not (stringp buffer-file-name))
      (error "Not visiting a file.")
    (kill-new buffer-file-name)
    ;; Give some visual feedback:
    (message "String \"%s\" saved to kill ring." buffer-file-name)
    buffer-file-name))

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

  reply	other threads:[~2006-08-31 12:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-31 10:04 Filename of buffer into kill-ring functionality Marco Wahl
2006-08-31 12:40 ` Reiner Steib [this message]
2006-08-31 15:43   ` Kevin Rodgers
2006-08-31 19:08     ` Reiner Steib
2006-08-31 20:40       ` Kevin Rodgers
     [not found]   ` <mailman.6092.1157039301.9609.help-gnu-emacs@gnu.org>
2006-09-01  7:38     ` Marco Wahl
2006-09-01  8:58 ` Eli Zaretskii

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=v91wqxkri6.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    /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).