* `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
* Re: `org-attach-file-list' doesn't allow dotfiles
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-03-18 16:19 ` Bastien
1 sibling, 1 reply; 5+ messages in thread
From: Bastien @ 2014-03-12 18:39 UTC (permalink / raw)
To: Oleh; +Cc: John Wiegley, org mode
Hi Oleh,
Oleh <ohwoeowho@gmail.com> writes:
> 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'm copying John to this email, to see if there is any reason why
files starting with a dot cannot be attached.
Otherwise the change looks okay to me.
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: `org-attach-file-list' doesn't allow dotfiles
2014-03-10 15:46 `org-attach-file-list' doesn't allow dotfiles Oleh
2014-03-12 18:39 ` Bastien
@ 2014-03-18 16:19 ` Bastien
1 sibling, 0 replies; 5+ messages in thread
From: Bastien @ 2014-03-18 16:19 UTC (permalink / raw)
To: Oleh; +Cc: org mode
Hi Oleh,
Oleh <ohwoeowho@gmail.com> writes:
> 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 "[^~]\\'"))))
I pushed a slightly different change:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=74162d9e
> Is there a reason behind this dot file restriction? Would anything break
> if the proposed change was made?
I cannot think of any and John seems too busy right now.
Let's continue with this change and see if anything breaks.
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: `org-attach-file-list' doesn't allow dotfiles
2014-03-12 18:39 ` Bastien
@ 2014-04-01 20:20 ` John Wiegley
2014-04-11 9:44 ` Bastien
0 siblings, 1 reply; 5+ messages in thread
From: John Wiegley @ 2014-04-01 20:20 UTC (permalink / raw)
To: Bastien; +Cc: John Wiegley, org mode, Oleh
No reason I can think of.
John
On Mar 12, 2014, at 1:39 PM, Bastien <bzg@gnu.org> wrote:
> Hi Oleh,
>
> Oleh <ohwoeowho@gmail.com> writes:
>
>> 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'm copying John to this email, to see if there is any reason why
> files starting with a dot cannot be attached.
>
> Otherwise the change looks okay to me.
>
> Thanks,
>
> --
> Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: `org-attach-file-list' doesn't allow dotfiles
2014-04-01 20:20 ` John Wiegley
@ 2014-04-11 9:44 ` Bastien
0 siblings, 0 replies; 5+ messages in thread
From: Bastien @ 2014-04-11 9:44 UTC (permalink / raw)
To: John Wiegley; +Cc: org mode, Oleh
John Wiegley <jwiegley@gmail.com> writes:
> No reason I can think of.
Thanks for confirming! Best,
--
Bastien
^ 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).