From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Richard Subject: Re: Drag images from Firefox to org-mode Date: Sun, 20 Oct 2013 22:42:27 +0200 Message-ID: <87k3h7ptcc.fsf@yahoo.fr> References: <87eh7irjvi.fsf@yahoo.fr> <52610C29.3000505@yahoo.fr> <526114B4.6060303@yahoo.fr> <2d5635af9ad6d51badb40e1e19c85572@mail.rickster.com> <87y55qpp44.fsf@yahoo.fr> <857b1a922e24dda4404df4d19fabd7e2@mail.rickster.com> <20131018204553.GA87254@BigDog.local> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXzpS-0003Th-T5 for emacs-orgmode@gnu.org; Sun, 20 Oct 2013 16:42:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXzpL-0005pj-IB for emacs-orgmode@gnu.org; Sun, 20 Oct 2013 16:42:26 -0400 Received: from mxin.ulb.ac.be ([164.15.128.112]:22525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXzpL-0005p5-BY for emacs-orgmode@gnu.org; Sun, 20 Oct 2013 16:42:19 -0400 In-Reply-To: (Oleh's message of "Sat, 19 Oct 2013 12:34:14 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Oleh Cc: org mode Oleh writes: > This can be fixed with a platform-aware function that checks both the > clipboard and the cut-buffer. I suggest to ask for a string with (read-string "URL: " nil nil default), offering the content of the clipboard/kill ring/selections as the DEFAULT. I think it's better to be explicit when downloading content, and there isn't much overhead in asking for a confirmation. > This can be fixed by adding `org-download-max-filename-length`. When > it > overflows, just resort to `default-directory' and provide a > message/option to fix. I suggest that the right place for those files is as attachment, and that's where customization should happen. The function choosing the right place (i.e. org-download--dir) could be turned into a defvar or defcustom which could then be set either to #'org-download--dir or #'org-attach-dir. > By the way, which system doesn't allow for spaces in directory names? ISTR that MSDOS (except the latest versions) didn't allow spaces in filenames :) Anyway, I tend to avoid spaces as much as I can in filenames (including dirs) > If you want the ability to create arbitrary output directories > based > on document context, the customization can be made to accept a > function (lambda) as a value, which could then return a directory > prefix. > This isn't an option for users with no elisp skills. It is an option if there are enough examples/built-ins that can be used. e.g. message-send-mail-function can be customized in this way, its docstring gives a list of meaningful values. -- Nico.