From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#61449: 30.0.50; diff-hl-dired: Consider adding a cookie to diff-hl-dired overlay Date: Sun, 19 Feb 2023 01:25:50 +0200 Message-ID: References: <8e8703e8-b41b-3fb1-edf1-8764fe725488@yandex.ru> 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="15117"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 To: Ramesh Nedunchezian , 61449@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 19 00:26:18 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 1pTWaw-0003hf-IV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Feb 2023 00:26:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTWai-0000LO-2W; Sat, 18 Feb 2023 18:26:04 -0500 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 1pTWag-0000Kx-JI for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 18:26:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pTWag-00028I-7d for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 18:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pTWaf-00069m-UC for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 18:26:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Feb 2023 23:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61449 X-GNU-PR-Package: emacs Original-Received: via spool by 61449-submit@debbugs.gnu.org id=B61449.167676276023659 (code B ref 61449); Sat, 18 Feb 2023 23:26:01 +0000 Original-Received: (at 61449) by debbugs.gnu.org; 18 Feb 2023 23:26:00 +0000 Original-Received: from localhost ([127.0.0.1]:45158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTWad-00069X-Uv for submit@debbugs.gnu.org; Sat, 18 Feb 2023 18:26:00 -0500 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:35444) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTWac-00069J-Ti for 61449@debbugs.gnu.org; Sat, 18 Feb 2023 18:25:59 -0500 Original-Received: by mail-wr1-f52.google.com with SMTP id a11so1358012wro.2 for <61449@debbugs.gnu.org>; Sat, 18 Feb 2023 15:25:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=M1XCez2Yfp20jW0ZD9KHQXHnNPZBbn/ytLrBR9cgCVU=; b=SyvPg7jCaVpytfQgilw52XMkCsbi7QG2z42zgSrIGnFUlGA2HTQSR43arYpA62yUew s1D+IY8KBEFBXoNqSI5UkV4gm14AHN7r+foPww29Mf35PTO0O8bJXy29AGvwm5ngkHB6 wsXyzcNxqEH/qMFBMH8IAcdNgbcIIcqrW+xnV8aD2fCJsFeJEr3CGb0fQzrYT0bsRUvf JS1EYLO+2nEJgQr7x+p9YO8fh3iTTeeZ2v+c/49bDsGlqv7fbylTPmYo/CcZVkGvwjaj RNXXoE4T7R5bOfgSWomBbLmnKp0RBPwBPvA4ce07QQPCVSSmerWS4O13/3U95DeT/wh9 6CUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=M1XCez2Yfp20jW0ZD9KHQXHnNPZBbn/ytLrBR9cgCVU=; b=oUZLl0cz/RMmZEowSLB4vmZLnAWYChJ68fERU1+9j11/eG0R2TJvtbG8p6cWmJm6Yl UOO9SMO8uXQsT/xaBi3mg5a6i4MWF2jZ2PBDF+fJptvkGR3oCOgQRJ+Duh054GFGRXfk XCnpN9IO47yITA0wEaAxzMYh/sxIe1/l+m8hObAPCk4nxxK3kG+aFkI3c8TmE+ThlnEb 4P4qdrxYlQOXKQjKtqvfMhhKfZ3ic+FJWJvTdCB6+QMBOFvz6Ujaf3pi44035zRXGBku MCt5ZDQEyGVEXb4M3tAKzGTASrhjMsCNPiqrenFFlCxf4qqcSpAfGbBoI32DKPKASBWs CCWA== X-Gm-Message-State: AO0yUKXeW6qZE3ScAOp7oSdRJw5+FiESPbeO3RioI9VzK3RiNNnOHOZg TRwf53224PZfJUVf7cEi+aw= X-Google-Smtp-Source: AK7set8FA4s0U+5Nb4cqiSBmKlJjqOJEemu1TVUAkvVR2aM4pAktF6T/HPEzIrwHjInXOocVuWriWQ== X-Received: by 2002:a05:6000:136e:b0:2c3:f8b8:87 with SMTP id q14-20020a056000136e00b002c3f8b80087mr3630617wrz.25.1676762752948; Sat, 18 Feb 2023 15:25:52 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id a18-20020adffb92000000b002bfd524255esm205460wrr.43.2023.02.18.15.25.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Feb 2023 15:25:52 -0800 (PST) Content-Language: en-US In-Reply-To: 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:256007 Archived-At: Hi again! On 13/02/2023 13:19, Ramesh Nedunchezian wrote: > - `diff-hl-dired-cookie` :: This is added by me, and contains the vc > state. > - `diff-hl` :: This is added by `diff-hl-dired`, and `t` isn't much > useful for the task I have hand. > - `before-string` :: This is added by `diff-hl-dired`, and the vc > state is avaiable as a face property. > > If I have to get to that property, this is the kind of manoeuvre I > need to do > > (->> x > (memq 'before-string) > cadr > (get-text-property 0 'display) > car > (-filter 'facep) > car) > > If you add a cookie, I can do whatever with it. > > Mind you ... I am not saying the relevant information is /not/ there; > I am only saying that it is buried too deep, and not readily accessible. Thank you for the extra clarification. I've added a new overlay property 'diff-hl-dired-type' in https://github.com/dgutov/diff-hl/commit/d20f16bf5eadd66e775f215e800f25caddae8cb5. It the same as you asked, I think, except with a different name. Due to the version bump, it should be out soon in diff-hl 1.9.2.