From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Campbell Barton Newsgroups: gmane.emacs.devel Subject: Re: Thoughts on support for vc-diff unsaved buffer contents? Date: Fri, 22 Nov 2024 20:05:07 +1100 Message-ID: References: <68c0ce3e-8316-43db-8f3c-ead0ad028326@gmail.com> <878qtbogqi.fsf@mail.linkov.net> 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="27521"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 22 10:05:59 2024 Return-path: Envelope-to: ged-emacs-devel@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 1tEPbz-00074Y-Az for ged-emacs-devel@m.gmane-mx.org; Fri, 22 Nov 2024 10:05:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEPbJ-000059-D2; Fri, 22 Nov 2024 04:05:17 -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 1tEPbG-0008PI-L8 for emacs-devel@gnu.org; Fri, 22 Nov 2024 04:05:14 -0500 Original-Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tEPbE-0000Pw-M3 for emacs-devel@gnu.org; Fri, 22 Nov 2024 04:05:13 -0500 Original-Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-21288d3b387so14490605ad.1 for ; Fri, 22 Nov 2024 01:05:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732266311; x=1732871111; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=FPTQrzqGDNwGgknuAZCp8XY6nbpnb9d1sWpNRTqYOjY=; b=gK+BY5kPjp17gb+cNYz3HH1WOMLmPWPicHkW0X44jG8R/sKBVC4O4sI625IKNza2VY HwWu3LMI7b6U+Z7ud729qTaCH86VkjLVE2ytRa4/CxYwso4K28FTriq8iqarn263Rinm dE4/DHjYGhqAee0bLFaxnno827Sf5jMYfmnvxdAGGMsR0sc/Hi6ezE1ix3VGBF3JMATP 0fm61M7vwQKaAid3O85Ap6XTvR/tGWerWHHwEWZr0eUdS1djYiYIOCySL5JNLSXm1HXI jYxvwSKiDNAZ6y0q2UMufjRilMWgSt+h/SXneOrv2SBkO8e1KpkITNZxenmHrNnTjQJx agXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732266311; x=1732871111; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FPTQrzqGDNwGgknuAZCp8XY6nbpnb9d1sWpNRTqYOjY=; b=FCEAJ1VKqajdAqx5gXXXGtBThu/5sA6VAxzWO+hxRdj+jD36IKstQ+tghPDL1rWH2a hjxUpFNhrENlOmnySTBFbY63is/ft4GpW93l6qBYWlkhSfn7q6UjVHE1CeQo1JBFbS3L u8SztCC8gVza6h/qlorWvxzzYqRvyHqIcgCXrKWYy15h9mcqrh7CE8pvJTuKbPEv5JcV wzlIO6iMk+Bp5T2ZCKQ8OJXt8W7cumIhzEoxtNIOJTNXdAYEeElwq5AOoYkgJSBPO2Zk 3DfRrjRipCpFnxJgLseaTCicmmZxPQ6LGuCQj6dTUgRI8Pr+HetKmS3JcHknCs9wBuBP wF/w== X-Gm-Message-State: AOJu0YxHU6NFuN0D7XCnPOH1siuhQxDrgUV2lWMViqvKD3SYb1U2EygM uyDJ5dfD4zCbjd24S13AsA1PMD2X7VJDgPpiLAJS/e7crR1AvEp4i/9AiA== X-Gm-Gg: ASbGncu+HAnULsUP0nWQlU4Z1F4EWr3FZKHHw3Fnhm9xqqj8dGdPS4duriBYM3tHUdr NIdhgpTTbpWWXVvK6zx8itAErPDOmBCGD6HddxoGcRU36aBFv/+m3VOeIaFGFZnIaIe7vx8yc5o bd4lHCDIQ1Zd2U37SdDHk1bZSTe6rUMvPdCrrF1A1/3kbQQ23JIhvhc5WsNgBy/SVQ9PnA4L7aO /sGaLO2L3HGNpZcXn26XKwxShE7js2/jYZFFtsNL6GQ+4o2eW3QNV5M X-Google-Smtp-Source: AGHT+IHITWxMNclM9nZliM2k0gk8wGYew5c3ksDCANGZm0gcgSErdRYXdaCK0XbkmktZPXYDU1C9fw== X-Received: by 2002:a17:902:e94c:b0:212:5529:ef47 with SMTP id d9443c01a7336-2129f69f91dmr30506875ad.53.1732266310888; Fri, 22 Nov 2024 01:05:10 -0800 (PST) Original-Received: from ?IPV6:2402:b801:2c65:4b00::1? ([2402:b801:2c65:4b00::1]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2129dbfeb4esm11563275ad.164.2024.11.22.01.05.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Nov 2024 01:05:10 -0800 (PST) Content-Language: en-US In-Reply-To: <878qtbogqi.fsf@mail.linkov.net> Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=ideasman42@gmail.com; helo=mail-pl1-x62c.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325580 Archived-At: On 24-11-22 6:44 PM, Juri Linkov wrote: >> Hi, recently I've run into a situation where it's necessary to calculate >> modified line ranges without first saving the buffer (where "modified" is >> determined by a version control diff). >> >> I'm curious if this is something that might be supported - or, is already >> supported (although I'm fairly sure it's not). > > 'diff-no-select' as well as 'multi-file-diff-no-select' accept > unsaved buffers as their arguments. Thanks for the suggestion. The part I'm not sure about regarding `diff-no-select' & `diff-buffer-with-file' is how they could work with version-control (vc-diff or a related functions). As far as I can see the diff needs to be generated by version-control (git/hg/svn etc) instead of a file - since the "original" file necessarily exist as a file on disk.