From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Samuel Wales Newsgroups: gmane.emacs.help Subject: highlighting one buffer according to another Date: Wed, 14 Sep 2022 20:09:29 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11544"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 15 05:10:35 2022 Return-path: Envelope-to: geh-help-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 1oYfGs-0002t7-PH for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 15 Sep 2022 05:10:34 +0200 Original-Received: from localhost ([::1]:47386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYfGr-00064p-2K for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 23:10:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYfFz-00064X-32 for help-gnu-emacs@gnu.org; Wed, 14 Sep 2022 23:09:39 -0400 Original-Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]:35614) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYfFt-0005nh-Jj for help-gnu-emacs@gnu.org; Wed, 14 Sep 2022 23:09:38 -0400 Original-Received: by mail-lj1-x22e.google.com with SMTP id 9so19671225ljr.2 for ; Wed, 14 Sep 2022 20:09:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=NYvC99qcRt82K5KRpdMUnITIeKnRYqB7Hp+rsWszHmY=; b=PfwgpwXKcYfO66Mx84ddHIZu0uVdqWt0IGDqqJ7beQN7/EwXi+I+rsKPQdTI2qyMw+ WOEjrvAOLp7j7wbjhfai0+k+bLTgT8QVSaQV/KLqs1O2VlqKpffOiNwUdSpZKgDDVNmX qlrEUjPRWpG1ah/5v8dCEnCxkdrxhgg+EL1vVlCg1NOLifefAlDicTcHuFEmnDH09DeY koe6X1+BVy0F+8CnkZ8Lp3J3itR6tCMllEpL0CJRND2wFrSkeRnC6Ml1RWmi9VONP2E5 OH2grJmr4G4TDb+SI/TRbjRy2pzP8lSG+6ARIt9wdNZhO+9cPjnWJdWenavp2zCR2UE1 Sygg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=NYvC99qcRt82K5KRpdMUnITIeKnRYqB7Hp+rsWszHmY=; b=WKfAU/CLSoG8NhBGWRUvNSr6kvF3nnFyNt3HaTpF4KhsL7fUFdTtZsv32iGW1byVdl uk6v+LlP6LIkZAKrNx5Vnk4+KyilgNqPxn8uqCgTLClohg46Fy87ba5e2GCKj6Rl0Rca Cnsu4uWNUw/u7AQpJXruzcXYektCf2Qnh80AA+dvueibSuAFR6D3wKct6lPLPizv1V3/ eOri04y93hVVGE2vy2v8fH3WxW5IUEa4NRvuD45qA6PmQtPthbPlzJF5aIysRJ4534dC Cu+QYpa4Z9ACaK0/DCaoAIHmCRzE/LDLcs8WkooaWwwbBTk7ec1Z8acGD4l7x4Voi300 WEgA== X-Gm-Message-State: ACgBeo1nuIOdBMWDCeasElEbGxdubzXPVaSAI21t73HVWFhea1gfgVqm QAkcyxn/qRVcPxrBnZmiPOqF9+rg36YrZnTfOZZIra+zH/97oQ== X-Google-Smtp-Source: AA6agR5izIQam5VsrS9rVIw1GDEE4U1XfMGMzPhHIRxYkemfkxUBChi6aY2IQhdUYyxe9aud67wcntSg8YCIYrKPCsI= X-Received: by 2002:a05:651c:4d0:b0:26b:fc19:94f1 with SMTP id e16-20020a05651c04d000b0026bfc1994f1mr6883837lji.75.1663211370713; Wed, 14 Sep 2022 20:09:30 -0700 (PDT) Original-Received: by 2002:aa6:c2eb:0:b0:21e:73da:40af with HTTP; Wed, 14 Sep 2022 20:09:29 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::22e; envelope-from=samologist@gmail.com; helo=mail-lj1-x22e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:139465 Archived-At: this is probably much too much for me but i thought i'd bring it up anyway. i have a derivative of diff-mode that has special gutter characters. it captures the diff, its contents, from any other buffer. suppose the buffer it captures from is called orig. it could be magit or anything else. and suppose the name of the buffer with special gutter characters is mydiff. what i want to do is mark every - or + line in orig, if the corresponding line in mydiff contains a special gutter character. for marking, i haven't decided fully, but it can maybe change the face for the - or + line to inverse video. so part of the problem is finding the corresponding line in orig for each line in mydiff, and part of it is changing the face of lines in orig. [or in principle using fringe or something, but starting with inverse video seems reasonable.] a test for plain equality of lines after eliminating gutter etc. would be sufficient, but some kind of @@ line number syncing or wiggling might or might not be in principle possible for more accuracy of which line mydiff refers to. ideas welcome. or any code. i don't have more specific qs than this beause this is where i got in this.