help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: elisp search-forward problem - function stops on search failed error


From: Tassilo Horn
Subject: Re: elisp search-forward problem - function stops on search failed error
Date: Thu, 11 Apr 2013 14:35:02 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

acomber <deedexy@gmail.com> writes:

> (defun do-cols () 
>   "convert tab char to html td delim"
>   (interactive)
>   (goto-char (point-min)) 
>      (while (search-forward "\t")
>         (insert "
> ")
>      )
> ) 
>
> which works fine but on finishing I see in the command window: Search
> failed: "    "

It doesn't replace, it adds something before (or after) the tabs.

>      (while (search-forward "\t", nil, t)
>
> But this function does nothing, get error:
>
> Symbol's value as variable is void: \,

You don't write commas to separate arguments in funcalls (or items in
lists in general).

Bye,
Tassilo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]