emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: emacs-orgmode@gnu.org
Cc: Fabian Braennstroem <f.braennstroem@gmx.de>
Subject: Re: create links for all marked files in dired
Date: Tue, 27 Nov 2007 14:47:37 +0000	[thread overview]
Message-ID: <87r6ib4ueu.fsf@bzg.ath.cx> (raw)
In-Reply-To: <fibuem$k9l$1@ger.gmane.org> (Fabian Braennstroem's message of "Sun, 25 Nov 2007 14:51:47 +0000")

Hi Fabian,

Fabian Braennstroem <f.braennstroem@gmx.de> writes:

> is there a chance to create links from the marked files in a
> dired buffer using org-mode internal functions?

I already suggested something for this here:

  http://article.gmane.org/gmane.emacs.orgmode/4440

If you want to create a list of links from dired and copy this list to
the kill-ring, maybe you can use something like this as well:

(defun my-copy-dired-files-in-kill-ring ()
  "Copy files names in the kill ring."
  (interactive)
  (let ((files (dired-map-over-marks (dired-get-filename) nil)))
    (kill-new
     (mapconcat 
      (lambda (f) 
	(concat "[[file:" f "][" 
		(file-name-nondirectory f) "]]"))
      files "\n"))
    (message "%d Org links copied to the kill-ring" (length files))))

Does that help?

-- 
Bastien

  parent reply	other threads:[~2007-11-27 14:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-25 14:51 create links for all marked files in dired Fabian Braennstroem
2007-11-25 14:22 ` Carsten Dominik
2007-11-25 17:17   ` Fabian Braennstroem
2007-11-26 12:29     ` Phil Jackson
2007-11-27 14:47 ` Bastien [this message]
2007-11-28 21:39   ` Fabian Braennstroem

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.orgmode.org/

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

  git send-email \
    --in-reply-to=87r6ib4ueu.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=f.braennstroem@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.
Code repositories for project(s) associated with this public inbox

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

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).