From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Edi Weitz Newsgroups: gmane.emacs.help Subject: Re: Output in Emacs Date: Sun, 02 Nov 2003 20:26:02 +0100 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87ad7e7et1.fsf@bird.agharta.de> References: Reply-To: edi@agharta.de NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1067801635 2977 80.91.224.253 (2 Nov 2003 19:33:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 2 Nov 2003 19:33:55 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 02 20:33:53 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AGNyz-0003Kt-00 for ; Sun, 02 Nov 2003 20:33:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AGNyQ-0004AI-DO for geh-help-gnu-emacs@m.gmane.org; Sun, 02 Nov 2003 14:33:18 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!trane.agharta.DE!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-NNTP-Posting-Host: trane.agharta.de (62.159.208.82) Original-X-Trace: news.uni-berlin.de 1067801161 41677619 62.159.208.82 (16 [15706]) Mail-Copies-To: never User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:cPuyDgRXud11qxNVNJ1xE05AFSw= Original-Xref: shelby.stanford.edu gnu.emacs.help:117799 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:13735 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13735 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 () (interactive) (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. Edi.