From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Florian Lindner Newsgroups: gmane.emacs.help Subject: Re: Key binding Date: Mon, 25 Nov 2002 17:18:36 +0000 Organization: T-Online Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <84el9adloh.fsf@lucy.cs.uni-dortmund.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8Bit X-Trace: main.gmane.org 1038241998 32116 80.91.224.249 (25 Nov 2002 16:33:18 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 25 Nov 2002 16:33:18 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18GMAf-0008Lo-00 for ; Mon, 25 Nov 2002 17:33:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18GM8m-0008Vn-00; Mon, 25 Nov 2002 11:31:20 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!news.belwue.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-X-Trace: news.t-online.com 1038241551 06 21943 WlQGE3-VSCAzqG 021125 16:25:51 Original-X-Complaints-To: abuse@t-online.com X-Sender: 340060635977-0001@t-dialin.net User-Agent: KNode/0.7.1 Original-Xref: shelby.stanford.edu gnu.emacs.help:107426 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:3977 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3977 Kai Großjohann wrote: > Florian Lindner writes: > >> (define-key pascal-mode-map "\C-c\v" '(shell-command >> (file-name-sans-extension (buffer-file-name)))) > > (defun fl-execute-current-buffer () > "doc string here" > (interactive) > (shell-command (file-name-sans-extension (buffer-file-name)))) > (define-key pascal-mode-map (kbd "C-c v") 'fl-execute-current-buffer) Thanks, it's not really working. That's how it looks like now: (add-hook 'pascal-mode-hook (lambda() [..] (defun fl-execute-current-buffer () "Executes the compiled file" (interactive) (shell-command (file-name-sans-extension buffer-file-name))) (define-key pascal-mode-map (kbd "C-c v") 'fl-execute-current-buffer))) I've I execute this it just displays in the minibuffer: Filename: Runtime error 201 at 0x0805C0DA (some more hex codes) Filename is the output my program gives right before it is waiting for input. If I just execute the program in a bash shell it works ok, I can enter something. A weird problem also apperas if I try to execute the program in the shell mode (M-x shell), it scrolling thousands of lines with withspaces down. Everything works on a normal shell. Any ideas? Thanks, Florian