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: Overlay mechanic improvements Date: Tue, 30 Sep 2014 07:52:26 +0200 Message-ID: <87d2adk63p.fsf@fencepost.gnu.org> References: <871tr6qup8.fsf@fencepost.gnu.org> <87ppepne6d.fsf@fencepost.gnu.org> <87mw9smxaz.fsf@fencepost.gnu.org> <87sijii1cd.fsf@fencepost.gnu.org> <87vbo7j7yy.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412061672 10207 80.91.229.3 (30 Sep 2014 07:21:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Sep 2014 07:21:12 +0000 (UTC) Cc: emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 30 09:21:06 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XYrk9-0007EF-0R for ged-emacs-devel@m.gmane.org; Tue, 30 Sep 2014 09:21:05 +0200 Original-Received: from localhost ([::1]:41242 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYrk8-0001Kq-HY for ged-emacs-devel@m.gmane.org; Tue, 30 Sep 2014 03:21:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYrjp-0001KG-VA for emacs-devel@gnu.org; Tue, 30 Sep 2014 03:20:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYrjl-0007OA-0I for emacs-devel@gnu.org; Tue, 30 Sep 2014 03:20:45 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYrjk-0007Mp-Tm for emacs-devel@gnu.org; Tue, 30 Sep 2014 03:20:40 -0400 Original-Received: from localhost ([127.0.0.1]:56721 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYrbj-0004sl-Tg; Tue, 30 Sep 2014 03:12:24 -0400 Original-Received: by lola (Postfix, from userid 1000) id A49BEE0525; Tue, 30 Sep 2014 07:52:26 +0200 (CEST) In-Reply-To: (Richard Stallman's message of "Mon, 29 Sep 2014 16:48:52 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174828 Archived-At: Richard Stallman writes: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > Does this mean you turn off display of the image on the overlay when > > the text in that region is changed? > > Very much so, yes. Changing the text in the region would be a pain if > you could not see it, and changing it breaks the correspondence between > text and image anyway. > > I see. > > But you keep the overlay in existence -- how come? Convenience. preview-latex has a mechanism to run only a region through LaTeX, so it is possible to regenerate only images in a region. This comes with its own shortfalls compared with regenerating the whole document but is much faster and less disruptive as then only images in that region flicker as they appear. When editing a particular equation or other element, reusing its original boundaries as the region to run through LaTeX is a natural choice, so the retained overlay preserves those boundaries (and offsets them visually) for the sake of the commands regenerating a region. If you split an equation into two by editing it, "regenerating" the image will replace the original overlay with two new ones: in fact, even if the boundaries stay the same, the overlay will get replaced. It sticks around only until some new image is generated touching any of the original region. If you write, say, word_text instead of word\_text (throwing LaTeX into inadvertant math mode), the resulting nuisance overlay will need to get manually removed (with keyboard sequence or mouse click) after correcting the syntax error since no image will reappear in that area after the correction. That tends to be a smaller net distraction than having to hand-select your regions to regenerate in the common case. -- David Kastrup