From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Lee Newsgroups: gmane.emacs.help Subject: Re: problems with save-excursion Date: Wed, 15 Mar 2006 14:26:41 GMT Organization: x Message-ID: References: <1141857397.880352.44860@u72g2000cwu.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1142433064 27700 80.91.229.2 (15 Mar 2006 14:31:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Mar 2006 14:31:04 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 15 15:30:59 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FJX1P-0003yE-1N for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Mar 2006 15:30:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FJX1M-0002GU-Bt for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Mar 2006 09:30:40 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsmst01b.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr13.news.prodigy.com.POSTED!404941e6!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) Cancel-Lock: sha1:XcCRoJ81EwyYFPJFfs8D+C7VY6I= Original-Lines: 18 Original-NNTP-Posting-Host: 66.194.80.196 Original-X-Complaints-To: abuse@prodigy.net Original-X-Trace: newssvr13.news.prodigy.com 1142432801 ST000 66.194.80.196 (Wed, 15 Mar 2006 09:26:41 EST) Original-NNTP-Posting-Date: Wed, 15 Mar 2006 09:26:41 EST X-UserInfo1: [[PAPDCA[S@SSTX[KZD\_T@@USXHQD\MNPWZKB]MPXHZUSAANVUEAE[YETZPIWWI[FCIZA^NBFXZ_D[BFNTCNVPDTNTKHWXKB@X^B_OCJLPZ@ET_O[G\XSG@E\G[ZKVLBL^CJINM@I_KVIOR\T_M_AW_M[_BWU_HFA_]@A_A^SGFAUDE_DFTMQPFWVW[QPJN Original-Xref: shelby.stanford.edu gnu.emacs.help:138176 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:33790 Archived-At: >>>> filcab writes: >> I have the following function: >> (defun copy-line () >> (interactive) >> (save-excursion >> (beginning-of-line) >> (set-mark-command) >> (end-of-line) >> (copy-region-as-kill))) >> But it's not working... you could do: (defun copy-line () (interactive) (kill-new (thing-at-point 'line)))