From: Jean Louis <bugs@gnu.support>
To: TRS-80 <lists.trs-80@isnotmyreal.name>
Cc: emacs-orgmode@gnu.org
Subject: Re: from dired to an org file with list of files with links
Date: Sun, 13 Dec 2020 18:46:40 +0300 [thread overview]
Message-ID: <X9Y3YCgVatgzpfa4@protected.rcdrun.com> (raw)
In-Reply-To: <187b91011b02ac8bf039accd9905423b@isnotmyreal.name>
* TRS-80 <lists.trs-80@isnotmyreal.name> [2020-12-11 19:21]:
> On 2020-12-11 03:09, Uwe Brauer wrote:
> > > Dear Uwe,
> > > * Uwe Brauer <oub@mat.ucm.es> [2020-12-10 22:45]:
> >
> > > (require 'dired-x)
> >
> > > (defun dired-to-org-links ()
> > > "Generates Org links for Dired files and stores in memory. Yank
> > > it in other buffer"
> > > (interactive)
> > > (let* ((files (dired-get-marked-files)))
> > > (when files
> > > (kill-new
> > > (with-temp-buffer
> > > (dolist (file files)
> > > (let* ((base (file-name-nondirectory file))
> > > (link (format "[[file:%s][%s]]\n" file base)))
> > > (insert link)))
> > > (buffer-string))))))
> >
> > Thanks, that is very nice.
> > I played a bit around with org-fstree, that is also useful.
>
> Indeed, nice function!
>
> And what great and fast service! :)
>
> If I may be permitted to pick a nit; Uwe, you may want to prefix the
> function with `my-` or `uwe-` or your initials, etc. for namespace
> reasons. Unless of course this is something Jean Louis is planning on
> submitting as a patch to dired itself... ;)
It is more Org related. In my opinion all built-in Org hyperlink types
should be already integrated in Org, probably also this is integrated.
The org-store-link actually works in Dired.
The org-insert-last-link works to put link into buffer
So it is just iteration missing.
prev parent reply other threads:[~2020-12-13 17:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-10 19:44 from dired to an org file with list of files with links Uwe Brauer
2020-12-10 20:36 ` [one pkf found] (was: from dired to an org file with list of files with links) Uwe Brauer
2020-12-10 21:04 ` from dired to an org file with list of files with links Jean Louis
2020-12-11 8:09 ` Uwe Brauer
2020-12-11 16:14 ` TRS-80
2020-12-13 15:46 ` Jean Louis [this message]
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=X9Y3YCgVatgzpfa4@protected.rcdrun.com \
--to=bugs@gnu.support \
--cc=emacs-orgmode@gnu.org \
--cc=lists.trs-80@isnotmyreal.name \
/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).