From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] org-attach: Allow attaching file from visited buffer Date: Thu, 21 Jun 2018 17:47:30 +0200 Message-ID: <87y3f8cfal.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW1o9-0005oJ-H7 for emacs-orgmode@gnu.org; Thu, 21 Jun 2018 11:47:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fW1o6-0002jZ-Fr for emacs-orgmode@gnu.org; Thu, 21 Jun 2018 11:47:37 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:59857) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fW1o6-0002iW-8r for emacs-orgmode@gnu.org; Thu, 21 Jun 2018 11:47:34 -0400 In-Reply-To: (Eric Danan's message of "Thu, 21 Jun 2018 16:27:12 +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" To: Eric Danan Cc: emacs-orgmode@gnu.org Hello, Eric Danan writes: > When the file to attach is already open in emacs, it is generally > faster to select it from the buffer list than navigating to it through > the file system. This patch adds a `b' command to the attach > dispatcher that reads a buffer and writes it in the attachment > directory. Thank you. One issue is that we're losing the method choice (symlink, copy, hardlink). However, `org-attach-attach' already offers to start file system navigation from a Dired side buffer, if any. We may extend this idea: if there is a buffer currently displayed in another window, but no Dired buffer, offer its default directory as a start for completion. Another idea is to create a new function that will attach the current file to the subtree in another window. See `org-attach-dired-to-subtree', for example. If you haven't signed FSF papers, you need to add TINYCHANGE at the end of the commit message. Regards, -- Nicolas Goaziou