logoalt Hacker News

Syntoniclesyesterday at 5:51 PM4 repliesview on HN

I for one am striving for clarity and couldn't care less about being confused with AI.

However I've only ever used regular dashes. How do you type an em-dash? Is it OS specific? I've taken to using Emacs insert-char with a list of frequently used ones in my scratch buffer. My memory for Unicode is unreliable.


Replies

topgrain2yesterday at 6:27 PM

Keyboard layout specific. Macs with their default English layout use “option-shift-dash” which is really easy to remember (and relatively discoverable, as such things go) which is why using proper m-dashes (not just double-dashes) used to be a strong indicator a poster was using a Mac, before LLMs took the character over.

On iOS you type it by pressing dash and holding until alternative options come up, same way you type e.g. accented characters.

show 2 replies
eichinyesterday at 8:51 PM

In emacs, c-x 8 RET prompts you for unicode character names (or hex) so for rare use you can just spell it out. There's also C-x 8 _ m for em dash and C-x 8 _ n for en dash. (Hit c-x 8 c-h to get a full list of those bindings, like any normal secondary map - they're about as idiosyncratic as the XCompose bindings, but you might find some of them "stick" in your head better (I personally like "C-x 8 1 / 2" better than "Compose 1 2" even if it's a lot more typing...)

xp84yesterday at 6:21 PM

Macs have a native way to do dashes: option- hyphen for en-dash and option shift hyphen for em-dash. On Windows there are some application-specific ways that make sense, e.g. in Office, but outside that you’re on your own and have to use the “hold alt and type the character codes” method! Or charmap.

feanaroyesterday at 6:57 PM

> How do you type an em-dash? Is it OS specific?

On Linux X11 at least, you can enable the Compose key and then press `<Compose>---` which results in — and `<Compose>--.` which gives you –

show 1 reply