From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 2C3oIP+tCWYvDQAA62LTzQ:P1 (envelope-from ) for ; Sun, 31 Mar 2024 20:39:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 2C3oIP+tCWYvDQAA62LTzQ (envelope-from ) for ; Sun, 31 Mar 2024 20:39:59 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=att.net header.s=s1024 header.b=ekcHjvz7; dmarc=none; 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=1711910399; a=rsa-sha256; cv=none; b=JqDEYvdtkaqx874mWYyGwTiv+K6EfeBXEMf4WFw/OopIu8gKrNZB3DetOMRgMSku06hnRg vSuFZ1E4ynK3x7nDNxSfPB5uQCXWRW77cn+C8nJBuYTYyeKGcfvvUtEpJ4ftv2tv49gZNK JoEOUJMUxwCsWLQjCQIceG6NLcEg2jr1UOh9mXE5985KqSXVsNQXoYOB9WsnWMlqMeb090 AWeX9lAZ26st+xUow8PDvwZ5PxBgALI0g/ZfiaaxsrNsFy2p3lvz4dNXJiQBJSGenE2g/x V4qmu6Z6NWGSkSWHZK3vysCH7ICrFyY4McHvPvd2y4SRX7WYTi/2qBYhd9EQJA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=att.net header.s=s1024 header.b=ekcHjvz7; dmarc=none; 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711910399; 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:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ICsCv6a7Ed5CsEpRHB+eRAKLItuHE3Or+JS/QuYZB7Q=; b=kpFQt2WxCdkHKeRdZh855iOZKsctfOGOdCmsaIISF6yE3FdQsj/owSi800m15BxERVIA5W +rgB7A70dx2A78/eguoslWtDA4EYtBKQZT3k5fZ4mUQja441qFUZZ51+aAzE0jxdGGohKI p+PwqesWQUOtuEO1649vsCEgrTlg2Fq+sgqT87mZYuCaIzK+TSUDNLuiCmy2KYQui7L7lb uN4SVd0omVJMj9bHAbB9f/zR3q9A6ZoOv0+YD2voX6CONIYRIXfNgSHxQHGnTImOVfoETX Wux+LRh6lxJZ1rlMyZF/g7Ia3QDyYxcNzNH80BFGrm1UaClyY/FU/QPnGI9jkA== 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 B3CDC1A579 for ; Sun, 31 Mar 2024 20:39:58 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rr05L-00021i-5h; Sun, 31 Mar 2024 14:39:15 -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 1rr05H-00021T-Ql for emacs-orgmode@gnu.org; Sun, 31 Mar 2024 14:39:12 -0400 Received: from sonic304-24.consmr.mail.ne1.yahoo.com ([66.163.191.150]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rr05F-0008Ud-5R for emacs-orgmode@gnu.org; Sun, 31 Mar 2024 14:39:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=att.net; s=s1024; t=1711910344; bh=ICsCv6a7Ed5CsEpRHB+eRAKLItuHE3Or+JS/QuYZB7Q=; h=From:Date:Subject:To:References:From:Subject:Reply-To; b=ekcHjvz760tBoFDOr/f9wYOepIYscqznUfa+dbSfYEdGSvyKkb3UHUiz5SidHMKDDYU5r7ZypHR2GBoYdTqd4yedmAwiWOUplnoT/d5opMHFA5DQ8sG3ZM4RmesTVgDGl9smaZ/ZBpf+1VsV8CQ2FLsTDf1aCN4BI2pzcirdwAc= X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1711910344; bh=JLrVZXl6NTlm1Kint9VpnKu0nvpuqLlmvcAaT0hX+xU=; h=X-Sonic-MF:From:Date:Subject:To:From:Subject; b=Y02P2BT0Qnhqhs7R2yr8dxr8vfpMr4IcKcDVYvA+x/+YUbtfY7BufwqYOfZavvVCE6qP1Fyf1JfwKzowwRfHwbc/5O9BQ9iMKkFmYIiB2YMTveWV0evnbHbK4G4fBmQ3EquAy7Ybed8D4AQspQ44LcuM21X0XmqDi4Gcuoczc2Chg7XG3h7pGxMY1Iqb+vl7l+tLN/fzQzyZVlYtypN72qyQZB990H7f8anDjokLK/Q2yORVFHUqpht0fVMbT/48zZnWIdmVk9WIZz+KwGfurN8EB2Y0vUfFj6oHZW4kYVOEmzr+1vU8ku80tb7muNSVVySoVwGhJQe9W4qxOGV2Kw== X-YMail-OSG: 12zX46cVM1luzwgRgWNeNTLGfSgeSNvssN.nFEKSfhF4wKX_AeRnwzvMSMYBIHu sRr.QTwtic7XCk0ooQ.jBn.6oe3j1PXyOttv.TnTBItscmmr5S5uP3ThHGoMlpcbaEDXqfvxk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vkBrBSm5oJIx55.HW4K1FWUw- X-Sonic-MF: X-Sonic-ID: 09f84550-3cb7-4635-aa64-95df47d5f3c9 Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ne1.yahoo.com with HTTP; Sun, 31 Mar 2024 18:39:04 +0000 Received: by hermes--production-ir2-7bc88bfc75-dw7mr (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 22e3c67d25cb3ab9a7dc0f4c95421ecd; Sun, 31 Mar 2024 18:39:00 +0000 (UTC) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4155f354439so5871015e9.2 for ; Sun, 31 Mar 2024 11:39:00 -0700 (PDT) X-Gm-Message-State: AOJu0YxHOJTyDa5ZMo+hfELdApm2+1CjPj4toS0kxY/xA52L4OFhz/CC c7s/wz2ttjdtV7+yJbQ7xt7cRmD9UPG6G1cJx1Rw0ULw+oK0VM3E+sgNKAbABjEML7Qoy+PKrME /GaEEyaG86TZRvyNNaiXMmrN/GFI= X-Google-Smtp-Source: AGHT+IFmOjFbdkej3V6xe05MXCVy9RGvR3cwIb5RaWMWlYrgejzuY/O32VybC2sQyYOYSAyQ0yyalFg/L2ayoCXzifM= X-Received: by 2002:a05:600c:3583:b0:414:8948:5f81 with SMTP id p3-20020a05600c358300b0041489485f81mr7774380wmq.8.1711910339107; Sun, 31 Mar 2024 11:38:59 -0700 (PDT) MIME-Version: 1.0 From: Jeff Trull Date: Sun, 31 Mar 2024 11:38:47 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: [BUG] org-export-table-row-number off by one when special row present [9.6.23 ( @ /home/jet/.config/emacs/elpa/org-9.6.23/)] To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000a66e150614f92fd9" References: X-Mailer: WebService/1.1.22205 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: none client-ip=66.163.191.150; envelope-from=edaskel@att.net; helo=sonic304-24.consmr.mail.ne1.yahoo.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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 X-Spam-Score: -8.82 X-Migadu-Queue-Id: B3CDC1A579 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -8.82 X-TUID: VeE4dX/Cbe8M --000000000000a66e150614f92fd9 Content-Type: text/plain; charset="UTF-8" Consider this table: | Shape | Sides | |----------+-------| | Triangle | 3 | | Pentagon | 5 | |----------+-------| | Average | 4 | #+TBLFM: @4$2=vmean(@2..@3) org-export-table-row-number correctly returns 3 for the cell containing '4' (and the target of the formula) Now add a column alignment row: | Shape | Sides | | | | |----------+-------| | Triangle | 3 | | Pentagon | 5 | |----------+-------| | Average | 4 | #+TBLFM: @5$2=vmean(@3..@4) org-export-table-row-number still returns 3 for the same cell, despite the extra row. I think this is inconsistent with the documentation of the function, which implies that only separator lines are considered when determining the count. Also note that from a user perspective, special rows (but not separators) are part of the row count. I did some initial investigation and determined that org-element-map is used to count the row numbers, and special rows are ignored in that function. I think this is the source of the issue. Emacs : GNU Emacs 29.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2024-03-26 Package: Org mode version 9.6.23 ( @ /home/jet/.config/emacs/elpa/org-9.6.23/) current state: ============== (setq org-link-elisp-confirm-function 'yes-or-no-p org-ditaa-jar-path "/usr/share/ditaa/ditaa.jar" 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-re-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js@3.6.0" org-export-before-parsing-hook '(org-attach-expand-links org-re-reveal-prepare-tts) 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-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] 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-latex-listings-options '(("basicstyle" "\\footnotesize\\ttfamily") ("showstringspaces" "false") ("breaklines" "true")) org-persist-before-read-hook '(org-element--cache-persist-before-read) org-mode-hook '(#[0 "\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2] org-superstar-mode org-tempo-setup (lambda nil (electric-indent-local-mode -1)) #[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-eldoc-load) org-babel-load-languages '((emacs-lisp . t) (dot . t) (ditaa . t) (shell . t)) org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-latex-format-headline-function 'org-latex-format-headline-default-function org-confirm-shell-link-function 'yes-or-no-p org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-latex-classes '(("beamer" "\\documentclass[11pt,aspectratio=169]{beamer}\n \\usenavigationsymbolstemplate{} % no navigation bar\n \\beamertemplateballitem % items have little balls" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-latex-packages-alist '(("" "moresize") ("" "fancyvrb") ("" "inconsolata") ("" "tikz") ("" "color") ("" "listings")) 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-latex-src-block-backend t org-ditaa-eps-jar-path "/home/jet/.config/emacs/elpa/contrib/scripts/DitaaEps.jar" org-structure-template-alist '(("n" . "notes") ("a" . "export ascii") ("c" . "center") ("C" . "comment") ("e" . "example") ("E" . "export") ("h" . "export html") ("l" . "export latex") ("q" . "quote") ("s" . "src") ("v" . "verse")) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-export-backends '(ascii html icalendar latex md confluence re-reveal) org-confirm-babel-evaluate nil org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal org-re-reveal-title-slide "

%t

%a

%d

" org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function 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) ("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) ("id" :follow org-id-open) ("subed" :store org-subed-store-link :follow org-subed-open) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow #[514 "\301\300\302 Q \"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("mailto" :follow #[514 "\301\300\302 Q \"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("https" :follow #[514 "\301\300\302 Q \"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("http" :follow #[514 "\301\300\302 Q \"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("ftp" :follow #[514 "\301\300\302 Q \"\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-html-format-headline-function 'org-html-format-headline-default-function org-metaup-hook '(org-babel-load-in-session-maybe) org-tab-before-tab-emulation-hook '(org-tempo-complete-tag) ) --000000000000a66e150614f92fd9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Consider this table:

| Shape =C2=A0 =C2=A0| Sides |=
|----------+-------|
| Triangle | =C2=A0 =C2=A0 3 |
| Pentagon | = =C2=A0 =C2=A0 5 |
|----------+-------|
| Average =C2=A0| =C2=A0 =C2= =A0 4 |
#+TBLFM: @4$2=3Dvmean(@2..@3)

org-export-table-row-number= correctly returns 3 for the cell containing '4' (and the target of= the formula)

Now add a column alignment row:

| Shape =C2=A0 = =C2=A0| Sides |
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| =C2=A0<c> = =C2=A0|
|----------+-------|
| Triangle | =C2=A0 3 =C2=A0 |
| Pent= agon | =C2=A0 5 =C2=A0 |
|----------+-------|
| Average =C2=A0| =C2= =A0 4 =C2=A0 |
#+TBLFM: @5$2=3Dvmean(@3..@4)

org-export-table-row= -number still returns 3 for the same cell, despite
the extra row. I thin= k this is inconsistent with the documentation of
the function, which imp= lies that only separator lines are considered
when determining the count= . Also note that from a user perspective,
special rows (but not separato= rs) are part of the row count.

I did some initial investigation and = determined that org-element-map is
used to count the row numbers, and sp= ecial rows are ignored in that function.
I think this is the source of t= he issue.



Emacs =C2=A0: GNU Emacs 29.3 (build 2, x86_64-pc-l= inux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0)
=C2=A0of 2024-03-2= 6
Package: Org mode version 9.6.23 ( @ /home/jet/.config/emacs/elpa/org-= 9.6.23/)

current state:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D
(setq
=C2=A0org-link-elisp-confirm-function 'yes-or-no-p
= =C2=A0org-ditaa-jar-path "/usr/share/ditaa/ditaa.jar"
=C2=A0or= g-bibtex-headline-format-function #[257 "\300 \236A\207" [:title]= 3 "\n\n(fn ENTRY)"]
=C2=A0org-persist-after-read-hook '(o= rg-element--cache-persist-after-read)
=C2=A0org-re-reveal-root "https://cdn.jsdelivr.= net/npm/reveal.js@3.6.0"
=C2=A0org-export-before-parsing-hook &= #39;(org-attach-expand-links org-re-reveal-prepare-tts)
=C2=A0org-cycle-= tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-ar= g-expand)
=C2=A0org-archive-hook '(org-attach-archive-delete-maybe)<= br>=C2=A0org-ascii-format-drawer-function #[771 " \207" [] 4 &quo= t;\n\n(fn NAME CONTENTS WIDTH)"]
=C2=A0org-cycle-hook '(org-cyc= le-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-win= dow-after-visibility-change
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 org-cycle-display-inline-images)
=C2=A0org-latex-li= stings-options '(("basicstyle" "\\footnotesize\\ttfamily= ") ("showstringspaces" "false") ("breaklines&= quot; "true"))
=C2=A0org-persist-before-read-hook '(org-el= ement--cache-persist-before-read)
=C2=A0org-mode-hook '(#[0 "\3= 01\211 \207" [imenu-create-index-function org-imenu-get-tree] 2] org-s= uperstar-mode org-tempo-setup
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(lambda nil (electric-indent-local-mode -1))
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#[0 "\300\301\3= 02\303\304$\207" [add-hook change-major-mode-hook org-fold-show-all ap= pend local] 5]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0#[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=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0org-babel= -hide-all-hashes org-eldoc-load)
=C2=A0org-babel-load-languages '((e= macs-lisp . t) (dot . t) (ditaa . t) (shell . t))
=C2=A0org-latex-format= -drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"= ;]
=C2=A0org-latex-format-headline-function 'org-latex-format-headli= ne-default-function
=C2=A0org-confirm-shell-link-function 'yes-or-no= -p
=C2=A0org-html-format-drawer-function #[514 "\207" [] 3 &qu= ot;\n\n(fn NAME CONTENTS)"]
=C2=A0outline-isearch-open-invisible-fu= nction 'outline-isearch-open-invisible
=C2=A0org-latex-classes '= (("beamer"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 "\\documentclass[11pt,aspectratio=3D169]{b= eamer}\n =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\\us= enavigationsymbolstemplate{} % no navigation bar\n =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\\beamertemplateballitem =C2=A0 =C2= =A0 =C2=A0 =C2=A0 % items have little balls"
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ("\\section{%s= }" . "\\section*{%s}") ("\\subsection{%s}" . "= ;\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsub= section*{%s}"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0("article" "\\documentclass[11pt]= {article}" ("\\section{%s}" . "\\section*{%s}") (&= quot;\\subsection{%s}" . "\\subsection*{%s}")
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ("\= \subsubsection{%s}" . "\\subsubsection*{%s}") ("\\parag= raph{%s}" . "\\paragraph*{%s}")
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ("\\subparagraph{= %s}" . "\\subparagraph*{%s}"))
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("report" &qu= ot;\\documentclass[11pt]{report}" ("\\part{%s}" . "\\pa= rt*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 ("\\section{%s}" . "\\section*{%s}") ("\\subse= ction{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}= " . "\\subsubsection*{%s}"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("book" "\\d= ocumentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}&= quot;) ("\\chapter{%s}" . "\\chapter*{%s}")
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (&quo= t;\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}= " . "\\subsection*{%s}") ("\\subsubsection{%s}" . = "\\subsubsection*{%s}"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0)
=C2=A0org-agenda-before-write= -hook '(org-agenda-add-entry-text)
=C2=A0org-latex-packages-alist &#= 39;(("" "moresize") ("" "fancyvrb")= ("" "inconsolata") ("" "tikz") (&q= uot;" "color") ("" "listings"))
=C2= =A0org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode= -configure-edit-buffer)
=C2=A0org-confirm-elisp-link-function 'yes-o= r-no-p
=C2=A0org-latex-src-block-backend t
=C2=A0org-ditaa-eps-jar-pa= th "/home/jet/.config/emacs/elpa/contrib/scripts/DitaaEps.jar"=C2=A0org-structure-template-alist '(("n" . "notes"= ;) ("a" . "export ascii") ("c" . "center= ") ("C" . "comment") ("e" . "exampl= e") ("E" . "export")
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 ("h" . "export html") ("l" . &q= uot;export latex") ("q" . "quote") ("s" = . "src") ("v" . "verse"))
=C2=A0org-speed-= command-hook '(org-speed-command-activate org-babel-speed-command-activ= ate)
=C2=A0org-html-format-inlinetask-function 'org-html-format-inli= netask-default-function
=C2=A0org-ascii-format-inlinetask-function '= org-ascii-format-inlinetask-default
=C2=A0org-export-backends '(asci= i html icalendar latex md confluence re-reveal)
=C2=A0org-confirm-babel-= evaluate nil
=C2=A0org-fold-core-isearch-open-function 'org-fold-cor= e--isearch-reveal
=C2=A0org-re-reveal-title-slide "<h2>%t<= /h2><h2>%a</h2><h2>%d</h2>"
=C2=A0org-la= tex-format-inlinetask-function 'org-latex-format-inlinetask-default-fun= ction
=C2=A0org-persist-before-write-hook '(org-element--cache-persi= st-before-write)
=C2=A0org-tab-first-hook '(org-babel-hide-result-to= ggle-maybe org-babel-header-arg-expand)
=C2=A0org-link-shell-confirm-fun= ction 'yes-or-no-p
=C2=A0org-babel-pre-tangle-hook '(save-buffer= )
=C2=A0org-agenda-loop-over-headlines-in-active-region nil
=C2=A0org= -occur-hook '(org-first-headline-recenter)
=C2=A0org-metadown-hook &= #39;(org-babel-pop-to-session-maybe)
=C2=A0org-link-parameters '((&q= uot;attachment" :follow org-attach-follow :complete org-attach-complet= e-link) ("eww" :follow org-eww-open :store org-eww-store-link)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0("rmail" :follow org-rmail-open :store org-rmail-store-= link) ("mhe" :follow org-mhe-open :store org-mhe-store-link)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0("irc" :follow org-irc-visit :store org-irc-store-link = :export org-irc-export)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("info" :follow org-info-open = :export org-info-export :store org-info-store-link :insert-description
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 org-info-description-as-command)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("gnus" :f= ollow org-gnus-open :store org-gnus-store-link)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("docview&q= uot; :follow org-docview-open :export org-docview-export :store org-docview= -store-link)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0("bibtex" :follow org-bibtex-open :store = org-bibtex-store-link)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("bbdb" :follow org-bbdb-open := export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-sto= re-link)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0("w3m" :store org-w3m-store-link) ("doi&= quot; :follow org-link-doi-open :export org-link-doi-export) ("id"= ; :follow org-id-open)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("subed" :store org-subed-store= -link :follow org-subed-open) ("file+sys") ("file+emacs"= ;) ("shell" :follow org-link--open-shell)
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("news&= quot; :follow #[514 "\301\300\302 Q \"\207" ["news"= ; browse-url ":"] 6 "\n\n(fn URL ARG)"])
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(&= quot;mailto" :follow #[514 "\301\300\302 Q \"\207" [&qu= ot;mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"])<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0("https" :follow #[514 "\301\300\302 Q \"\= 207" ["https" browse-url ":"] 6 "\n\n(fn URL = ARG)"])
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0("http" :follow #[514 "\301\300\302 = Q \"\207" ["http" browse-url ":"] 6 "\n\= n(fn URL ARG)"])
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("ftp" :follow #[514 "\301= \300\302 Q \"\207" ["ftp" browse-url ":"] 6 &= quot;\n\n(fn URL ARG)"])
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("help" :follow org-link= --open-help :store org-link--store-help) ("file" :complete org-li= nk-complete-file)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("elisp" :follow org-link--open-el= isp))
=C2=A0org-html-format-headline-function 'org-html-format-headl= ine-default-function
=C2=A0org-metaup-hook '(org-babel-load-in-sessi= on-maybe)
=C2=A0org-tab-before-tab-emulation-hook '(org-tempo-comple= te-tag)
=C2=A0)
--000000000000a66e150614f92fd9--