Re: [Orgmode] [PATCH 5/5] clipboard handling in remember templats

2008-04-09 Thread Carsten Dominik

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 [EMAIL PROTECTED]

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



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [PATCH 5/5] clipboard handling in remember templats

2008-04-09 Thread James TD Smith
On 2008-04-09 17:32:22(+0200), Carsten Dominik wrote:
 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 [EMAIL PROTECTED]
 
 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?
No, it should override any links at point. 
 So maybe the first alternative in the cond should be just (link), to bypass 
 any parsing
Yes.

James


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode