From: Oleh <ohwoeowho@gmail.com>
To: org mode <emacs-orgmode@gnu.org>
Subject: `org-attach-file-list' doesn't allow dotfiles
Date: Mon, 10 Mar 2014 16:46:00 +0100 [thread overview]
Message-ID: <CAA01p3oR40R-HjGcRoqsnsRzDPWgyvEH_FwRsfidgcQcABkKeA@mail.gmail.com> (raw)
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
next reply other threads:[~2014-03-10 15:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 15:46 Oleh [this message]
2014-03-12 18:39 ` `org-attach-file-list' doesn't allow dotfiles Bastien
2014-04-01 20:20 ` John Wiegley
2014-04-11 9:44 ` Bastien
2014-03-18 16:19 ` Bastien
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAA01p3oR40R-HjGcRoqsnsRzDPWgyvEH_FwRsfidgcQcABkKeA@mail.gmail.com \
--to=ohwoeowho@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.