News for hackers. Stuff that matters.
Re:Regarding the Em Dash by colanderman on Sunday January 07, 2018 @01:03AM (#16089520)
Personally I’m a big fan of the compose key for such matters. (Both OS X and Linux.) The mnemonics I find easier to remember.

• Compose . . → …

• Compose < " and Compose > " → “ and ”

• Compose < ' and Compose > ' → ‘ and ’

• Compose / = → ≠

• Compose + - → ±

• (couldn't figure out ≈)

• Compose < = → ≤

• Compose > = → ≥

• Compose o o → °

• (no compose for π)

Re:Regarding the Em Dash by chrismorgan on Sunday January 07, 2018 @08:42AM (#16090814)
~~ → ≈

I’ve customised my Compose key quite a bit.

I added things like:

- Greek characters from Vim’s digraphs, so p star = π, l star = λ, &c. (Looks like WinCompose’s defaults now actually include asterisk-first ones, star p → π, so I might drop my additions.)

- Emoji, :), :D, XD, :/, :S, &c.

- Improved curly quotes, whereby I super-conveniently type curly quotes all the time: ;; → ‘, :: → “, '' → ’, "" → ”. (Look at them on the keyboard to figure out the reasoning. ∷ is available as 2:.)

I contemplated, but didn’t add, Vim’s box drawing digraphs; there are a few collisions, and I only ever use box drawing characters in Vim, so I’ll just use Ctrl+K there.

http://temp.chrismorgan.info/.XCompose is my current .XCompose. I’m using Windows these days, so that’s with WinCompose.

Re:Regarding the Em Dash by username223 on Sunday January 07, 2018 @11:53AM (#16091468)
> - Emoji, :), :D, XD, :/, :S, &c.

Aagh! I mean... and so it comes full circle. Does no one remember when "emoticons" were sideways ASCII art? Does no one wonder why entry (8) in a list gets turned into "open paren smiley face with sunglasses?" Kids these days...

Re:Regarding the Em Dash by chrismorgan on Sunday January 07, 2018 @06:24PM (#16093380)
Oh, I remember it full well. But even in those comparatively early days when only :-( and :-) had specific Unicode codepoints [HN filters out emoji, imagine the appropriate codepoints yourself], I preferred to use them to :-) and :-(.

Why do I use all the fancy Unicode things? Because they’re there!

Re:Regarding the Em Dash by colanderman on Sunday January 07, 2018 @12:36PM (#16091681)
~~ doesn't work on OS X ;)
Re:Regarding the Em Dash by anjbe on Sunday January 07, 2018 @03:20AM (#16089871)
> (no compose for π)

You can create your own compose sequences in ~/.XCompose. I mapped pi to Compose * p, taking the idea from Plan 9: https://9fans.github.io/plan9port/man/man7/keyboard.html

Re:Regarding the Em Dash by Freak_NL on Sunday January 07, 2018 @05:39AM (#16090284)
If a particular compose sequence strikes you as sensible and suitable for everyone, you can submit patches upstream as well. I believe the base tables reside in Xorg, and GTK uses these as an upstream source, but I'm not completely sure.

I've did this for vowels with macrons — ā (-a), ō (-o), ū (-u), in particular because they are useful in romanised Japanese.