In markdown-mode, some emacs features misbehave, sometimes emacs crashes.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
emacs-goodies-el (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
# Context
Using emacs in markdown-mode.
# Affected features
* search-and-replace misses some occurrences
* sometimes downcase-word and capitalize-word operate on a wrong region (correct size but off by several characters)
* sometimes dabbrev-expand is affected, too, in a similar way
* query-replace sometimes causes emacs to crash
# How to reproduce
* Install Ubuntu 12.10 (or 12.04).
* sudo apt-get install emacs emacs-goodies-el
* Launch emacs (e.g. Alt-F2, type emacs, press Enter).
* In scratch buffer, type some multi-line text. For example : C-U 32 A, Enter, Up, C-K, C-K, then press C-Y 8 times.
* Buffer contains this :
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
AAAAAAAAAAAAAAA
AAAAAAAAAAAAAAA
AAAAAAAAAAAAAAA
AAAAAAAAAAAAAAA
AAAAAAAAAAAAAAA
AAAAAAAAAAAAAAA
AAAAAAAAAAAAAAA
AAAAAAAAAAAAAAA
* Go to top of buffer.
* Run query-replace (e.g. Esc-%), type a, press Enter, type b, press Enter, press "!"
* See all A turned into B as expected
;; This buffer is for notes you don't wbnt to sbve, bnd for Lisp evblubtion.
;; If you wbnt to crebte b file, visit thbt file with C-x C-f,
;; then enter the text in thbt file's own buffer.
BBBBBBBBBBBBBBB
BBBBBBBBBBBBBBB
BBBBBBBBBBBBBBB
BBBBBBBBBBBBBBB
BBBBBBBBBBBBBBB
BBBBBBBBBBBBBBB
BBBBBBBBBBBBBBB
BBBBBBBBBBBBBBB
* Undo (C-_)
* M-x markdown-mode
* Go to top of buffer.
* Run same query-replace (e.g. Esc-%), press Enter, press "!"
## Expected behavior
Replacement has same behavior in markdown-mode as in any other mode (see above).
## Observed behavior
Replacement only operates on the first occurrence of each line.
;; This buffer is for notes you don't wbnt to save, and for Lisp evaluation.
;; If you wbnt to create a file, visit that file with C-x C-f,
;; then enter the text in thbt file's own buffer.
bAAAAAAAAAAAAAA
bAAAAAAAAAAAAAA
bAAAAAAAAAAAAAA
bAAAAAAAAAAAAAA
bAAAAAAAAAAAAAA
bAAAAAAAAAAAAAA
bAAAAAAAAAAAAAA
bAAAAAAAAAAAAAA
* Undo (C-_)
You can go back to any other mode (fundamental-mode, lisp-interactio
## Variant of query-replace failure : replacing patterns containing a line feed
* undo to get back to original content with all A
* M-x text-mode (or any other major mode)
* Go to top of buffer.
* Run query-replace (e.g. Esc-%), C-q C-j, Enter, C-q C-j > (space), press Enter, press "!"
* See every lines prefixed with "> " as expected.
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
> ;; If you want to create a file, visit that file with C-x C-f,
> ;; then enter the text in that file's own buffer.
>
> AAAAAAAAAAAAAAA
> AAAAAAAAAAAAAAA
> AAAAAAAAAAAAAAA
> AAAAAAAAAAAAAAA
> AAAAAAAAAAAAAAA
> AAAAAAAAAAAAAAA
> AAAAAAAAAAAAAAA
> AAAAAAAAAAAAAAA
>
Now try same thing in markdown-mode:
* Undo (C-_)
* M-x markdown-mode
* Go to top of buffer.
* Run same query-replace (e.g. Esc-%), press Enter, press "!"
## Expected behavior
Replacement has same behavior in markdown-mode as in any other mode (see above).
## Observed behavior
Replacement misses every over line.
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
> ;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
>
AAAAAAAAAAAAAAA
> AAAAAAAAAAAAAAA
AAAAAAAAAAAAAAA
> AAAAAAAAAAAAAAA
AAAAAAAAAAAAAAA
> AAAAAAAAAAAAAAA
AAAAAAAAAAAAAAA
> AAAAAAAAAAAAAAA
You can observe similar behavior when using a pattern that replaces one line feed with two line feeds.
Oh, testing it again just crashed my emacs now! I let apport report it but it does not provide me a reference to the crash.
## Additional information
* Could not find an easy reproducible case for downcase-word and capitalize-word or for emacs crashes. Since a crash occurs, actual problem may lies in emacs instead of emacs-goodies-el ?
* Tested from a newly created user account to isolate from any custom emacs init files.
* Same problem happens on 12.04 and 12.10.
* On 12.04 same problem happens with stock emacs from distribution (emacs23) and with emacs24.
1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu
$ lsb_release -rd
Description: Ubuntu 12.10
Release: 12.10
2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center
$ LC_ALL=C apt-cache policy emacs-goodies-el
emacs-goodies-el:
Installed: 35.2ubuntu2
Candidate: 35.2ubuntu2
Version table:
*** 35.2ubuntu2 0
500 http://
100 /var/lib/
3) What you expected to happen
4) What happened instead
See long explanation above.
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: emacs-goodies-el 35.2ubuntu2
ProcVersionSign
Uname: Linux 3.5.0-21-generic x86_64
ApportVersion: 2.6.1-0ubuntu9
Architecture: amd64
Date: Wed Jan 9 17:33:16 2013
InstallationDate: Installed on 2012-12-27 (13 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
PackageArchitec
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=fr_FR.UTF-8
SHELL=/bin/bash
SourcePackage: emacs-goodies-el
UpgradeStatus: No upgrade log present (probably fresh install)
Package: emacs-goodies-el 35.2ubuntu2 contains markdown-mode.el unmodified from upstream version: 1.8.1 as can be verified :
$ wget -q http:// jblevins. org/projects/ markdown- mode/markdown- mode.el -O - | diff -sq /usr/share/ emacs/site- lisp/emacs- goodies- el/markdown- mode.el - emacs/site- lisp/emacs- goodies- el/markdown- mode.el and - are identical
Files /usr/share/