2010-06-05

AutoHotKey Path Problem; Windows Shortcut Path

Perm url with updates: http://xahlee.org/mswin/autohotkey_path_problem.html

AutoHotKey Path Problem; Windows Shortcut Path

Xah Lee, 2010-06-05

This page documents some file path problems of AutoHotKey scripting language, and also some compexlity of computing.

Symptoms

Suppose you have a Windows shortcut file, named “ErgoEmacs 1.8.0.1”, at “C:\Users\xah\Desktop\”.

Now, create a file with this content:

Run "C:\Users\xah\Desktop\ErgoEmacs 1.8.0.1"

Name it for example “test.ahk”. Double click to run it. AutoHotKey will complain about file not found.

However, adding the “.lnk” extension works:

Run "C:\Users\xah\Desktop\ErgoEmacs 1.8.0.1.lnk" ; works

But, other files without extension also works, example:

Run "C:\Users\xah\Desktop\emacs 23.2.1 -Q" ; works

This is odd. Here's a summary of what works and not:

; shortcut file name: ErgoEmacs 1.8.0.1.lnk
 Run "C:\Users\xah\Desktop\ErgoEmacs 1.8.0.1.lnk" ; works

; shortcut file name: ErgoEmacs 1.8.0.1.lnk
 Run "C:\Users\xah\Desktop\ErgoEmacs 1.8.0.1" ; no

; shortcut file name: ErgoEmacs-1.8.0.1.exe - Shortcut.lnk
 Run "C:\Users\xah\Desktop\ErgoEmacs-1.8.0.1.exe - Shortcut" ; no

; shortcut file name: ErgoEmacs-1.8.0.1.exe - Shortcut.lnk
 Run "C:\Users\xah\Desktop\ErgoEmacs-1.8.0.1.exe - Shortcut.lnk" ; no

Apparently, the problem isn't just about having or not having the “.lnk” extension there. I think it might also have to do with the shortcut name having a version string with multiple dot chars. It seems to confuse ahk in its attempt to interpret the path.

Use Full Name with Extension For Windows Scripting

A little test with PowerShell:

PS C:\Users\xah\Desktop> explorer.exe '.\ErgoEmacs 1.7.lnk'
PS C:\Users\xah\Desktop> explorer.exe '.\ErgoEmacs 1.8.0.1.lnk'
PS C:\Users\xah\Desktop> explorer.exe '.\emacs 23.2.1 -Q.lnk'
PS C:\Users\xah\Desktop> explorer.exe '.\ErgoEmacs-1.8.0.1.exe - Shortcut.lnk'

Shows that it all runs fine. So, the problem must be AutoHotKey.

