Page moved to http://xahlee.org/linux/shell_color_prompt.html
Perm url with updates: http://xahlee.org/emacs/emacs_vs_Notepad.html
Emacs vs Windows Notepad
Xah Lee, 2011-04-13
On Apr 9, 11:39 am, "Captain Obvious" 〔udode...@users.sourceforge.net〕 wrote:
Yeah, god forbid doing things differently than Windows(r) NotePad does.
One of the emacs cult phenomenon is that whenever some UI improvement is mentioned, the emacs cultist will bring up Windows Notepad. It's like this:
Emacs user: we should be more loving and share resources. Emacs cultist: we don't want another communist.
from that point on, no meaningful discussion can be had. It's just emacs vs Windows Notepad, the good vs the evil, the knowledgeable vs the idiots. Like:
Emacs user: emacs undo is making me insane. Is it possible to have traditional undo? Emacs cultist: if you want Windows Notepad, use that. Emacs user: emacs keys are so hard to remember. Is it possible to support the conventional keys for copy, cut, open, close, etc as in gnu/linux apps? Emacs cultist: Why don't you go use Windows Notepad? Emacs user: the C- and M- notation is not as intutive as Ctrl+ and Alt+. I understand the historical reasons, perhaps we can make the notation change? Emacs cultist: if this poses a problem for you, may i suggest you use Windows Notepad?
Twitter Hash and Unicode Symbols
Some unicode symbol semantic thoughts.
There does not seem to be a good hash code for functional programing. If you search “#fp”, lots of tweet comes up but is not related to functional programing. If you use “#functionalprograming”, that's too long a word, takes 21 character out of tweet limit of 140, and rarely do people use that.
Twitter doesn't allow hash of unicode symbols. For example, for functional programing, you might use
#λ, but twitter doesn't recognize any non-ascii char as a hash tag. (seems only recognize hash of english letters) When you search for “#λ”, nothing shows up, even if you have tweeted it. However, if you just search for λ, it shows up, though, most of it is Japanese using that symbol as part of emoticon.
Anyhow, it might be nice to establish a convention among functional programing communities to use λ for any tweet related to functional programing but is not specific about a language e.g. erlang, ocaml, haskell, clojure, scala, lisp, fsharp, Mathematica, etc.
Also, for my own writings on my site, the topics are usually programing, math, visual arts, literature (letters), sex, others. I thought a bit about using a unicode symbol to represent each. Here's what i come up with:
- λ programing
- ƒλ functional programing
- ∑ math
- ℓ literature, letters (humanities)
- ⌨ keyboarding
- ♪ music
- ⚤ sex
There are several ways to input unicode symbols on Mac and Windows. For example, on the Mac you can use Mac OS X Keyboard Viewer and Unicode, character palette. On Windows you can use Alt code or Character Map, but they are inconvenient.
If you use emacs, buy my Emacs Unicode Math Symbols Input Mode (xmsi-mode) to input these. See also: How to Create a APL or Math Symbols Keyboard Layout.
Emacs Bug: using universal argument to insert a unicode char with key defined by “key-translation-map” creates error and disables undo
Emacs Bug: C-u ＆ key-translation-map disables undo.
This seems like a bug. Steps to reproduce:
- Start GNU Emacs 23.2 with “-Q”. (so it doesn't load any custome init files.)
- Evaluate this:
(define-key key-translation-map (kbd "M--") (kbd "─"))(it lets you press 【Alt+-】 to insert a unicode char “BOX DRAWINGS LIGHT HORIZONTAL” (U+2500).)
- Open a new buffer.
- Type 【C-u 30 M--】. (insert the char 30 times.)
- You get this error: universal-argument-other-key: Args out of range: " ─", 0, 7
- Now, do Type 【C-u 30 M--】 again. This time, no problem.
- The worst problem is this: Now, when you try to undo, emacs says “No further undo information”.
CSS's “float” is really hard to understand. How many people in the world really understand it? I'm guessing it's less than 2 thousand.
Here's a test page. html css float left right test page.
Discovered that there's a forum for Paul Graham's language Arc Lisp, at arclanguage.org, and there's a thread discussing my criticism of lisp, at: Source arclanguage.org.
Looking For a Tool for HTML/XML Validation
In Firefox, there's a Extension called “Html Validator”. It adds a little indicator icon at the bottom right corner of your window. When a page you visit isn't valid, it lights up. You can click on it to see the errors. The really important feature of this extension is that it does not make a connection to w3c's validator. The same validating SGML parser used by w3c is bundled. This means, it validate any local html files. (this is most important use for me, as i do web dev with manually coded html files. Each time i preview my html in browser, i can also know whether it has html errors.)
Is there anything similar in Google Chrome, Opera, Safari, or even IE9? As far as i checked in the past years, all other validator i've seen simply send the current url to w3c's validator site.
I'm looking for a *local* tool to validate html. Command line program that can do batch checking will be best. In the past years i've spent a few hours with “html tidy”, and i don't think it's a solution for me, because i have problems using it to check missing tags. I don't need any cleaning up of my source file. All i want is it to tell me if i have missing tags or mis-matched tags, and tell me the line number. (if you really think Tidy does the job, please let me know the exact options. Again, all i need is for it to tell me any missing tags or mis-matched tags.)