emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] create links for all marked files in dired


From: Bastien
Subject: Re: [Orgmode] create links for all marked files in dired
Date: Tue, 27 Nov 2007 14:47:37 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux)

Hi Fabian,

Fabian Braennstroem <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]