From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jonas Bernoulli Newsgroups: gmane.emacs.bugs Subject: bug#24179: 24179 Date: Thu, 11 Aug 2016 18:39:54 +0200 Message-ID: <87vaz7xns5.fsf@bernoul.li> References: <87y448s2k8.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1470933776 5048 195.159.176.226 (11 Aug 2016 16:42:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 11 Aug 2016 16:42:56 +0000 (UTC) User-Agent: mu4e 0.9.17; emacs 25.1.1 To: 24179@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 11 18:42:51 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXt4F-00017y-7U for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Aug 2016 18:42:51 +0200 Original-Received: from localhost ([::1]:49749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXt4C-00036b-71 for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Aug 2016 12:42:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXt2a-0001gT-4e for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 12:41:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXt2V-0008Um-2Z for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 12:41:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXt2U-0008Ug-Vx for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 12:41:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bXt2U-00050Y-6I for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 12:41:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87y448s2k8.fsf@gmail.com> Resent-From: Jonas Bernoulli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Aug 2016 16:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24179 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24179-submit@debbugs.gnu.org id=B24179.147093360319171 (code B ref 24179); Thu, 11 Aug 2016 16:41:02 +0000 Original-Received: (at 24179) by debbugs.gnu.org; 11 Aug 2016 16:40:03 +0000 Original-Received: from localhost ([127.0.0.1]:54231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXt1X-0004z9-5Y for submit@debbugs.gnu.org; Thu, 11 Aug 2016 12:40:03 -0400 Original-Received: from mail.hostpark.net ([212.243.197.30]:42757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXt1V-0004yf-2L for 24179@debbugs.gnu.org; Thu, 11 Aug 2016 12:40:01 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 93CCA16B84 for <24179@debbugs.gnu.org>; Thu, 11 Aug 2016 18:39:59 +0200 (CEST) X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id NSSk2kddj1Wm for <24179@debbugs.gnu.org>; Thu, 11 Aug 2016 18:39:59 +0200 (CEST) Original-Received: from hal (178-82-62-170.dynamic.hispeed.ch [178.82.62.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 657CC16B81 for <24179@debbugs.gnu.org>; Thu, 11 Aug 2016 18:39:59 +0200 (CEST) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122085 Archived-At: Thanks Eli! > Btw, magit-blame could be nicer to the display engine by placing a > 'cursor' property on the first character of each before-string it > creates to show the blamed commit. After reading the documentation, I cannot quite figure what I am supposed to do. Given this: (with-current-buffer (get-buffer-create "demo") (pop-to-buffer (current-buffer)) (erase-buffer) (insert "one\ntwo\nthree") (backward-word 2) (let ((ov (make-overlay (point) (save-excursion (forward-line 1) (point)))) (heading "before two\n")) (overlay-put ov 'before-string heading) (overlay-put ov 'the-value "two") (overlay-put ov 'evaporate t))) I think I am supposed to change it to: (with-current-buffer (get-buffer-create "demo") (pop-to-buffer (current-buffer)) (erase-buffer) (insert "one\ntwo\nthree") (backward-word 2) (let ((ov (make-overlay (point) (save-excursion (forward-line 1) (point)))) (heading "before two\n")) (put-text-property 0 1 'cursor (length heading) heading) (overlay-put ov 'before-string heading) (overlay-put ov 'the-value "two") (overlay-put ov 'evaporate t))) However I would then expect that it would become possible for the cursor to be displayed "on" the "b" because of this: "In other words, the string character with the ‘cursor’ property of any non-‘nil’ value is the character where to display the cursor. The value of the property says for which buffer positions to display the cursor there." one *efore two two three That would be a change in behavior* but I am not seeing any change so I am unsure whether I am doing this all wrong. If so, then please correct the above code. * However if that is possible, I would prefer to use the `cursor' property to provide the hint to the display engine that the cursor should keep ending up here (as it does without fiddling with `cursor' at all): one before two *wo three Given "the cursor will be displayed on this character for any buffer position in the range `[OVPOS..OVPOS+N)'", I don't see how I can say "display the cursor HERE instead of at the positions BEFORE HERE as specified by N".