2009-09-18

Emacs Does Not Support Viewing Images Files In Windows

Perm url with updates: http://xahlee.org/emacs/modernization_image_support.html

Emacs Does Not Support Viewing Images Files In Windows

Xah Lee, 2009-09-18

In Emacs's Dired mode for viewing directories, you can press Enter on a image file to view the image file. (this is a new feature in at least emacs 22) When working in html, you can also press “M-x ffap” (find-file-at-point) on a inline image link and view that image. This is very convenient. However, viewing image does not work out of the box in the GNU Emacs binary for Windows downloaded from FSF's website.

I thought this is a show-stopping bug. I filed a bug report to FSF. (see: bug#4367) However, they don't think this is a bug, and refuse to fix it.

The argument from the few replies of Emacs developers, in summary, are:

  • Bundling DLL is problematic. It is problematic due to licensing issues, and or creates a maintenance problem.
  • This is not a bug, and not important. If users want image support for Windows, they can download them elsewhere. It's a third-party tool.

I cannot believe how emacs developers cannot see this is a critical problem, and actually consider it not a problem.

Here's parts of my argument sent to the bug list:

• Viewing image files right inside emacs is very convenient, and a common operation. For example, for web developers, it is often needed to quickly see the image files, either in dired or with M-x ffap in inline images. Web app programers are today perhaps more than 50% of professional programers (or some large percentage.)

• I disagree about the argument that including DLL is too much work or problematic. For example, all popularly used emacs distros (Lennart's EmacsW32, Aquamacs Mac, Carbon Emacs), all support viewing images out of the box. They mostly have just 1 core developer. If they can do it, GNU emacs with its tens of developers certainly can manage.

• Perhaps there's licensing problem to include image DLL in GNU Emacs. If i'm correct, this might be because things bundled with GNU Emacs require signed copyright transfer agreement due to FSF's policy, or some complexity related to this. If so, i do think this is a problem that harms GNU Emacs. Again, if the issue of bundling image DLL for emacs does have something to do with licensing, then perhaps this licensing issue needs to be reconsidered. I'm aware this is a controversial and has been debated for long. I do not wish to suggest FSf people to re-exam old policies, but if this particular problem of not able to open image files in emacs out of the box is related to this, thus i mentions this.

• Considered from user point of view... if emacs does support viewing images, and does support Windows, then it must support it out of the box. For example, compare other successful Open Source projects, example: FireFox. They don't say: oh, including DLL is a problem, and it's considered a 3rd party tool. If you are on Windows and need it, go use your OS's file management to view images, or go follow these install and compile instructions on how to get it to work.

• Consider the related issue of emacs not supporting editing PHP or Visual Basic code. Consider this: average programer, hear that emacs is a great editor, she downloads it, and find out it simply doesn't support 2 of the MOST popular languages. This alienates a big chuck of potential users.

Yes, FSF has a philosophy in supporting only Free Software. However, consider the user point of view again. In the 1980s and 1990s, where perhaps more than 50% of programers uses emacs. In those era, emacs works out of the box for what they need to do. This quality, helped spread GNU and FSF's philosophies. But, the computing landscape has changed a lot in the past 20 years, and emacs does not work out of the box for most professional programer's needs today. For whatever philosophical or political problems today to include Visual Basic, this situation is a problem for emacs. If emacs still have a lot users, then it isn't a problem, but a verifiable fact is that, emacs's users among professional programers has reduced to something like 1%. (“professional programers” is here defined as those who's main income is from programing or sys admin.)

• Microsoft's Visual Basic, the most popular version of Basic, its license is not philosophically in sync with FSF's philosophy on software licenses, but Visual Basic mode for emacs is Free Software. So, whether to bundle the Visual Basic mode shouldn't be a problem if FSF is willing to consider effective ways to spread its philosophy by making emacs more usable for majority of professional programers on a practical basis.

Sorry if this report is tangential or perhaps not useful at all. But i tried to detail this specific problem of not able to open image files in emacs on Windows with reasons i think are pertinent that are mentioned by developers.

2009-09-16

Idiocy of Keyboard Layouts

Perm url with updates: http://xahlee.org/kbd/keyboard_layouts.html

Idiocy of Keyboard Layouts: QWERTZ, AZERTY, Alt Graph

Xah Lee, 2009-09-16, 2010-11-03

Recently, am looking at different keyboard layouts used in different countries, in discussion about ErgoEmacs project. See Keyboard layout.

One thing i noticed, is that many of them are idiotically designed.

Idiocy of Swapping Keys

Germany kbd-s

A variation of QWERTZ layout used in Germany.

For example, the QWERTZ one used in Germany and some other euro countries. It differs from QWERTY by swapping Y and Z. Here's the frequency of these keys in German according to Letter frequency:

Z (1.13%) 20th most frequent.
Y (0.04%) 25th most frequent.

We see that both are not frequently used, and Y is almost never used.

On QWERTY, Z is a pinky curl to the lower row, while Y requires a 2-key extend of the 2nd (pointing) finger to the upper row. It is questionable that Y is easier to type than Z.

Belgian kbd-s

A Belgian AZERTY layout.

Similar is the AZERTY layout, used in France and Belgium. It differs from QWERTY, mostly by swapping A and Q, Z and W, and M with “,”, again supposedly for the purpose of efficiency for the French language. Each of the swapping are quite questionable.

According to Letter frequency, in French, A is used 7.636%, and Q is 1.362%, so A is used 5.6 more times than Q. A is on the home row, but Q is not. What's the reason for swapping A and Q??

Also consider the swapping of Z (0.136%) and W (0.114%). Their frequency of use is almost the same, and the Z position on QWERTY is not necessarily more difficult to type than W's position. Z is a pinky curl to the lower row, while W is a slightly larger extention with 4th finger (the ring finger) to the upper row.

The swapping of M with , is equally silly. Consider typing ease of their positions on QWERTY, they are about equal. Both are a curl-in to the lower row. M with 2nd finger (pointing finger), while , with middle finger. I would say M is actaully the easier to type, because the middle finger is longer and harder to curl in. In French, M is a frequently used letter (2.968%). I don't have the number for the comma, but it's clear M happens at least twice more frequently than comma. So, swapping actually made them less efficient.

If you really want to improve efficiency of QWERTY by swapping some key pairs, there are a lot candidate pairs that'd do much better.

Consider this in another way. Suppose we are going to create a new layout by make 3 pairs of swapping from QWERTY to improve the efficiency for typing French. Then, the “AQ”, “ZW”, “M,” are probably far the worst choices. (note: all this should done by methods that is scientifically sound, for example, quantified data of finger movement, distances, letter frequency, and many other aspects, or, as statistical data gathered from social study of some population's experiences.)

In studying these, i wanted to know WHO actually designed these layout, or how were these layout developed. That is, their history. But that's more esoteric info and needs more time to research than i can devote now.

Stupidity of Alt Graph

Another major stupidity is related to the Alt Graph key. In many of these layouts, the right Alt is the AltGr key, for typing many letters not in English. However, if you look in detail, you'll notice that vast majority of key spaces in most of these layouts are left empty with the Alt Gr, a egregious waste of spots. And if you look at their choice of placement for the chars, clearly they have paid absolutely no consideration to touch typing efficiency.

Canadian Multilingual Standard kbd-s

Canadian Multilingual

Canadian French kbd-s

Canadian French

France kbd-s

French layout, a AZERTY variation.

When you read Wikipedia articles on them, you also read about some criticism similar to the above, and get the sense that these layouts didn't really came from conscious design. For example, the French in Canada do NOT use the AZERTY used in France, even though their lang is the same. (the variations between France French and Canadian French, with respect to typing (i.e. Grapheme) is probably practically non-existent.)

If one must create a incompatible layout among nations, simply adopting Dvorak will be much better, because of the simple fact that all vows are on the home row, and all euro langs heavily use the vow letters. Even better is to adopt a Dvorak variant layout modified for their particular language. (These efficient layout exist, see: Dvorak, Maltron, Colemak, NEO, Bépo, Turkish-F, Keyboard Layouts Fight!)

Your Layout vs My Layout

Also, you'll note that there are a lot unnecessary variations of layout. For example, there's Canadian Multilingual Standard, Canadian French, French. There's “Spanish (Spain)” and “Spanish (Latin America)”. There is United Kingdom, United Kingdom Extended, US-International. If you just use Dvorak, with a Alt Graph that fill key spots more with chars, and with ergonomics considerations, it is trivial to arrive at a layout design that can replace much of these variations and yet be more touch-typing efficient than each of the layout.

Latin American kbd-s

Spanish (Latin American)

Spanish kbd-s

Spanish (Spain)

United Kingdom kbd-s

United Kingdom

US-International kbd-s

US International. Among existing layouts, this design is more close to technical excellency, as it more properly uses Alt Gr spaces. If we re-arrange it to Dvorak, it would close to a good universal layout for majority of Latin-alphabet based languages.

Overall, i think the way things are has little to do with technical reasons, but rather: (1) historical happenstances. Much like the story of QWERTY and Dvorak. (2) Human animal's egotistic pride. Much the same pervasive and perpetual political fight about language, among different countries of different languages, among different countries of the same language, among the same country with different languages, or among regions using the same language but small variations. It's not about technicality of design, but this is MY, that is YOURS.

2009-09-15

XahLee.org tidbits 2009-09-15

tidbits:

2009-09-15

Watched Coraline (film) today. Pretty good. Better in first half. Not as good as i expected though, because i read the summary of the story on Wikipedia first and i think i'd love it. I didn't particular find the animation that spectacular, nor the story extraordinarily fascinating.

This movie reminds me of Pan's Labyrinth, also a fantastic film. I think i liked PL better.

The technology of this film, Stop-motion, is rather fascinating. Basically, you just take still photos and sequence them together. I couldn't imagine how such method could make a good, smooth, animation, but apparantly it can.

Typically, stop-animation is done using clays for characters, because clay is easy to mold. This film is done by 3D printing to create models. Amazing technology. Imagine, in order to create this film, they have to build minature sets, and take tens of thousands photos of it. Quite amazing. Consider what it takes to build the minature sets, little houses, chairs, dolls... in a sense, they are high quality toys, custome made by dedicated professional artisans. The resulting product is a magnitude higher quality than mass produced minature toys you could by in toy stores. Fascinating. I wonder if they sell those sets and artifacts after the film.

2009-09-11

Bang Brothers, a popular porn website. Wikipedia comes to explain: Bangbros

See also: Xah's Porn Outspeak.

2009-09-04

The juvenile sea squirt wanders through the sea searching for a suitable rock or hunk of coral to cling to and make its home for life. For this task, it has a rudimentary nervous system. When it finds its spot and takes root, it doesn't need its brain anymore, so it eats it! (It's rather like getting tenure.)*

* The analogy between the sea squirt and the associate professor was first pointed out, I think, by the neuroscientist Rodolfo Llinas.

-Daniel C. Dennett (from Consciousness Explained, 1991)

The academic Tenure issue has been on my mind. My un-informed impression is that it's a extreme inefficiency. After reading the Wikipedia article, i learned that the origin of tenure itself is supposed to be academic freedom, but of course, some criticism states that its effects is exactly the opposite. I don't know for sure, but i think something of a life-long award is certainly bad. It basically make people lazy, by human nature. When food is guaranteed for life (by some unnatural modern social structure), it is questionable that the person will be as productive as before.

The tenure issue can be checked by statistical survey. (which probably has been done) We can look at all highly respected academics, and do a social study on their productivity, comparing those having tenure, and not, and productivity from before and after tenure. More likely than not, general speaking, tenure gets productivity downhill.

2009-09-02

I've known about induced lactation, mostly from Wikipedia reading few years ago, however, Wikipedia has taken it to a high ground! See Erotic lactation.

2009-08-29

This week i got a email from Rudy Rucker. He's writing a blog about pseudospheres http://www.rudyrucker.com/blog/2009/08/28/pseudospheres/. Our brief chat went over whether there's a animation of the Breather Surface breathing.

I don't know the answer. I don't even know what exactly the breahter surface is, and I've wondered about seeing it breathing. After asking Richard Palais, he gave me some explanation. Here's from what i understand. For detail, see: Breather Surface.

2009-09-13

keyboard shortcut notations

Perm url with updates: http://xahlee.org/emacs/modernization_hotkey_notation.html.

A Short Survey Of Keyboard Shortcut Notation

Xah Lee, 2009-09-13

This article details some issues about designing notation that represent key presses, as often displayed in menus for keyboard shortcuts.

Here's some example of illustration the shortcuts notations used for various keys, from Microsoft Windows applications. These examples are from Microsoft's Internet Explorer (Version 8.0), Windows Mail (Version 6.0):

Ctrl+N           (New Window in IE)
Ctrl+Shift+H     (History in IE)
Alt+F4           (Close)
Alt+Left Arrow   (Back in IE)
Esc              (Stop in IE)
F5               (Refresh in IE)
Alt+Home         (Home Page in IE)
Alt+Enter        (Properties in Windows Mail)

(missing examples of using the Tab key, and Page up/down key, Backspace and Delete keys.)

[about choosing a keyboard shortcut notation for a new emacs distribution ErgoEmacs] I think Microsoft's notation is good enough, though i do have a little personal gripes about keyboard shortcut notations.

With keys involving shift key, in my mind i always thought it should be “Ctrl+n” and “Ctrl+Shift+n”, for the none-shifted and shifted version...

The difference between “my” model and the Windows model is that, in “my” model, the shortcut notation are interpreted as typed text. That is, users TYPE characters with modifiers. Emacs uses this interpretation for its “keybinding” notation too. In the Windows notation, keys are more thought of as buttons on the keyboard hardware. This model is actually more sensible.

In the docs i wrote i always used “my” model, but never really seriously decided if it is better.

Notational Problems With Shifted Keys

Both models do have some problems. In both “my” model and Windows's model, the notation for pressing all keys Ctrl and Shift and 1, has two notations: “Ctrl+Shift+1” and “Ctrl+@”. More than one notation for the same key press is not good. But also, it introduces another notation “Ctrl+Shift+@”.

For example, the somewhat standard key combo to increase font size (aka zoom in) is pressing Control and Shift and Plus. In Firefox on Windows, it is shown in menu as “Ctrl++”. Note that it made a choice to skip showing the “Shift” key. Normally, it really should be “Ctrl+Shift+=”. The reason that it made the choice of using the version not showing the Shift key, is because that way it is more obvious to see that “+” is zoom in and “-” is zoom out. That is, consider “Ctrl++” and “Ctrl+-”, versus, “Ctrl+Shift+=” and “Ctrl+-”. (Just noticed, that in Internet Explorer, it actually uses this notation “Ctrl +”. This shows that the Microsoft UI designers are willing to sacrifice consistency for ease of understanding.)

This multiple representation problem occurs because of the fact that some keys are used for more than one glyph with the Shift down (For example, “1” and “!”, “2” and “@”, “3” and “#” etc.). The end result is that there is no one-to-one correspondence with a key combination and its notation.

This problem gets worse with different keyboard layouts, because not all layouts have the same Shifted symbols. For example, i looked at the Spanish Spain layout, according to Wikipedia article on Keyboard layout, a key combination of Ctrl and the ampersand symbol, would be: “Ctrl+Shift+6” and “Ctrl+&”. But in US keyboard and layout, it would be “Ctrl+Shift+7” and “Ctrl+&”.

Interpreting Key Notation As Typed Characters vs Pressing Buttons

From this example, we can see a slight advantage of interpreting the notation as typing text, instead of pressing buttons on keyboard. Because, if we treat the notation as chars to type, then “Ctrl+&” would be the only notation for this particular shortcut, so there's no “Ctrl+Shift+7” or “Ctrl+Shift+6” alternatives that are dependent on keyboard layout. Again, this is what emacs do. Note that, emacs is this way only because it is evolved from 1980s, where there is not much notion of keyboard shortcuts, but more about programing and character streams entered by user. Emacs did not took a explicit, conscious, decision to deal with keyboard and layout and human interface complexity that happened in 1990s and 2000s. Keyboard notation today, for communicating what keys to press as shortcuts to invoke commands, as displayed in menus, really should deal with keys on the hardware as human pressing buttons, not as representation of character streams or typing text.

Apple's Model

Btw, it is also worth to mention that Apple's OS X, does not use the plus sign for its keyboard notation. For example, in Firefox for the Mac, to zoom in, the notation on the menu is shown as: “⌘+”, which means holding down the Command key and press “+”. The Apple model is arguably more elegant.

Apple Mac OS X keyboard shortcut notation 2

Shortcut Notation used in Mac OS X, from Safari.

(Apple uses the symbol “⌘” for the Command key, “⌥” for its “Option/Alt” key, “‸” for Control key, “⇧” for Shift key.) Apple use images to display these symbols. These symbols also in Unicode. Here's their unicode names: PLACE OF INTEREST SIGN “⌘”, OPTION KEY “⌥”, CARET “‸”, UPWARD WHITE ARROW “⇧”.

Apple keyboard shortcut symbols

Key symbos used in Mac OS X menus.

In the Apple's model, adjacency implies pressing keys together. In order to use the Apple model, it is necessary to introduce symbols for the Control and Alt key modifiers (or other modifiers). If you don't use special glyphs, then “Ctrl+N” would become “CtrlN”.

(Note that Apple's model do have theoretical problems. For example, if there is a shortcut for pressing Command key together with the character “⌘” on some new unicode keyboard hardware, then by the Apple model it should be shown as “⌘⌘”. Of course, this is likely never to happen in practice in the the foreseeable future. A more practical problem Ctrl combination with the caret. It would be “‸^”, slightly confusing. However, note that the Control key is almost never used as shortcuts in Apple's apps.)

I would be interested to know what are the notation shown in menus in Linux Gnome and KDE. (am guessing they follow Windows, but would like confirmation)

Some references:

Notation As Consummer Software vs Programing Language Syntax

A related issue is key syntax for defining key presses. This issue is entirely separate from Keyboard Shortcut notation, but is somewhat related, and often confused together.

There is no standard, of a syntax/language to represent key presses as needed in software that needs to deal with keyboard shortcuts. Each Operating system, or key macro, key mapping, key layout software, invents its own syntax. Here are some examples of the different syntax used by different systems: