From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cFZiIvU8fGOoWQEAbAwnHQ (envelope-from ) for ; Tue, 22 Nov 2022 04:07:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +C1sIvU8fGMo7wAAauVa8A (envelope-from ) for ; Tue, 22 Nov 2022 04:07:33 +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 35F2747C97 for ; Tue, 22 Nov 2022 04:07:32 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxJcG-000666-Qd; Mon, 21 Nov 2022 22:06:32 -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 1oxJcF-00065k-Cb for emacs-orgmode@gnu.org; Mon, 21 Nov 2022 22:06:31 -0500 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oxJcC-0000UQ-CN for emacs-orgmode@gnu.org; Mon, 21 Nov 2022 22:06:30 -0500 Received: by mail-lj1-x22d.google.com with SMTP id r8so5924836ljn.8 for ; Mon, 21 Nov 2022 19:06:28 -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=k+U72xCUP/0n1etXjyEMvPyOIJa2RIBIY18Nr3+ENSU=; b=UtqxYo594K+H0hS0x7eVRemGjmvNBZrTdO1FBo6Dzoc5avmltUhbl9gNvXkE9kjMlZ QX5zqkkHWCCaAzeqR9LG8ylUF5R9sbALRJubBwUyhTagUpE0g/n6d2o9ybWDov/32oIt cVyesIymt0dFUUtJb367nZVcDz/pk1mCjLW+Vcc5H7/merhDXSZ815JGit44nDwAc+zy 6+jTI/P86m2GA6Ye6r1xpSLvIxjQEWK2br0ZtSyuZiJ0o5sZa4PP5x6VWbOJsQQPRIXx aVW5XFX4XfPGkcFP/kbMrPljrZ4AfDTeZ76G2X02R1L8b3rNWUfwfS3t6IpX3FCCd0fW 95Ng== 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=k+U72xCUP/0n1etXjyEMvPyOIJa2RIBIY18Nr3+ENSU=; b=Abjd+XqS2yt+UTkWovK5BHZ61ZFGG2rg0CgCseOe3ImNzTZucKO3Rfc3txKAF8CvdU nRRmvUdQynrd1UfoZ+W55hskJlc7/9/T5OYHjNWv5+jdIZ/ut7wKHALVZjmqm/tPY13V SD32LXhJGtPZubrDtOgaS7Ul+ao24/8yoU050yZo8qhk7J9QzFtNukBpkfMnZfSxMZa/ qxw7Ix1gCEUQS1FO+90ijRFYy/bcCbMSFXERYFiUsXg3W5ngnI81eEUEoet327pb+Pa5 UsanR2Gy3RJ5YmJb0z4t5BGul5uAGhtGd9EXz+DK8rcNsfPWSnYwIRNsvCSnnbKs2tUV NLxA== X-Gm-Message-State: ANoB5pmLkFSYUHgzvrh8O8M51xtI6aBy/RilExZELNqblp3MBK1FrpK9 hHwUUuKjbpTVBsK2iNDR4aqKGg15xvyI6aTUjsdZ86S9O2lXLROr X-Google-Smtp-Source: AA0mqf5jaEq+HybK1AJL3bN0OpS3N0ADkKDYYMOU2YIm4uezUfOOsVD8asUyzEOz9XgqL0Je+2IRVp4/pp/6scw+kiw= X-Received: by 2002:a2e:b0cd:0:b0:277:4e6:d43f with SMTP id g13-20020a2eb0cd000000b0027704e6d43fmr6342814ljl.503.1669086385145; Mon, 21 Nov 2022 19:06:25 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6520:4e:b0:22e:6caf:6e93 with HTTP; Mon, 21 Nov 2022 19:06:23 -0800 (PST) In-Reply-To: References: From: Samuel Wales Date: Mon, 21 Nov 2022 20:06:23 -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::22d; envelope-from=samologist@gmail.com; helo=mail-lj1-x22d.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=1669086452; 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=k+U72xCUP/0n1etXjyEMvPyOIJa2RIBIY18Nr3+ENSU=; b=SI7YQbHG1wvmN7Z7rK2/8HjN+g70mqTvO4sji8V4L/ope8TukLD6i4guDgUjNtMXUDiV/f k4INVbet/r6sQQ+pqQpNx6teVnzoi0TwzS0MhLZcwUpk3WUsGjecLl1HtYgiD213S+4HsW dW8QutcZpc3APNzOYxEeovh/XAvg7+KtvtUQHr9IcsXqigfe2vEEpIgZm0k3e2TghTmP9b RBvzHDbQHJwMfCNR/Pw5SqRcd80uuK5/d25mi0ErF/0LdFLB7uAt20p0jWPAudm7QTjGLX bLDVz0vk/1Q/SMmKUzCDrAMNwy0tdX68QFQ/e2KXJxuf8bKXSjnTB35+SO8NZQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669086452; a=rsa-sha256; cv=none; b=p64RDnUkOC5FBV2Fw4A1OSpyhMcoINBPgD2d29glU6+zF33kGsK2Ygc0B4YgsqeccAWmMk 4m0xFCmf+dZXW06NpPkdGB2MUDqk4aHvBHajuJu97P2Ul6qzJuSJo5DhjNIJcoSq2mHS9u wnmIN7zV75ExSCNZv1Pq61BJ+8SOOy0Qj0ul73l67bK30HirFz5IEqrp9BzkCmrKJ7yRtF +ee7aC5e8KaiVi3pPKkMHfDnRkOyc7yH0c/ZAB5QGufzDW6nTj+nQE09ENAwT7fNrgH2Mn ZtbaTK9L4TUijuYuZ/SnABglBacYwZSLw5kDKfQNEwn3PmOzZldYtei8YGi+4A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=UtqxYo59; 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: -3.31 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=UtqxYo59; 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: 35F2747C97 X-Spam-Score: -3.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: iNnQVyEZfWRy 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