From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= Newsgroups: gmane.emacs.bugs Subject: bug#66216: 28.2; scroll-up-line doesn't work if there is a before-string overlay with newline Date: Sat, 30 Sep 2023 21:15:49 +0200 Message-ID: <40ca88d3-e25d-e24f-6a54-5a5fc6c6f136@gmail.com> References: <83zg15z0a8.fsf@gnu.org> <99a86a00-20d8-446f-336a-1f405e07d59f@gmail.com> <834jjdyp6b.fsf@gnu.org> <67dcfd75-204d-f2ae-9a76-6b4eaec67197@gmail.com> <83bkdja8d2.fsf@gnu.org> <000f4e25-a432-57ce-9aaf-140dcfbd73eb@gmail.com> <83a5t3a7fu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36071"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Cc: 66216@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 30 21:17:12 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qmfSh-00093r-2j for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Sep 2023 21:17:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qmfSL-0002k4-Cn; Sat, 30 Sep 2023 15:16:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qmfSJ-0002ju-DD for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2023 15:16:47 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qmfSJ-0005bR-4n for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2023 15:16:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qmfSY-0007qW-7F for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2023 15:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Sep 2023 19:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66216 X-GNU-PR-Package: emacs Original-Received: via spool by 66216-submit@debbugs.gnu.org id=B66216.169610137930097 (code B ref 66216); Sat, 30 Sep 2023 19:17:02 +0000 Original-Received: (at 66216) by debbugs.gnu.org; 30 Sep 2023 19:16:19 +0000 Original-Received: from localhost ([127.0.0.1]:59798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmfRq-0007pM-Oh for submit@debbugs.gnu.org; Sat, 30 Sep 2023 15:16:19 -0400 Original-Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:53575) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmfRk-0007on-Sc for 66216@debbugs.gnu.org; Sat, 30 Sep 2023 15:16:16 -0400 Original-Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-53447d0241eso13236408a12.3 for <66216@debbugs.gnu.org>; Sat, 30 Sep 2023 12:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696101351; x=1696706151; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=DIqdcgQv0B3zoRZNTU1oaHvsm/iCaCVSpq3OfnvjANo=; b=TqHXQy6Ir3Aaf2Y2CjMexLYbFOt2pzXv53GjxfB5Knv86mjCSGORATLGfxKGD7qdN7 ROMH7nKpq2FtuFrtJlGYpIhN9wPRG5r2/K5OAsB4SO8NbXUSRpWI6vOYkdTnt4GHnMdP kof5RILXz5NFoKRa26kXvqtwPJr1LtwDTZSwbBw0pcZ9Yt8AukKDh0NhTgpe8rdPFOaR 3YxL1SSuXXE/a7kTqHG4RTYKfBjvRhEfVjL/eYqcDfM0bC6fydFDk145K8Qw1y3+M9el /XUMwGWNCATWNPyFL3B0BePr8ZtfbugFg8nBrhIwG4C916fNpnad97Wh25dT93mn5snO hvng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696101351; x=1696706151; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DIqdcgQv0B3zoRZNTU1oaHvsm/iCaCVSpq3OfnvjANo=; b=PG406tF1QpB/t8EemygHhuyDruBJvkAA2l3bkVVwzm2gJsZPORxHK2N2D1reQZtWHl g66WHi2zJiVIjGZIpV6ZZzOb4ioEwZdrddjd+s/fh79jE0qDBkJBhyZdw8msXWm+gwd/ LE9Bat/hWyLezNvPdv/MpzLHegEBUm3iMOBfQ3z53LaG31OMI5rPwGB6A38XwlHeFoiZ fz7YNmLEeNzIOYqV6ZcRMRm8v4tepTn77BgWfRSrkEw9PoxKKDoYB0/I+HYuwvPKOg9j W+sl55jodYNEEPNaGIfWilVY82N2wCHZLaYcJpAbM1sEe6wmMq2ZOq//6Nf9SbbzLqeg 3Mtw== X-Gm-Message-State: AOJu0Yw7mdmKIWq0VWX2LksRw21eAUTs5TOBT0ZAjLo28ipwNkanAhdr WN9wjnfxEjCsMShtYuEVvvY= X-Google-Smtp-Source: AGHT+IHqe45G3negbY6JO4naQsw7IIcjvffALQnMPlRGPDEn9yv3+Ryj79ObTkZq+K6FUd+ViSOKRg== X-Received: by 2002:aa7:d40e:0:b0:533:5c03:5fce with SMTP id z14-20020aa7d40e000000b005335c035fcemr7016225edq.5.1696101351197; Sat, 30 Sep 2023 12:15:51 -0700 (PDT) Original-Received: from [192.168.8.4] (netacc-gpn-104-239-178.pool.yettel.hu. [91.104.239.178]) by smtp.gmail.com with ESMTPSA id s3-20020aa7d783000000b0053116e45317sm13030658edq.44.2023.09.30.12.15.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 30 Sep 2023 12:15:50 -0700 (PDT) Content-Language: sv-FI In-Reply-To: <83a5t3a7fu.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271561 Archived-At: On 9/30/23 19:37, Eli Zaretskii wrote: >> >> Then line numbers will be incorrect > Why not? it depends on how the buffer text is generated, doesn't it? This is an example of magit's default blame presentation mode: http://www.mycpu.org/images/magit-blame.jpeg The header in front of each code chunk is an overlay. If we wanted to implement this without overlays (just simple text lines with text properties), then the headers will receive a line number, making the original line number incorrect. I suppose this is what you meant by "populating a scratch buffer with generated text" >> and also the buffer won't be editable. > That is easily made possible from Lisp, isn't it? How? The optimal solution is to edit the original buffer right away, just like how magit currently works. Maybe it's possible to sync between the scratch and the original buffer somehow. But this solution is awkward, and I'm sure it has a lot of pitfalls. Using overlays is a much more straightforward (from the package's viewpoint, and also from the user's). > A Lisp program written for Emacs definitely _should_ consider > limitations and restrictions of the Emacs infrastructure it uses, if > it wants to present a convenient, efficient, and well-looking > interface to the users. Fair enough. Are these limitations documented? Multiple-line overlays seem to work well in a lot of cases, several packages use it. It is just there are some cases where they don't work how one may expect. So one might think that such overlays are fully supported, and these cases are just bugs that can be fixed without too much work.