From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MOxANIM/fGMGJQEAbAwnHQ (envelope-from ) for ; Tue, 22 Nov 2022 04:18:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SB1NNIM/fGPY7gAAauVa8A (envelope-from ) for ; Tue, 22 Nov 2022 04:18:27 +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 3BFD13FF63 for ; Tue, 22 Nov 2022 04:18:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxJme-0000WM-Ls; Mon, 21 Nov 2022 22:17:16 -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 1oxJmd-0000Vy-7t for emacs-orgmode@gnu.org; Mon, 21 Nov 2022 22:17:15 -0500 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oxJmb-0003UG-0s for emacs-orgmode@gnu.org; Mon, 21 Nov 2022 22:17:15 -0500 Received: by mail-lf1-x132.google.com with SMTP id j16so21643797lfe.12 for ; Mon, 21 Nov 2022 19:17:12 -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=25/z22rxyouAtI999jduMa2BsRYMYcMYzgvcaXiSzY8=; b=BXJ3cxMeQvFwqQTHsW/eSLcPIFs5gfzAWKY7IAciuWl2ySYNOgRHi/SQ8vQQ+7rjEw dmUBRoNmc7oRSr5zmA/MSfnsq32EIprQ8Ez8ZibFanolH1BgTzw8mIoHLWcZ2tqCDxWQ h6b/oigQ+75Ke3byuPoe1xYhXfKVEygcA45Rkz2Lupvv3+/c5h4aFqAF2MCeiDyRW17w z3ZiKskkOx9kSpjJoYRG7TO4YjOx7r+eNkhFV4ay0H43sY6xiCKh7KAceNbXLt1c1cGm 98liZvLAnKM4DmqWsGxzt82oEBmDuQGiHYXc2guJzD/dFLufrTMgb/mzs6mULamf/+Kr W1Tw== 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=25/z22rxyouAtI999jduMa2BsRYMYcMYzgvcaXiSzY8=; b=bXoUb4BNmTo0lJUASb8KkxgivOqMhollyCaScEuLxAkNP+L3msNutFQkwGNpj1ba+x grqyUmGfgUvnQoK5lyKgNcihydjhQv/ZkmkHyO2ZWn5XyHOwKiGZ7dLUiKM1NJaa4k8j oQs9Pgxtm/rYTRs+i/OQe2pyJMZeishkCELoAgsn/fKRXaoGr6du8Yq9+dyDarSXoBll mI7o7dpVKzJhXH3JGjzbr0JogS/7bGT1VkFZvx/QaPPthg88zvxjAxTOwHL4ubMKMSHi eaMjBiYlAjRfoylHCWnFjmXiltfRmnZZHIYNvBf3p0PboZ0f90+IjVdb7XUQAfxWeVCW yL8A== X-Gm-Message-State: ANoB5pmBuG7yLIZMCtlz0QX1N7G9exhfhQXwuiMVdoKX2w5Ah0xJZr++ qzOHZ+zFjXWrPwa1wlF2ZhA3dcun5vjJiOB95AuIKX2usygO6Kne X-Google-Smtp-Source: AA0mqf4zLj2PCdEyql4UMGuSwJ6O1aDwWXfcW6IhwqUHIspQtvpSrlsyFXfcdpHm5e/XdVwhXDl6WaF6WGfOWl9NSZE= X-Received: by 2002:a19:4913:0:b0:4ab:faae:693b with SMTP id w19-20020a194913000000b004abfaae693bmr544180lfa.597.1669087029280; Mon, 21 Nov 2022 19:17:09 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6520:4e:b0:22e:6caf:6e93 with HTTP; Mon, 21 Nov 2022 19:17:08 -0800 (PST) In-Reply-To: References: From: Samuel Wales Date: Mon, 21 Nov 2022 20:17:08 -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::132; envelope-from=samologist@gmail.com; helo=mail-lf1-x132.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=1669087107; 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=25/z22rxyouAtI999jduMa2BsRYMYcMYzgvcaXiSzY8=; b=bh2txVMAbUzTjV047Sqk8k7HrnR0yyKaY9z/HPYJeDCNgZ40VPVCXt1YxfCvixOxzI1cUy Rm3H0C1lt9d2W524Nqc19tt6hVNFgdRuKLj2EQWGi0ZeDpvEB+4tm/sFIF0aIqzWS9P1l8 xoZ0rqzv9k+vBKAHwqDEQjpNEZkFK+p5utZh9J4P1aAQa2H95kAVpqsS8ws9Tz4UP815we Yb9KWHGyMB1OVeZjK4l7rBxly9Ad8cWMUqAeoJc9asg+1hYP5gQ811GmyHOOnMoMo2H7rg InI64/G9go2mSu6wnjT4NHuAtuuGJwsEOb3DSmGs7QWbAe2DmWyEnTHAGqW5zA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669087107; a=rsa-sha256; cv=none; b=K2ydCE7kQlaR+fcVNIs8ZzcxnEEIlQCMy1SiVQ5jYx4bSbagulSCJX4MEcLaP+588ko9hk Owqw8Dm9iTaxGZy7E001mGZAkyd/o5vZsGXO23S00q3TdevGeKjCFieo5KnVYbuwCG1u6W KywxnN9n5piA+ls925pwr3WrX4JDhdESBzVfSL1MAqmxu/bcwEUO4zI8KQIQdxGtp1+4qh 08FEsro1wz5ptth2442wbioDKlqZ8dfgfClsQO89y5SG+WiNor2uYg3eOQFH0VLaWrB6cw oJvs/fDVLY2PtoR3yUcp5y5Lr3d7yRnh7s0ntai3KxNGuZZotln70ZSZFRi7NQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=BXJ3cxMe; 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: -2.50 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=BXJ3cxMe; 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: 3BFD13FF63 X-Spam-Score: -2.50 X-Migadu-Scanner: scn1.migadu.com X-TUID: 6dNCBW7kltOk incidentally, if you want empty hunk headers, you can do this at least in my version of git: xfuncname = " " but idk why it works and i had had it commented out. On 11/21/22, Samuel Wales wrote: > p.s. hunk header munging does not unmingle [i.e. group changes by org > header in magit status buffer diffs] :(. but it is true that what i > want is some kind of preference given by magit to org entries as > demarcated by org headings. > > idk if what i want is in principle possible or not in standard diff or > git diff. that is, idk if they could be patched to accept an arg that > would allow you to specify that org entries should be preserved if > possible or something like that. > > great to know difftastic can in principle be coded to do what i want, > however. so maybe soetime you could tell git to use. > > org hunk headers are rather nice looking. on the other hand, it gets > the previous header, even if not the parent header. i think this is > why i had the impression that git was in principle incapable of org > hunk header text of the type i wanted. but hunk header text is not > something i use a lot. it's rather nice looking, but in some cases i > prefer empty hunk headers. > > 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 > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com