Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Classic "everyone is using the software wrong, but it's the fault of everyone, and not the software".

Some distros like Void seem to patch this out.[1]

From mandoc/mdocml's mandoc_char(7) [2]

In roff(7) documents, the minus sign is normally written as ‘\-’. In manual pages, some style guides recommend to also use ‘\-’ if an ASCII 0x2d “hyphen-minus” output glyph that can be copied and pasted is desired in output modes supporting it, for example in -T utf8 and -T html. But currently, no practically relevant manual page formatter requires that subtlety, so in manual pages, it is sufficient to write plain ‘-’ to represent hyphen, minus, and hyphen-minus.

Which is the common-sense thing to do.

Meanwhile, GNU projects become increasingly less relevant due to obnoxiousness like this.

In general the amount of wankery of "the correct hyphen" is staggering.

[1]: https://man.openbsd.org/mandoc_char

[2]: https://github.com/void-linux/void-packages/blob/20c66829134...



> everyone is using the software wrong, but it's the fault of everyone, and not the software > GNU projects

There's a way more popular thing that breaks commandline snippets: auto-replace from `--` (double hyphen-minus) to `—` (emdash), in many chat applications and, particularly, on Mac OS.

The argument for having such problem is the same: "everyone is using the software wrong", but alas, some people just forget to backtick their snippets (when that's even supported).

So it's not just GNU projects; it's GNU projects where there's a good chance to actually fix such problems despite the opinion of some code authors.


On iOS it’s really almost impossible to type -- in an input that isn’t explicitly defined to allow it. In this comment box for instance, I had to type `- -` (dash space dash), and then delete the space in the middle. I’m not sure if it’s possible to disable this behavior on a web text box.

Virtually any other method of inputting -- automatically, invariably converts it to a single em dash.

The best part about this is that it happens silently and automatically, unlike every other autocorrect on the platform. “Smart punctuation” can be disabled globally for the entire device, but I don’t think that’s particularly reasonable, either.


Gotta love smart punctuation.

Just yesterday, I had to fix a broken page because someone dared store a link tag in a word document, which helpfully and silently converted its quotes into smart quotes for the user.

I have a Ruby class that's whole purpose is to undo this kind of help in user provided text, but I missed a spot.

Thankfully, I've seen this happen a thousand times, so I knew what was happening. The user didn't though. And trying to explain why her quotes are the wrong kind of quotes would be impossible.

I cannot fathom the arrogance that drives the writer of any text processing application to silently replace what the user inputs, especially what they paste, with what they prefer instead. In the case of apple, they'll even delete other parts of the text if you disagree with their choice.

It's why I use notepad for almost everything and I avoid excel like the plague.


> I had to type `- -` (dash space dash), and then delete the space in the middle

Which itself seems like a bug, if the intended behaviour of adjacent dashes is to turn them into a long dash.

There is a similar annoying bug in Confluence (it's some weirdo corporate sort-of-wiki software), where backticks normally result in monospaced text, but if you type a closing backtick and then move to the start of the line and type the opening backtick, it just doesn't work. You get non-monospaced text, with literal backticks in it. To fix it you have to delete both of the backticks, then re-type the opening one, and then re-type the closing one.


Turn off "Smart Punctuation" in Keyboard settings.


Ok, but I want that on for the 90% of time I am talking to people.


What frustrates me is that this is a solved problem: In Word, for example, automatic substitutions can be overridden by undoing (via Ctrl Z or backspace) and repeating the same sequence, which will disable substitution.

Preferably I should be able do type - - and then have it be replaced by —, and backspace to turn it into --.


I agree with your first paragraph but not the second. What frustrates me is any sort of override of my keyboard keys – 100% of the time when I press backspace, I intend to delete one (1) character behind the blinking cursor. Not a whole word, not perform undo, not anything else. One character.

(Alternatively, if text is selected, then of course I’d like to delete the selection.)


-- ?

I had no trouble at all. iPhone 11, iOS 17.

Edit... as another commenter points out: it's the "smart punctuation" keyboard setting that handles this. I have it turned off...


It's pretty much mandatory for developers and tech people using a Mac to turn off the global "Use smart quotes and dashes" and most of the text replacement gunk.

It's quite counterproductive to have someone paste a json blob in Slack/mails/etc. ending up with all with the wrong quotes, as in “string”


It's a bit ironic because Apple did not do this for a very long time and only implemented it in recent years after being pressured by Windows converts who were used to it happening there.


It doesn’t happen on Windows, other than in specific applications like Word.


Sounds mostly just like Mac OS then, no? Where in specific applications like Notes and Slack it is being replaced. But not in other specific applications like Finder, Terminal, Music, or Firefox.

I don't like it either, but one seems modelled after the other.


I responded to your “Apple […] implemented it in recent years after being pressured by Windows”. I have no idea what Apple actually implemented. In any case, there’s no such application-independent functionality in Windows proper. Word for Mac probably also had it all along. And it’s as wide-spread in platform-independent web-tech-based apps (e.g. Electron apps).


> I have no idea what Apple actually implemented.

The things the person I responded to mentioned:

> the global "Use smart quotes and dashes" and most of the text replacement gunk.


MacOS has (had?) a fairly reasonable keyboard layout that let you type such things directly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: