Copy-pasting linked text

In Tinderbox 4 & 5, if I cut or copied text containing links from one note and pasted it in another, the links came along with the rest of the text. In this way, if I needed to quote a passage from an old note in a new one, I didn’t have to redo the links. Can I do this in TBX vv 6 & 7?

BBly

You can copy and paste notes, and the links will be preserved. We don’t copy links for in-text excerpts at present, both for efficiency and because the duplicated links are frequently unwanted.

A much bigger problem is cutting/copying and pasting within a note.

I have a note that looks like:

line one with a link
line two with another link

How do I move line two ahead of line one without losing the link on line two?

I can’t! At least, I haven’t figured out how in years of using Tinderbox…

(which is very surprising to me)

I certainly appreciate the argument for efficiency in the program code, but as I’m writing, it hardly ever happens, when I Copy-Paste a passage of text with links, that I don’t want the links to come along with it, as they would in TBX 4 & 5 (which is where I picked up the habit). Any links I don’t want are easy to get rid of in the Browse Links… dialog — and, in vv 4 & 5, if I Cut (rather than Copy) the overlinked text in the destination note, I could then just Paste purified text back in!

Of course, I don’t know how links are encoded on the programming side, and probably can’t appreciate what would be involved in organizing this change, but I for one would be very grateful if I could do this again!

BBly

1 Like

I seem to remember @eastgate sharing some workaround for moving links within a note, but I can’t remember what it was.

@mwra do you know perhaps? If you’ve got a note with multiple text links in it, and you want to change the order of them… what do you do?

Text links are ordered by their anchor position in the $Text, so to change order, you need to alter the $Text. In Browse Links, basic links are first in the order of creation, then text/web links by order of anchor position.

Not time to test just now, but IIRC the trick is to copy the desired text (link and desired surrounding text) and paste it into the new position before then deleting the original. A little counter-intuitive as an approach but (if it still works) a workaround.

This isn’t about their position in browse links… but in the absolute most basic text editing of notes that contain links.

I start with this note:

Now I want to move the second paragraph to the beginning. So I cut the second paragraph and paste it at the beginning. Or I copy the second paragraph and paste it at the beginning. This results in:

I can’t rearrange text within a note, unless I’m willing to lose the link.

And honestly, I can’t fathom this! Mark B has maintained his website with TB for how many years now? And you do aTbRef. Are you telling me that neither of you ever rearranges text in a note after adding links, or you always re-construct all the disappearing links after rearranging text? Both scenarios strikes me as incredibly unlikely, so I have to imagine there’s something I’m missing.

1 Like

The article I was thinking of is here, but it is out of date. Drag-drop to other windows’ text pane or tear-off text windows in same or other TBXs now work. However, in all cases described on that page, link data is not transferred though I’m unclear as to when the copy process stopped supporting links.

I quite often remake links. A workaround if moving text past a section of text that doesn’t contain links is the move the latter rather than the former, so the text with links in it ‘moves’ by default.

Ah yeah. Copy & paste used to do the trick. I’m not sure when it broke. Here’s hoping it comes back at some point…

So, I just want to be clear on something… let’s say I’ve got a list of links in my note like:

And I wanted to reorder them, the solution as of today is to:

  1. Click on each link to determine what note it links to
  2. Note that info down somewhere
  3. Reorder the lines to be what I want
  4. Reconstruct each of the links

Am I the only one that thinks that’s insane?

I know @mwra and @eastgate both use links in their sites a lot… do you guys just never edit your text, or always go through that arduous process when you do edit your text?

If I have a list I know I might want to reorder, I put each item in separate notes and put those notes in a container. That lets me use all Tinderbox’s facilities – sorting, outline view, chart view, and all the rest – to work with the list.

Copying and pasting text links is tricky; if you keep the links, sometimes you need to delete the unwanted links, while if you don’t keep the links, sometimes you need to replace them. If I hadn’t expected to need to edit this list, and now I needed to completely revamp it, here’s what I’d do today:

  1. Copy the current list, and paste an unlinked copy beneath the current list.
  2. Edit the copy.
  3. Recreate the links
  4. Delete the old list

Or, if I want to add or remove items, I can do that in place.

Copying and pasting text links is tricky; if you keep the links, sometimes you need to delete the unwanted links, while if you don’t keep the links, sometimes you need to replace them

Well, I wouldn’t expect the links to disappear by default… on OS X, when you copy and paste rich text with links, the links stay. If you want to remove the links, you manually remove them. If it’s super common to do this, then maybe a “copy without links” or “paste without links” function makes sense… but throwing the links away violates a basic expectation of copy-and-paste.

If I hadn’t expected to need to edit this list, and now I needed to completely revamp it, here’s what I’d do today

That’s certainly a better workflow than I came up with, thanks @eastgate :slight_smile:

I use Tinderbox for three significant (to me) HTML projects… two websites, and a personal wiki. I use text links all the time. Losing the links any time I rearrange text within a note is a major frustration for me. I really hope you choose to add this functionality back soon.

Here’s a workaround I’ve uncovered for Tinderbox’s inability to cut & paste linked text within notes. First, an example image:

The goal is pretty simple: rearrange the text so that the notes are in alphabetical order.

(note: I’ve used an extremely simple example here to illustrate a point. In my real document, the notes are not neatly shown to the left, they’re buried in a long list of notes)

Here’s the process:

  1. Click a note link to navigate to the note
  2. Right-click and “Open in new tab”
  3. opt+cmd+right arrow to navigate back around to the first tab
  4. cmd+’ to “go back” to the note with the links
  5. Repeat steps 1-4 for the remaining linked notes
  6. Edit your text however you like
  7. Select some text that should be-relinked, and drag the note’s link parking space to the document link parking space
  8. Find the tab with the note to link to, and drag the document link parking space to the note icon
  9. Repeat 7 & 8 for any remaining broken links

Obviously this is long-winded compared to cutting and pasting to rearrange the text… but so far it’s a worthwhile tradeoff to make given that Tinderbox can do things that are impossible in other tools.

There’s a way using agents that may save a bit of time… it replaces the entire “open in new tab” set of steps:

  1. Make an agent inside your main note, with the query linkedFrom($Container(agent))
  2. Disable the agent so it keeps the aliases around while you work
  3. Select some text, drag the note’s link parking space to an alias in the agent, and select “original” from the drop down in the right corner
  4. Repeat step 3 for all text to be re-linked

1 Like

Excellent, @pat – thank you!

Just kindly tell how you “Disable” an agent.

You can do this by setting the agent’s priority to ‘off’. You can do this via any one of:

I am catching up on this thread because I’ve hit upon a similar need to cut-and-paste text that contains links from Note1 to Note2. As I made my way through the thread, I was quite surprised in how complicated it seems.

I’m in the middle of a writing project and admittedly read through the posts quickly (“focus on creating content, not tinkering with the tool”, preaches my conscience). Based on a first-pass through the posts, setting up agents/deactivating agents, navigating links in new tabs – all seems so complex!

If votes are tallied for new features, please count my vote for a “Paste and Preserve Links” option – perhaps, it can be part of the Edit menu, like “Paste and Match Style”.

With regard to the idea that this is rarely encountered, I’m surprised by that too. I run into this problem quite a lot. In fact, it is more often the case that I want to preserve links in $Text.

3 Likes

Agreed. I would love for links to be able to be copied. I also usually want to preserve links, and correct links are easier to destroy than to create.

I understand there are some efficiency considerations, but it would be great to have the option available, even if it’s not the default behavior.

2 Likes