When writing scripts on Windows, apparently the full file name with the “.lnk” extension is preferred. Also, apparantly when calling executables, full name with “.exe” is preferred. Because: (1) when pressing the Tab key for name completion, full file name is suggested. (2) when using a file without the “.lnk” extension, PowerShell refuses to open it. (it'll open a default directory)

This seems obvious now. When doing scripting in unix, usually the full file name is prefered, even though sometimes extension or program can name be omitted (shebang #!).

AutoHotKey Problem

I think i narrowed down a clean example of this problem. Create a shortcut “ErgoEmacs-1.8.0.1.exe - Shortcut” in your personal desktop. Then, the following ahk script will fail:

Run "C:\Users\xah\Desktop\ErgoEmacs-1.8.0.1.exe - Shortcut.lnk"

The error is:

ahk shortcut path error

Apparently, ahk tried to parse the path into parameters, probably because it sees the “.exe” part.

“.lnk” Extension Does Not Show

Another complexity that's interesting to note here is that the “.lnk” extension does not show, even if you have folder options to show file extensions. Wikipedia explains:

Microsoft Windows uses .lnk as the filename extension for shortcuts to local files, and .URL for shortcuts to remote files, like web pages. Commonly referred to as “shortcuts” or “link files”, both are displayed with a curled arrow by default, and no filename extension. (The extension remains hidden in Windows Explorer even when “Hide extensions for known file types” is unchecked in File Type options, because it is controlled by the NeverShowExt option in HKEY_CLASSES_ROOT\lnkfile in the Registry. The IsShortcut option causes the arrow to be displayed.)

Desktop File Location Mirror

Another potential complexity is that, on Windows, there are 2 locations for Desktop files, and shortcut files showing in the public one will automatically be mirrored on the user one by some virtual mechanism. (but not the other way, of course)

See: Windows Start Menu, Desktop, Quick Launch, File Locations

...

Overall, to understand the situation in depth, is to understand:

  • How exactly ahk interpret the path in “Run ‹file path string›”.
  • How exactly PowerShell interpret file and executable path. (i.e. how does it automatically add “.exe” if omitted.) Same question for “cmd.exe”.
  • What is the mechanism that mirror shortcut files from public desktop in user's desktop dir.

2010-06-04

Software Dependency Complexity: Fink, Unison

Perm url with updates: http://xahlee.org/comp/software_dependency_complexity.html

Software Dependency Complexity: Fink, Unison

Xah Lee, 2010-06-04

This essay documents a computer industry complexity, in particular, a problem of installing a single software, caused by software dependency.

Today, i got a project to update a website of a university. The first job, is to install the Unison software, which allows 2-way file synchronization.

The remote machine is Mac OS X 10.6 running on a recent server version of mini mac. On the mac, there are 2 primary ways to systematically install a large number of unix software. One is Fink, and another is Macports.

I've been using fink since it started in ~2002. I've casually tried MacPorts once or twice in the past, but didn't have a good experience with it. Over the years i've been using fink, largely i'm a happy user, but i've had some problems so i don't regard it as near perfect. So, i did some reading the web to see if one has really surpassed the other. After a hour, it seems there's no conclusive evidence whether one is much better than the other. Basically, MacPort has more updates, but Fink has more packages and is stable.

So, i decided to use fink. (long story short, i've worked on this server before, and have installed unix tool set thru fink, but recently the professor upgrated the machine from 10.4 server to 10.6 with new hardware, so i removed all fink stuff “/sw/”, necessarily for a fresh start.)

After installing fink, and run thru numerous commands such as selfupdate, and other preparations such as checking Unison versions on the machines i need to work on and available versions on fink and enable unstable branch the latest Unison at fink is in, i started to install Unison.

fink desc unison
sudo fink install unison-2.27.57-1008

Then, i got this:

Pick one: [1] 
The following package will be installed or updated:
 unison
The following 129 additional packages will be installed:
 atk1 atk1-shlibs autoconf2.6 automake1.11 avahi avahi-dev cairo cairo-shlibs dbus
 dbus-glib1.2-dev dbus-glib1.2-shlibs dbus1.3-dev dbus1.3-shlibs docbook-utils enchant1-dev
 enchant1-shlibs esound esound-bin esound-common esound-shlibs gconf2 gconf2-dev gconf2-shlibs
 gd2 gd2-shlibs gettext gettext-dev glib2-dev glib2-shlibs gnome-desktop2.11-dev
 gnome-desktop2.11-shlibs gnome-doc-utils gnome-icon-theme gnome-keyring gnome-keyring-dev
 gnome-keyring-shlibs gnome-menus gnome-menus2-dev gnome-menus2-shlibs gnome-mime-data
 gnome-panel-dev gnome-panel-shlibs gnome-python2-py26 gnome-vfs2-unified gnome-vfs2-unified-dev
 gnome-vfs2-unified-shlibs gnutls26 gnutls26-shlibs gtk+2 gtk+2-dev gtk+2-shlibs gtk-doc
 gtkglarea2 gtkglarea2-shlibs gtksourceview-1.0-data gtksourceview-dev gtksourceview-shlibs
 gtkspell2-dev gtkspell2-shlibs gweather-data jadetex lablgtk lablgtk2 libavahi-client3-shlibs
 libavahi-common3-shlibs libavahi-core6-shlibs libavahi-glib1-dev libavahi-glib1-shlibs
 libbonobo2 libbonobo2-dev libbonobo2-shlibs libbonoboui2 libbonoboui2-dev libbonoboui2-shlibs
 libcroco3 libcroco3-shlibs libgettext8-dev libglade2 libglade2-shlibs libgnome2 libgnome2-dev
 libgnome2-shlibs libgnomecanvas2 libgnomecanvas2-dev libgnomecanvas2-shlibs libgnomecups-dev
 libgnomecups-shlibs libgnomeprint2.2-dev libgnomeprint2.2-shlibs libgnomeprintui2.2-dev
 libgnomeprintui2.2-shlibs libgnomeui2-dev libgnomeui2-shlibs libgsf1.114-dev libgsf1.114-shlibs
 libgweather libgweather-shlibs libidl2 libidl2-shlibs libjpeg8 libpng14 librsvg2
 librsvg2-shlibs libsoup2.4.1-ssl libsoup2.4.1-ssl-shlibs libwnck1.22 libwnck1.22-shlibs
 libxml2-py26 numpy-py26 orbit2 orbit2-dev orbit2-shlibs pango1-xft2-ft219 pango1-xft2-ft219-dev
 pango1-xft2-ft219-shlibs ptex-base ptex-texmf pycairo-py26 pycairo-py26-dev pygobject2-py26
 pygobject2-py26-dev pygobject2-py26-shlibs pygtk2-gtk-py26 pygtk2-gtk-py26-dev pyorbit2-py26
 pyorbit2-py26-dev scipy-core-py26 shared-mime-info texlive-base
Do you want to continue? [Y/n] 

I was a bit surprised. Installing Unison requires 129 additional software? and things like gnome-icon-theme? For a moment i was thinking perhaps i did something wrong. I didn't have time to ponder on it. After some re-checking, i went ahead.

The installation and compilation started about 8:30 pm, and ended at 10:37 pm, with thousands lines of output, that ends with this message:

...
New package: dists/unstable/main/binary-darwin-i386/x11/xinitrc_1.5-1_darwin-i386.deb
Failed: Fink::SysState: Could not resolve inconsistent dependencies

What the fuck? A web search quickly found this official Fink FAQ at: Source. Quote:

Q6.22: Whenever I try to build from source, Fink keeps waffling between alternate versions of the same library.

A: Often, in a complicated build tree, you may find that some of the packages depend on a particular version of a library, and other depend on a different one (e.g. db47 vs. db44). Consequently, Fink may try to switch to whichever one isn't currently installed in order to satisfy the build dependency for the current package that you're trying to update.

Unfortunately, due to limitations in the build-dependency engine, you may wind up with the dreaded

Fink::SysState: Could not resolve inconsistent dependencies

message when trying a sufficiently complicated update-all. This generally gives you a command to try to resolve the issue:

fink scanpackages
sudo apt-get update
sudo apt-get install foo=1.23-4 

but this may not work for sufficiently complicated updates. You might need to update packages one-by-one, at least for a while.

So, there it is. Installing a single software, with expert know-how, ends up in failure with 4 hours spent. That is the state of the art in software today.

One might think that perhaps it is easier to just compile Unison myself. Note that Unison is written in OCaml. So, to compile Unison you'll need to have the whole OCaml platform. If you are lucky, you might succeed with half a day on that.

MacPort Try

Ok, at this point i can maybe try to fix it or try MacPort. So, MacPort it is.

vmm:~ xahlee$ which port
/opt/local/bin/port
vmm:~ xahlee$ sudo port install unison
--->  Computing dependencies for unison
--->  Fetching ocaml
--->  Attempting to fetch ocaml-3.11.2.tar.bz2 from http://distfiles.macports.org/ocaml
--->  Verifying checksum(s) for ocaml
--->  Extracting ocaml
--->  Configuring ocaml
--->  Building ocaml
--->  Staging ocaml into destroot
--->  Installing ocaml @3.11.2_0
--->  Activating ocaml @3.11.2_0
--->  Cleaning ocaml
--->  Fetching unison
--->  Attempting to fetch unison-2.32.52.tar.gz from http://distfiles.macports.org/unison
--->  Verifying checksum(s) for unison
--->  Extracting unison
--->  Applying patches to unison
--->  Configuring unison
--->  Building unison
--->  Staging unison into destroot
--->  Installing unison @2.32.52_0
--->  Activating unison @2.32.52_0
--->  Cleaning unison
vmm:~ xahlee$ which unison
/opt/local/bin/unison
vmm:~ xahlee$ 

Success in 10 min.

Note: this is not a story of MacPort vs Fink. They are pretty similar in quality. Also, MacPort by default installs binary, while Fink by default compiles, which i've chosen to not change.

In this essay, i wanted to document the complexity of software. Why is it complex, why so many seemingly simple things are fraught with problems, what's the cause, why is software engineering so complicated.

In this particular case, i think the problem traces to software dependencies. It is really a issue that cannot be practically solved. In order to have a robust dependency system, you have to have a dependency system to start with, that each software can document or communicate as a element in the system. This ideal framework is simply not possible from existing diverse software, that are built from different languages and different operating systems, from different decades. Instead, a dependency system is somewhat cooked up by practical means. That means, there's lots of flaws. In my case, the practical consequences is that, installing a command line file syncing software spuriously requires one to install 128 other software, including a desktop system with images for icons, and cause me 4 hours. LOL.

(For another documentation on the issues of Unison and Cygwin, see: The Complexity And Tedium of Software Engineering)

2010-06-03

“Free” Software Morality, Richard Stallman, and Paperwork Bureaucracy

Perm url with updates: http://xahlee.org/UnixResource_dir/writ2/FSF_philosophy.html

“Free” Software Morality, Richard Stallman, and Paperwork Bureaucracy

Xah Lee, 2009-02-27

This essay discusses Richard Stallman, the Free Software Foundation's moral stance on software, and how legal paperwork required by FSF impedes the progress of FSF's software projects.

Richard Stallman, contributed to society in 2 significant ways. One is his coding, producing many major software, such as emacs, gcc, …. The other, with far more greater impact, and is the reason he is remembered in human animal history, is the creation of FSF with its GPL.

His technical, coding, contribution is unquestionably a positive contribution. His “free” software movement is, however, questionable. The reason that society recognized this social contribution, is partly, if not significantly, due to the fact that he has achieved success in his vision. For example, to illustrate, if Hitler was successful, today he would be a hero, leader, founder, as opposed to a hateful criminal. As another illustration, if US lost the war to UK, then the “founding fathers” of US would be considered criminals today who got punished by death. In fact, many of the leaders in the US at the time is doing quite morally questionable things besides treason. (including, copyright violation to the scale perhaps beyond any in the history of human animals)

Richard Stallman, also did some morally questionable things before he started FSF. In one perspective, you can consider him a software criminal. Lucky for him that at the time there was not much of software law yet. Else, he'd be in jail before he had a chance to mouth his manifesto. So, in this perspective, he is someone who breaks the law, got dissed by MIT, got pissed, with vengeance he starts the FSF to recoup his ego.

The above is one perspective. A perspective neutral, where human animal's behavior is considered foremost as ethology, sans a context of any particular moral system.

How FSF Paperwork Requirement Impedes Software Projects

The FSF requirement of legal paper signing is a significant problem for FSF's software to progress forward.

First, let's presume that it is something that needs to be done in order for FSF to protect GPL.

Now, imagine, there are 2 software A and B. In A, there are paperwork going by postal mail, as part of how A grows code. In B, no paperwork required.

Today, thanks to FSF, vast majority of open source software use model B. Just look at all the code at Google Code, SourceForge, numerous other open source code depositories and all linuxes. Today, the internet age is at a point where people watch movies streamed online and all sort of online transactions, the paperwork and postal mail legal rights transfer model is a major time drain and impetus killing.

To help see this, imagine, if all open source software today, those hosted by Google Code, Source Forge, all linux development, or any code on emacswiki, requires a postal mail legal paper signing before the code can be published, then, to what degree do you think will slow down the progress? Can you now see?

So, now you see, GNU emacs's requirement for signing legal document thru paper mail is a significant obstacle for GNU emacs to progress.

I have thought about how to remedy this situation yesterday, but didn't see any solution or conclusion. First, we presume that the paperwork is in fact necessary, as FSF says so. Ok, then what can we do? I don't really know. If the paperwork is necessary, and of course FSF is practically the leading organization to protect the GPL, in a sense allowing the thousands other open source or “free” software to progress freely without paperwork. It appears to me we have run into a inherently unsolvable problem. I was thinking, perhaps GNU software can be considered as kinda sacrifice, by requiring the legal paperwork in order to protect GPL, for the good of the broad open source community, but meanwhile sacrifice GNU software's progress due to the very nature of paperwork bureaucracy ... but this model of “GNU software as sacrifice for greater goods” cannot sustain itself, because eventually GNU's software will become so bad that most people will use other open source software, and if that is so, then FSF's GPL leadership role will rot out too, because only a very small percentage of people is actually using FSF's “free” software ...

The above paragraph is a bit of rambling. In any case, i do doubt the necessity for FSF to require the paperwork. Maybe it was critical in the 1980s or 1990s when FSF just started, but maybe not today. It is even questionable if FSF itself was necessary in the 19980s. For example, there was BSD's license. And there's also the much simpler “public domain” release. Arguably these do not propagate the ideal software licensing philosophy adhered by FSF. GPL in my opinion is the primary cause of FSF's success. (Richard calls it “fighting fire with fire”.) But in any case, consider today, with huge participation of Google, Apple, and quite several large organization and commercial entities participating in open source projects in major ways, it is questionable today that even GPL itself, is needed at all. Richard has been successful in spreading his moral philosophy of software. FSF's role in spreading this moral stance on software use, is today successful and arguably mission complete, in the sense that it is already part of standard practice in the industry. So, in this perspective, FSF can in fact today close shop, and the existing open source and “free” software world may not fare worse.

Today, software from FSF has already rotted to little significance in the industry. Consider Perl, PHP, and all the software written in them. Consider javascript, Firefox, and in mid 2000s Java itself, non are FSF's software. FSF's software have almost no presence in the web development area, where it is today probably the largest sector in software industry. Multitudes of languages, tools, apps, that are open source or “Free” software crop up daily some hundred or thousands of times faster than the number of FSF's software. FSF's software today probably is less than 1% of all Open Source or “Free” software out there. In fact, if we imagine as some kind of disaster that causes all FSF's software to disappear, the Open Source and “Free” Software out there probably wouldn't suffer a dent. (e.g. in Operating systems, the BSDs can replace the whole Linuxes that use significant portion of software produced by FSF.)

Note: in the above, we didn't even discuss whether Open Source or “‘Free’ Software”'s moral stance is itself good for society. This is still a a hotly controversial subject with no agreement in human animal society. For example, see: A Case Against OpenSources (2001) By Mathias Strasser. @ Source stlr.stanford.edu

For me, i believe that “Free” Software idea is indeed a good idea, but far from the degree of Richard's fanaticism. The gist is that, software is a piece of goods, and by the very nature of software, it can be copied without cost. So, the traditional copyright law, usually allowing one single copy, may not be the best benefit to human animals on a whole, long term wise, when compared to the “‘free’ software” moral philosophy. In the moral philosophy of “‘Free’ software”, software industry more becomes a service oriented industry, where coders get paid to modify and customize existing software. This is also arguably a better business model, more fitting to the nature of software, when compared with existing copyright software laws or practices, where software is closed to public extensions and customizations, and is being rented out as a permission to use.

For some detail on the idea of the above paragraph, see: Responsible Software Licensing.

This essay is a edited version of a newsgroup post in gnu.emacs.help. Source groups.google.com

Richard Stallman's Abuse of the Word “Freedom”

Software Freedom is Free Speech or Free Beer?

2010-06-02

emacs 23.2 features

Perm url with updates: http://xahlee.org/emacs/emacs23.2_features.html

Emacs 23.2 Features

Xah Lee, 2010-06-02, 2011-01-14

Some preliminary report on new features in emacs 23.2.

Emacs 23.2 is released on 2010-05-08, just 9 months from the previous major release, Emacs 23 (23.1). (See: New Features in Emacs 23.)

New Modes

CEDET IDE

Emacs 23.2 has lots of significant new features. The most significant is probably the inclusion of the CEDET package, which is a huge IDE-like package with features to parse different languages. CEDET is written by Eric Ludlam. I'll be studying this package and document its features for practical use.

javascript mode

A javascript mode, is finally bundled. Activated by the command “js-mode”. This is renamed from the “espresso” mode by Daniel Colascione, which is based on a earlier javascript mode by Karl Landstrom.

Note that Steve Yegge's js2-mode is not chosen. Rather sad. Steve's mode is more radical, in that it features a on-the-fly js parser (written in elisp). It actually validate js code as you type, similar to nxml mode by the xml expert James Clark.

Steve's js2-mode was being attacked in the gnu dev mailing list in 2009-08. Steve, is a humble guy at least in his public writing. He promised to fix whatever the mentioned issues to combine it with (alleged) advantages of espresso mode. (Source lists.gnu.org)

The included js mode is the espresso mode, not Steve's js2 mode. Espresso mode's feature is very basic, pretty much just a regex based syntax coloring, like vast majority of emacs's major modes.

Steve's blog about the js2 mode is here: Source steve-yegge.blogspot.com

Full thread on js2-mode at Source lists.gnu.org. Look for subject name “Why js2-mode in Emacs 23.2” dated 2009-08-09.

nxml for XML now default

The nxml-mode, by the xml expert James Clark, was included in emacs 23.1, but somehow isn't default when you open a xml file. Now it is. I filed a bug report on this. See: bug#4169.

htmlfontify

A new package, htmlfontify.el turns a syntax colored buffer into HTML code. Written by Vivek Dasmohapatra. This is used for publishing code on the web. The command name is “htmlfontify-buffer”. This package is similar to the “htmlize.el” package by Hrvoje Niksic. I've been using Hrvoje's htmlize for the past 4 years. See: Using Emacs To Syntax Color Source Code In HTML.

Note that htmlfontify is known among emacs users since at least 2006. Same with CEDET, and javascript modes, and nxml mode. It usually take some 4 years for things to get into GNU Emacs. This inefficiency is a major problem.

Also, “htmlize.el” existed since at least 2007. However, in a private email Hrvoje Niksic told me he refuse to work with FSF (or something like that), even though the code is released in GPL. I completely sympathizes with him, and i have come to dislike the bureaucratic inefficiency and propaganda from FSF. (See: “Free” Software Morality, Richard Stallman, and Paperwork BureaucracyMy Experience of Emacs vs XEmacs.)

Opening Large Files

Emacs can now open files up to 512MB in size, doubling previous.

async-shell-command; M-&

New command “async-shell-command” with hotkey 【Alt+&】. You can use it to call shell command, and the shell command will run in the background. If you used 【Alt+!】 (shell-command), it will freeze emacs while your shell command is running. It is basically the same as calling shell-command with a “&” appended (for bash).

Convenient Cursor Moving

A new command “move-to-window-line-top-bottom”, with hotkey 【Alt+r】, will move cursor to top, center, or bottom of current window. Repeated call cycle these locations. This is a complement to 【Ctrl+l】 (recenter-top-bottom).

I don't think this is necessarily a good feature. Emacs's is filled with tens of these little commands for text editing. Their problem is that there are too many specific commands with hard to remember keys that are also many keystrokes, and puts a burden on user to become familiar with all these commands and call them in specific situations. Better would be a few powerful commands on easy keys that are context sensitive. So, you can just remember 10 commands, and call 2 or 3 of them in sequence, instead of remembering 20 or 30 special commands each having complicated combo keystrokes. For examples, see: mark-word problem, fill-paragraph problem, isearch problem.

For Elisp Coders

Glad to note that recursive option is added to the elisp commands “copy-directory” and “delete-directory”. A great feature for those who use elisp for sys admin and text processing. This fixed a bug i've reported, see: A Function For Copying and Deleting Whole Dir. This means, lots of my text processing scripts don't have to make system calls cp -r and rm -r anymore. This solves many cross-platform complexities especially on Windows.

For reasons why elisp is perhaps the best text processing lang, see: Text Processing: Emacs Lisp vs Perl.

Centralize Config Files to 〔~/.emacs.d/〕

Some config files are moved from the 〔~/〕 dir to 〔~/.emacs.d/〕. Examples are Emacs calculator “calc”'s 〔~/.calc.el〕, abbreviation system's 〔~/.abbrev_defs〕. If you already have these files at 〔~/〕, your file will still work and won't be moved automatically. You might want to move them. Also, the path 〔~/emacs.d/〕 is the default value of the variable “user-emacs-directory”.

Note, that Bookmark's file is still at 〔~/.emacs.bmk〕, and recently opened file (recentf-mode) data is still at 〔~/.recentf〕.

Emacs does not have a policy on where package's data should be saved, nor a unified location for user installed packages. By this emacs 23.2 move, it appears that program data should now be at the var “user-emacs-directory”.

On a separate note, the “desktop-save-mode”'s data is at 〔~/.emacs.d/.emacs.desktop〕, however, one problem is when emacs quit, it bugs the user by asking them to save the desktop file location. There are 2 problem with this: ① if emacs crashed or OS crashed, the currently opened files are not saved. ② it bothers the user by asking.

dired auto refresh

dired has new variable “dired-auto-revert-buffer”. If set to “t”, then when you open a directory, the listing will be refreshed (that is, it automatically calls revert-buffer).

This improvement doesn't really do much. The problems are:

  • ① The default value of dired-auto-revert-buffer is false (“nil”).
  • ② Even set to t, it does not refresh if you switch to a existing dired buffer. It works when you actually “visit” a existing dired buffer. That is, you call dired or call find-file.

I think xemacs has a robust auto-refresh feature long ago.

...

There are quite a few other features i didn't cover here. Many are related to emacs running in linux. If you like to read the official release notes, see: emacs23.2_features_official.txt.

2010-06-10 Addendum: David Capello and me released a new ErgoEmacs distribution based on 23.2, download it at: http://code.google.com/p/ergoemacs/downloads/list.

2010-05-31

The Tech Geekers and Software Engineering

Much re-organization. Collected essays on software engineering and programers. The Tech Geekers and Software Engineering.

about 30 essays written in the past 10 years.