2010-08-31

emacs: have command overwrite selection

i have this code that inserts date.

(defun insert-date ()
"Insert current date."
(interactive)
(insert (format-time-string "%Y-%m-%d"))
)
(put 'insert-date 'delete-selection t)

the last line is to make sure that if i have a text selection, just overwrite it.

but it doesn't work.

i wrote to FSF about it i think last year, i think Richard Stallman himself turned it down.

but in my daily use, this is quite annoying.

with i think recent interest in behavior of text selection, can this be made to work?

thanks.

Xah

dvorak layout? what's that?

On Aug 31, 10:33 am, Alan Mackenzie wrote:
> In comp.emacs Xah Lee wrote:
>
> > Dvorak isn't available in all popular operating systems until about 10
> > years ago. (i think Microsoft is actually the first one to include it
> > out of the box, in mid 1990s?
>
> Xah, that's not English.  Only a very careless native English speaker
> could have written those two sentences.  The correct verb tenses in those
> two sentences are "Dvorak hadn't been available .... until 10 years ago"
> and "Microsoft was the first one".

on the surface i think you are right, but am not sure Alan if looked in depth.
(e.g. if you ask a university professor of literature; or professor of linguistics; or, those people who write on Language Log @ http://languagelog.ldc.upenn.edu/nll/ (and those who are itchy to digress on this, start a new thread pls! i will enjoy it, and will we all!))

>  Humour me, just for once, and tell me
> what your native language is, please.

am chinese by blood, alan. Chinese is what i grew up with in first 14 years. (not to mention body language)

can't believe you really need to ask that twice, of all these years. y'know, google 30 seconds will find u the answer, right from the dragon's mouth. My basic bio with clear and explicit info on this is online for like a decade.

> > I know that Mac didn't include a dvorak layout until OS 9 or OS 8 in
> > about 1998 or so. (i switched to dvorak in 1993 or 1994, and basically
> > created my own layout using ResEdit))
>
> There seems to be an assumption through this interesting topic that
> Dvorak is superior to Qwerty and friends.  Is there any solid evidence
> for this or is it all anecdotal?

god! you are not trolling right?

i tell u what. i read all sort of info on dvorak online since the web started (and before that, it was books) Beginning in about late 1990s, starting with slashdot.org, questions like basic doubt of dvroak has been drivelled all over. But that seems to be over in the early 2000s. But you still asking that??

sometimes, when discussing with some of the emacs developers, i really, really find things so curious. You, lennart, and eli... reading the emacs dev, i also see the same phenomenon, where A is absolutely sure of a fact, while B doesn't even understand what A is talking about, and vice versa, and took long convo back and forth to possibly clear the communication but not necessary agree (and i think after a few weeks each party really have forgotten whatever the other's point of view on a issue at all, even if it is a plain fact) So, i thought perhaps some of this has to do with the nature of texture communication, and the fact that most of us hardly know each other other than online posts of very narrow scope... but i think part of it has to do with not really being serious. In a professional environment (real professional environment, like having to see each other's face weekly in a company, where the goal is more precise and familiar to all...), persistent mis-communication doesn't happen to this degree.

but still, i'm quite surprised often of this...

you asking me, showing some doubt, about dvorak's efficiency over qwerty. I dunno what to say, but have you try to read what's been posted? I think if you really think about the question and ask yourself, i think you'll know the answer and convinced (not to mention actually took the time to learn dvorak or do research on this) I mean, literally, this question has been discussed just about in every online forum that's remotely related to computers or keyboard or input devices. slashdot mentions dvorak every few years... hacker news, delicious, reddit... hundreds and hundreds of discussions, and the new comer stackoverflow... but even, i think the question doubting the basic tenets of dvorak has been over since early 2000s. I think the topic of discussion has moved to more exotic ones, such as what's most efficient layout, and dvorak with emacs or vim, or other new layout's questions... etc.

ok, am getting ranty, if not already. Let me answer your q directly.

> Dvorak is superior to Qwerty and friends.  Is there any solid evidence
> for this or is it all anecdotal?

this really depends on what you mean. If taken your question as is without some special assumption of what you are really asking, then yes of course, dvorak is superior to qwerty, in easier to type, more comfortable to type, reduce RSI, reduce error, and for those who never learned touch typing, its even easier to learn than qwerty, and there's massive amounts of solid evidence.

evidence? well the first is the research done by Dvorak. Also published as a book. Then else, in the thread i mentioned the caplx site, which does studies and comfirm this, and there are quite a few other sites with java or javascript that compute the various distances, di-graphs, hand balance, etc on dvorak vs qwerty.

going deeper, perhaps you are one of those skeptics who doubt that all this measure of key distances don't mean shit. Yeah, such voice has been heard in online drivels, but it doesn't mean such doubt is not valid. How to investigate that? well, you can look into stat research of rsi over people, or more logical analysis of why key distances etc shouldn't be valid, or spend few weeks to read all blogs of those who actually learned dvorak (like, this is a method social research), or read all blocks of those coders who developed rsi and thought about going into dvorak ...

like, there's Wikipedia, which is my first stop in research just about anything. So, maybe spend 20 min to read it? note that it usally links to 10 or more other references or sites. Not saying it's all valid just because lots of links , but it can be a starting pointing of research to judge on this issue yourself??

how serious are you about this? i mean, if really, than start learning touch type on dvorak to ultimately judge for yourself??

Nothing wrong with asking, nice question Alan. :D

Xah ∑ http://xahlee.org/ ☄

Maltron, Kinesis keyboards

On Aug 31, 4:04 am, Tassilo Horn wrote:
> Xah Lee writes:
>
> Hi Xah,
>
> > In these languages, usually there are few extra characters that needs
> > to be typed. There are many standardized layouts for them (e.g.
> > QWERTZ, AZERTY), but often they still requires you to type the special
> > chars by a combination of key press using AltGr modifier, and these
> > layout usually do not consider any ergonomics in the sense of dvorak.
> > (see: Idiocy Of Keyboard Layouts.)
>
> Well, at least with standard QWERTZ and German Dvorak Type II (which I
> use), the keys for äöü can be typed without modifier.  With QWERTZ, even
> ß is not modified, although you don't need it too often in German.

you are right. I glossed over that.

haven't done much study on this but did spend a couple of hours to look at various international layout before...
〈Idiocy Of Keyboard Layouts〉 http://xahlee.org/kbd/keyboard_layouts.html

my impression is that i see lots of them rely on Alt Gr... and i don't really find some of the qwerty variation of swapping 1 or 2 pairs of keys makes any ergonomic sense to me.

it'd be nice to throughly study the various layouts for different langs, to get a sense if the special char needed are a direct key press or not, by what percentage, etc.

(e.g. first step is probably to get to know what special chars are needed in that lang, and how frequent for each, then look at the layout(s) of that lang, see if the char needs AltGr, their position, ... a evaluation of efficiency can come by devicing a formula that maps char frequency to a value of key press ease)

one thing i wondered about the different layout for different lang is that how they came by? is it much designed by a single person just by chance and somehow become the standard? or was it more thru formal study and evaluation... (my random guess is the former)

e.g. here's the Wikipedia page showing different keyboard layouts
http://en.wikipedia.org/wiki/Keyboard_layout

> The problem is that although the German Dvorak Type II is quite
> convenient when writing plain text, it's not that good for programming,
> cause {[]}| and others are all modified.  It's still better than QWERTZ,
> where even / needs a modifier...
>
> I would like to have some programming mode, which assigns more important
> symbols to the äöü keys.  You don't need those when programming anyway.
>
> > It's much better to find ways to create a universal layout that are
> > largely efficient, fixes the hardware layout problem, fixes the number
> > arrangement problem, and can be used for all languages. I think this
> > is quite doable.
>
> I'm far less positive.  I can't even think about a reasonable compromise
> for only latin languages...

humm... i think starting with Maltron or Kinesis, such a keyboard and layout can come...

one thing i always wondered about Kinesis is that why no other keyboard manufacture make those bowl shaped key surface. I vaguely recall it was due to a patent. Can anyone confirm?

Xah

2010-08-28

calling python in emacs

On Aug 28, 12:45 pm, Michael Hannon wrote:
> Greetings.  I use Emacs for, among other things, running Python code and R
> code.  In both modes (Python and ESS "Emacs Speaks Statistics") there is a
> function bound to the sequence:
>
>     C-c C-n
>
> Both functions advance to the next line of code in the buffer, i.e., skipping
> blank lines, comment lines, etc.
>
> In ESS mode the function bound to C-c C-n also (by default) sends the current
> line to R for evaluation.  I find this to be very convenient as a way to watch
> calculations "evolve".
>
> It's possible to do something similar in Python mode by selecting the
> current line and then sending the region (C-c C-r) to Python for evaluation,
> but this is a bit cumbersome.
>
> Can anybody suggest a way to graft the ESS-mode behavior onto Python mode?
> I've appended the high-level descriptions of both functions.  I understand
> that the source code is available, and that I'm free to hack away to my
> heart's content.  I just don't have the skills at Emacs/Lisp required to do
> such a thing in a finite amount of time.
>
> Thanks and best wishes,
>
> -- Mike
>
>     Python mode
>     ===========
>
> C-c C-n runs the command python-next-statement, which is an
> interactive compiled Lisp function.
>
> It is bound to C-c C-n.
>
> (python-next-statement &optional COUNT)
>
> Go to start of next statement.
> With argument COUNT, do it COUNT times.  Stop at end of buffer.
> Return count of statements left to move.
>
> ----------
>
>     ESS mode
>     ========
>
> C-c C-n runs the command ess-eval-line-and-step, which is an
> interactive compiled Lisp function in `ess-inf.el'.
>
> It is bound to C-c C-n, C-c C-e C-n, > line & step>.
>
> (ess-eval-line-and-step &optional SIMPLE-NEXT EVEN-EMPTY INVISIBLY)
>
> Evaluate the current line visibly and step to the "next" line.
> "next" = the next line with non-comment code _unless_ SIMPLE-NEXT is non-nil,
> possibly via prefix arg.  If 2nd arg EVEN-EMPTY [prefix as well],
> also send empty lines.    When the variable `ess-eval-empty' is non-nil
> both SIMPLE-NEXT and EVEN-EMPTY are interpreted as true.

i haven't coded python for few years and havn't used ess MODE, but if all you need is to send the region to python to eval and display the output in buffer, that's pretty easy. I wrote a tutorial about this here:

〈Elisp Wrapper For Perl Scripts〉 http://xahlee.org/emacs/elisp_perl_wrapper.html

it's just 5 lines of elisp.

Xah ∑ http://xahlee.org/ ☄

2010-08-27

how is a unicode char mapped to font glyph?

am wondering, that each char in unicode has a code point; what's the analogous term for a character in a font?

i never understood the part of the process when a decoded file needs to be mapped to font (or fonts, by some modern font substitution techonolgy)

for example, if i have a file with the greek alpha α (U+03B1). What's the exact process for a app to choose a particular a particular character in a font? (and what happens in the case of a rare unicode char say the heart ♥ (U+2665).)

does a font contain meta info about what symbols it has?

if 2 fonts both have the symbol alpha, do they necessarily share the same “code point”? or is it dependent on the type of font such as Type1, Type3, TrueType, OpenType? ...

Wikipedia http://en.wikipedia.org/wiki/Computer_font doesn't say much about this.

thanks for any pointers or references.

Xah ∑ http://xahlee.org/ ☄

2010-08-26

user interface face; point of view; delete selection

On Aug 20, 5:45 am, p...@informatimago.com (Pascal J. Bourguignon) wrote:
> Gabriel TEIXEIRA writes:
> > Hello all,
>
> > I've been working with three simultaneous emacs windows, each one
> > containing a diferent project, and I noticed that two of those three
> > are presenting a weird behaviour. When I select a text in those
> > windows (like by pushing Shift and then the arrow keys), and then I
> > push the key Delete, I expect that the selected/highlighted text be
> > erased, but instead, it erases a single character to the left of the
> > cursor (like would happen without the selection) and the selection
> > disappears (although the same operation works with Backspace or
> > Shift+Delete normally).
>
> This is the normal emacs behavior.  You've been distorted by the later
> "graphical user interfaces".

hi Pascal, that's a point of view. From the other side, it can be considered that YOU've been distorted by 1980's computing interfaces.

Xah ∑ http://xahlee.org/ ☄

------------------------------------------------
hi Gabriel TEIXEIRA, all you need is to turn on the delete-selection-mode

• New Features in Emacs 23
http://xahlee.org/emacs/emacs23_features.html

quote:

Also, now you can hold down the Shift key then press arrows key to select text. To turn this off, put:

(setq shift-select-mode nil) ; “t” for true, “nil” for false

However, by default, pressing delete key will not delete selected text. If you want this, put:

(delete-selection-mode 1) ; make typing override text selection

i don't know if that is on in emacs 24, but maybe give it a try.

note that cua-mode also turns on the typing overwrite behavior, but is is not done by having delete-selection-mode, it implemented it's own.

also, if your selection is made by mouse, then it will automatically have delete selection behavior, even if delete-selection-mode is not on.

it short, the situation is a bit messy.

also, this problem happens to me too, that sometimes for some reason the delete selection behavior is gone. Quite annoying. When this happens, i call delete-selection-mode again to turn it back.

Xah ∑ http://xahlee.org/ ☄

2010-08-25

emacs implementations

On Aug 12, 11:18 am, Craig A. Finseth wrote:
> Last-Modified: 2010-08-12
> Posting-Frequency: bi-monthly
> URL: http://www.finseth.com/emacs.html
> Copyright: 1990-9, 2000-10 by Craig A. Finseth
> Archive-name: emacs-implementations
> Disclaimer: Approval for *.answers is based on form, not content.
>
> Emacs Implementations

just realized, that Craig is the author of the book

http://www.finseth.com/craft/
http://www.amazon.com/Craft-Text-Editing-Craig-Finseth/dp/1411682971/

sometimes mentioned in old emacs communities.

nice.

from his emacs implementation list, seems he also has a implementation, called Freyja.

but the url given http://www.finseth.com/index.html#Freyja
is dead.

Xah ∑ http://xahlee.org/ ☄

2010-08-24

xah's emacs wiki home page text

My name is Xah Lee. I use Emacs, and have since 1997, live in emacs daily since 1998, and love it.

I have some emacs and elisp tutorial here:

* [[http://xahlee.org/emacs/emacs.html Xah's Emacs Tutorial]]
* [[http://xahlee.org/emacs/elisp.html Xah's Emacs Lisp Tutorial]]

Here's some elisp code i wrote:

* [[http://ergoemacs.org/ ErgoEmacs]]. A emacs distribution, together with [[http://www.davidcapello.com.ar/ David Capello]].
* [[http://xahlee.org/emacs/ergonomic_emacs_keybinding.html ErgoEmacs Keybinding]]. A emacs keybinding set based on ergonomics.
* [[http://xahlee.org/emacs/unicode-browser.html Unicode Browser mode (xub-mode)]]. For browsing unicode character palette.
* [[http://xahlee.org/emacs/xbbcode-mode.html BBCode mode (xbbcode-mode)]]. For editing lighweight markup BBCode. Emacswiki page here: [[BbCode]]
* [[http://xahlee.org/mswin/emacs_autohotkey_mode.html AutoHotkey mode (xahk-mode)]] A mode for editing AutoHotkey script.
* [[http://code.google.com/p/lsl-mode/ LSL mode (xlsl-mode)]]. A mode for editing Linden Scripting Language. Emacswiki page here: [[LSLMode]]
* [[http://xahlee.org/emacs/elisp_idiom_templates.html emacs lisp yasnippet templates]]. A collection of 105 yasnippet templates for coding emacs lisp.

I am a mild supporter of FSF/GNU. I urge programers to take a class in college on sociology, economics, history, philosophy.

Most Open Source or FSF proponents are youngsters who's got nothing to loose, and “freedom” is just their execuse to advance their self interests. Freedom fighters are almost always losers to begin with, and invariably they are the primary beneficiary of the “freedom” they clamour. When you are poor, student, no ability or interest in business, then, you are likely to love opinions advanced by orgnization such as FSF, e.g. no patent, open source. But if you do have business abilities, have commercially valuable software, have patents, you are not likely to believe in FSF's ideas. Most FSF fans are just another a form egocentric [[http://xahlee.org/Netiquette_dir/hackernews_xahleeorg_politics.html politcal struggle]]. This is nothing unusual when looking at the history of human animals. (e.g. most political upheavals, revolutions, are started by youngsters or the mob who have not much to lose).

Also note, Richard Stallman's “Free” software, is just one philosophy on software's distribution and use, among a few. There are 2 aspects that he abused the word “free”. (1) hijacking it to mean freedom, instead of the more popular sense of no price tag. (e.g. software that are given out for free is now given the shady term freeware, while software of FSF's ideal gets a better term “Free Software”.) (2) He uses the word “free” in his talks ostensibly to mean the concept of Freedom in the context of human rights. But FSF's philosophy on software use as freedom is really just a point of view. Most people, or even me or intellectuals, when using Apple, Microsoft, Goole products, or any software that does not come with source code, do not believe we are loosing freedom in general. (PS: also, today's pop concept of “Human Rights” itself is just one school of thought in moral philosophy, not necessary the best with regards for a properous human community.)

Some essays related to Open Source and IT industry:

* [[http://xahlee.org/UnixResource_dir/writ/mshatred155.html On Microsoft Hatred]]

* [[http://xahlee.org/UnixResource_dir/writ/responsible_license.html Responsible Licensing]]

* [[http://xahlee.org/Periodic_dosage_dir/_p2/russell-lecture.html What Desires are Politically Important?]] (by Bertrand Russell)

Some essay about problems of emacswiki:

* [[http://xahlee.org/emacs/emacs_wiki_problem.html Problems of Emacswiki]]

Thanks for Alex Schroeder for starting emacswiki, and thanks for visiting my page on emacswiki!

== Comments ==

Hi, Xah. Wondered if that was really you, based on the initial post. This update removes any doubt --ChristopherSmith. ;)

: Greetings, comrade. —Xah

[new]
Xah has also been a well known troll on various comp.lang.* newsgroups and played in the same league as ErikNaggum.
Just browse some older stuff in the [http://groups.google.com/groups?as_q=fuck&as_ugroup=comp.lang.*&as_uauthors=xah+lee&safe=off Usenet archives]. -- AlexSchroeder

[new]
Older? Xah remains trollific in the present tense, as a glance at comp.lang.python reveals. Use of emacs reveals Xah isn't completely bad, no? --ChristopherSmith

: dear Christopher, by the way, i left a reply on your page about the naming of Mac OS X. However, some [self-censored] went ahead and deleted it. I don't think he asked you before hand. It is not even his [self-censored] business. Sometimes i wonder, if we should forgive these younsters. But then, just because one has bad childhood doesn't obliterate all a psychopath's crimes. It is behaviors like these, that pains me. —Xah

::: Thanks for the pointer--I restored your remark. As Zappa so eloquently put it, "Censorship is like treating dandruff through decapitation". Though if I could recommend a book to you, Sun Tzu makes some excellent points about non-frontal assaults, and I feel that the points you make in various fora would have more impact if they hit from the flank more often than square-on. ;) --ChristopherSmith

----
I'd prefer decent language on the wiki. -- AlexSchroeder

: Alex, was it you who censored my post before? why don't you just say so? because it seems anonymous, and more than just four-letter words are deleted.—Xah

Nope, it wasn't me. I sure agree with the sentiment, however. :) -- AlexSchroeder

: OK. Thanks for the note. —Xah

----

Note to Alex Schroeder: This page doesn't validate, apparantly because of the «dl» tag. —Xah Lee, 2006-08-30

----
You might want to change "youngsters who’s got nothing to loose" to "youngsters who've got nothing to lose". I am not
being critical, just trying to be helpful. I'm guessing that English is not your first language.

George
----

CategoryHomepage

2010-08-23

xah brags about keyboarding efficiency

On Aug 21, 6:39 pm, Kenneth Tilton <kentil...@gmail.com> wrote:
> On 8/21/2010 5:51 PM, Xah Lee wrote:
>
> > lol kenny, u've been more spammy and cranky in the past months.
>
> No, seriously: what Lisp web app framework do you use?

emacs lisp?

> Ah, hang on, you already mentioned elsewhere you don't do Javascript
> -- all hand-coded static HTML? That's fine, but you are not my
> audience. OTOH, if you want to step your game up a level, qooxlisp
> would be a good way to avoid learning more than the absolute
> minimum. Then you get to learn, Cells, too:  
>  http://wiki.github.com/kennytilton/cells/ That would make you
> forget Mathematica.

where did a say i don't do javascript?

• Xah's Javascript Tutorial
http://xahlee.org/js/js.html

oh, and yes my over 4 thousand pages visited by 7 thousand visitors PER DAY are hand coded, but some are elisp generated. See for examples:

• Links to Wikipedia from XahLee.org
http://xahlee.org/wikipedia_links.html

• Google Earth Files at XahLee.org
http://xahlee.org/kml_links.html

• Creating A Sitemap With Emacs Lisp
http://xahlee.org/emacs/make_sitemap.html

kenny, i don't think u want to do piss links with me. :)

btw, this is a good opportunity for me to brag. Even though my html is manually crafted love affair, but, i challenge anyone, with whatever mark-down or wiki system they use, that i can type, format, to desired effect, FASTER than them.

let me explain what i mean. For example, here's some common markup syntax

= first header =
== second header ==

simple paragraph, no need to mark anything

[ http://en.wikipedia.org/wiki/Lightweight_markup_language link done with square bracket, sometimes double]

{
; program code here. literal format
(+ 3 4)
}

Now, i claim, i when i write html in emacs, i spontaneously generate all the tags, faster then they can type those single char markdowns. e.g. the above html equivalent would be like this:

<h1>first header</h1>
<h2>second header</h2>
<p>simple paragraph</p>

<p><a href="http://en.wikipedia.org/wiki/Lightweight_markup_language">Lightweight markup language</a></p>

<pre class="elisp">
<span class="comment-delimiter">; </span><span class="comment">program code here. literal format
</span>(+ 3 4)
</pre>

wooah, can you believe that??

let me repeat to be sure.

i don't care if you are a champion of speed-typing in highschool, and i don't care what kinda simple, efficient, ass-kicking markdown system you use, my claim is, that when i work in emacs with my own elaborately customized system, i create the equivalent rendering with the much verbose html markup, FASTER than you can with your markdown. (and with more exacting control and rendering flexibility too, with PROPER CSS! AND, IT'S ALL HTML4 STRICT VALID!!!)

whoaah, did i blew anyone's mind? i'm willing to subject to tests or open challenges.

humm... i think some honest fellow here may be wondering just what system i'm using. Let me be humble and tell you straight forward here without being mysterious.

Keyboard:

• The Microsoft Natural Ergonomic Keyboard 4000
http://xahlee.org/emacs/ms_keyboard/ms_natural_keyboard_4000.html

Keyboard layout:

• The Dvorak Keyboard Layout
http://xahlee.org/comp/dvorak_keyboard_layout.html

App:

• ErgoEmacs Emacs distribution
http://ergoemacs.org/

Emacs Keybinding system:

• ErgoEmacs Keybinding
http://xahlee.org/emacs/ergonomic_emacs_keybinding.html

(plus extra customization
( can be seen here http://xahlee.org/emacs/xah_emacs_init.html
(more specifically, these files on that page related to efficiency of keys
* xah_emacs_keybinding.el
* xah_emacs_unicode_input.el
* xah_emacs_alias.el
* xah_emacs_abbr.el
)
) )

Extensive customized emacs html mode system. Part of it are discussed here:

• “Zen-Coding” and “Emacs-Buddha-Coding”
http://xahlee.org/js/zen-coding.html

• Emacs and HTML Tips
http://xahlee.org/emacs/emacs_html.html

Extensive os-wide key macros:

• AutoHotkey Example Scripts
http://xahlee.org/mswin/autohotkey_examples.html

(part of my custom file can be seen at the bottom of that page, here's the direct url:
http://xahlee.org/mswin/xah_autohotkey.ahk
)

OS: Mac or Windows, either way. Currently on Windows. If on Mac, the os-wide macro replacement of AutoHotkey will be the Mac's DefaultKeyBinding.dict and QuickSilver.

• How To Create Keybinding In Mac OS X
http://xahlee.org/emacs/osx_keybinding.html

well, i'm not satisfied with the brag above. Y'know? many linux tech geekers brag about vi, command lind, ratpoison system etc shit, or emacs old farts brag about emac's default keybinding system, or lisp coders brag about the paren edit mode. I, Xah Lee, hereby claims that when it comes to general computer operating tasks (such as switching windows, launching apps, get a piece of text here past there, processing file, etc ), or specific lisp coding tasks (e.g. general editing process when coding lisp), that i work faster, more efficient, less key strokes, than them.

yes, all this i'm willing to test publicly in some way. There was a fellow who announced such a open competition a month ago. Let's see how that goes.

why do i dare to brag about this? because i'm the biggest computer operation efficiency nerd on earth. My methods or the system i personally developed to use, are not based on hearsay or habit or hacker lore as most tech geeker idiots are about these issues. My methods, is developed with a scientifically verifiable ways as much as possible.

• All About Keyboards, Keyboard Layouts, Shortcuts, Macros
http://xahlee.org/Periodic_dosage_dir/keyboarding.html

well, sometimes i feel bad because i brag too much. I wonder if i'd damage my public image... but ya know? i have to say what i think is true, and my “braggings” above i think is fairly true. Yes, someone create a public test please.

Xah ∑ http://xahlee.org/ ☄

blame Windows!

On Aug 23, 2:48 pm, "Captain Obvious" wrote:
> So, you see, Microsoft actually cares about users and their habits and they
> can go as far as introducing new OS components just to make their experience
> better.
[full article pasted below my sig]

well said Captain Obvious! (btw, you name made me lol. pun not intended here.)

regarding about the permission to modify files in “C:\Program Files”, i've written about it too. Here:

• Windows Vista VirtualStore Problem
http://xahlee.org/UnixResource_dir/writ/windows_virtualstore.html

also, recently i happed to read a few articles about Microsoft written by the venerable Microsoft developer Raymond Chen

〈The Old New Thing: What about BOZOSLIVEHERE and TABTHETEXTOUTFORWIMPS?〉 (2003-10-15), by Raymond Chen, at http://blogs.msdn.com/b/oldnewthing/archive/2003/10/15/55296.aspx

where you read that lots of shit is blamed to Microsoft, while the real fault is 3rd party asses, and Microsoft spend tremendous time just to still make things work.

Also, you know how Microsoft startup is like a snail? See:

• Windows Starting Too Slow? Disable Windows Startup Apps with msconfig
http://xahlee.org/mswin/disable_Windows_startup_apps.html

actually, just about all 3rd party software adds hidden gook of itself to Windows startup, so when Windows starts slow, ms got blamed, but in fact it's those fucking Adobe, iTune, Java, games. (in particular, fuck Java the motherfucker, and Sun Microsystems fuckface, glad u dead. (note that in a java update about few months ago, it surreptitiously installs a 3rd party web based backup service software. you can read about in in blogs if you care to search.))

Xah ∑ http://xahlee.org/ ☄

On Aug 23, 2:48 pm, "Captain Obvious" wrote:
>  TB> Do you think that the view that MS and Sun (under whatever ownership)
>  TB> are slowly dying is somehow contentious?
>
> Yes. I do not have a strong opinion on this, though.
> My point was, however, that it "does not follow", i.e. it is hard to related
> slowness of IE8 installation to death of MS.
>
>  TB> Patches do this by *reading and writing the whole file for each line
>  TB> they change*.
>
> Holy crap...
>
>  TB> So, maybe this bug will take 20 years to "fix" where "fix" means
>  TB> "ignore until we replace it with something else".  That's not a good
>  TB> indicator, at the very best.
>
> Ok, you've convinced me that Sun is not doing very well.
>
> But Microsoft isn't that bad. They fix things. They are not afraid to change
> things for better breaking compatibility with old cruft. They spend a lot of
> efforts making old cruft co-existing with new solutions.
>
> E.g. NT branch does not allow writting to C:\Program Files (like /usr) for
> non-admininstrator users with default settings -- for obvious settings. But
> both users and applications abused this -- users were usually working as
> administrators on XP and applications were writing to C:\Program Files\xxx
> (while they should write to C:\Profiles\user\Application Data\xxx).
>
> In Vista they have fixed this -- first, now administrator is more like a
> member of wheel group who can do sudo and needs to do sudo for
> administrative tasks (although it is implemented via complex machinery on
> kernel level, as far as I understand).
> Then applications which try to write to C:\Program Files while being
> executed in low-privilege mode actually run to some directory in
> C:\Profiles\user\... -- this is implemented transparently on filesystem
> level.
>
> So, you see, Microsoft actually cares about users and their habits and they
> can go as far as introducing new OS components just to make their experience
> better.
>
> Of course, not everything is perfect. But in case of slow installation times
> it's not like they've made totally retarded thing and do not want to fix it.
> More like it is not tuned very well. Maybe it will go 2x or 3x faster if
> ideally tuned and optimized, but it is not absolutely critical so they
> didn't do it.
>
>  TB> That "something else" of course will turn out to be Linux.
>
> Do you think that Linux will kill Windows too? Or that would be Apple's OS?

2010-08-21

microsoft hatred

2010-08-21

On Aug 21, 8:50 am, Kenneth Tilton wrote:
> On 8/20/2010 1:22 PM, Xah Lee wrote:

> > On Aug 18, 3:51 am, Tim Bradshaw  wrote:
> >> On 2010-08-18 11:12:53 +0100, Kenneth Tilton said:
>
> >>> They've run up the white flag, Microsoft, haven't they?
>
> >> I think it's what happens to monopolists: they get big by being a
> >> monopolist, and because they have no competition they get slow and
> >> bureaucratic.
>
> > lol. what load of crap.
>
> > many tech geekers don't understand what the word monopoly means.
>
> > monopoly is preventing others from competition.
> > monopoly is not saturation of a market.
>
> > when tech geekers speaks of Microsoft monopoly, they mean saturation
> > of a market.
>
> Speak for yourself. I am talking about anti-competitive practices.
> Really unecessary, too, since they had dominant share anyway. And now
> all Bill does is worry about how to give away all the money he grabbed
> unnecessarily. That's the joke. The unfunny part is the people he hurt
> along the way, and the scorn most folks have for him and his company.

well i paid a lot attention to this over the past decade about Microsoft being anti-competitive... but i don't really see any, or any that's worse than say, Sun Microsystems. And even in my 20 years of using a computer i used Mac from 1990 to 2009-06 as my main PC and never have the expertise or worked on any of Microsoft's tech as a professional programer, and i don't like Microsoft, but my feeling is that Microsoft Windows is simply vastly better than competitors, ALL things considered.

what anti-competitive practice are are you thinking?

bundling a browsers? i'm sorry but i think that's rather a MAJOR, non-trivial, INNOVATION.

threaten to cut off partnership if PC makers sleeps with other OS? Sue ya wife if she threatens a divorse!

branching off Java? FUCK Sun Microsystems with its motherfucking purity and run-everywhere marketing fuck Java lies FUCK, and i'm glad Sun is dead. The scumbag pulled the same Netscape “open sourcing it” trick when death is near. AM VERY GLAD THE SUN MICRO FUCK IS DEAD. Google also broke off ostensibly with their customized non-standard Java, and Oracle just sued Google (but for different reason). (LOL!)

(see also:
• Jargons of Info Tech Industry
http://xahlee.org/UnixResource_dir/writ/jargons.html

• What are OOP's Jargons and Complexities
http://xahlee.org/Periodic_dosage_dir/t2/oop.html
)

the above are perhaps the most cited Microsoft faults. What others? some halooween document? Fuck you linux slashdot groklaw tech geeking social science illiterate sucmbags lying thru your teeths spreading fucking illiterate motherfucking mis-info jargons FUD for your own political gain, and fuck you richard stallman for bending the meaning of the word FREE for your personal gain, and befuddle the concept of human's freedom of behavior with your brand of software distribution philosophy.

(
• “Free” Software Morality, Richard Stallman, and Paperwork Bureaucracy
http://xahlee.org/UnixResource_dir/writ2/FSF_philosophy.html
)

but tell me kenny what you think are some of the anti-competitive practices.

O, btw, i've switched to PC now as my main machine in 2009, from 18 years of Mac, 10 of which being a Mac fanatic so to speak.

My story is here:

• Switching from Mac/Unix To PC/Windows
http://xahlee.org/mswin/switch_to_windows.html

and with the decision to switch, i've thrown away my mental block of not learning any Microsoft techs, and in the past year have read extensively on MS techs (e.g. over 100 Wikipedia articles related to MS's techs), and started to write a bunch of Microsoft related tutorials. You can see them collected here:

• Microsoft Windows Tech Tips
http://xahlee.org/mswin/index.html

let me give one impression of their language. The Microsoft PowerShell.

• Xah's PowerShell Tutorial
http://xahlee.org/powershell/index.html

The PowerShell, in my opinion, is far more powerful and well designed, than the combination of all of perl, python, php. (O my god, no wonder Microsoft is so successful.) (for those functional programing nerds, note that PowerShell was called Monad! Yay monad!)

O, u can see the Wikipedia articles i've read.

• Links to Wikipedia from XahLee.org
http://xahlee.org/wikipedia_links.html

i've made estimates, that for each i actually linked to in my writings, i've read about 6 more, starting about 2004. (was thinking 10, but last time i did a more serious estimate, i think 6 is proper.)

Since about 2006, i spend 16 hours in front of computer each day. (actually something like that can be said since 1995) 1/2 of that is in emacs, 1/2 in Wikipedia, and 1/2 in Firefox. LOL

come, Microsoft haters, let's start a flamewar on this. am willing to entertain with my smattering of english. (except kenny)

Xah ∑ http://xahlee.org/ ☄

2010-08-20

what's monopoly 2

On Aug 20, 12:42 pm, "Captain Obvious" wrote:
>  XL> lol. what load of crap.
>
>  XL> many tech geekers don't understand what the word monopoly means.
>
>  XL> monopoly is preventing others from competition.
>  XL> monopoly is not saturation of a market.
>
>  XL> when tech geekers speaks of Microsoft monopoly, they mean saturation
>  XL> of a market.
>
> I generally agree with you, but when everybody looks for familiar (read:
> like Windows) operating systems and compatible (read: with Windows)
> software, you cannot deny that others are being prevented from competation
> to some extent.
> Plus there is something called "vendor lock-in".

a bit explanation is in order.

When a company prevents others from entering the market by tricks = evvvill!. This is what most tech geekers are thinking.

There's not that much example of such in our capitalistic US going on, to the degree that idiot everybody or tech geekers needs to be alarmed, maybe except US government.

When a company saturates a particular market, such as Microsoft's OS for PC, google for search engine, that's not = evviiil. Because, any joe can come in and sell their shit, and when the public decided joe's better (e.g. linux), the so called monopoly topples.

quote: «Judge Alex Kozinski of the 9th Circuit pointed out that the key to monopoly is not market share — even when it is 100 percent — but the ability to keep others out. A company which cannot keep competitors out is not a monopoly, no matter what percentage of the market it may have at a given moment.»

from 〈Basic Economics〉, First Edition, by Thomas Sowell
ISBN: 0-465-08138-X
http://www.amazon.com/exec/obidos/ASIN/046508138X

Chapter 2: Big business and Government: Anti-Trust Laws, p.102

See also:

• Reading Notes on Basic Economics
http://xahlee.org/Periodic_dosage_dir/jdini/basic_economics.html

• On Microsoft Hatred
http://xahlee.org/UnixResource_dir/writ/mshatred155.html

• The Microsoft Hatred FAQ
http://xahlee.org/UnixResource_dir/writ/mshatredfaq.html

run and buy the book now. Save humanity! as tech geekers might say, every generation some idiots repeats shooting ourselves.

Xah ∑ http://xahlee.org/ ☄

what's monopoly

On Aug 18, 3:51 am, Tim Bradshaw wrote:
> On 2010-08-18 11:12:53 +0100, Kenneth Tilton said:
>
> > They've run up the white flag, Microsoft, haven't they?
>
> I think it's what happens to monopolists: they get big by being a
> monopolist, and because they have no competition they get slow and
> bureaucratic.

lol. what load of crap.

many tech geekers don't understand what the word monopoly means.

monopoly is preventing others from entering market.
monopoly is not saturation of a market.

when tech geekers speaks of Microsoft monopoly, they mean saturation of a market.
e.g. GNU is a monopoly, linux is a monopoly, google is a monopoly.

btw, what kenny is babbling about? i installed ie8 from ie7 in maybe 5 min about a year ago?

Xah ∑ http://xahlee.org/ ☄

2010-08-18

yasnippet html mode

frozenthrone88@gmail.com

hi Jimmy Wu, pluskid, joaotavora and all,

i made a lot changes to the current html mode dir.

i'm thinking of updating it in the yasnippet repository, but would like to go thru you or the community first.

basically, i made it more for html (instead of xml), and added several more.

i'm thinking, html and xhtml should be separate, since they are sufficiently different, e.g.
vs
. It's painful when inserting a snippet to make a choice.

the current state of my change can be seen here

http://code.google.com/p/ergoemacs/source/browse/#svn/trunk/packages/yasnippet-0.6.1c/snippets/text-mode/html-mode

if you guys are ok with it, i'll rename the original html-mode snippets to xhtml, and the ones i changed for html.

let me know what you guys think. Thanks.

Xah

http://groups.google.com/group/smart-snippet/browse_frm/thread/f9db6f0df71e62d4

2010-08-15

unicode character browser

hi kenny!

Xah Lee wrote:
> some collection of math symbols in unicode.
> • Math Symbols in Unicode
>    http://xahlee.org/comp/unicode_math_operators.html

Kenneth Tilton wrote:
> I am surprised you do not include the numeric character codes.

i thought about it, but the page would get unwieldy.
To make it work well one might have to implement javascript so that mouse hover can popup a balloon with info about the char... my javascript isn't so great... maybe sometimes down the road.

but if you want a unicode char browser:

• Emacs xub-mode; A Unicode Browser
http://xahlee.org/emacs/unicode-browser.html

i feel that's the best unicode browser/palette/codemap kinda app there is. (in my humble opinion, more useful than Apple's Character palette, or Windows charmap.)

if you are not a emacs user, i'd even say download emacs and use it just for it just for browser unicode chars.

Xah

  • 《Unicode Standard, Version 5.0》 amazon
  • 《Unicode Explained》 (2006), by Jukka K Korpela. amazon
  • 《CJKV Information Processing: Chinese, Japanese, Korean & Vietnamese Computing》 (2008), by Ken Lunde. amazon
  • 《Fonts and Encodings》 (2007), by Yannis Haralambous. amazon

2010-08-14

unicode brackets

On Aug 14, 4:47 am, John Dunlop wrote:
> (c.emacs and c.l.lisp dropped)
>
> Xah Lee:
>
> >  http://xahlee.org/comp/unicode_matching_brackets.html
>
> Which angle brackets would you use to indicate orthography? I see ⟨
> and ⟩ (U+27E8 and U+27E9) as well as ‹ and › (U+2039 and U+203A) at
> Wikipedia.


The
⟨⟩ (U+27E8 and U+27E9)
unicode name is
MATHEMATICAL LEFT/RIGHT ANGLE BRACKET.
I don't think it is used much, due to math not being so wide spread... most people who do math use typesetting e.g. LaTeX, and it's pretty old tech, uses its own technology to generate special brackets, and its support for unicode isn't widespread.

The ‹› (U+2039 and U+203A)
unicode name is
SINGLE LEFT/RIGHT-POINTING ANGLE QUOTATION MARK
and double « »
is mostly used by French and other euro langs for quotation, analogous to US's curly quotes.

some discussion about quotation punctuation i wrote is here:
http://xahlee.org/Periodic_dosage_dir/bangu/typography.html

another, widely used is
〈〉 and 《》
these are standard punctuation in chinese and related langs (e.g. Japanese) for book titles or other titles. (film, plays, etc.)
see http://xahlee.org/Periodic_dosage_dir/bangu/chinese_punctuation.html

you can read about all these on Wikipedia too.

Xah
∑ http://xahlee.org/


http://groups.google.com/group/alt.usage.english/browse_thread/thread/5c761fb5e5978e51#

how the Win logo on keyboard became popular?

Uday Reddy wrote:
> Microsoft never made any complete systems. They started out as sellers of
> compilers and made their name as the *suppliers* of DOS to IBM. When IBM's
> monopoly ended and the PC became an open architecture, they became suppliers to
> us. So, they do not have ownership of the PC or the keyboard that goes with
> it. Their assertion of ownership to a pair of modifier keys, whose idea has
> been long in existence before their birth even, is illegitimate.


the way i'm guessing how the Win logo became common in PC keyboard is this:

Microsoft invented the key and logo (probably influenced by Apple), and place it on the keyboard they manufacture, as well integrated in their OS for use of that key. Perhaps in a year or two, other keyboard manufactures, in competition with Microsoft's hardware department, also wanted to have that key, because MS's OS is very popular.

i'm not sure if there's anything explicitly sinister about how it came to became so popular.

keyboard manufactures do not have to make keyboard with that key or logo. Daz, Happy Hacker keyboards, Optimus, Kinesis, sell versions of keyboard that don't have the win logo. ( photo & link: http://xahlee.org/emacs/keyboards_hacker_idiocy.html )

though it'd be nice if someone knows about this history and tell us.

Xah

keyboard with a gnu logo

Uday wrote:
> But I am opposed to commercialization. The Windows keys were not on
> the IBM PC keyboard. Microsoft added them. They are good modifier
> keys. So, I have no problem with Microsoft adding them. My
> opposition is to Microsoft branding them, charging royalty to the
> keyboard manufacturers, and locking up the keys in Windows-specific
> ways so that they are *not free*. And, software freedom is what we
> are here about. So, it is a surprise to me that the people here don't
> attack this violation of freedom as vigorously as possible.

not sure this is true, Uday.

Microsoft is also a keyboard manufacture, starting in mid or early 1990s.

i don't know the history of how the Win key/logo got so wide spread, but once they made their logo into their own keyboards, and if other keyboard makers want to use them, certainly they are subject to licensing.

Apple always has a Apple logo on their keyboards on the Cmd key, only about 3 years ago it's officially removed. Those who make 3rd party Apple keyboard are subject to licensing fee too, am sure, and probably also a royalty.

thinking about this... i think FSF might make a keyboard where the Win/Cmd key is a GNU logo. Actually i think that's a good idea because the Win logo key on keyboard is a commonly heard complaint from GNU/linux programers. Actually i think this is quite a doable market... Several kbd makers started to have a cult following due to the fact they sell kbds without the win logo, e.g. Daz, Happy Hacking, and are frequently buzzed about in programing forums and in gadget review sites.

(Google recently ban'd MS's OS for their employees (google announced it from their blog, and subsequently reported all over by news agencies). Allegedly, they allow just linux and mac. (if any doesnt know, Google is probably the largest user of GNU/linux in the world, not just as servers, and they are making their own OS based on GNU/linux called Chrome OS) I'd say such a kbd would be popular fairly quickly, especially if FSF takes the initiative to create them.)

(PS the Win key and Apple key both send the same keycode am pretty sure. This is because you can plug in a PC keyboard to Mac, or Apple kbd to PC, and the Win/Apple key functions without any special driver.)

sorry for the diversion... thinking about putting the gnu head as a logo on the key... it'll needs to be a streamline version, perhaps a silhouette of the gnu head. (am a aficionado of logo artwork and computer keyboards, have written perhaps 50 articles on them.)

Xah

google analytics mouse pointer offset

about a couple months ago, the mouse pointing is offset when pointing at the graphics.

that is, when you move your mouse to point at the dot of a day in top graphics, it will popup a balloon to tell you how many visitors on that day. But about while ago, it seems the pointer is offset about 1 inch to the left of my actual mouse position. This makes it impossible to read the visitor balloon for the right edge of the days in the graph. (because i have to move my mouse off the right edge of the window)

i cleared browser data but didn't help.

how can i solve this? thanks.

Xah ∑ http://xahlee.org/ ☄
http://www.google.com/support/forum/p/Google+Analytics/thread?tid=11507eff48d227ba&hl=en

2010-08-13

emacs, alt, Win, Meta, keys

Drew Adams wrote:
> > > It mentions explicitly Alt+Letter.
> So what? No one said that menu accelerators do not _exist_.
> And no one said that Microsoft has no doc describing them.

> I say that my guess is that the percentage of Windows users that regularly use -
> or even who have _ever_ tried to use - menu accelerators is very, very, _very_
> small. It simply is not a large part of the global Windows experience. That's
> my guess.

> Do do guess differently? Do you guess that _most_ Windows users use menu
> accelerators? Or even 10% of Windows users? Or 1%? What's your guess?

> Do your mother, sister, cousin, neighbor, doctor, dentist, car mechanic, and
> grocer (who all use Windows no doubt) use Windows menu accelerators? Have they
> even heard of such a thing?

> No way. That's _my_ guess.

> Would they care to use accelerators if you told them about their existence and
> how terribly handy they are? Point them to the URL you passed along as proof of
> the importance. See how quickly they adopt this feature that you feel is so
> vital to Windows.

> No way. That's _my_ guess.

Windows's mechanism for accessing menu is pretty old, starting from mid 1990s or earlier.

my guess is that most programers use it, and extensively.

when i first started to use Windows in a company in 1998, i learned it and use it extensively. I haven't used Windows from about 2002 to 2008, but in 2009 i switched from Mac to Windows as my main machine. I still use the Alt as a efficient way to operate applications.

for example, one trick is that Alt+Space brings out the generic window menu, then you can press c to close the window, or other letter to max or min the window. So, typically if i want to close a window, i press Alt+Space c, in any application. That's faster than Alt+F4 because F4 is far up. Same for minimizing the window. And it works system wide.

likewise, in Explorer (aka a folder on desktop), i can quickly press

Alt v d to change to listing view.
Alt v m to change to thumbnail view.

and likewise many other operations in diverse applications.

For emacs, it is a different beast so i don't use the Alt way to access emacs's menu (after all emacs doesn't really rely on putting commands to menus.). But the point here is that the Alt key on Windows is quite old and very clean and efficient keyboarding system, and i suspect is still heavily used by programers on Windows today.

i think the original design is that it allows people to operate the computer wholly without owning a mouse. (at the time mouse is still a novelty from Apple) If i recall correctly, it was well praised. It was so for Windows in 1990s, and i can still operate Windows completely today with just keyboard, reasonably effective (without turning on mousing keys on the number keypad; and without considering 3D apps or drawing apps etc that really requires mousing.)

though, Lennart's and Uday argue that Alt key under Windows is more important than the Win key. This i'm not sure. In last few years, i think Microsoft has de-emphasized the importance of the Alt key, and put more emphasize on the Win key. Because the Win key got new logo design with their new keyboards, and there are more shortcuts assigned to it in Vista and more in 7. By default, Windows Vista has the underscore in the menu names turned off. I recall reading that it's because few people use the Alt key today and the underscore in menu names is a eyesore (because average users is happy to use the mouse to pull menus, and the underscore confuses them).

in general, the Win key's function is for system wide OS management such as app launch/switch, logging out, system sleep. While Alt is for system wide control of menus by keyboard for each app.

There are common exceptions of course. e.g. many games will disable Win key when they are running. Because, in gaming situation, user don't usually want to do any system mangement tasks, and the accidental hitting of Win key is a problem. Likewise, many specialized apps will have different use of Alt key. e.g. In Second Life (a 3D app), Alt is to control camera used in conjunction of mouse. In Blender (3D app), Alt also has specialized purposes.

just some input from my experience.

Xah


2010-08-13

> On Fri, Aug 13, 2010 at 18:01, Jason Rumney wrote:
>
>> Â On 13/8/2010 11:37 PM, Chong Yidong wrote:
>
>>> If there is any technical reason why this cannot be done on Windows, I
>>> have not yet seen anyone argue it.
>>
>> Such a program might theoretically be possible, but as far as I know it does
>> not exist.
>
> I haven't tried it, but shouldn't AutoHotKey be theoretically able to do it?

Lennart Borgman wrote:
> I might misremember, but I think that was not possible. That was one
> of the reason I added the low level keyboard hook to my patched Emacs.

i researched this about 3 months ago, and in one of the doc page, it stated no. (can't find the page at the moment, but i should be able to find it if anyone needs)

here's what i've written on my AutoHotkey tutorial:
«the “Win+L” (lock computer) and “Win+U” (easy access center) cannot be disabled.»
http://xahlee.org/mswin/autohotkey_examples.html

it was quoted or rephrased from one of the page in the official doc. (i myself didn't need/want to disable it)

basically, it's easy to completely disable the Win key. Can be done with IntelliType that is bundled with every Microsoft keyboards, thru a GUI.

but there are certain Win+key combinations that's hard or impossible. See e.g. http://www.autohotkey.com/forum/viewtopic.php?p=345326

btw, same situation with Mac. Certain Opt+key and/or Cmd+key are hard to disable.

Xah

unicode symbols for math

some collection of math symbols in unicode.

• Math Symbols in Unicode
http://xahlee.org/comp/unicode_math_operators.html

• Arrows in Unicode
http://xahlee.org/comp/unicode_arrows.html

• Matching Brackets in Unicode
http://xahlee.org/comp/unicode_matching_brackets.html

these are grouped by the symbol's purpose as much as possible.

i made them because i can't find unicode symbols grouped by purpose elsewhere.

The unicode “plane -> block” structure does not group symbols well, because the chars are added throughout the decades. Some symbols get added in one block, but later on related symbols get added elsewhere. For example, binary relational symbols are scattered in different unicode blocks. Same for binary operators, or all symbols used for set theory, etc. Sometimes a symbol has multiple uses in different math fields, so which block it gets added into unicode is not well defined.

hope it's useful to some one.

Xah
∑ http://xahlee.org/

emacs on Windowns: Alt or Win for Meta?

Uday S Reddy writes:

> Hi guys, I am not sure where this discussion is headed. Whether these
> applications of the windows key are "useful" or not is for the users
> to determine, is it not?

Chong Yidong wrote:
> The problem is that Lennart's proposed solution seems to be the wrong
> one. If you want to rebind the Windows key to a modifier key, the
> conceptually correct way to do it should be via a separate program,
> separate from Emacs. That is exactly how it is done on GNU/Linux (where
> conventions like Alt-TAB are commonly respected, nowadays).
>
> If there is any technical reason why this cannot be done on Windows, I
> have not yet seen anyone argue it.

Emacs on Mac all allow either Cmd or Opt to be Meta though.

doesn't matter which choice, they step on the OS's function. Cmd is Mac's primary modifier (e.g. copy is Cmd+c, open is Cmd+o), and Opt is for inserting special chars (e.g. like AltGr).

same can be said on Windows. Both Alt and Win key have OS purposes.

doesn't matter which key emacs uses a meta by default on either Mac or Windows, they intrude the OS keys. Doesn't make sense to me to say setting Win key as Meta is not stepping on OS operation while setting it to Win is.

(personally i prefer Alt as Meta on Windows and i don't agree with Lennart or Uday that Alt is more critical than Win in Windows. I think they are both rather important, and i use both heavily on Windows outside of emacs. Win key in general is for system-wide operation, and Microsoft in last few years has more and more emphazied that key's importance thru Windows Vista and now Windows 7. Alt is importance because it provides a system wide method to access any app's menu by pressing key sequences. Quite efficient and is commonly used by power users (e.g. programers).)

Overall, i don't think there's any conclusive argument whether by default Alt or Win should be Meta, but providing this choice to user i think is critical for emacs.

Xah

2010-08-03

text editing competition

2010-08-03

hi, i had this idea for a long time, and am very interested. I'd be very interested to participate.

for the past ~5 years, i'm pissed often in my arguments about operational efficiency of many of emacs's defaults. (shortcut choices, command behavior choice...)

the ultimate showdown is to prove it in real time. I thought about creating such a contest but that takes some serious effort. I wrote quite a lot of it though, but scattered.

here's some articles i wrote about the issue. I link them below, some with a short quote of relevant part. I hope it might be helpful in creating this contest.

------------------------------
• The Modernization of Emacs (the most important changes i think emacs should adopt)
http://xahlee.org/emacs/modernization.html

quote:

... Even for professional users, it is openly questionable that emacs's ways of operation induced by its default user interface allows more efficient operation than a user interface based on modern software conventions. (this can be tested by having 2 team of programmers roughly equally experienced or skilled in using emacs. One team use Emacs with default UI setup, the other use a emacs with modernized interface (such as Mac's Aquamacs), then compare their efficiency in finishing a set of coding tasks.)

------------------------------

• A Typing Game in Emacs
http://xahlee.org/emacs/emacs_game.html

(on some ideas of creating problems of such a realtime editing contest)

------------------------------

here's some criticism on officiency of some emacs's command's behaviors

• The Operative Efficiency of Emacs's Deleting Text to kill-ring
http://xahlee.org/emacs/emacs_kill-ring.html

• Emacs Shortcut to Delete Whole Line
http://xahlee.org/emacs/emacs_delete_whole_line.html

• Usability Problems With Emacs's Letter-Case Commands
http://xahlee.org/emacs/modernization_upcase-word.html

• Suggestions on Emacs's mark-word Command
http://xahlee.org/emacs/modernization_mark-word.html

• Suggestions on Emacs's Line-Cutting Commands
http://xahlee.org/emacs/modernization_fill-paragraph.html

• Emacs Incremental Search Suggestions
http://xahlee.org/emacs/modernization_isearch.html

• Text Editor's Cursor Movement Behavior (emacs, vi, Notepad++)
http://xahlee.org/emacs/text_editor_cursor_behavior.html

------------------------------

on efficiency of shortcut choices (e.g. which keys should map to what commands)

• ErgoEmacs Keybinding
http://xahlee.org/emacs/ergonomic_emacs_keybinding.html

------------------------------

i looked at your site. I look forward to it. When is the problem going to be announced?

also, i thought of a issue... the contest may subject to repeated practice before actually creating the video. How might this be solved?

Thanks.

Xah

emacs, writing new mode

On Jul 28, 11:05 am, Raindog wrote:
> Hello,
>
> I'm semi-new to emacs and now have a programming need that is list-
> based and editing-intensive.  So I thought I might take a shot at
> writing an emacs mode.  I'm curious the best way to approach is.
>
> Quick summary: I'm looking to write a program to do morphological
> forced connections.  You make lists of words like this:
>
> type: cavern, city, county, mountain
> material: crystal, wood, flesh, gold
> etc.
>
> And a pattern like this:
>
> A @type@ made of @material@ @location@ inhabited by @inhabitants@
> @government@ @special@
>
> When run, random words are pulled into the pattern:
>
> "A cavern made of crystal in space inhabited by ghosts ruled by a
> hereditary monarch where learning is exalted."
> "An island made of wood in the polar regions inhabited by apes ruled
> by a ghost which is sacred."
> etc.  (example from O'Reilly's Mind Performance Hacks)
>
> So how does look for an elisp package:
>
> - User starts a new file and selects the mode
> - The mode knows about a format to specify lists and patterns (perhaps
> comments in the new buffer document it for reference)
> - User edits the text file, editing lists and patterns
> - When things are as the user likes, he hits a key to "evaluate" which
> generates the morph pattern
>
> Questions:
>
> (1) Does that sound like the right emacsy approach?

yes overall.

> (2) I can hack through the lisp to get it to interpret and process the
> buffer, but I am not sure how to structure the "hit a key and
> evaluate".  I may not have read far enough in the docs.


it's pretty easy. How exactly to do depends on what kinda interface/design you want.

in anycase, you can have user press a key and the whole buffer's text will be considered as input. (with this choice, the disadvantage is that the buffer context must be pretty much syntactically correct, just like a language. Any extra coma, space, might break it. Or, you could write more elaborate code to parse but the effort quickly gets exponential in proportion on syntax leniency)

> (3) One thing I'm not sure about is where to put the results.  What is
> the preferred emacs approach: put the results in the buffer?  The lisp
> interactive mode puts the results in the minibuffer.

again, much of this depends on what YOU want first. You could have the output in a special buffer, which i suggest is easiest. typically, named like this: “*word output*”

> If I get it going, I'll publish it for others.

great. Your task seems pretty easy as elisp coding goes. I think anyone coded elisp for a couple of years can create it in half a day, based on my own experience. (i have some elisp tutorial on my site if you haven't seen already)

Xah
∑ http://xahlee.org/

emacs, ibm charset, unicode, geometric boxes chars

On Aug 3, 3:11 am, harry weston wrote:
> Hello
>
> I have searched the 'net, but cannot find out how to incorporate into emacs the symbols from the IBM extended character set that draw boxes of single or double lines. It used to be easy on my old Epson dot-matrix printer. My failure to locate it is most likely because I don't know exactly what to look for among the ISOs and all that. I'll be very grateful for any help your can give,
>
> Very best wishes, and thanks for offering this service, Harry Weston

you'll need to give us some details. e.g. do you have a image (screenshot) of the character? Most people today isn't familiar with ibm charsets.

also, am certain that all ibm charsets in any version should be in unicode. So, your problem is simply finding the right unicode, if i understand it correctly. Not sure what you mean by “incorporate”.

you might find your char in the “shapes” file in the following:

• xub Unicode Browser mode for Emacs
http://xahlee.org/emacs/unicode-browser.html

the following might help on some issues of input, code point, etc.

• Emacs and Unicode Tips
http://xahlee.org/emacs/emacs_n_unicode.html

Xah
∑ http://xahlee.org/