From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabian Braennstroem Subject: Re: create links for all marked files in dired Date: Wed, 28 Nov 2007 21:39:48 +0000 Message-ID: References: <87r6ib4ueu.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IxTqJ-0001N0-LC for emacs-orgmode@gnu.org; Wed, 28 Nov 2007 15:49:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IxTqI-0001Le-80 for emacs-orgmode@gnu.org; Wed, 28 Nov 2007 15:49:11 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IxTqH-0001LY-VC for emacs-orgmode@gnu.org; Wed, 28 Nov 2007 15:49:09 -0500 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IxTqG-0003TW-Pk for emacs-orgmode@gnu.org; Wed, 28 Nov 2007 15:49:09 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IxTiP-0000uK-A8 for emacs-orgmode@gnu.org; Wed, 28 Nov 2007 20:41:01 +0000 Received: from pd9e48067.dip0.t-ipconnect.de ([217.228.128.103]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Nov 2007 20:41:01 +0000 Received: from f.braennstroem by pd9e48067.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Nov 2007 20:41:01 +0000 In-Reply-To: <87r6ib4ueu.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi to both, thanks for your help ... Bastien schrieb am 11/27/2007 02:47 PM: > Hi Fabian, > > Fabian Braennstroem 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? Works great! I was thinking about it , but just in python ;-) Greetings!