From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: Retrieve front-advance from make-overlay Date: Mon, 15 Jan 2007 10:18:58 +0100 Message-ID: <45AB4702.6070908@gmail.com> References: <45AA9AEC.1050800@gmail.com> <45AAD917.30400@gmail.com> <864pqsdadi.fsf@lola.quinscape.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1168887385 19881 80.91.229.12 (15 Jan 2007 18:56:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Jan 2007 18:56:25 +0000 (UTC) Cc: Stefan Monnier , Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 15 19:56:23 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H6VdQ-00041Q-Ie for ged-emacs-devel@m.gmane.org; Mon, 15 Jan 2007 18:28:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6Nzm-0007cn-Oo for ged-emacs-devel@m.gmane.org; Mon, 15 Jan 2007 04:19:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6Nza-0007Zo-MB for emacs-devel@gnu.org; Mon, 15 Jan 2007 04:19:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6NzZ-0007YF-Aq for emacs-devel@gnu.org; Mon, 15 Jan 2007 04:19:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6NzZ-0007Y5-5v for emacs-devel@gnu.org; Mon, 15 Jan 2007 04:19:01 -0500 Original-Received: from [80.76.149.213] (helo=ch-smtp02.sth.basefarm.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H6NzW-0000Vg-JM; Mon, 15 Jan 2007 04:18:58 -0500 Original-Received: from c83-254-145-24.bredband.comhem.se ([83.254.145.24]:59843 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1H6NzU-0005M1-8g; Mon, 15 Jan 2007 10:18:57 +0100 User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) Original-To: David Kastrup In-Reply-To: <864pqsdadi.fsf@lola.quinscape.zz> X-Antivirus: avast! (VPS 0703-0, 2007-01-13), Outbound message X-Antivirus-Status: Clean X-Scan-Result: No virus found in message 1H6NzU-0005M1-8g. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1H6NzU-0005M1-8g 2ceb274bedcab35b0004f8b49fd6c2ae X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:65218 Archived-At: David Kastrup wrote: > "Lennart Borgman (gmail)" writes: > >> Stefan Monnier wrote: >>>> Is it possible to retrieve from an overlay the parameters front-advance and >>>> rear-advance that was given to make-overlay? >>>> Without that it is not possible to make a new copy of an overlay AFAICS. >>> The source code of `copy-overlay' answers this question. >> Thanks. Indeed it does ;-) -- BTW copy-overlay is not mentioned in Info. > > (defun overlay-polarities (ov) > (let ((buf (overlay-buffer ov)) > (start (overlay-start ov)) > (end (overlay-end ov))) > (unwind-protect > (with-temp-buffer > (move-overlay ov 1 1) > (insert " ") > (list (> (overlay-start ov) 1) > (> (overlay-end ov) 1))) > (move-overlay ov buf start end)))) > > This at least has the advantage of not touching the original buffer. > But it is tasteless nevertheless. Thanks David, I did not that one. I will try it.