emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* `org-attach-file-list' doesn't allow dotfiles
@ 2014-03-10 15:46 Oleh
  2014-03-12 18:39 ` Bastien
  2014-03-18 16:19 ` Bastien
  0 siblings, 2 replies; 5+ messages in thread
From: Oleh @ 2014-03-10 15:46 UTC (permalink / raw)
  To: org mode

Hi all,

I recently investigated why `org-open-at-point` uses smplayer to
open *.mp4 links, although the system's default is vlc.
The solution was to create ~/.mailcap with

    video/mp4; vlc %s

I wanted to store this file as an attachment in an org document, so I
don't forget about it, but this attachment can't be opened due
to `org-attach-file-list` ignoring all files that start with a dot.

I would modify it like this to ignore just "." and "..":

    --- a/lisp/org-attach.el
    +++ b/lisp/org-attach.el
    @@ -425,7 +425,7 @@ This can be used after files have been added
externally."
       "Return a list of files in the attachment directory.
     This ignores files starting with a \".\", and files ending in \"~\"."
       (delq nil
    -       (mapcar (lambda (x) (if (string-match "^\\." x) nil x))
    +       (mapcar (lambda (x) (if (string-match "^\\.\\.?$" x) nil x))
                    (directory-files dir nil "[^~]\\'"))))

Is there a reason behind this dot file restriction? Would anything break
if the proposed change was made?

regards,
Oleh

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-04-11 13:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-10 15:46 `org-attach-file-list' doesn't allow dotfiles Oleh
2014-03-12 18:39 ` Bastien
2014-04-01 20:20   ` John Wiegley
2014-04-11  9:44     ` Bastien
2014-03-18 16:19 ` Bastien

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