News for hackers. Stuff that matters.
Re:Always paste without formatting on macOS by crazygringo on Saturday November 04, 2023 @11:43AM (#38142074)
My whole life I've been wishing for something in between.

If I'm transferring between applications, I never want 95% of formatting — I don't want font or size or color or line-height or paragraph spacing or whatever.

But I do want italics, because that conveys actual meaning around emphasized words and titles. And I do want to preserve subscript/superscript in things like CO2 or "squared", because that's similarly meaningful. And I also want to maintain bulleted and numbered lists, which again have meaning. Strikethru as well.

So I just really wish that the OS had a toggle switch so that "Paste and Match Style" would still preserve everything "textually meaningful" -- <i>, <sub>, <sup>, <ol>, <ul>, <li>, and <s>.

Re:Always paste without formatting on macOS by bambax on Saturday November 04, 2023 @12:28PM (#38142532)
I wrote a browser extension some time ago that does something similar: Paste as Markdown [0].

The user can copy any text from anywhere, and then with the help of the extension, paste the result (somewhere in the browser), in markdown, so emphasis and lists, etc. are preserved, while everything else is discarded.

[0] https://markitdown.medusis.com/

Re:Always paste without formatting on macOS by Findecanor on Saturday November 04, 2023 @12:07PM (#38142318)
You could argue that font, size, colour, line-height and paragraph spacing should not be considered "formatting" of the text, but as properties that belong to the container that the text is in.
Re:Always paste without formatting on macOS by coldtea on Saturday November 04, 2023 @02:44PM (#38143944)
Whether it belongs to text or the pdf reader or rich text editor or browser doesn't matter.

I want to carry them over when I copy and paste the text (and sometimes to strip them). I don't want to copy and paste the container.

Re:Always paste without formatting on macOS by Champagn3Papi on Saturday November 04, 2023 @11:48AM (#38142120)
I recently bought the Pastebot, it's one of those tools once you try it and make it fit in your workflow you never want to go back.

It's something like 12$ one time purchase which is great and a huge productivity booster!

Re:Always paste without formatting on macOS by benhurmarcel on Saturday November 04, 2023 @02:20PM (#38143722)
Re:Always paste without formatting on macOS by Wowfunhappy on Saturday November 04, 2023 @12:28PM (#38142522)
I agree completely—but I'll go further. From a UI standpoint, italics should be treated akin to capital/lowercase letters.

Currently, on every computer I'm aware of, if I copy an all-caps paragraph and paste into the middle of an all-lowercase paragraph, the pasted text will still be capitalized. Similarly, if I click into an all-caps paragraph and start typing without caps-lock on, the new text will be lowercase.

Italics should work the same way.

Note: I am 100% cognizant that capital letters are different characters in unicode/ascii. Put that aside for a moment, it's not relevant to UI behavior, users don't care.

Re:Always paste without formatting on macOS by crazygringo on Saturday November 04, 2023 @01:30PM (#38143213)
In CSS, `text-transform: uppercase;` is able to separate case from styling. I've used it frequently in the past, since you often want to experiment with all-caps for short headings, captions, subtitles, etc. Whereas if you hard-code the all-caps in text, you can't go back.

In Chrome, if you copy CSS-all-caps text to the clipboard, it is copied as uppercase.

Intriguingly, in Firefox, it is copied as the original (mixed case) source HTML text.

I do like the idea treating all-caps as a style, just like small caps. The problem, of course, is that it makes it kind of impossible to type within it, since there's no feedback as to when you're typing capital letters at the starts of sentences or not.

Re:Always paste without formatting on macOS by Wowfunhappy on Saturday November 04, 2023 @01:57PM (#38143511)
To be clear, my assertion is that most user-facing text editors should have the opposite of all-caps as a style! I think italics should be treated the way we treat capitalization.

Pressing ⌘I (or using the UI equivalent) should act like the italics version of caps-lock.

Re:Always paste without formatting on macOS by snoopen on Saturday November 04, 2023 @04:48PM (#38144983)
I much prefer the approach of applying emphasis, be it italics, bold, all-caps etc, on top of plain text. To me this is the most versatile approach and I think is better for accessibility.

A sentence with italics or any other emphasis should read exactly the same without that emphasis. Where the same isn't true of capitalisation.

Re:Always paste without formatting on macOS by Wowfunhappy on Saturday November 04, 2023 @06:36PM (#38145927)
> A sentence with italics or any other emphasis should read exactly the same without that emphasis.

But it doesn't, that's the thing! The word you italicize can alter the meaning of a sentence. For instance:

> I didn't steal Sally's necklace!

> I didn't steal Sally's necklace!

> I didn't steal Sally's necklace!

Re:Always paste without formatting on macOS by nnf on Sunday November 05, 2023 @12:36AM (#38148269)
One of my favorites:

I didn’t say I took the money.

I didn’t say I took the money.

I didn’t say I took the money.

I didn’t say I took the money.

I didn’t say I took the money.

I didn’t say I took the money.

Re:Always paste without formatting on macOS by Wowfunhappy on Sunday November 05, 2023 @07:28AM (#38150556)
LOL, where is this from? This is almost[1] word-for-word what popped up last night when I asked ChatGPT for a sentence "that will have a different meaning depending on which word is italicized." I knew italics could alter meaning, but I couldn't think of a good example off the top of my head.

I liked ChatGPT's example, but I thought it was a bit too subtle, so I changed it to the sentence I used in the GP. I didn't realize ChatGPT's example was plagiarized.

---

1: ChatGPT wrote "I didn't say I took her money."

Re:Always paste without formatting on macOS by Wowfunhappy on Sunday November 05, 2023 @01:11PM (#38153793)
As of this writing my parent comment is downvoted, so maybe the difference between the three sentences is less obvious than I thought. While all three sentences assert that I didn't steal Sally's necklace:

• The first version implies that I acquired Sally's necklace via other means.

• The second version implies that I stole someone else's necklace.

• The last version implies that I stole something else from Sally.

Re:Always paste without formatting on macOS by vehemenz on Sunday November 05, 2023 @02:15PM (#38154554)
> A sentence with italics or any other emphasis should read exactly the same without that emphasis.

Not true. In conventional English, it is typical (if not expected) to add verbal emphasis to italicized words while reading aloud.

Re:Always paste without formatting on macOS by nightfly on Saturday November 04, 2023 @03:04PM (#38144102)
What makes italics so special it deserves that treatment and not everything else in rich-text (bold, underline, sub/superscript)?
Re:Always paste without formatting on macOS by iudqnolq on Saturday November 04, 2023 @03:13PM (#38144179)
The fact that it is special? All of this is arbitrary, that doesn't make it wrong.

Italics is the most important of those styling options for formal English writing (eg MLA style). Underlining was traditionally used a as substitute if italics were unavailable.

Re:Always paste without formatting on macOS by Wowfunhappy on Saturday November 04, 2023 @06:46PM (#38146000)
Subscripts and superscripts should probably work the same way as italics. They're just not as top of mind for me because I don't use them as often in my day-to-day life (and when I do, I often use the unicode characters).

I could see an argument for treating bold and underline this way as well, but I think the case is less clear-cut. Boldness is more likely than italics to be used for visual styling as opposed to semantic meaning.

Re:Always paste without formatting on macOS by crazygringo on Sunday November 05, 2023 @10:11AM (#38151772)
Yup, bold is mostly used stylistically for headings, titles, stuff like that. (And sometimes as part of link styling, especially with a lighter link color.)

Virtually the only time it's used within text is in a textbook-type situation, where the first use of key terms is in bold, but subsequent usage isn't. Which isn't helpful/relevant if you're copying a passage from it -- just because it was the first usage in that book, doesn't mean it's the first usage in your own document.

And underlining doesn't really exist typographically except for links. It's always been the handwriting/typewriter substitute for italics. It has no established meaning whatsoever -- any non-link usage of it is idiosyncratic, which is usually not something you'd want to preserve.

Re:Always paste without formatting on macOS by mrtesthah on Saturday November 04, 2023 @11:54AM (#38142194)
Notational Velocity works exactly this way.
Re:Always paste without formatting on macOS by bentcorner on Saturday November 04, 2023 @01:34PM (#38143255)
I kind of want something like markdown or WP reveal codes, where you can copy paste formatted text, but be able to see the formatting so you can remove anything unnecessary.

There's countless implementations of formatting toolbars for web based editors, most of them bad, I feel like if operating systems handled this for users we wouldn't be wasting cycles on this kind of problem.

Re:Always paste without formatting on macOS by i13e on Sunday November 05, 2023 @01:23AM (#38148821)