emacs-orgmode
[Top][All Lists]
Advanced

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

[O] `org-attach-file-list' doesn't allow dotfiles


From: Oleh
Subject: [O] `org-attach-file-list' doesn't allow dotfiles
Date: Mon, 10 Mar 2014 16:46:00 +0100

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



reply via email to

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