From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Alignment and images Date: Tue, 28 Jun 2016 21:23:23 +0300 Message-ID: <83inwtw4tg.fsf@gnu.org> References: <831t3hxowt.fsf@gnu.org> <83twgdw9n7.fsf@gnu.org> <83por1w6ng.fsf@gnu.org> <83lh1pw5bt.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1467138354 1269 80.91.229.3 (28 Jun 2016 18:25:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2016 18:25:54 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 28 20:25:52 2016 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 1bHxhi-0000J8-TA for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2016 20:25:47 +0200 Original-Received: from localhost ([::1]:38717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHxhi-000774-6T for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2016 14:25:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHxg3-0005cN-Mn for emacs-devel@gnu.org; Tue, 28 Jun 2016 14:24:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHxg2-000212-Ju for emacs-devel@gnu.org; Tue, 28 Jun 2016 14:24:03 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHxg2-00020p-GG; Tue, 28 Jun 2016 14:24:02 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4509 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bHxfx-0007GI-TX; Tue, 28 Jun 2016 14:24:00 -0400 In-reply-to: (message from Lars Magne Ingebrigtsen on Tue, 28 Jun 2016 20:17:00 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:204884 Archived-At: > From: Lars Magne Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Tue, 28 Jun 2016 20:17:00 +0200 > > Eli Zaretskii writes: > > >> So... there is no easy way implement this in the current Emacs? > > > > I don't think so, but maybe someone else will come up with some > > rabbit-out-of-the-hat. > > Using the :align-to specs judiciously (i.e., only inserting them where > they are needed), as well as a post-command-hook looking like > > (defun meme--fix-point () > (let ((column (current-column))) > (when (get-text-property (point) 'meme-intangible) > (if (> column meme-column) > (forward-char 1) > (backward-char 1)) > (setq column (current-column))) > (setq meme-column column))) > > seems to make all movement commands work as expected. It's unfortunate > that this is needed, though... It shouldn't be hard to add the no-cursor condition, once its Lisp form is defined. It's just a flag in the glyph structure that needs to be set, all the rest already works.