From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 eORMJK/JKWMEKQAAbAwnHQ (envelope-from ) for ; Tue, 20 Sep 2022 16:09:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YPRKJK/JKWNJZgAA9RJhRA (envelope-from ) for ; Tue, 20 Sep 2022 16:09:51 +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 6E28C13F9B for ; Tue, 20 Sep 2022 16:09:48 +0200 (CEST) Received: from localhost ([::1]:50186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oadwZ-0007xK-I4 for larch@yhetil.org; Tue, 20 Sep 2022 10:09:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oabUz-0005jd-RC for emacs-orgmode@gnu.org; Tue, 20 Sep 2022 07:33:11 -0400 Received: from [39.171.215.24] (port=6006 helo=Mac-mini.local) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oabUu-0000fK-E3 for emacs-orgmode@gnu.org; Tue, 20 Sep 2022 07:33:09 -0400 Received: by Mac-mini.local (Postfix, from userid 501) id 92D2064E115B; Tue, 20 Sep 2022 19:32:55 +0800 (CST) References: <631d472b.c80a0220.2b4b2.bf86SMTPIN_ADDED_BROKEN@mx.google.com> <87h71ew0m0.fsf@localhost> <631e92ee.050a0220.f9c18.92f5SMTPIN_ADDED_BROKEN@mx.google.com> <87y1uovp9w.fsf@localhost> <631fe1c9.050a0220.3ab2b.3f52SMTPIN_ADDED_BROKEN@mx.google.com> <87bkrhwc42.fsf@localhost> <6322b0a8.050a0220.59bb8.6923SMTPIN_ADDED_BROKEN@mx.google.com> <87y1uluir1.fsf@localhost> <6322f5ad.c80a0220.5e936.823eSMTPIN_ADDED_BROKEN@mx.google.com> <878rmesf64.fsf@localhost> User-agent: mu4e 1.8.9; emacs 29.0.50 From: "Christopher M. Miles" To: Ihor Radchenko Cc: "Christopher M. Miles" , emacs-orgmode@gnu.org Subject: Re: [PATCH v6] New: auto display inline images under subtree when `org-cycle'. Date: Tue, 20 Sep 2022 19:32:03 +0800 In-reply-to: <878rmesf64.fsf@localhost> Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Host-Lookup-Failed: Reverse DNS lookup failed for 39.171.215.24 (deferred) Received-SPF: softfail client-ip=39.171.215.24; envelope-from=numbchild@gmail.com; helo=Mac-mini.local X-Spam_score_int: 78 X-Spam_score: 7.8 X-Spam_bar: +++++++ X-Spam_report: (7.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, MSGID_MULTIPLE_AT=1, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_PBL=3.335, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, SPOOFED_FREEMAIL_NO_RDNS=0.001, URI_DOTEDU=1.999 autolearn=no autolearn_force=no X-Spam_action: reject 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: , Reply-To: numbchild@gmail.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663682988; h=from:from:sender:sender:reply-to: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; bh=z5pBNNfQXScIs/AU9WLkFkZ9Lf7vy9d/aoHB5iL58NA=; b=PgHX/1bc1omx65nW52mCdvdAWVB5xXj/rY8elQ0XuEJ7NXBELfOUepyIq9j6T69ku4FC68 +sw0rG89CVfrmU7sUv11J6moTYtEQqk+h6QCqPq25L9v+zuDdsdTN5piFjIJ8ldeBcfE2m 9A0FOqHnDcv/0e2XpTJVqT85PA/cIpPMWpz0UL5pOK1ZmX9lNr2nNZzQeYbk522KDIiV9l WNJdj6KURC3YDdZn1hEjokW/x/GSURQa84cnbc0FXriDWJXdpjJPHG/g012uS0qqi3HuC8 jWihzULggdp44ReU57mmwjKMDFKvgEPCAV8JrZlgocIJ2XfwQ146sUPbzmpG3Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663682988; a=rsa-sha256; cv=none; b=aq5alMDXgPLBbqJprTVuDYZZgOU3ab6ZO8wQoRILCp0NFauISsazkiFISTPQk4Y+quPAaa bNlpBqb03SxBT0MDf9dRRpDAai3yz22WhCmkHf6Sw8c4nAxBrOX9G7h5evE4mQQERfaXLI anrKc7NrN2V874MBAvZ88zTHKx8PCkG8ONfC8XTkVL4iuLFK1uxKFHfbxUDPnia+s7eT/1 zTKuOyin8Kr+CSoNjIMnwq2KHLBtTK43Ig66/OrS+X/nMW11R09sNxMppNBMFGWV68vXQZ 93yh1xolRKNWk+V4EZOVgVjq0/Q0gKhGepNZc2LuCQGEDlDZ7RgB9O6O5iPgQA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=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" X-Migadu-Spam-Score: 2.77 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=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" X-Migadu-Queue-Id: 6E28C13F9B X-Spam-Score: 2.77 X-Migadu-Scanner: scn1.migadu.com X-TUID: CZ2gSD+1Ztux --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I checked out your patch, it's fine to me. Should be fine to apply. Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> Ok, I will submit the first patch of new property at first. If you're >> going to implement this cycling inline image display feature, >> that's great! > > The changes to the manual are confusing after exporting. Note that > > #+vindex: org-image-actual-width will not be visible in html/pdf export. > They only serve as info search nodes and do not appear in the actual > > text. > > I am attaching an alternative version of the patch. Let me know if you > have any objections. > > From 475c607f874e4e78c1e13d15e36ae894b121acad Mon Sep 17 00:00:00 2001 > Message-Id: <475c607f874e4e78c1e13d15e36ae894b121acad.1663656903.git.yant= ar92@gmail.com> > From: stardiviner > Date: Thu, 15 Sep 2022 17:25:13 +0800 > Subject: [PATCH v6] org.el: Support subtree-level org-image-actual-width > overriding > > * lisp/org.el (org-display-inline-image--width): Support new property > "ORG-IMAGE-ACTUAL-WIDTH" overriding global variable > `org-image-actual-width'. > --- > doc/org-manual.org | 186 +++++++++++++++++++++++++-------------------- > etc/ORG-NEWS | 4 + > lisp/org.el | 90 +++++++++++----------- > 3 files changed, 155 insertions(+), 125 deletions(-) > > diff --git a/doc/org-manual.org b/doc/org-manual.org > index a37b8390c..4c9c087a7 100644 > --- a/doc/org-manual.org > +++ b/doc/org-manual.org > @@ -11314,6 +11314,24 @@ ** Images > startup by configuring the variable > ~org-startup-with-inline-images~[fn:119]. >=20=20 > + > + #+vindex: org-image-actual-width > + #+cindex: @samp{ORG-IMAGE-ACTUAL-WIDTH}, property > + By default, Org mode displays inline images according to their actual = width. > + You can customize the displayed image width using ~org-image-actual-wi= dth~ variable (globally) or =3DORG-IMAGE-ACTUAL-WIDTH=3D property (subtree-= level)[fn:120]. > + Their value can be the following: > + - (default) Non-nil, use the actual width of images when inlining them. > + - When set to a number, use imagemagick (when available) to set the > + image's width to this value. > + - When set to a number in a list, try to get the width from any > + =3D#+ATTR.*=3D keyword if it matches a width specification like: > + #+begin_example > + ,#+ATTR_HTML: :width 300px > + #+end_example > + and fall back on that number if none is found. > + - When set to nil, try to get the width from an =3D#+ATTR.*=3D keyword > + and fall back on the original width if none is found. > + > ** Captions > :PROPERTIES: > :DESCRIPTION: Describe tables, images... > @@ -11404,7 +11422,7 @@ ** Creating Footnotes > #+vindex: org-footnote-define-inline > #+vindex: org-footnote-section > Otherwise, create a new footnote. Depending on the variable > - ~org-footnote-define-inline~[fn:120], the definition is placed right > + ~org-footnote-define-inline~[fn:121], the definition is placed right > into the text as part of the reference, or separately into the > location determined by the variable ~org-footnote-section~. >=20=20 > @@ -11419,7 +11437,7 @@ ** Creating Footnotes > | {{{kbd(d)}}} | Delete the footnote at point, including definition an= d references. | >=20=20 > #+vindex: org-footnote-auto-adjust > - Depending on the variable ~org-footnote-auto-adjust~[fn:121], > + Depending on the variable ~org-footnote-auto-adjust~[fn:122], > renumbering and sorting footnotes can be automatic after each > insertion or deletion. >=20=20 > @@ -11609,7 +11627,7 @@ ** Export Settings >=20=20 > #+cindex: @samp{DATE}, keyword > #+vindex: org-export-date-timestamp-format > - A date or a time-stamp[fn:122]. > + A date or a time-stamp[fn:123]. >=20=20 > - =3DEMAIL=3D :: >=20=20 > @@ -11624,7 +11642,7 @@ ** Export Settings > Language to use for translating certain strings > (~org-export-default-language~). With =3D#+LANGUAGE: fr=3D, for > example, Org translates =3DTable of contents=3D to the French =3DTable= des > - mati=C3=A8res=3D[fn:123]. > + mati=C3=A8res=3D[fn:124]. >=20=20 > - =3DSELECT_TAGS=3D :: >=20=20 > @@ -11901,7 +11919,7 @@ ** Table of Contents > #+cindex: excluding entries from table of contents > #+cindex: table of contents, exclude entries > Org includes both numbered and unnumbered headlines in the table of > -contents[fn:124]. If you need to exclude an unnumbered headline, > +contents[fn:125]. If you need to exclude an unnumbered headline, > along with all its children, set the =3DUNNUMBERED=3D property to =3Dnot= oc=3D > value. >=20=20 > @@ -12020,7 +12038,7 @@ ** Include Files > | =3D#+INCLUDE: "~/.emacs" :lines "10-"=3D | Include lines from 10 to E= OF | >=20=20 > Inclusions may specify a file-link to extract an object matched by > -~org-link-search~[fn:125] (see [[*Search Options in File Links]]). The > +~org-link-search~[fn:126] (see [[*Search Options in File Links]]). The > ranges for =3D:lines=3D keyword are relative to the requested element. > Therefore, >=20=20 > @@ -12060,7 +12078,7 @@ ** Macro Replacement > : #+MACRO: name replacement text; $1, $2 are arguments >=20=20 > #+texinfo: @noindent > -which can be referenced using =3D{{{name(arg1, arg2)}}}=3D[fn:126]. For > +which can be referenced using =3D{{{name(arg1, arg2)}}}=3D[fn:127]. For > example >=20=20 > #+begin_example > @@ -12179,7 +12197,7 @@ ** Comment Lines > Finally, a =3DCOMMENT=3D keyword at the beginning of an entry, but after > any other keyword or priority cookie, comments out the entire subtree. > In this case, the subtree is not exported and no code block within it > -is executed either[fn:127]. The command below helps changing the > +is executed either[fn:128]. The command below helps changing the > comment status of a headline. >=20=20 > - {{{kbd(C-c ;)}}} (~org-toggle-comment~) :: > @@ -12451,7 +12469,7 @@ *** Frames and Blocks in Beamer >=20=20 > - Org exports a Beamer frame's objects as block environments. Org can > enforce wrapping in special block types when =3DBEAMER_ENV=3D property > - is set[fn:128]. For valid values see > + is set[fn:129]. For valid values see > ~org-beamer-environments-default~. To add more values, see > ~org-beamer-environments-extra~. > #+vindex: org-beamer-environments-default > @@ -13039,7 +13057,7 @@ *** Math formatting in HTML export > #+vindex: org-html-mathjax-options~ > LaTeX math snippets (see [[*LaTeX fragments]]) can be displayed in two > different ways on HTML pages. The default is to use the [[https://www.m= athjax.org][MathJax]], > -which should work out of the box with Org[fn:129][fn:130]. Some MathJax > +which should work out of the box with Org[fn:130][fn:131]. Some MathJax > display options can be configured via ~org-html-mathjax-options~, or > in the buffer. For example, with the following settings, >=20=20 > @@ -13051,7 +13069,7 @@ *** Math formatting in HTML export > #+texinfo: @noindent > equation labels are displayed on the left margin and equations are > five em from the left margin. In addition, it loads the two MathJax > -extensions =3Dcancel.js=3D and =3DnoErrors.js=3D[fn:131]. > +extensions =3Dcancel.js=3D and =3DnoErrors.js=3D[fn:132]. >=20=20 > #+vindex: org-html-mathjax-template > See the docstring of ~org-html-mathjax-options~ for all supported > @@ -13114,7 +13132,7 @@ *** CSS support > #+vindex: org-export-html-todo-kwd-class-prefix > #+vindex: org-export-html-tag-class-prefix > You can modify the CSS style definitions for the exported file. The > -HTML exporter assigns the following special CSS classes[fn:132] to > +HTML exporter assigns the following special CSS classes[fn:133] to > appropriate parts of the document---your style specifications may > change these, in addition to any of the standard classes like for > headlines, tables, etc. > @@ -13351,7 +13369,7 @@ *** LaTeX/PDF export commands > Org file. See the docstring for the > ~org-latex-default-packages-alist~ for loading packages with certain > compilers. Also see ~org-latex-bibtex-compiler~ to set the > -bibliography compiler[fn:133]. > +bibliography compiler[fn:134]. >=20=20 > *** LaTeX specific export settings > :PROPERTIES: > @@ -13889,7 +13907,7 @@ *** Source blocks in LaTeX export > packages for customization of that specific source block. In the > example below, the =3D:options=3D are set for Engraved or Minted. Minted > is a source code highlighting LaTeX package with many configurable > -options[fn:134]. Both Minted and Engraved are built on [[https://www.ct= an.org/pkg/fvextra][fvextra]], and > +options[fn:135]. Both Minted and Engraved are built on [[https://www.ct= an.org/pkg/fvextra][fvextra]], and > so support many of the same options. >=20=20 > #+begin_example > @@ -14142,7 +14160,7 @@ ** OpenDocument Text Export >=20=20 > The ODT export back-end handles creating of OpenDocument Text (ODT) > format. Documents created by this exporter use the > -{{{cite(OpenDocument-v1.2 specification)}}}[fn:135] and are compatible > +{{{cite(OpenDocument-v1.2 specification)}}}[fn:136] and are compatible > with LibreOffice 3.4. >=20=20 > *** Pre-requisites for ODT export > @@ -14543,7 +14561,7 @@ **** LaTeX math snippets > variables ~org-latex-to-mathml-convert-command~ and > ~org-latex-to-mathml-jar-file~. >=20=20 > - If you prefer to use MathToWeb[fn:136] as your converter, you can > + If you prefer to use MathToWeb[fn:137] as your converter, you can > configure the above variables as shown below. >=20=20 > #+begin_src emacs-lisp > @@ -14554,7 +14572,7 @@ **** LaTeX math snippets > #+end_src >=20=20 > #+texinfo: @noindent > - or, to use LaTeX=E2=80=8BML[fn:137] instead, > + or, to use LaTeX=E2=80=8BML[fn:138] instead, >=20=20 > #+begin_src emacs-lisp > (setq org-latex-to-mathml-convert-command > @@ -14873,7 +14891,7 @@ **** Customizing tables in ODT export > tables, see [[*Tables in ODT export]]. >=20=20 > This feature closely mimics the way table templates are defined in the > -OpenDocument-v1.2 specification[fn:138]. > +OpenDocument-v1.2 specification[fn:139]. >=20=20 > #+vindex: org-odt-table-styles > For quick preview of this feature, install the settings below and export= the > @@ -14907,7 +14925,7 @@ **** Customizing tables in ODT export >=20=20 > To use this feature proceed as follows: >=20=20 > -1. Create a table template[fn:139]. > +1. Create a table template[fn:140]. >=20=20 > A table template is set of =3Dtable-cell=3D and =3Dparagraph=3D style= s for > each of the following table cell categories: > @@ -14946,7 +14964,7 @@ **** Customizing tables in ODT export > =3D=3D element of the content template file > (see [[x-orgodtcontenttemplate-xml][Factory styles]]). >=20=20 > -2. Define a table style[fn:140]. > +2. Define a table style[fn:141]. >=20=20 > #+vindex: org-odt-table-styles > To define a table style, create an entry for the style in the > @@ -16177,7 +16195,7 @@ *** Publishing action > ~org-org-publish-to-org~. This produces =3Dfile.org=3D and puts it in t= he > publishing directory. If you want a htmlized version of this file, > set the parameter ~:htmlized-source~ to ~t~. It produces > -=3Dfile.org.html=3D in the publishing directory[fn:141]. > +=3Dfile.org.html=3D in the publishing directory[fn:142]. >=20=20 > Other files like images only need to be copied to the publishing > destination; for this you can use ~org-publish-attachment~. For > @@ -17795,13 +17813,13 @@ *** How to evaluate source code > #+kindex: C-c C-v e > #+findex: org-babel-execute-src-block > Org provides many ways to execute code blocks. {{{kbd(C-c C-c)}}} or > -{{{kbd(C-c C-v e)}}} with the point on a code block[fn:142] calls the > +{{{kbd(C-c C-v e)}}} with the point on a code block[fn:143] calls the > ~org-babel-execute-src-block~ function, which executes the code in the > block, collects the results, and inserts them in the buffer. >=20=20 > #+cindex: @samp{CALL}, keyword > #+vindex: org-babel-inline-result-wrap > -By calling a named code block[fn:143] from an Org mode buffer or > +By calling a named code block[fn:144] from an Org mode buffer or > a table. Org can call the named code blocks from the current Org mode > buffer or from the "Library of Babel" (see [[*Library of Babel]]). >=20=20 > @@ -18002,7 +18020,7 @@ *** Collection >=20=20 > - =3Dvalue=3D :: >=20=20 > - Default for most Babel libraries[fn:143]. Functional mode. Org > + Default for most Babel libraries[fn:144]. Functional mode. Org > gets the value by wrapping the code in a function definition in the > language of the source block. That is why when using =3D:results > value=3D, code should execute like a function and return a value. For > @@ -18731,7 +18749,7 @@ ** Noweb Reference Syntax >=20=20 > #+cindex: @samp{noweb-ref}, header argument > Source code blocks can include references to other source code blocks, > -using a noweb[fn:144] style syntax: > +using a noweb[fn:145] style syntax: >=20=20 > : <> >=20=20 > @@ -19259,7 +19277,7 @@ ** Structure Templates > ~org-structure-template-alist~ and ~org-tempo-keywords-alist~. For > example, {{{kbd(< s TAB)}}} creates a code block. Enable it by > customizing ~org-modules~ or add =3D(require 'org-tempo)=3D to your Emacs > -init file[fn:145]. > +init file[fn:146]. >=20=20 > #+attr_texinfo: :columns 0.1 0.9 > | {{{kbd(a)}}} | =3D#+BEGIN_EXPORT ascii=3D ... =3D#+END_EXPORT=3D | > @@ -19339,7 +19357,7 @@ *** Org Indent Mode > To display the buffer in the indented view, activate Org Indent minor > mode, using {{{kbd(M-x org-indent-mode)}}}. Text lines that are not > headlines are prefixed with virtual spaces to vertically align with > -the headline text[fn:146]. > +the headline text[fn:147]. >=20=20 > #+vindex: org-indent-indentation-per-level > To make more horizontal space, the headlines are shifted by two > @@ -19367,9 +19385,9 @@ *** Hard indentation >=20=20 > It is possible to use hard spaces to achieve the indentation instead, > if the bare ASCII file should have the indented look also outside > -Emacs[fn:147]. With Org's support, you have to indent all lines to > +Emacs[fn:148]. With Org's support, you have to indent all lines to > line up with the outline headers. You would use these > -settings[fn:148]: > +settings[fn:149]: >=20=20 > #+begin_src emacs-lisp > (setq org-adapt-indentation t > @@ -19640,7 +19658,7 @@ ** Summary of In-Buffer Settings >=20=20 > #+vindex: org-startup-indented > Dynamic virtual indentation is controlled by the variable > - ~org-startup-indented~[fn:149]. > + ~org-startup-indented~[fn:150]. >=20=20 > | =3Dindent=3D | Start with Org Indent mode turned on. | > | =3Dnoindent=3D | Start with Org Indent mode turned off. | > @@ -20498,7 +20516,7 @@ *** Setting up the staging area >=20=20 > #+vindex: org-mobile-directory > The mobile application needs access to a file directory on > -a server[fn:150] to interact with Emacs. Pass its location through > +a server[fn:151] to interact with Emacs. Pass its location through > the ~org-mobile-directory~ variable. If you can mount that directory > locally just set the variable to point to that directory: >=20=20 > @@ -20519,7 +20537,7 @@ *** Setting up the staging area > requires OpenSSL installed on the local computer. To turn on > encryption, set the same password in the mobile application and in > Emacs. Set the password in the variable > -~org-mobile-use-encryption~[fn:151]. Note that even after the mobile > +~org-mobile-use-encryption~[fn:152]. Note that even after the mobile > application encrypts the file contents, the file name remains visible > on the file systems of the local computer, the server, and the mobile > device. > @@ -20535,15 +20553,15 @@ *** Pushing to the mobile application > ~org-mobile-files~ into the staging area. Files include agenda files > (as listed in ~org-agenda-files~). Customize ~org-mobile-files~ to > add other files. File names are staged with paths relative to > -~org-directory~, so all files should be inside this directory[fn:152]. > +~org-directory~, so all files should be inside this directory[fn:153]. >=20=20 > Push creates a special Org file =3Dagendas.org=3D with custom agenda vie= ws > -defined by the user[fn:153]. > +defined by the user[fn:154]. >=20=20 > Finally, Org writes the file =3Dindex.org=3D, containing links to other > files. The mobile application reads this file first from the server > to determine what other files to download for agendas. For faster > -downloads, it is expected to only read files whose checksums[fn:154] > +downloads, it is expected to only read files whose checksums[fn:155] > have changed. >=20=20 > *** Pulling from the mobile application > @@ -20560,7 +20578,7 @@ *** Pulling from the mobile application >=20=20 > 1. > #+vindex: org-mobile-inbox-for-pull > - Org moves all entries found in =3Dmobileorg.org=3D[fn:155] and appends > + Org moves all entries found in =3Dmobileorg.org=3D[fn:156] and appends > them to the file pointed to by the variable > ~org-mobile-inbox-for-pull~. It should reside neither in the > staging area nor on the server. Each captured entry and each > @@ -20854,9 +20872,9 @@ *** A LaTeX example of radio tables > #+cindex: @LaTeX{}, and Orgtbl mode >=20=20 > To wrap a source table in LaTeX, use the =3Dcomment=3D environment > -provided by =3Dcomment.sty=3D[fn:156]. To activate it, put > +provided by =3Dcomment.sty=3D[fn:157]. To activate it, put > ~\usepackage{comment}~ in the document header. Orgtbl mode inserts > -a radio table skeleton[fn:157] with the command {{{kbd(M-x > +a radio table skeleton[fn:158] with the command {{{kbd(M-x > orgtbl-insert-radio-table)}}}, which prompts for a table name. For > example, if =3Dsalesfigures=3D is the name, the template inserts: >=20=20 > @@ -20875,7 +20893,7 @@ *** A LaTeX example of radio tables > ~orgtbl-to-latex~ to convert the table to LaTeX format, then insert > the table at the target (receive) location named =3Dsalesfigures=3D. Now > the table is ready for data entry. It can even use spreadsheet > -features[fn:158]: > +features[fn:159]: >=20=20 > #+begin_example > % BEGIN RECEIVE ORGTBL salesfigures > @@ -21091,7 +21109,7 @@ ** Special Agenda Views > #+vindex: org-agenda-skip-function > #+vindex: org-agenda-skip-function-global > Org provides a special hook to further limit items in agenda views: > -~agenda~, ~agenda*~[fn:159], ~todo~, ~alltodo~, ~tags~, ~tags-todo~, > +~agenda~, ~agenda*~[fn:160], ~todo~, ~alltodo~, ~tags~, ~tags-todo~, > ~tags-tree~. Specify a custom function that tests inclusion of every > matched item in the view. This function can also skip as much as is > needed. > @@ -21134,7 +21152,7 @@ ** Special Agenda Views > #+vindex: org-agenda-skip-function > Search for entries with a limit set on levels for the custom search. > This is a general approach to creating custom searches in Org. To > -include all levels, use =3DLEVEL>0=3D[fn:160]. Then to selectively pick > +include all levels, use =3DLEVEL>0=3D[fn:161]. Then to selectively pick > the matched entries, use ~org-agenda-skip-function~, which also > accepts Lisp forms, such as ~org-agenda-skip-entry-if~ and > ~org-agenda-skip-subtree-if~. For example: > @@ -22258,6 +22276,7 @@ * Footnotes > #+findex: org-anniversary > #+findex: org-cyclic > #+findex: org-block > + > [fn:60] When working with the standard diary expression functions, you > need to be very careful with the order of the arguments. That order > depends evilly on the variable ~calendar-date-style~. For example, to > @@ -22496,140 +22515,143 @@ * Footnotes > within a buffer with the =3DSTARTUP=3D options =3Dinlineimages=3D and > =3Dnoinlineimages=3D. >=20=20 > -[fn:120] The corresponding in-buffer setting is: =3D#+STARTUP: fninline= =3D > +[fn:120] The width can be customized in Emacs >=3D 24.1, built with > +imagemagick support.=20 > + > +[fn:121] The corresponding in-buffer setting is: =3D#+STARTUP: fninline= =3D > or =3D#+STARTUP: nofninline=3D. >=20=20 > -[fn:121] The corresponding in-buffer options are =3D#+STARTUP: fnadjust= =3D > +[fn:122] The corresponding in-buffer options are =3D#+STARTUP: fnadjust= =3D > and =3D#+STARTUP: nofnadjust=3D. >=20=20 > -[fn:122] The variable ~org-export-date-timestamp-format~ defines how > +[fn:123] The variable ~org-export-date-timestamp-format~ defines how > this timestamp are exported. >=20=20 > -[fn:123] For export to LaTeX format---or LaTeX-related formats such as > +[fn:124] For export to LaTeX format---or LaTeX-related formats such as > Beamer---, the =3Dorg-latex-package-alist=3D variable needs further > configuration. See [[LaTeX specific export settings]]. >=20=20 > -[fn:124] At the moment, some export back-ends do not obey this > +[fn:125] At the moment, some export back-ends do not obey this > specification. For example, LaTeX export excludes every unnumbered > headline from the table of contents. >=20=20 > -[fn:125] Note that ~org-link-search-must-match-exact-headline~ is > +[fn:126] Note that ~org-link-search-must-match-exact-headline~ is > locally bound to non-~nil~. Therefore, ~org-link-search~ only matches > headlines and named elements. >=20=20 > -[fn:126] Since commas separate the arguments, commas within arguments > +[fn:127] Since commas separate the arguments, commas within arguments > have to be escaped with the backslash character. So only those > backslash characters before a comma need escaping with another > backslash character. >=20=20 > -[fn:127] For a less drastic behavior, consider using a select tag (see > +[fn:128] For a less drastic behavior, consider using a select tag (see > [[*Export Settings]]) instead. >=20=20 > -[fn:128] If =3DBEAMER_ENV=3D is set, Org export adds =3DB_environment=3D= tag > +[fn:129] If =3DBEAMER_ENV=3D is set, Org export adds =3DB_environment=3D= tag > to make it visible. The tag serves as a visual aid and has no > semantic relevance. >=20=20 > -[fn:129] By default Org loads MathJax from [[https://cdnjs.com][cdnjs.co= m]] as recommended by > +[fn:130] By default Org loads MathJax from [[https://cdnjs.com][cdnjs.co= m]] as recommended by > [[https://www.mathjax.org][MathJax]]. >=20=20 > -[fn:130] Please note that exported formulas are part of an HTML > +[fn:131] Please note that exported formulas are part of an HTML > document, and that signs such as =3D<=3D, =3D>=3D, or =3D&=3D have speci= al > meanings. See [[http://docs.mathjax.org/en/latest/input/tex/html.html#t= ex-and-latex-in-html-documents][MathJax TeX and LaTeX in HTML documents]]. >=20=20 > -[fn:131] See [[http://docs.mathjax.org/en/latest/input/tex/extensions.ht= ml#tex-and-latex-extensions][TeX and LaTeX extensions]] in the [[http://doc= s.mathjax.org][MathJax manual]] to learn > +[fn:132] See [[http://docs.mathjax.org/en/latest/input/tex/extensions.ht= ml#tex-and-latex-extensions][TeX and LaTeX extensions]] in the [[http://doc= s.mathjax.org][MathJax manual]] to learn > about extensions. >=20=20 > -[fn:132] If the classes on TODO keywords and tags lead to conflicts, > +[fn:133] If the classes on TODO keywords and tags lead to conflicts, > use the variables ~org-html-todo-kwd-class-prefix~ and > ~org-html-tag-class-prefix~ to make them unique. >=20=20 > -[fn:133] This does not allow setting different bibliography compilers > +[fn:134] This does not allow setting different bibliography compilers > for different files. However, "smart" LaTeX compilation systems, such > as latexmk, can select the correct bibliography compiler. >=20=20 > -[fn:134] Minted uses an external Python package for code highlighting, > +[fn:135] Minted uses an external Python package for code highlighting, > which requires the flag =3D-shell-escape=3D to be added to > ~org-latex-pdf-process~. >=20=20 > -[fn:135] See [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.= html][Open Document Format for Office Applications > +[fn:136] See [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.= html][Open Document Format for Office Applications > (OpenDocument) Version 1.2]]. >=20=20 > -[fn:136] See [[http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl][MathT= oWeb]]. > +[fn:137] See [[http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl][MathT= oWeb]]. >=20=20 > -[fn:137] See [[http://dlmf.nist.gov/LaTeXML/]]. > +[fn:138] See [[http://dlmf.nist.gov/LaTeXML/]]. >=20=20 > -[fn:138] [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html= ][OpenDocument-v1.2 Specification]] > +[fn:139] [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html= ][OpenDocument-v1.2 Specification]] >=20=20 > -[fn:139] See the =3D=3D element of the > +[fn:140] See the =3D=3D element of the > OpenDocument-v1.2 specification. >=20=20 > -[fn:140] See the attributes =3Dtable:template-name=3D, > +[fn:141] See the attributes =3Dtable:template-name=3D, > =3Dtable:use-first-row-styles=3D, =3Dtable:use-last-row-styles=3D, > =3Dtable:use-first-column-styles=3D, =3Dtable:use-last-column-styles=3D, > =3Dtable:use-banding-rows-styles=3D, and =3Dtable:use-banding-column-sty= les=3D > of the =3D=3D element in the OpenDocument-v1.2 specificatio= n. >=20=20 > -[fn:141] If the publishing directory is the same as the source > +[fn:142] If the publishing directory is the same as the source > directory, =3Dfile.org=3D is exported as =3Dfile.org.org=3D, so you prob= ably > do not want to do this. >=20=20 > -[fn:142] The option ~org-babel-no-eval-on-ctrl-c-ctrl-c~ can be used > +[fn:143] The option ~org-babel-no-eval-on-ctrl-c-ctrl-c~ can be used > to remove code evaluation from the {{{kbd(C-c C-c)}}} key binding. >=20=20 > -[fn:143] Actually, the constructs =3Dcall_()=3D and =3Dsrc_{= }=3D > +[fn:144] Actually, the constructs =3Dcall_()=3D and =3Dsrc_{= }=3D > are not evaluated when they appear in a keyword (see [[*Summary of > In-Buffer Settings]]). >=20=20 > -[fn:144] For noweb literate programming details, see > +[fn:145] For noweb literate programming details, see > http://www.cs.tufts.edu/~nr/noweb/. >=20=20 > -[fn:145] For more information, please refer to the commentary section > +[fn:146] For more information, please refer to the commentary section > in =3Dorg-tempo.el=3D. >=20=20 > -[fn:146] Org Indent mode also sets ~wrap-prefix~ correctly for > +[fn:147] Org Indent mode also sets ~wrap-prefix~ correctly for > indenting and wrapping long lines of headlines or text. This minor > mode also handles Visual Line mode and directly applied settings > through ~word-wrap~. >=20=20 > -[fn:147] This works, but requires extra effort. Org Indent mode is > +[fn:148] This works, but requires extra effort. Org Indent mode is > more convenient for most applications. >=20=20 > -[fn:148] ~org-adapt-indentation~ can also be set to =3D'headline-data=3D, > +[fn:149] ~org-adapt-indentation~ can also be set to =3D'headline-data=3D, > in which case only data lines below the headline will be indented. >=20=20 > -[fn:149] Note that Org Indent mode also sets the ~wrap-prefix~ > +[fn:150] Note that Org Indent mode also sets the ~wrap-prefix~ > property, such that Visual Line mode (or purely setting ~word-wrap~) > wraps long lines, including headlines, correctly indented. >=20=20 > -[fn:150] For a server to host files, consider using a WebDAV server, > +[fn:151] For a server to host files, consider using a WebDAV server, > such as [[https://nextcloud.com][Nextcloud]]. Additional help is at thi= s [[https://orgmode.org/worg/org-faq.html#mobileorg_webdav][FAQ entry]]. >=20=20 > -[fn:151] If Emacs is configured for safe storing of passwords, then > +[fn:152] If Emacs is configured for safe storing of passwords, then > configure the variable ~org-mobile-encryption-password~; please read > the docstring of that variable. >=20=20 > -[fn:152] Symbolic links in ~org-directory~ need to have the same name > +[fn:153] Symbolic links in ~org-directory~ need to have the same name > as their targets. >=20=20 > -[fn:153] While creating the agendas, Org mode forces =3DID=3D properties > +[fn:154] While creating the agendas, Org mode forces =3DID=3D properties > on all referenced entries, so that these entries can be uniquely > identified if Org Mobile flags them for further action. To avoid > setting properties configure the variable > ~org-mobile-force-id-on-agenda-items~ to ~nil~. Org mode then relies > on outline paths, assuming they are unique. >=20=20 > -[fn:154] Checksums are stored automatically in the file > +[fn:155] Checksums are stored automatically in the file > =3Dchecksums.dat=3D. >=20=20 > -[fn:155] The file will be empty after this operation. > +[fn:156] The file will be empty after this operation. >=20=20 > -[fn:156] https://www.ctan.org/pkg/comment > +[fn:157] https://www.ctan.org/pkg/comment >=20=20 > -[fn:157] By default this works only for LaTeX, HTML, and Texinfo. > +[fn:158] By default this works only for LaTeX, HTML, and Texinfo. > Configure the variable ~orgtbl-radio-table-templates~ to install > templates for other modes. >=20=20 > -[fn:158] If the =3DTBLFM=3D keyword contains an odd number of dollar > +[fn:159] If the =3DTBLFM=3D keyword contains an odd number of dollar > characters, this may cause problems with Font Lock in LaTeX mode. As > shown in the example you can fix this by adding an extra line inside > the =3Dcomment=3D environment that is used to balance the dollar > @@ -22637,9 +22659,9 @@ * Footnotes > a much better solution is to add the =3Dcomment=3D environment to the > variable ~LaTeX-verbatim-environments~. >=20=20 > -[fn:159] The ~agenda*~ view is the same as ~agenda~ except that it > +[fn:160] The ~agenda*~ view is the same as ~agenda~ except that it > only considers /appointments/, i.e., scheduled and deadline items that > have a time specification =3D[h]h:mm=3D in their time-stamps. >=20=20 > -[fn:160] Note that, for ~org-odd-levels-only~, a level number > +[fn:161] Note that, for ~org-odd-levels-only~, a level number > corresponds to order in the hierarchy, not to the number of stars. > diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS > index a7f32671e..d9b41515b 100644 > --- a/etc/ORG-NEWS > +++ b/etc/ORG-NEWS > @@ -296,6 +296,10 @@ headings in HTML export. > Use the header argument =3D:var x=3Dcode-block[]=3D or > : #+CALL: fn(x=3Dcode-block[]) > to pass the contents of a named code block as a string argument. > +*** New property =3DORG-IMAGE-ACTUAL-WIDTH=3D for overriding global ~org= -image-actual-width~ > + > +The new property =3DORG-IMAGE-ACTUAL-WIDTH=3D can override the global > +variable ~org-image-actual-width~ value for inline images display width. >=20=20 > ** New options > *** New custom settings =3Dorg-icalendar-scheduled-summary-prefix=3D and= =3Dorg-icalendar-deadline-summary-prefix=3D > diff --git a/lisp/org.el b/lisp/org.el > index a50921519..bba1b5233 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -12224,7 +12224,8 @@ (defconst org-default-properties > "EXPORT_OPTIONS" "EXPORT_TEXT" "EXPORT_FILE_NAME" > "EXPORT_TITLE" "EXPORT_AUTHOR" "EXPORT_DATE" "UNNUMBERED" > "ORDERED" "NOBLOCKING" "COOKIE_DATA" "LOG_INTO_DRAWER" "REPEAT_TO_ST= ATE" > - "CLOCK_MODELINE_TOTAL" "STYLE" "HTML_CONTAINER_CLASS") > + "CLOCK_MODELINE_TOTAL" "STYLE" "HTML_CONTAINER_CLASS" > + "ORG-IMAGE-ACTUAL-WIDTH") > "Some properties that are used by Org mode for various purposes. > Being in this list makes sure that they are offered for completion.") >=20=20 > @@ -16255,48 +16256,51 @@ (defun org-display-inline-image--width (link) > If the value is a float between 0 and 2, it interpreted as that propor= tion > of the text width in the buffer." > ;; Apply `org-image-actual-width' specifications. > - (cond > - ((eq org-image-actual-width t) nil) > - ((listp org-image-actual-width) > - (let* ((case-fold-search t) > - (par (org-element-lineage link '(paragraph))) > - (attr-re "^[ \t]*#\\+attr_.*?: +.*?:width +\\(\\S-+\\)") > - (par-end (org-element-property :post-affiliated par)) > - ;; Try to find an attribute providing a :width. > - (attr-width > - (when (and par (org-with-point-at > - (org-element-property :begin par) > - (re-search-forward attr-re par-end t))) > - (match-string 1))) > - (width > - (cond > - ;; Treat :width t as if `org-image-actual-width' were t. > - ((string=3D attr-width "t") nil) > - ;; Fallback to `org-image-actual-width' if no interprable w= idth is given. > - ((or (null attr-width) > - (string-match-p "\\`[^0-9]" attr-width)) > - (car org-image-actual-width)) > - ;; Convert numeric widths to numbers, converting percentage= s. > - ((string-match-p "\\`[0-9.]+%" attr-width) > - (/ (string-to-number attr-width) 100.0)) > - (t (string-to-number attr-width))))) > - (if (and (floatp width) (<=3D 0.0 width 2.0)) > - ;; A float in [0,2] should be interpereted as this portion of > - ;; the text width in the window. This works well with cases l= ike > - ;; #+attr_latex: :width 0.X\{line,page,column,etc.}width, > - ;; as the "0.X" is pulled out as a float. We use 2 as the upp= er > - ;; bound as cases such as 1.2\linewidth are feasible. > - (round (* width > - (window-pixel-width) > - (/ (or (and (bound-and-true-p visual-fill-column-mod= e) > - (or visual-fill-column-width auto-fill-f= unction)) > - (when auto-fill-function fill-column) > - (- (window-text-width) (line-number-display-w= idth))) > - (float (window-total-width))))) > - width))) > - ((numberp org-image-actual-width) > - org-image-actual-width) > - (t nil))) > + ;; Support subtree-level property "ORG-IMAGE-ACTUAL-WIDTH" specified > + ;; width. > + (let ((org-image-actual-width (org-property-or-variable-value 'org-ima= ge-actual-width))) > + (cond > + ((eq org-image-actual-width t) nil) > + ((listp org-image-actual-width) > + (let* ((case-fold-search t) > + (par (org-element-lineage link '(paragraph))) > + (attr-re "^[ \t]*#\\+attr_.*?: +.*?:width +\\(\\S-+\\)") > + (par-end (org-element-property :post-affiliated par)) > + ;; Try to find an attribute providing a :width. > + (attr-width > + (when (and par (org-with-point-at > + (org-element-property :begin par) > + (re-search-forward attr-re par-end t))) > + (match-string 1))) > + (width > + (cond > + ;; Treat :width t as if `org-image-actual-width' were t. > + ((string=3D attr-width "t") nil) > + ;; Fallback to `org-image-actual-width' if no interprable= width is given. > + ((or (null attr-width) > + (string-match-p "\\`[^0-9]" attr-width)) > + (car org-image-actual-width)) > + ;; Convert numeric widths to numbers, converting percenta= ges. > + ((string-match-p "\\`[0-9.]+%" attr-width) > + (/ (string-to-number attr-width) 100.0)) > + (t (string-to-number attr-width))))) > + (if (and (floatp width) (<=3D 0.0 width 2.0)) > + ;; A float in [0,2] should be interpereted as this portion of > + ;; the text width in the window. This works well with cases= like > + ;; #+attr_latex: :width 0.X\{line,page,column,etc.}width, > + ;; as the "0.X" is pulled out as a float. We use 2 as the u= pper > + ;; bound as cases such as 1.2\linewidth are feasible. > + (round (* width > + (window-pixel-width) > + (/ (or (and (bound-and-true-p visual-fill-column-m= ode) > + (or visual-fill-column-width auto-fill= -function)) > + (when auto-fill-function fill-column) > + (- (window-text-width) (line-number-display= -width))) > + (float (window-total-width))))) > + width))) > + ((numberp org-image-actual-width) > + org-image-actual-width) > + (t nil)))) >=20=20 > (defun org-display-inline-remove-overlay (ov after _beg _end &optional _= len) > "Remove inline-display overlay if a corresponding region is modified." > --=20 > 2.35.1 =2D-=20 [ stardiviner ] I try to make every word tell the meaning that I want to express without mi= sunderstanding. Blog: https://stardiviner.github.io/ IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAmMppOMACgkQG13xyVro msNC1ggAmva5P3BIcFvie0OR+cLgVD4657olwfo9ZWK2k3tbKMeZlQOrMCHw2hID QzY2KN1ZSi+PhL1DkuvGbJTfJDoUuSAgkTF6rss/oz0QxSNkAZX+IZgGnC+47dcl EfsTu2xDwdQkxK8D96ewTMXk2QFSOIviBeBMcgrmzaFSMY8flEXlVPnd8JCzIcfI e9kzf2VKcOTOJRvLbixk+StgKHuZ/O8uL3gujzrrm16Bm3A6PbtSbbqa4PqlYbEl sWCIavfGsed+MVleA9bGnO0SPX/guNOnn9qbaPWD9uRsbBatdBdzaJIvhckBDDuM jVJg7+QlCCnojIWo4lsg6eFqKeIggQ== =NpkM -----END PGP SIGNATURE----- --=-=-=--