From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH 5/5] clipboard handling in remember templats Date: Wed, 9 Apr 2008 17:32:22 +0200 Message-ID: <4477ED15-3E57-4A1F-93C0-B43BFAA5749E@science.uva.nl> References: <20080316162417.23004.16993.stgit@nyarlathotep.internal> <20080316163020.23004.90078.stgit@nyarlathotep.internal> Mime-Version: 1.0 (Apple Message framework v919.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JjdAs-00086K-DO for emacs-orgmode@gnu.org; Wed, 09 Apr 2008 12:29:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JjdAq-00085B-NC for emacs-orgmode@gnu.org; Wed, 09 Apr 2008 12:29:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjdAq-000856-C2 for emacs-orgmode@gnu.org; Wed, 09 Apr 2008 12:29:24 -0400 Received: from fg-out-1718.google.com ([72.14.220.158]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JjdAp-0004YM-W3 for emacs-orgmode@gnu.org; Wed, 09 Apr 2008 12:29:24 -0400 Received: by fg-out-1718.google.com with SMTP id d23so3721432fga.30 for ; Wed, 09 Apr 2008 09:29:22 -0700 (PDT) In-Reply-To: <20080316163020.23004.90078.stgit@nyarlathotep.internal> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: James TD Smith Cc: emacs-orgmode@gnu.org Hi James, I am going to accept this patch, but I do have a question about it: On Mar 16, 2008, at 5:31 PM, James TD Smith wrote: > From: James TD Smith > > Fix the X clipboard handling so it works properly, and so it works > in XEmacs,and > add a new % expansion for adding links. > > This patch reverts the %c expansion to its original function (head > of kill > ring), and adds three new % expansions as follows: > > %x - Contents of the X clipboard. This is the first non-empty value > from the > PRIMARY, SECONDARY and CLIPBOARD X clipboards. > > %^C - This allows the user to choose between any of the clipboard > values > available, the kill ring head, and the initial region if set. > > %^L - Like %^C, but this inserts an org link using the selected value. > --- > > org.el | 56 +++++++++++++++++++++++++++++++++++++++++--------------- > 1 files changed, 41 insertions(+), 15 deletions(-) [...] > (cond > ((org-in-regexp org-bracket-link-regexp 1) > ;; We do have a link at point, and we are going to edit it. > @@ -12579,7 +12583,7 @@ link description." > (setq link (org-make-link > "file:" (match-string 1 (expand-file-name file))))) > (t (setq link (org-make-link "file:" file)))))) > - (t > + ((not link) > ;; Read link, with completion for stored links. If you set it up like this, `link' will be overwritten be any link found at point. Is you intention not to make the new argument link-location *overrule* anything that might be at point? So maybe the first alternative in the cond should be just (link), to bypass any parsing.... - Carsten