[Top][All Lists]

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

Re: Output in Emacs

From: Edi Weitz
Subject: Re: Output in Emacs
Date: Sun, 02 Nov 2003 20:26:02 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

On Sun, 02 Nov 2003 20:15:45 +0100, Dirk Joos <> wrote:

> I'm working with GNU-Emacs and I want to know how I can print the
> content of a variable in the current buffer of emacs. What is the
> command?
> Here an example:
> (defun zahl()
> (interactive)
> (let ( (k 1) )
> ;at this place I want to print the content
> ;of the variable k in the actual buffer at the current
> ;cursorposition. In emacs the result should be 1 on the screen
> )
> )

I think you're looking for 'insert':

  (defun foo ()
    (let ((k 1))
      (insert (format "%d" k))))

You should adhere to the usual conventions for intending Lisp
code. This'll help other people to read it.


reply via email to

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