From: acomber <deedexy@gmail.com>
To: Help-gnu-emacs@gnu.org
Subject: What is elisp idiom for continue until end of buffer
Date: Fri, 10 Aug 2012 07:43:17 -0700 (PDT) [thread overview]
Message-ID: <1344609797798-261116.post@n5.nabble.com> (raw)
I created this elisp function
(defun fmt-tbl ()
"format Word tables for wiki"
(interactive)
(goto-char (point-min))
(insert "{||-")
(while (search-forward "\t")
(delete-backward-char 1)
(insert "|")
)
(goto-char (point-min))
(while (search-forward "\n")
(insert "|-")
)
(goto-char (point-max))
(insert "|}")
)
Which fails at (while (search-forward "\n"). I also tried
(while (end-of-line)
(insert "|-")
)
But that also didn't work.
How can I repeatedly goto end of line on each line until EOF?
--
View this message in context: http://emacs.1067599.n5.nabble.com/What-is-elisp-idiom-for-continue-until-end-of-buffer-tp261116.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
next reply other threads:[~2012-08-10 14:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-10 14:43 acomber [this message]
2012-08-10 16:12 ` What is elisp idiom for continue until end of buffer Eric Abrahamsen
2012-08-10 16:16 ` acomber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1344609797798-261116.post@n5.nabble.com \
--to=deedexy@gmail.com \
--cc=Help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).