emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ruijie Yu via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: Luca Ferrari <fluca1978@gmail.com>
Cc: Ihor Radchenko <yantar92@posteo.net>,
	emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: copying text from links makes it with a starting [[
Date: Thu, 12 Jan 2023 17:15:48 +0800	[thread overview]
Message-ID: <273F07DB-1621-4EA2-802B-7A485D6EF0EF@netyu.xyz> (raw)
In-Reply-To: <CAKoxK+4wU93aL07q55eZtn5p6qwnPSUgfhjBB3MNhs5Y3QyXjg@mail.gmail.com>


> On Jan 12, 2023, at 15:45, Luca Ferrari <fluca1978@gmail.com> wrote:
> 
> On Tue, Dec 27, 2022 at 2:26 PM Ihor Radchenko <yantar92@posteo.net> wrote:
>> 
>> Luca Ferrari <fluca1978@gmail.com> writes:
>> Could you please provide more details about what is happening?
>> What exactly do you do to copy the link?
>> See https://orgmode.org/manual/Feedback.html#Feedback
>> 
> 
> Imagine I've this org fragment:
> 
> Link: [[https://foo.com]]
> 
> where the link is displayed without brackets, in org mode.
> I place the point at the beginning of the first visibile character,
> hence the 'h', and the C-space M-e M-w and then go to another
> application and paste the content of the clipboard.
> I've seen that sometimes the link is copied as text, so both beginning
> and ending brackets are there, but with long links the ending brackets
> are not there, but it could be they I remove them accidentally.
> I would like to copy only the visible part, but I guess there's no
> solution unless I do something manually or configure a web package to
> open the link into another application.
> 
> 
> Luca

Hi Luca,

If all you want to do is to copy the (visible) URI without its surrounding brackets, then maybe you can take a look at how C-c C-l is implemented regarding how it gets the URI, and from there figure out how you can put the URI into the kill ring. 

Otherwise if you want to copy portions of the URI without also copying the opening brackets, then I suppose there might have to be specialized commands for C-w and friends that handles opening brackets? 

Best,


RY


  parent reply	other threads:[~2023-01-12  9:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-27 13:06 copying text from links makes it with a starting [[ Luca Ferrari
2022-12-27 13:26 ` Ihor Radchenko
2023-01-12  7:42   ` Luca Ferrari
2023-01-12  8:32     ` tomas
2023-01-12  9:15     ` Ruijie Yu via General discussions about Org-mode. [this message]
2023-01-13  8:40     ` Ihor Radchenko
2023-01-14  0:06       ` Samuel Wales
2022-12-27 14:34 ` Esteban Ordóñez
2022-12-27 14:42   ` Esteban Ordóñez
2022-12-27 15:20 ` Max Nikulin

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=273F07DB-1621-4EA2-802B-7A485D6EF0EF@netyu.xyz \
    --to=emacs-orgmode@gnu.org \
    --cc=fluca1978@gmail.com \
    --cc=ruijie@netyu.xyz \
    --cc=yantar92@posteo.net \
    /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).