Emacs Misc Bugs

Advertise Here

, , …,

This page is a misc collection of emacs defects i found and have blogged about. Most of these have been reported to FSF too.

GNU Emacs 24.1.50.1 Bug: find-dired on Filenames with Spaces

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.

Source groups.google.com

GNU Emacs 24.1.50.1 bug: find-dired calls cmd.exe's “find”

this seems to be a showstopper bug.

  1. start emacs runemacs.exe -Q
  2. call find-dired.
  3. Give a directory path. e.g. ~/web/xahlee_org/comp/
  4. Give the find option: -name "*html"
  5. expected result: list of files in dired.

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 )

Source groups.google.com

Linux/Emacs Copy/Paste Problem

In linux, if copy/paste doesn't work with other apps, you need to add this line:

(setq x-select-enable-clipboard t)

in GNU Emacs 24.0.93.1, that var is set to t now.

Emacs Dired Recursive Load Error 2011-05-26

See: Emacs Dired Recursive Load Error 2011-05-26.

Emacs Bug: 【Ctrl+u】 & (key-translation-map) disables “undo”.

This seems like a bug. Steps to reproduce:

Emacs Dired Bug: Delete File List Not Visible

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)

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.

sgml-delete-tag bug

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.

Unicode 6 and Emacs 23.2 semi-Bug

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 and Unicode Tips.

(thanks to Jason Rumney and Klaus Straubinger. Source groups.google.com.)

See also: Unicode 6 Emoticons.

Emacs Bug: “isearch-forward” Doesn't Respect New Value of “case-fold-search” When Repeating Last Seearch

Steps to reproduce:

GNU Emacs bug#10074: rgrep, “find: invalid predicate `-nam'”

This seems to be a bug. Steps to reproduce:

-*- 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.

bug#10074

blog comments powered by Disqus