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 GMlcJm2BcGN5OQAAbAwnHQ (envelope-from ) for ; Sun, 13 Nov 2022 06:32:29 +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 OLdyJW2BcGMRXAEAG6o9tA (envelope-from ) for ; Sun, 13 Nov 2022 06:32:29 +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 1BB6BCCA1 for ; Sun, 13 Nov 2022 06:32:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ou5al-0000EP-RX; Sun, 13 Nov 2022 00:31:40 -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 1ou5aj-0000Dz-Th for emacs-orgmode@gnu.org; Sun, 13 Nov 2022 00:31:38 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ou5ag-0000pC-Fb for emacs-orgmode@gnu.org; Sun, 13 Nov 2022 00:31:37 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id BC3F4240101 for ; Sun, 13 Nov 2022 06:31:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668317491; bh=3U2QzTchhiYV69DVN+AM8MbxFUr/we172X9E5U2AAE0=; h=From:To:Cc:Subject:Date:From; b=V3xzDPfixQ75eEDBJn95nue2qJy/UEOOCZ6wd6dUiHSFvpjP7U5y/dQnsWJlIPBtH gQE5VB9VQshaTWXjLb/D4mWf6ZY8RgPRm9XOdgIUswBuUhpjO7OaI5s2kHSUplk4ga dZ3/+kJFztolAI20ZwNkW+zbrebpRl70D1k+6zkH52/SgmQ7KOm910ast/tvCxLI7J DIkf7OEX9FAi1VLQ6EZySnUXBfyS+dri0RkP/d3zmzv1ChLuS7xRZ0pIbGdUC6zo87 jG8rfso9l7SUpS0zB3Qp+wNC/Di/bn4Dj/xVk34W+dyeVaAE70IGPFXvEyLTDduyWp 4017r7SBUzmrg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N91Jc0Gwyz9rxF; Sun, 13 Nov 2022 06:31:27 +0100 (CET) From: Ihor Radchenko To: Samuel Wales Cc: emacs-orgmode@gnu.org Subject: Re: [OT] org and diff In-Reply-To: References: Date: Sun, 13 Nov 2022 05:32:09 +0000 Message-ID: <87zgcv773a.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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=1668317549; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=U9vt3gjGDdnRDO1riRkWR0G1fCJyi+Z/U+Osgg/a9+0=; b=X52MiEBZXB+pJ+dZ7GwjtaR6bUXLXQ2LOTYQpfWwmqSpn8mfSrKx8NFlX5nKJvpvzK4LSX FNBjlfdL3ZTNPvCdKk6n0hrMmw7gcfU3/YfXqy4eB0V+YMlhcqoHCflwmsxYM7bwKrBzY7 4JStZqWUSSnGxuHV0Jxj0SkryFscmG3H+ykeLXXqAkDVvDQl8qh3mdAqtesa6IRt0fATjH R7qPqp5zpp39fJ3XTsoq+G2T9uEO6aCpSzY6b9rIX10sMhyl0XWCSiTt9vCy0AAXHV4SvG ZlqrMHNXeYaIat+AlanMe7Db1OrDbc2V4oTmjl7i4Ru/WkRi7V6IqZadfeQJyA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668317549; a=rsa-sha256; cv=none; b=tmwyKINC00ZScLl9NiKKwasDjyhgDzNklkN7xyQq5GD4Glbpl7dqV5acADlLtZ7R+1tYIF IKssLI5v9uV+KBx1o8IlUkoVDHasqo4ZsKppWHtV7D3NZKyP4v8GDK9ubIEPhA5TrZmuW9 +SFct3Iyok9BWFA2a3QFeA8Fte+Kquxib100uheyLpZw9laMX5MFes8ccBBhckLGwrY0oe QUKtXtNVugEZ3ki58/du+deGIDHFhBOsiv6olgs2Y+GA4Wc3tdp/3pyNvk7aoxFFBKNf0W 30MiPa3d80oBQPqxzES05aMBCwmzOy6J1cAXBfEufJx4OFUasbej65sCGQeV0A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=V3xzDPfi; dmarc=pass (policy=none) header.from=posteo.net; 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.04 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=V3xzDPfi; dmarc=pass (policy=none) header.from=posteo.net; 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: 1BB6BCCA1 X-Spam-Score: -2.04 X-Migadu-Scanner: scn1.migadu.com X-TUID: VayrY+AQEKig Samuel Wales writes: > 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? Most likely, the default git's grouping of chunks is not good enough for your case. I have the following in my ~/.gitconfig: [diff "org"] xfuncname = "^(\\*+ +.*)$" [core] attributesfile = /home/yantar92/.gitattributes And ~/.gitattributes: *.org diff=org This will help grouping changes under the same heading. Source: https://protesilaos.com/codelog/2021-01-26-git-diff-hunk-elisp-org/ -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at