From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Overlay after-string with cursor (Stefan Monnier) Date: Sun, 11 Aug 2019 18:32:39 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="263343"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: "otadmor ." Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 12 00:32:57 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hwwOT-0016MJ-Vy for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Aug 2019 00:32:54 +0200 Original-Received: from localhost ([::1]:42024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwwOS-0001nr-Vy for geh-help-gnu-emacs@m.gmane.org; Sun, 11 Aug 2019 18:32:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36553) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwwOM-0001nh-CE for help-gnu-emacs@gnu.org; Sun, 11 Aug 2019 18:32:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hwwOL-0005lF-A5 for help-gnu-emacs@gnu.org; Sun, 11 Aug 2019 18:32:46 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:58751) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hwwOL-0005kk-3p for help-gnu-emacs@gnu.org; Sun, 11 Aug 2019 18:32:45 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5826C445F11; Sun, 11 Aug 2019 18:32:43 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E91C5445EF0; Sun, 11 Aug 2019 18:32:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1565562761; bh=p7sCllARapRu0smg0SC/D6pwGOA+cm5Qrtq5rxM6SXE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Qn0NmE6MKfC19lIKZm2W+Mqixal+uuUsdSyPDnjx0LdSWoADUDip4m5IFMXOHwSQP 1ODP7tQiL3N0tZYJqanu1JMcVC26LErfeBubs9XKLaoQLRtHoOlzeFl/vbZL1YnvGk Nne5Kfi1TY0ayY6+TsQqbFKY+ylWWDHoNOFD2RQqlYWJLrEH1C/vONgLYLsP+bFRth /O+Z3aYgS9IzXT3E33sZAo/8Y9+4rV2fbYZrAIWGbuYxkTbur5E1cUYj3dUOgoLevf vvXyUdl0Hj4zVRRZ9HKOhFsm5g+QZkvENahpnBWeTr5KEY9VScwW4zDicOFARAg4co HonkN3iGfeqrw== Original-Received: from alfajor (dyn.83-228-179-131.dsl.vtx.ch [83.228.179.131]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 20B92120F68; Sun, 11 Aug 2019 18:32:40 -0400 (EDT) In-Reply-To: (otadmor .'s message of "Mon, 12 Aug 2019 01:24:19 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121330 Archived-At: >> You can control where the cursor is displayed in the after-string, with >> the `cursor` property. Doing in it such a way that it gives the >> illusion that you can put the cursor "wherever you want" can be a bit >> fiddly > As I understand, setting the cursor property allows me to put the > cursor only in one position inside my overlay. AFAIK the cursor is never at two places at the same time, so that's not a problem. > I want the user to be able to move the cursor inside the overlay when > using the after-string property. You can, by changing the `cursor` property whenever you want the cursor to change position. >> so I think it's worth clarifying why exactly you want something >> like that, so as to be better decide how to attack the problem. > Im trying to implement something visually similar to what vimdiff has, > as in this URL: > https://www.thegeekstuff.com/2010/06/vimdiff-file-diff-tool/ > In there, you can see the lines filled with "....................." > where there is no content in the line of the first file and there is > content in the matching line in the second file. > Hope this makes it clearer and that I managed to reply this thread correctly. That doesn't explain why you care about the cursor positioning in those spaces that don't correspond to any real line, so I'm afraid it doesn't make it clearer :-( Stefan