From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0DQjLQCDcGN5OQAAbAwnHQ (envelope-from ) for ; Sun, 13 Nov 2022 06:39:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id un02LACDcGM8RAEAG6o9tA (envelope-from ) for ; Sun, 13 Nov 2022 06:39:12 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 57E8CD360 for ; Sun, 13 Nov 2022 06:39:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ou5hk-0002em-Uf; Sun, 13 Nov 2022 00:38:53 -0500 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 1ou5hY-0002dN-GZ for emacs-orgmode@gnu.org; Sun, 13 Nov 2022 00:38:40 -0500 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ou5hW-0002Ly-BL for emacs-orgmode@gnu.org; Sun, 13 Nov 2022 00:38:40 -0500 Received: by mail-lf1-x134.google.com with SMTP id g7so14313536lfv.5 for ; Sat, 12 Nov 2022 21:38:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=38buTGugwgqfRH0k28RtY+o/xX7PMXV9/B1+XDzD/u0=; b=AsTfW3u0KUGr1P6um+YgVcC3RNHKh4CmmdYDKa6A+5lCVChi0nzfYds3Ibb5AX7GEQ dA4RJDHwpwHTp7EF6WkIFZrFL6deD+LFN2kZUlwLF3sUBErocXQ82VwxYZN2w8Dj+tfo 4s+Z8BLkgodxvqNJ6XUtaDFQ/+cmFPamX1SKWHKvjdbIje/oIoGNlY2n7UVGA3XQX749 FVPTEkERiBhIpwoNkEzmLe2OZS7TnJVKYiXe4C5YirI0RzDyqWgvkFIwqUpk9d72fwuG rMhDEG5xSh0+gNwcj5RFGpNeP5MOR0/MMcY3mv5S7psxTHwsQyuCgwkWqxLaMdMCwmDk qYgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=38buTGugwgqfRH0k28RtY+o/xX7PMXV9/B1+XDzD/u0=; b=4Eg6FGxoLuwDQiz/1qIokHZ5XBLS1tvMhjw0vNjQkhsGnUPrtlMlx0RCQzGGBFk1sd Tdnvo5vHREH6zimemz8bOYPDPKmjA6OXFztoOXcJNTCxzPEsGG/PWDOoGKOC5cMOP8VI IlE6nl+GdCiSr49QC7OH8yvLf3tS73OCi+QVuMMfIAVOXoFnMzeD4TGy8A4BnyAkGWBI ewybVqhz+qaD6e1gT+LZf+agoaQAy6xXnQYj5kctzFypuXTsIEowM5bHa0T+kc96rBaX M2rAb69bp9RjQfwL2vyQBlPDrpTZAK5E+jjMn4X2o/wmo3kUxLy+qbZP97mpVppFUe1j Gv0A== X-Gm-Message-State: ANoB5plauCFha3Kpf8ayAVTWr7ScZQLHLiqlgiU7ppn5zNylWoUlDX4J 1wUuF6/hVr1dGdhOcgVyPyQYQp0yDNq4DzQM1l0IyVSbf48UlXMY X-Google-Smtp-Source: AA0mqf474Uxr9i242W5oAvE88YTai8EOsxStdeQ/XWP7WfEXxUKpLQzp5E5Ee89FMIOopmsZc37zSxv1p4pVVmBFPjA= X-Received: by 2002:a05:6512:473:b0:4a2:2c37:e1bb with SMTP id x19-20020a056512047300b004a22c37e1bbmr2681282lfd.487.1668317915458; Sat, 12 Nov 2022 21:38:35 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6520:4af1:b0:22a:e96a:7f9b with HTTP; Sat, 12 Nov 2022 21:38:34 -0800 (PST) In-Reply-To: References: From: Samuel Wales Date: Sat, 12 Nov 2022 22:38:34 -0700 Message-ID: Subject: Re: [OT] org and diff To: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=samologist@gmail.com; helo=mail-lf1-x134.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668317952; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=38buTGugwgqfRH0k28RtY+o/xX7PMXV9/B1+XDzD/u0=; b=MmcBWGkV86ApP+2vPgUhGuhgRp1aMgjjns3Ej7xwPPRJq3XHP1v0hFrYL6cdYIAECeqK+J 9VeNGZahwmfoO37mHVlXbOY5ARRC9txhaUTTqAXVQtZI9YnazHj2rYfBxV/HPGVqMCh04j 1DQCmXMOmxXl+hYkbc5z8HcnIhu8cI4eMATEBdsYMUE1yue4wkLoZq18PVho1ZEv7lH3Hd 1M1imYofJhI+fji6tbCYyg++yA7778XOwRIWxjOYCg+d5DaV6RZ9t75plb1gNaBD2NcAfn uqDVk1z8poI4HkudMecNPkDcupiBlWChAf9jBORl/Pwc9wvVhhnqgAWM7EnGfA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668317952; a=rsa-sha256; cv=none; b=oiMydYKlY6dhhbenh4TVKC/+vyAlMLg3t9753asZrNCVJAFwECV42r3UBuNMaJIMr6uSuH wFHcJSQT9jPxxYl9sGQ4u6GANeIsCYakk2gUjS15F21oTfVut2g3L+G+GNGPmPF8nYVxsn yEL3YJGW85l7fZ3EzU+Q/lc0MBWgD6AjjGve4unAocTNqwUGt0UHAzlQPQUAvH2O7iSHJZ 06PtBc8t0bIM1wookoVXEB7LvX4S9JFeWFi8f/4iBbNk1IwI4btU+o6kojAQBk/X5QmjPj ZseZ4HrkBktQiM0uTcJ2iboa7FnjdBhPmE0a/Tfzow8IP+grzNhnBEhOieyBJQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=AsTfW3u0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.04 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=AsTfW3u0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 57E8CD360 X-Spam-Score: -4.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7xzXBAxH49mr ugh. i left out a probably significant fact that means i'd have to rework the whole post which i can't do atm. in /this particular example/ the file will actually still be there after staging. i forgot there are other changes in this concrete example. i am trying to clean up a set of magit changes that has this kind of mingling, but not in the plain list. as part of doing so, i had the idea of getting this plain list out of the file entirely. merely because i edit the plain list and don't want to make the diff more complex by doing so. the plain list is not part of the diff, and i wanted to have it not re-enter the diff when i edit it. when refiling the plain list entry created the same kind of chaos i was trying to reduce, i thought to move it /within/ the file. chaos. so i moved it to near the beg. chaos. then at the end. chaos. so you can take the post as, not a specific example, but what causes mingling in org with diff? or something like that. On 11/12/22, Samuel Wales wrote: > i have a very old version of Magit, for reasons I won't get into. > Fancier diff settings might be differnet or not available. > > But something drives me crazy. Probably not too Org-related, but it > might be. I just want to know why, is all. > > I have a 24k line org file, and it's not that complex wrt levels. 2 > or 3 levels with odd stars only. various types of content. > > someplace in it, is an entry with a 234-item plain list. if i try to > move this entry, and make no other changes, diff goes insane. if i > try to refile this entry to a different org file, diff similarly goes > insane, with the - part. only that change. > > ok, what it does is, intersperse or mingle entries. so suppose i want > to stage this one tiny little change, namely moving one entry [the one > with the large plain list] to a different location in the same file. > even if i move it really distantly. > > i.e. i want to put the - and the + of the move to the staging area in > magit. unstaged changes should then not have this file in it at all > after the staging operations. > > then, basically, staged changes will have this move. > > as a user, i want diff to make this two hunks, a big - and a big +. > but diff mingles parts of another entry or entries with this list, so > that it is scattered all over the diff. to get the result i want > requires tons of intra-hunk stage operations. at best. > > so, what aspect of diff or org is triggering this kind of behavior? > what is it that diff needs to understand about org, or what minimality > etc. settings does it want to create a better diff? > > i know org has lots of similar lines [e.g. planning headers with > scheduled dates that are identical]. but still, this is a nontrivial > size org file, with no other changes that i made. diff's insanity > still occurs even if i move the entry distantly. > > i am of course aware of histogram, patience, etc. and that git diff > has a few experimental choices of options. also long ago i read diff > manual with its discussion of end of file beg of file and minimality > with --minimal and all that stuff. > > however, here, though, i am mostly interested in specifically what > diff's, or git diff's, or magit's, /deal/ is. in /this/ case. > > where does it get off doing that? everything else is the same, so why > is it keying on the wrong thing? > > does it think i made the changes as it presents them, or does it go > for some other goal like minimality or speed and not really care what > i did? is it because it e.g. ignores end or beg of file or so? or is > it getting confused by some line? > > i have of course heard of merge something or others. which presumably > tell diff about the structure of files or so. like, the fact that the > planning line always follows the header. or perhaps i am imagining > this kind of tool. > > now, whether i can mitigte it is interesting /after/ that. my > paleolithic magit version might not be capable, but still. > > -- > The Kafka Pandemic > > A blog about science, health, human rights, and misopathy: > https://thekafkapandemic.blogspot.com > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com