emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: James TD Smith <ahktenzero@dsl.pipex.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH 5/5] clipboard handling in remember templats
Date: Wed, 9 Apr 2008 17:32:22 +0200	[thread overview]
Message-ID: <4477ED15-3E57-4A1F-93C0-B43BFAA5749E@science.uva.nl> (raw)
In-Reply-To: <20080316163020.23004.90078.stgit@nyarlathotep.internal>

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 <ahktenzero@usa.net>
>
> 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

  reply	other threads:[~2008-04-09 16:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-16 16:27 [PATCH 0/5] Various patches James TD Smith
2008-03-16 16:28 ` [PATCH 1/5] Hide drawers after displaying an entry using org-clock-goto James TD Smith
2008-03-16 16:29 ` [PATCH 2/5] Add a way to set a user-defined function to generate descriptions for links James TD Smith
2008-04-09 15:15   ` Carsten Dominik
2008-03-16 16:29 ` [PATCH 3/5] Some improvements to org-table-export James TD Smith
2008-04-09 15:59   ` Carsten Dominik
2008-03-16 16:30 ` [PATCH 4/5] Add a new sort option, which sorts items by todo keyword James TD Smith, James TD Smith
2008-04-09 15:40   ` Carsten Dominik
2008-03-16 16:31 ` [PATCH 5/5] clipboard handling in remember templats James TD Smith
2008-04-09 15:32   ` Carsten Dominik [this message]
2008-04-09 17:35     ` James TD Smith
2008-03-16 18:29 ` [PATCH 4/5] Various patches James TD Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4477ED15-3E57-4A1F-93C0-B43BFAA5749E@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=ahktenzero@dsl.pipex.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).