Unable to "Remove Link" from text that automatically became a link

What I did:

I was creating a note about git aliases and typed:

alias.st=status -sb


alias.gl=config --global -l

What happened:

alias.st and alias.gl became links. I right-clicked on the links and selected Remove Link. The link went away, but then came back when I continued editing.

The same thing happened when I selected the Preformatted style.

What I expected:

The links stayed removed. :wink:

Things that might be helpful to know (Agenda version, OS and model, etc):

Agenda 13.0 on macOS

If you change to the reformatted or fixed width format before you start typing, or before you paste, it should not convert the text to links.

We hope to improve this behavior in an update later this year.

Thanks for the work-around.

Does this “bug” also explain why, when I select those lines, then copy and paste them into a terminal window, the newlines are missing?

I highlighted the lines in Agenda, pressed Cmd-C to copy them, went to a terminal window and pressed Cmd-V, and there were no newlines. Here’s a screen shot showing this behavior:

While I’m writing, do you have any plans to make it easy to copy both individual lines of a preformatted code block or the entire code block without having to manually make a selection first? Similar to how the “circle” appears on the left side as the mouse hovers over each line, it would be nice to have a “copy” icon of some sort appear (on the right side?) for quick and easy copying of individual shell commands (for example). Similarly, a “copy all” icon at the top of the preformatted block would be great for code snippets. (It would be great if these copy icons worked without having the note be in the selected/edit state.)

It’s not really a bug. You have link detection turned on, so it detects links. We plan to undertake active steps to not detect links where you remove it, but it requires special treatment. If you don’t like the link detection, you can turn it off, or use the preformatted style (it was largely intended for code).

I have never seen the removal of newlines in a paste. That is odd. When I do the same, I get newlines, even when I paste in terminal.

Is there anything unusual about the original code? Did it come from something that uses a different form of newline (eg Windows)? Otherwise I don’t know, because if I type several lines of preformatted text, select it, and copy, I get newlines when pasting in terminal.

We do plan to improve paragraph level control, as you requested. Things like drag and drop of a list item or paragraph using the dot. Copy and paste might be an option too. Will keep it in mind.

I think I figured out how I got this to happen: I use option-return to start new lines without starting a new paragraph.

Good to hear. The ability to quickly “hover and copy” individual lines or entire blocks would be very useful.

Ah, right. So line breaks rather than paragraph breaks.

I still think it is a bit odd that it doesn’t paste into terminal as a new line, but I guess it makes more sense now.

It’s definitely “unexpected” from a user perspective. :grinning_face_with_smiling_eyes: It would be more intuitive if the plain text version of the clipboard instead had newlines (0x0a) to match what you see displayed in Agenda, especially inside code blocks.

I’m not really sure where this is going wrong. It could be — I would actually expect it — that Agenda puts the correct text on the pasteboard, but that the receiving app is removing the soft returns. In that case, I guess we could put in hard returns, but for a different app this may be undesirable. Shows the limitations of copy/paste I guess. There are always two parties involved.