I was creating a note about git aliases and typed:
alias.st=status -sb
or:
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.
Things that might be helpful to know (Agenda version, OS and model, etc):
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.
Itâs definitely âunexpectedâ from a user perspective. 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.