From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id SB+gNMDSpWR/KAAASxT56A (envelope-from ) for ; Wed, 05 Jul 2023 22:29:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UEiYM8DSpWR5HQAAG6o9tA (envelope-from ) for ; Wed, 05 Jul 2023 22:29:52 +0200 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 69F0D6746 for ; Wed, 5 Jul 2023 22:29:52 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH97X-0001LE-AP; Wed, 05 Jul 2023 16:29:03 -0400 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 1qH97V-0001Kn-Dt for emacs-orgmode@gnu.org; Wed, 05 Jul 2023 16:29:01 -0400 Received: from confino.investici.org ([93.190.126.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH97S-0002ja-AN for emacs-orgmode@gnu.org; Wed, 05 Jul 2023 16:29:01 -0400 Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4QxB864NJFz110c for ; Wed, 5 Jul 2023 20:28:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1688588934; bh=xCZedp8WzXn2eaA/g9mkLcVY2aXiK2pTVdoyj5LKkB8=; h=Date:To:From:Subject:From; b=rBDvDqAd2fpC36N+XolVof+ldurNFuwQH+VJ0d+Wree5wR73LuxNJuXvmiySPu5R3 pCD4D0gknEt/Exfgqjxo6wHIFBrdbJhgO7pZNzV4lG0xLE7RSMmDYYqGWWA4FRVMAC XWC30MD/7o2Dv61vS01CGHUWFqjvw9W3rQ0GMINU= Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: civeax@inventati.org) by localhost (Postfix) with ESMTPSA id 4QxB863pwqz110b for ; Wed, 5 Jul 2023 20:28:54 +0000 (UTC) Content-Type: multipart/alternative; boundary="------------HHNy0sDbUMcOo4zjjDrjMYEx" Message-ID: Date: Wed, 5 Jul 2023 21:28:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Content-Language: en-US To: emacs-orgmode@gnu.org From: Vladyslav Zapolskyi Subject: [BUG] org-indent-mode breaks indentation in source blocks Received-SPF: pass client-ip=93.190.126.19; envelope-from=civeax@inventati.org; helo=confino.investici.org 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, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688588992; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=xCZedp8WzXn2eaA/g9mkLcVY2aXiK2pTVdoyj5LKkB8=; b=pVFa8SSSKoHPOJfXyYI6YME/kgxZtYFd4ymyNi2F1MwH8r6xewwwcLNA+nT8s2r7ra1YkN QfqmFf008h7abfnz5AB6xM78DHD2jw4uJo54SiVmJxQLoT2BzQbBXuzqiquLVRnBu2ENAi JjTYxdYJBeub1z97lFaQmas1KvilTQP8nDufMeVc56/JfE6u8495QW2B1e0j3a1zyyw/sL eu4WHSBIQwz9BllLnvANiwc/dIacDYsJC65Z9ez+RUId40OZpQhbDj1WKpdhNTDBw3P2L8 haJsXjBLkctPFS9pwBZI+v331oF5CnxvI2jWojAoZZdWJkzLzjG4mHf1a8QmeQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=inventati.org header.s=stigmate header.b=rBDvDqAd; dmarc=pass (policy=reject) header.from=inventati.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1688588992; a=rsa-sha256; cv=none; b=H6Y+MStZtbM7zpQ3r77FxR75byPZiTa7SaD03Qq/VTyVAQ8muac9oLcyQnIefRfhcnWqoh xNKpsDZanZdfvxjOMCSCrtVinO9r66XoGCEPKTMpGo8jsrp03wlhYTOLk+0bBYTdzAK0BV QqWnNEiJlcsth1rriY7QAhjGQSZSzr054tr2QE+JqFjVMMYMV4bpSPivn3IZIspTXZAm52 03Wr48xbLG1YITO9M8mVeZ1ZXiY5O89brvhdI2npQuhGr8ihnUsmvSJoDS8klt7/l9opEC em5TvVG/qzIP9uXjE69ZPLJObd0o69gisbFaw+hYqx/9JM+hNcAJbneH9tX4dA== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.60 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=inventati.org header.s=stigmate header.b=rBDvDqAd; dmarc=pass (policy=reject) header.from=inventati.org; 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: 69F0D6746 X-Spam-Score: -6.60 X-TUID: vOyYbXFxGzey This is a multi-part message in MIME format. --------------HHNy0sDbUMcOo4zjjDrjMYEx Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit For example(written as it looks): (abababa abab :abab abab "abab") #+end_src * aba #+begin_src emacs-lisp (abababa abab :abab abab "abab") #+end_src * ababa #+begin_src emacs-lisp (abababa abab :abab abab "abab") #+end_src * abababa #+begin_src emacs-lisp (abababa abab :abab abab "abab") #+end_src * ababababa #+begin_src emacs-lisp (abababa abab :abab abab "abab") #+end_src When copying and pasting the indent is right for every level of indent, not only first and 4th(i am guessing every 4th?) Searching through the mailing lists, I found this: https://lists.gnu.org/archive/html/emacs-orgmode/2021-10/msg00729.html I am really "not an expert", but I think that this difference between soft and hard indentation is what's making it wrong. Thanks for any help! Emacs : GNU Emacs 29.0.92 (build 5, x86_64-pc-linux-gnu, GTK+ Version 2.24.33, cairo version 1.16.0) of 2023-07-02 Package: Org mode version 9.6.6 (release_9.6.6 @ /usr/local/share/emacs/29.0.92/lisp/org/) current state: ============== (setq org-link-elisp-confirm-function 'yes-or-no-p org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-persist-after-read-hook '(org-element--cache-persist-after-read) org-export-before-parsing-hook '(org-attach-expand-links) org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-archive-hook '(org-attach-archive-delete-maybe) org-edit-src-content-indentation 0 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-window-after-visibility-change org-cycle-display-inline-images) org-persist-before-read-hook '(org-element--cache-persist-before-read) org-mode-hook '(toc-org-enable (lambda nil (org-bullets-mode 1)) org-indent-mode #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-fold-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-confirm-shell-link-function 'yes-or-no-p outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-startup-indented t org-agenda-before-write-hook '(org-agenda-add-entry-text) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal org-persist-before-write-hook '(org-element--cache-persist-before-write) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-link-shell-confirm-function 'yes-or-no-p org-babel-pre-tangle-hook '(save-buffer) org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-metadown-hook '(org-babel-pop-to-session-maybe) org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("id" :follow org-id-open) ("eww" :follow org-eww-open :store org-eww-store-link) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export) ("info" :follow org-info-open :export org-info-export :store org-info-store-link :insert-description org-info-description-as-command) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("doi" :follow org-link-doi-open :export org-link-doi-export) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow #[514 "\301\300\302Q\"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("mailto" :follow #[514 "\301\300\302Q\"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("https" :follow #[514 "\301\300\302Q\"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("http" :follow #[514 "\301\300\302Q\"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("ftp" :follow #[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-link--open-elisp)) org-metaup-hook '(org-babel-load-in-session-maybe) ) --------------HHNy0sDbUMcOo4zjjDrjMYEx Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
For example(written as it looks):
(abababa abab :abab abab
	"abab")
#+end_src
* aba
  #+begin_src emacs-lisp
  (abababa abab :abab abab
         "abab")
  #+end_src
  * ababa
    #+begin_src emacs-lisp
    (abababa abab :abab abab
         "abab")
    #+end_src
    * abababa
      #+begin_src emacs-lisp
      (abababa abab :abab abab
         "abab")
      #+end_src
      * ababababa
        #+begin_src emacs-lisp
        (abababa abab :abab abab
	        "abab")
        #+end_src

When copying and pasting the indent is right for every level of indent,
not only first and 4th(i am guessing every 4th?)

Searching through the mailing lists, I found this:
https://lists.gnu.org/archive/html/emacs-orgmode/2021-10/msg00729.html

I am really "not an expert", but I think that this difference between
soft and hard indentation is what's making it wrong.

Thanks for any help!

Emacs  : GNU Emacs 29.0.92 (build 5, x86_64-pc-linux-gnu, GTK+ Version 2.24.33, cairo version 1.16.0)
 of 2023-07-02
Package: Org mode version 9.6.6 (release_9.6.6 @ /usr/local/share/emacs/29.0.92/lisp/org/)

current state:
==============
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"]
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-edit-src-content-indentation 0
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
		 org-cycle-optimize-window-after-visibility-change
		 org-cycle-display-inline-images)
 org-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-mode-hook '(toc-org-enable (lambda nil (org-bullets-mode 1)) org-indent-mode
		#[0 "\300\301\302\303\304$\207"
		  [add-hook change-major-mode-hook org-fold-show-all append local] 5]
		#[0 "\300\301\302\303\304$\207"
		  [add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
		org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-confirm-shell-link-function 'yes-or-no-p
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-startup-indented t
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate)
 org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal
 org-persist-before-write-hook '(org-element--cache-persist-before-write)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-pre-tangle-hook '(save-buffer)
 org-agenda-loop-over-headlines-in-active-region nil
 org-occur-hook '(org-first-headline-recenter)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link)
		      ("id" :follow org-id-open)
		      ("eww" :follow org-eww-open :store org-eww-store-link)
		      ("rmail" :follow org-rmail-open :store org-rmail-store-link)
		      ("mhe" :follow org-mhe-open :store org-mhe-store-link)
		      ("irc" :follow org-irc-visit :store org-irc-store-link :export
			org-irc-export)
		      ("info" :follow org-info-open :export org-info-export :store
			org-info-store-link :insert-description org-info-description-as-command)
		      ("gnus" :follow org-gnus-open :store org-gnus-store-link)
		      ("docview" :follow org-docview-open :export org-docview-export :store
			org-docview-store-link)
		      ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
		      ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete
			org-bbdb-complete-link :store org-bbdb-store-link)
		      ("w3m" :store org-w3m-store-link)
		      ("doi" :follow org-link-doi-open :export org-link-doi-export) ("file+sys")
		      ("file+emacs") ("shell" :follow org-link--open-shell)
		      ("news" :follow
			#[514 "\301\300\302Q\"\207" ["news" browse-url ":"] 6
			 "\n\n(fn URL ARG)"]
			)
		      ("mailto" :follow
			#[514 "\301\300\302Q\"\207" ["mailto" browse-url ":"] 6
			 "\n\n(fn URL ARG)"]
			)
		      ("https" :follow
			#[514 "\301\300\302Q\"\207" ["https" browse-url ":"] 6
			 "\n\n(fn URL ARG)"]
			)
		      ("http" :follow
			#[514 "\301\300\302Q\"\207" ["http" browse-url ":"] 6
			 "\n\n(fn URL ARG)"]
			)
		      ("ftp" :follow
			#[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"] 6
			 "\n\n(fn URL ARG)"]
			)
		      ("help" :follow org-link--open-help :store org-link--store-help)
		      ("file" :complete org-link-complete-file)
		      ("elisp" :follow org-link--open-elisp))
 org-metaup-hook '(org-babel-load-in-session-maybe)
 )
--------------HHNy0sDbUMcOo4zjjDrjMYEx--