Re: [O] `org-attach-file-list' doesn't allow dotfiles
John Wiegley writes: > No reason I can think of. Thanks for confirming! Best, -- Bastien
Re: [O] `org-attach-file-list' doesn't allow dotfiles
No reason I can think of. John On Mar 12, 2014, at 1:39 PM, Bastien wrote: > Hi Oleh, > > Oleh 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
Re: [O] `org-attach-file-list' doesn't allow dotfiles
Hi Oleh, Oleh 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
Re: [O] `org-attach-file-list' doesn't allow dotfiles
Hi Oleh, Oleh 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
[O] `org-attach-file-list' doesn't allow dotfiles
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