This page is a misc collection of emacs defects i found and have blogged about. Most of these have been reported to FSF too.
Emacs Bug: global-linum-mode Freeze Emacs on Big Image Files
i started to get this strange error from emacs 24.2 on Windows:
browse-url-default-windows-browser: ShellExecute failed: Not enough storage is available to process this command.
almost randomly. Sometimes, closing a browser tab or refreshing a browser page solves this, or sometimes re-open emacs buffer, or open some folder on desktop…. Hard to trace out a exact reproduction steps.
thanks to Rory Yorke. He gave the following info:
I experience similar behaviour on Windows 7 64-bit, with no chance of running out of memory or disk space; I assumed it was this: http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html (see message http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00180.html in thread).
Check out the links above. It's very informative.
This bug is crippling. I started to get “Spawning child process, resource temporarily unavailable” error i think in emacs 24. But in emacs 24.2, i started to get “ShellExecute failed…” very frequently. This is a major problem. Because i frequently launch external app from emacs (⁖ to Windows folder viewer (Explorer), or viewing image, or preview HTML in browser). According to his bug report, it also happens whenever you call shell such as diff-backup.
One possible work-around is to create a file shortcut to emacs binary, then, in the shortcut, open Properties, click the tap “Compatibility”, then set it to Windows XP or other mode. Launch emacs thru this file shortcut. Right now i'm doing this. We'll see if that works.
If you also have this problem, call report-emacs-bug to send them a bug report. The emacs dev is tired of me, i think. So, you do it!
in whitespace-mode, there's this default value for “whitespace-display-mappings”:
;; GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) of 2012-08-28 on MARVIN ;; default value of “whitespace-display-mappings” ((space-mark 32 [183] [46]) (space-mark 160 [164] [95]) (space-mark 2208 [2212] [95]) (space-mark 2336 [2340] [95]) (space-mark 3616 [3620] [95]) (space-mark 3872 [3876] [95]) (newline-mark 10 [36 10]) (tab-mark 9 [187 9] [92 9]))
many of the code points are chars from {Thai, Tibetan, Devanagari}, and including invalid Unicode code points. But they are not whitespaces.
| Decimal | Glyph | Name or UNICODE NAME |
|---|---|---|
| 10 | line feed | |
| 32 | space | |
| 46 | . | full stop |
| 95 | _ | underscore LOW LINE |
| 160 | NO-BREAK SPACE | |
| 164 | ¤ | Symbol, Currency |
| 2208 | invalid Unicode decimal | |
| 2212 | invalid Unicode decimal | |
| 2336 | ठ | DEVANAGARI LETTER TTHA |
| 2340 | त | DEVANAGARI LETTER TA |
| 3616 | ภ | THAI CHARACTER PHO SAMPHAO |
| 3620 | ฤ | THAI CHARACTER RU |
| 3872 | ༠ | TIBETAN DIGIT ZERO |
| 3876 | ༤ | TIBETAN DIGIT FOUR |
Jason Rumney answers (Source groups.google.com):
It looks like a bug. Probably the file has not been updated since the internal encoding for Emacs was changed from emacs-mule to utf-8-emacs.
See also: How to Use and Setup Emacs's whitespace-mode.
file-relative-name doesn't work on MS Windows style path when the drive letter is capitalized.
(file-relative-name "/Users/web/xyz.html" "/Users/web/") ; returns "xyz.html" (file-relative-name "c:/Users/web/xyz.html" "c:/Users/web/") ; returns "xyz.html" (file-relative-name "C:/Users/web/xyz.html" "C:/Users/web/") ; returns "C:/Users/web/xyz.html"
GNU Emacs 24.1.1 (i386-mingw-nt6.1.7601) of 2012-06-10 on MARVIN
Reported to FSF: bug#11827.
https://groups.google.com/group/gnu.emacs.help/browse_frm/thread/8b78f87f8c0dc9c3#
Fixed in dev branch.
Steps to reproduce:
emacs -Q.(global-set-key (kbd "<kp-8>") "«").After 0 kbd macro iterations: Keyboard macro terminated by a command ringing the bell
Note that the following all work:
(global-set-key (kbd "<kp-8>") "「") (global-set-key (kbd "<kp-8>") "『") (global-set-key (kbd "<kp-8>") "〈") (global-set-key (kbd "<kp-8>") "《") (global-set-key (kbd "<kp-8>") "“") (global-set-key (kbd "<kp-8>") "‘") (global-set-key (kbd "<kp-8>") "‹") (global-set-key (kbd "<kp-8>") "〔")
GNU Emacs 24.1.1 (i386-mingw-nt6.1.7601) of 2012-06-10 on MARVIN
The emacs functions {url-unhex-string, gnus-url-unhex-string} returns incorrect result. Example:
(require 'url-util) ;; emacs-24.1.50_2/lisp/url/url-util.el (url-hexify-string "Gauss–Bonnet_theorem") ; returns "Gauss%E2%80%93Bonnet_theorem" (url-unhex-string "Gauss%E2%80%93Bonnet_theorem") ; returns "Gauss\342\200\223Bonnet_theorem" (require 'gnus-util) ;; emacs-24.1.50_2/lisp/gnus/gnus-util.el (gnus-url-unhex-string "Gauss%E2%80%93Bonnet_theorem") ;; returns "GaussâBonnet_theorem" ;; correct result should be: "Gauss–Bonnet_theorem"
GNU Emacs 24.1.1 (i386-mingw-nt6.1.7601) of 2012-06-10 on MARVIN
Another issue is, why there's duplicate {url-unhex-string, gnus-url-unhex-string}?
Some discussion and temp solutions at:
Reported to FSF: bug#6252.
For browser's behavior, see: URL Percent Encoding and Unicode. For example of correct behavior in JavaScript, see: JavaScript Encode URL, Escape String.
when using GNU Emacs 24.1.50.1, calling find-dired, i got one of this:
2533274790481547 2 -rwx------ 1 h3 None 2994 Apr 28 20:52 xx\ saga\ of\ bsof\ 2011-07-22.html
note the backslash there.
when i move the cursor to that line and press Enter, i get:
dired-get-file-for-visit: File no longer exists; type `g' to update dired buffer
update doesn't help. Somehow, filenames with spaces causes the problem.
The problem also happens when calling dired-do-query-replace-regexp
Q. It'll stop dead reporting file doesn't exist.
What could possibly be the problem?
GNU Emacs 24.1.50.1 (i386-mingw-nt6.1.7601) of 2012-04-23 on MARVIN
(if starting emacs with -Q, then another problem occur. It calls
Microsoft cmd.exe's find.
this seems to be a showstopper bug.
runemacs.exe -Qfind-dired.~/web/xahlee_org/comp/-name "*html"Here's what i got:
c:/Users/h3/web/xahlee_org/comp/: find . "(" -name "*html" ")" -exec ls -ld {} ";" Access denied - . File not found - -NAME ---------- AMPERSAND_HTML_ENTITIES_UNICODE_SEMANTICS.HTML … ---------- APPLE_IPAD_CENSORSHIP.HTML … ---------- ASPELL_SPELL_CHECKING.HTML … ---------- ASPELL_VOCABULARY.HTML … ---------- BLOG.HTML … ---------- YOUR_REGEX_BRAIN.HTML … File not found - ) File not found - -EXEC File not found - LS File not found - -LD File not found - {} File not found - ; find finished at Sat Apr 28 19:46:27
each of the “…” is about n lines of file content. The n can be 4 to 10 or more. Not sure what's the pattern.
Also, my file names are mostly lowercase. Don't know why it is CAPS there.
GNU Emacs 24.1.50.1 (i386-mingw-nt6.1.7601) of 2012-04-23 on MARVIN
Windows 7.
Answer: This is because emacs's is calling Windows cmd.exe's “find”. Emacs should check what it is calling.
(thanks to Yuri Khan. Source groups.google.com )
See: Emacs Dired Recursive Load Error 2011-05-26.
This seems like a bug. Steps to reproduce:
(define-key key-translation-map (kbd "M--") (kbd "─")) (it lets you press 【Alt+-】 to insert a Unicode char “BOX DRAWINGS LIGHT HORIZONTAL” (U+2500).)This seems to be a bug. Define this:
(defalias 'yes-or-no-p 'y-or-n-p)
Then, in dired, type ~ to flag backup files. Then, type x to delete them. Dired will prompt you with “Delete D [251 files] (y or n)” with a list of files to be deleted on the top pane. When you have more files to fit in a window, part of the list is not visible, and there's no way to view them. You can't page with 【Alt+PgDn】 or 【Alt+PgUp】, can't use mouse to drag the scrollbar, scroll wheel just produce beeps. I haven't found a way to view it.
(thanks to {Eli Zaretskii, Drew Adam} for helping track down the cause. Source groups.google.com)
Steps to reproduce:
(require 'pp-c-l) (http://www.emacswiki.org/emacs/PrettyControlL)(pretty-control-l-mode 1)global-whitespace-modeSome other interesting findings.
(unload-feature 'pp-c-l)The above are tested with pp-c-l but it happens with http://user42.tuxfamily.org/formfeed-hline/index.html too as i tested earlier.
〔compatibility problem of whitespace-mode & PrettyControlL? By gnu.emacs.help. @ groups.google.com…〕
Emacs cult scumbag. To spell check a file of 2.6k words, it froze emacs for 10 seconds (emacs on Windows). While in Gmail, Mozilla Thunderbird, and everywhere else it's 0.3 seconds.
discovered a bug in html-mode. If you have this:
<p>some'</p>
and your cursor is at the beginning of line, then call sgml-delete-tag, it'll also delete the apostrophe.
This is “GNU Emacs 23.2.1 (i386-mingw-nt6.0.6002) of 2010-05-08 on G41R2F1”
this is fixed GNU Emacs 24.0.93.1.
There are these Unicode symbols
When calling describe-char on them, it doesn't give their names. Is this a bug?
Answer: That's because these chars are from Unicode version 6, released in 2010-10.
Unicode 6 added 2088 chars. I don't think there are any fonts that
support them yet. However, if you do Unicode work, you can add char info to
emacs so that describe-char will give you all the char's info.
You need to download a text file 〔UnicodeData.txt〕. For detail, see:
Emacs & Unicode Tips.
(thanks to Jason Rumney and Klaus Straubinger. Source groups.google.com.)
See also: Unicode 6 Emoticons.
Steps to reproduce:
emacs -Q).toggle-case-fold-search until it is disabled.isearch-forward 【Ctrl+s】 and search for “mylist”.toggle-case-fold-search so it is enabled.isearch-forward and typing the word “mylist” again works.This seems to be a bug. Steps to reproduce:
rgrep. Search for anything.-*- mode: grep; default-directory: "c:/Users/h3/web/xahlee_org/emacs/" -*- Grep started at Thu Nov 17 00:49:37 find . "(" -path "*/SCCS" -o -path "*/RCS" -o -path "*/CVS" -o -path "*/MCVS" -o -path "*/.svn" -o -path "*/.git" -o -path "*/.hg" -o -path "*/.bzr" -o -path "*/_MTN" -o -path "*/_darcs" -o -path "*/{arch}" ")" -prune -o "(" -name ".#*" -o -name "*.o" -o -name "*~" -o -name "*.bin" -o -name "*.bak" -o -name "*.obj" -o -name "*.map" -o -name "*.ico" -o -name "*.pif" -o -name "*.lnk" -o -name "*.a" -o -name "*.ln" -o -name "*.blg" -o -name "*.bbl" -o -name "*.dll" -o -name "*.drv" -o -name "*.vxd" -o -name "*.386" -o -name "*.elc" -o -name "*.lof" -o -name "*.glo" -o -name "*.idx" -o -name "*.lot" -o -name "*.fmt" -o -name "*.tfm" -o -name "*.class" -o -name "*.fas" -o -name "*.lib" -o -name "*.mem" -o -name "*.x86f" -o -name "*.sparcf" -o -name "*.fasl" -o -name "*.ufsl" -o -name "*.fsl" -o -name "*.dxl" -o -name "*.pfsl" -o -name "*.dfsl" -o -name "*.p64fsl" -o -name "*.d64fsl" -o -name "*.dx64fsl" -o -name "*.lo" -o -name "*.la" -o -name "*.gmo" -o -name "*.mo" -o -name "*.toc" -o -name "*.aux" -o -name "*.cp" -o -name "*.fn" -o -name "*.ky" -o -name "*.pg" -o -name "*.tp" -o -name "*.vr" -o -name "*.cps" -o -name "*.fns" -o -name "*.kys" -o -name "*.pgs" -o -name "*.tps" -o -name "*.vrs" -o -name "*.pyc" -o -name "*.pyo" ")" -prune -o -type f "(" -iname "*" -o -iname ".*" ")" -exec grep -i -n "grep" {} NUL ";" FIND: Parameter format not correct Grep exited abnormally with code 2 at Thu Nov 17 00:49:37
This is GNU Emacs version “GNU Emacs 23.3.1 (i386-mingw-nt6.1.7601) of 2011-03-10 on 3249CTO”.
If you are using ErgoEmacs with -Q, you get this extra info “find: invalid predicate `-nam'”, like this:
-*- mode: grep; default-directory: "c:/Users/h3/web/xahlee_org/emacs/" -*- Grep started at Thu Nov 17 00:36:51 find . "(" -path "*/SCCS" -o -path "*/RCS" -o -path "*/CVS" -o -path "*/MCVS" -o -path "*/.svn" -o -path "*/.git" -o -path "*/.hg" -o -path "*/.bzr" -o -path "*/_MTN" -o -path "*/_darcs" -o -path "*/{arch}" ")" -prune -o "(" -name ".#*" -o -name "*.beam" -o -name "*.vee" -o -name "*.jam" -o -name "*.o" -o -name "*~" -o -name "*.bin" -o -name "*.bak" -o -name "*.obj" -o -name "*.map" -o -name "*.ico" -o -name "*.pif" -o -name "*.lnk" -o -name "*.a" -o -name "*.ln" -o -name "*.blg" -o -name "*.bbl" -o -name "*.dll" -o -name "*.drv" -o -name "*.vxd" -o -name "*.386" -o -name "*.elc" -o -name "*.lof" -o -name "*.glo" -o -name "*.idx" -o -name "*.lot" -o -name "*.fmt" -o -name "*.tfm" -o -name "*.class" -o -name "*.fas" -o -name "*.lib" -o -name "*.mem" -o -name "*.x86f" -o -name "*.sparcf" -o -name "*.fasl" -o -name "*.ufsl" -o -name "*.fsl" -o -name "*.dxl" -o -name "*.pfsl" -o -name "*.dfsl" -o -name "*.p64fsl" -o -name "*.d64fsl" -o -name "*.dx64fsl" -o -name "*.lo" -o -name "*.la" -o -name "*.gmo" -o -name "*.mo" -o -name "*.toc" -o -name "*.aux" -o -name "*.cp" -o -name "*.fn" -o -name "*.ky" -o -name "*.pg" -o -name "*.tp" -o -name "*.vr" -o -name "*.cps" -o -name "*.fns" -o -name "*.kys" -o -name "*.pgs" -o -name "*.tps" -o -name "*.vrs" -o -name "*.pyc" -o -name "*.pyo" ")" -prune -o -type f "(" -iname "*.html" ")" -print0 | xargs -0 -e grep -i -nH -e "grep" find: invalid predicate `-nam' Grep finished with no matches found at Thu Nov 17 00:36:51
Seems quite a odd error. It appears that there's a typo somewhere that contains -nam instead of -name, but i wasn't able to find it anywhere so far. Note that this error occurs when starting emacs with -Q, so it rules out personal init files.