unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Barry Margolin <barry.margolin@level3.com>
Subject: Re: Output in Emacs
Date: Mon, 03 Nov 2003 22:25:31 GMT	[thread overview]
Message-ID: <vBApb.342$lK3.262@news.level3.com> (raw)
In-Reply-To: mailman.3057.1067896989.21628.help-gnu-emacs@gnu.org

In article <mailman.3057.1067896989.21628.help-gnu-emacs@gnu.org>,
Johannes Quint  <johannes.quint@web.de> wrote:
>and how to READ the contents of a buffer-line and then apply a function 
>to it?

(defun apply-function-to-current-line (func)
  (let ((string
	  (save-excursion
	    (beginning-of-line)
	    (let ((start (point)))
	      (end-of-line)
	      (buffer-substring start (point))))))
    (funcall func string)))

-- 
Barry Margolin, barry.margolin@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

       reply	other threads:[~2003-11-03 22:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.3057.1067896989.21628.help-gnu-emacs@gnu.org>
2003-11-03 22:25 ` Barry Margolin [this message]
2003-11-03 23:36   ` Output in Emacs Johan Bockgård
2003-11-03 23:38   ` Kevin Rodgers
2003-11-02 19:15 Dirk Joos
2003-11-02 19:26 ` Edi Weitz
2003-11-03 22:01   ` Johannes Quint
2003-11-06 21:24   ` LEE Sau Dan
2003-11-08  0:00     ` Michael M Mason
2003-11-02 19:32 ` Edward Dodge

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='vBApb.342$lK3.262@news.level3.com' \
    --to=barry.margolin@level3.com \
    /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).