From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Retrieve front-advance from make-overlay Date: Mon, 15 Jan 2007 08:20:25 +0100 Message-ID: <864pqsdadi.fsf@lola.quinscape.zz> References: <45AA9AEC.1050800@gmail.com> <45AAD917.30400@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1168884741 1056 80.91.229.12 (15 Jan 2007 18:12:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Jan 2007 18:12:21 +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:12:18 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 1H6Vcj-0003fK-Sn for ged-emacs-devel@m.gmane.org; Mon, 15 Jan 2007 18:27:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6MA4-00060u-5R for ged-emacs-devel@m.gmane.org; Mon, 15 Jan 2007 02:21:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6M9u-00060m-Ay for emacs-devel@gnu.org; Mon, 15 Jan 2007 02:21:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6M9r-0005x9-Gk for emacs-devel@gnu.org; Mon, 15 Jan 2007 02:21:33 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6M9r-0005x6-C7 for emacs-devel@gnu.org; Mon, 15 Jan 2007 02:21:31 -0500 Original-Received: from [62.67.228.11] (helo=pc3.berlin.powerweb.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H6M9q-0004Jj-TY for emacs-devel@gnu.org; Mon, 15 Jan 2007 02:21:31 -0500 Original-Received: from quinscape.de (pd95b0fdb.dip0.t-ipconnect.de [217.91.15.219]) by pc3.berlin.powerweb.de (8.9.3p3/8.9.3) with ESMTP id IAA14227 for ; Mon, 15 Jan 2007 08:20:56 +0100 X-Delivered-To: Original-Received: (qmail 4482 invoked from network); 15 Jan 2007 07:20:56 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 15 Jan 2007 07:20:56 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id EE61E24B4D; Mon, 15 Jan 2007 08:20:25 +0100 (CET) Original-To: "Lennart Borgman \(gmail\)" In-Reply-To: <45AAD917.30400@gmail.com> (Lennart Borgman's message of "Mon\, 15 Jan 2007 02\:29\:59 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:65195 Archived-At: "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. -- David Kastrup