fixing a bunch of broken stuff I think

This commit is contained in:
Chris Cochrun 2022-02-25 14:16:41 -06:00
parent 0dbc3ead0e
commit 8bace887a2
1551 changed files with 299 additions and 57481 deletions

View file

@ -1,91 +0,0 @@
<h2>Automating the Repetetive while also Learning a Bit More about My Editor</h2>
<p>In <time datetime="2021-10-04" title="2021-10-04">October</time> I joined Forem as the lead engineer for the content experience team. Ive been contributing to open source software for 9 years; Hello <a href="https://samvera.org">Samvera.org</a>; I miss you but I promise Im in a good place.</p>
<p>Coming from one open source community to another, I brought with me different workflows. I favor writing verbose commit messages. I like to use that as the text for my pull requests. The benefits are that commit messages travel with the code-base. I can use <code>git annotate</code> to help me understand the situation around a chunk of code.</p>
<p>But, in an open source community with over 600 contributors, the commit message as pull request strategy is inadequate. We could use <a href="https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks">git hooks</a> to provide commit message templating, but thats not enough for conversations around the pull request.</p>
<p>Forem provides a <a href="https://github.com/forem/forem/blob/main/.github/PULL_REQUEST_TEMPLATE.md">pull request template</a> to guide contributors through all of the considerations that go into the pull request review and acceptance.</p>
<p>The template provides a nice pre-amble comment to help new contributors. Then provides clear sections and instructions for a contributor to fill out:</p>
<ul>
<li>What type of Pull Request</li>
<li>Description</li>
<li>Related Tasks &amp; Documents</li>
<li>QA Instructions, Screenshots, and Recordings</li>
<li>Accessibility Concerns</li>
<li>Added/updated Tests</li>
<li>How will this change be communicated? (A Forem Core Team only section)</li>
<li>Any post deployment tasks to complete</li>
<li>A GIF that Expresses How You Feel About this Contribution</li>
</ul>
<p>As a new contributor to Forem, I love this guidance. And as I began reviewing other pull requests, I appreciated the structure even more.</p>
<h2 id="my-current-pull-request-workflow">My Current Pull Request Workflow</h2>
<p>When Im working on the code, I continue to write verbose commit messages. Then, when Im ready, I push up my branch and push the button to create a pull request for the branch.</p>
<p>By default, Github prepends the last commit message to the text of the pull request template. I focus my browser into that text area and use the <a href="https://github.com/dmgerman/editWithEmacs.spoon">editWithEmacs.spoon</a> to copy that text and paste it into a new Emacs buffer on my machine.</p>
<p>In that Emacs buffer, I then go about editing the pull request text.</p>
<p>When Im done, I type <kbd>Ctrl</kbd>+<kbd>c</kbd> then <kbd>Ctrl</kbd>+<kbd>c</kbd> (e.g., <code>C-c C-c</code> in Emacs parlance) to copy the text from my Emacs buffer and paste it back into the browsers text area. <small><a href="http://magit.vc">Magit</a> and <a href="http://orgmode.org">Org Mode</a> use that key combination for confirmation of commands.</small></p>
<p>And I submit my pull request.</p>
<h3 id="automating-my-workflow">Automating My Workflow</h3>
<p>Once I started editing these pull requests in Emacs, I started to see the clean-up work that I was regularly doing before I started filling out the checkboxes. And because I was now in my text editor, I chose to write a script to do that clean-up.</p>
<p>Without reading the elisp code, it:</p>
<ul>
<li>Removes the comment preamble</li>
<li>It adds the last commit message as the description</li>
<li>It tidies up the comments of two sections</li>
</ul>
<p>Below is the lisp code to do the tidying up:</p>
<pre><code class="language-lisp">(defun jnf/forem-tidy-pull-request ()
"Perform some quick tidying of the Forem PR template."
(interactive)
;; Start from the beginning.
(beginning-of-buffer)
;; The text before the first HTML/Markdown
;; comments is the commit message. Cut that
;; text...
(search-forward "&lt;!--")
(kill-region 1 (- (point) 4))
;; ...and paste it inside the description
;; section.
(replace-string
"## Description\n\n"
(concat "## Description\n\n"
(format "%s" (car kill-ring))))
;; We've moved point (e.g., the cursor) so let's
;; jump back to the beginning of the buffer.
(beginning-of-buffer)
;; Remove HTML/Markdown comments
(replace-regexp
"\\(\n\\)*&lt;!--\\(.\\|\n\\)*--&gt;\\(\n\\)*"
"")
;; Clean out the comments for QA instructions;
;; I'll write them, but the notes are
;; unnecessary.
(replace-regexp
"QA Instructions, Screenshots, Recordings\\([^#]\\)*"
"QA Instructions, Screenshots, Recordings\n\n")
;; Clean out accessibility concerns; I'll write
;; them, but the notes are unnecessary.
(replace-regexp
"UI accessibility concerns?\\([^#]\\)*"
"UI accessibility concerns?\n\n"))
</code></pre>
<p>Then comes the keyboard bindings to make this easier.</p>
<p>When copying from browser to Emacs, the <code>editWithEmacs.spoon</code> toggles on the <code>hammerspoon-edit-minor-mode</code> for the buffer. <a href="https://github.com/dmgerman/editWithEmacs.spoon/blob/45d44f4ecbeedd0959ac07c2a41d30bd2633ddc1/hammerspoon.el#L55-L64">See the code for those details</a>. The following code adds a new key binding <kbd>Ctrl</kbd>+<kbd>c</kbd> then <kbd>t</kbd> to the keyboard mappings.</p>
<pre><code class="language-lisp">(define-key
hammerspoon-edit-minor-map
(kbd "C-c t")
#'jnf/forem-tidy-pull-request)
</code></pre>
<p>Kind of nice. Load the content into an Emacs buffer, type <kbd>Ctrl</kbd>+<kbd>c</kbd> then <kbd>t</kbd> and Im a few steps closer to completing my pull request.</p>
<h3 id="what-remains">What remains?</h3>
<p>I wrote a script to <a href="https://github.com/ndlib/commandline-tools/blob/cd09d035cf00ff428d5a5a9f6fa986343597fa54/bin/build-pull-request-message">build a pull request message</a> from commit messages. <small>Note, at my previous employer they chose to keep using—and keep choosing to use—the branch name <code>master</code> hence the code defaults to that.</small></p>
<p>I would like to better incorprate that conceptual script into my workflow.</p>
<p>And if Im feeling up for the challenge, Ill grab any Github links from the commit messages and add those to the related tasks and documents.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Since joining Forem, Ive issued 32 pull requests. And as I started doing this task more, I started wondering, “How might I tweak my tooling to address some repetetive tasks?”</p>
<p>I let that question linger as I wrote several pull request messages in Emacs. And then, with a bit of time, I chose to spend a bit of time writing the above script. I dont know how many pull requests Ill need to write to “make up” for the time spent on the script.</p>
<p>But that is a lesser concern. Im more concerned with getting comfortable understanding the interplay of the various systems I use and how I can mold them to assist in the tasks at hand.</p>
<p>When I start to create a pull request, I can quickly run the clean up task so that I can then focus on writing the pull request. In other words, I automated away a “distraction” so I could stay closer to the area of focus.</p>

View file

@ -1 +0,0 @@
<!-- SC_OFF --><div class="md"><p>Wine doesn&#39;t seem to work. It just creates the wine prefix directory and hangs.<br/> Backlog: <a href="https://pastebin.com/08jjt531">https://pastebin.com/08jjt531</a></p> </div><!-- SC_ON --> &#32; submitted by &#32; <a href="https://www.reddit.com/user/TheRealKizu"> /u/TheRealKizu </a> <br/> <span><a href="https://www.reddit.com/r/archlinux/comments/r1stx8/wine_doesnt_work/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/archlinux/comments/r1stx8/wine_doesnt_work/">[comments]</a></span>

View file

@ -1 +0,0 @@
<table> <tr><td> <a href="https://www.reddit.com/r/unixporn/comments/r9zunk/dwm_dwm_has_been_getting_popular_recently/"> <img src="https://preview.redd.it/y8yj65qq0v381.png?width=640&amp;crop=smart&amp;auto=webp&amp;s=6f41aa55c5885c8bd9694b1c53676c4db5b46420" alt="[dwm] dwm has been getting popular recently" title="[dwm] dwm has been getting popular recently" /> </a> </td><td> &#32; submitted by &#32; <a href="https://www.reddit.com/user/Gaffclant"> /u/Gaffclant </a> <br/> <span><a href="https://i.redd.it/y8yj65qq0v381.png">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/unixporn/comments/r9zunk/dwm_dwm_has_been_getting_popular_recently/">[comments]</a></span> </td></tr></table>

View file

@ -1,382 +0,0 @@
<p>
With a 9.5 release highlight post last month, and the month before skipped, it's
now <i>three months</i> since the last regular instalment of TMIO. Let's get back up
to date on some of the latest happenings with Org.
</p>
<p>
Org as markup
</p>
<p>
Looking at the wider ecosystem, it certainly appears that there is a growing
appetite for Org markup outside org-mode. More projects like <a href="https://gohugo.io/">Hugo</a> and <a href="https://logseq.com/">Logseq</a>
seem to be interested in supporting Org markup, and there has been a recent
growth in editor extensions like Neovim's <a href="https://github.com/nvim-orgmode/orgmode/">orgmode.nvim</a> (started in March this
year) and Sublime Text's <a href="https://packagecontrol.io/packages/OrgExtended">OrgExtended</a> (started in June this year).
</p>
<p>
Interest in Org as a general-usage markup format can also be seen within the Org
project. Primarily lead by Nicolas Goaziou, there is an ongoing attempt to
codify the Org syntax in a formal specification in the Worg document <a href="https://orgmode.org/worg/dev/org-syntax.html">Org Syntax
(draft)</a>. Other members of the Org mailing list have directed their effort to
creating non-elisp parsers for Org, both to help Org tools be created in other
languages, and as put in the README for Tom Gillespie's <a href="https://github.com/tgbugs/laundry">laundry</a> parser
</p>
<blockquote>
<p>
The long term goal of this work is to provide a reference that can be used to
standardize Org syntax and behavior and to specify various levels of compliance
for an implementation of Org mode.
</p>
</blockquote>
<p>
Earlier this week Karl Voit, the author of the rather well-known document <a href="https://karl-voit.at/2017/09/23/orgmode-as-markup-only/">Org
Mode Is One of the Most Reasonable Markup Languages to Use for Text</a>, surprised
the mailing list by announcing his independent creation of a multi-leveled
standard for Org syntax subsets called "Orgdown" (the name is a blend of
"Org-mode" and "markdown", but the standard is only a subset of Org). Each level
defines a compliance score given by a mix of parsing and editing support, with
example compliance scores for the first (and currently only) level of the
standard given for common tools.
</p>
<p>
At this stage, it isn't clear exactly how the Org-outside-Emacs landscape will
evolve, but the swelling interest is very encouraging.
</p>
<p>
An Org parser in Julia
</p>
<p>
Speaking of parsers, I may be somewhat biased but I'm quite happy that a Org
parser for <a href="https://julialang.org/">Julia</a> now exists 🎉.
</p>
<p>
//github.com/tecosaur/OrgMode.jl
</p>
<p>
OrgMode.jl is a parser, but also intended as a general-purpose Org library for
Julia. It's only been a week since development started, but it currently
supports most of the <a href="https://orgmode.org/worg/dev/org-syntax.html">Org Syntax</a> draft specification, along with the rendering of
a parsed Org AST to a TTY or back to Org text. A few utility functions are also
included, such as <code>filtermap</code> which operates similarly to <code>org-element-map</code>.
</p>
<p>
Autoloading citation backends
</p>
<p>
One small but impactful change is autoloading of citation backends. Until
recently before say using the <kbd>csl</kbd> backend, one needed to
<code class="src src-elisp"><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-constant">require</span> <span class="org-highlight-quoted-quote">'</span><span class="org-constant">oc-csl</span><span class="org-rainbow-delimiters-depth-1">)</span></code> or face error messages.
</p>
<p>
Now, if you have a line like:
</p>
<pre class="example" id="org4a465c0"> #+cite_export: FORMAT ...
</pre>
<p>
org-mode will try to load the file <kbd>oc-FORMAT</kbd> before trying to process citations.
</p>
<p>
This should make getting started with citations in Org just a bit easier.
</p>
<p>
A nicer <kbd>:tangle-mode</kbd> syntax
</p>
<p>
The standard way of setting a <kbd>:tangle-mode</kbd> has typically been by providing a
closure that makes use of Elisp's octal syntax, such as <kbd>(identity #o755)</kbd>. This
is unnecessarily verbose, and certainly doesn't feel natural.
</p>
<p>
With the addition of a small mode-interpreting function
(<code>org-babel-interpret-file-mode</code>) It is now possible to specify <kbd>:tangle-mode</kbd> using
three different forms of shorthand
octal <kbd>o755</kbd> is equivalent to <kbd>(identity #o755)</kbd>
chmod <code>chmod</code>-style inputs like <kbd>u+x</kbd> are now parsed to a file mode[fn1] with the
the base/default mode set by <code>org-babel-tangle-default-file-mode</code>.
ls -l strings of the form given by <code>ls -l</code> like <kbd>rwxr-xr-x</kbd> are also accepted
</p>
<p>
This means the following forms are now all equivalent:
</p>
<pre class="example" id="orgbb3d0e1"> :tangle-mode (identity #o755)
:tangle-mode o755
:tangle-mode a=rx,u+w
:tangle-mode rwxr-xr-x
</pre>
<p>
It has also been noted on the mailing list that the <kbd>:tangle-mode (identity
#o755)</kbd> form works by being transformed to <kbd>:tangle-mode 493</kbd> during parsing.
Similarly <kbd>:tangle-mode 755</kbd> is equivalent to <kbd>:tangle-mode (identity #o1363)</kbd>. For
some values the decimal and octal interpretation are <i>both</i> valid file modes. Due
to the clear potential for confusion, and since file permissions are an
important security consideration, it has been suggested on the mailing list that
these forms should be depreciated with a warning in future. No decision has been
made yet though.
</p>
<p>
Org element parser cache
</p>
<p>
Ihor Radchenko has done some fantastic work over the past few months by
overhauling parts of <kbd>org-element.el</kbd> to introduce extensive caching. <kbd>org-element</kbd>
is <i>the</i> Org markup parser inside org-mode. This allows for a huge jump in speed,
and also provides a few functions which fetch information without updating the
cache --- allowing for particularly speedy lookups with a small sacrifice to
correctness guarantees on one or two properties in particular cases.
</p>
<p>
Several org-mode API<small>s</small> now make use of the cache to dramatically improve speed.
Aside from improvements to typically slow operations, this is ideal for
situations involving frequent buffer edits.
It's no understatement to say that this work is transformative.
</p>
<p>
One potential beneficiary from this work is actually fontification. It has
become increasingly apparent that the current regex-based method for buffer
fontification is imperfect, and can actually differ from the true structure of
the document as parsed (authoritatively) by <kbd>org-element</kbd>. This has lead to the
well-received suggestion on the mailing list to rewrite the fontification code
to be built on <kbd>org-element</kbd> instead.
</p>
<p>
Inline source block fontification
</p>
<p>
I think <a href="https://orgmode.org/manual/Structure-of-Code-Blocks.html">inline source code blocks</a> are an underappreciated feature of Org. I
don't think it's helped that they have not been visually treated at all
differently from plain text. Now though, they have a new dedicated face
(<code>org-inline-src-block</code>) <i>and</i> in the same manner as source blocks, based on
<code>org-src-fontify-natively</code> can be fontified using the language's major mode.
</p>
<figure id="orgc9faff1">
<img alt="inline-src-block-fontified-vs-code.png" src="https://blog.tecosaur.com/tmio/figures/inline-src-block-fontified-vs-code.png" />
<span class="figure-number">Figure 1: </span>Side-by-side comparison of a identical paragraphs using code (<code>~</code>) markup and inline source blocks (<code>src_</code>).
</figure>
<p>
If you aren't familiar with inline source blocks, you're missing out. They are
very much the inline cousin of source blocks, and so support all your favourite
Babel features like code execution and header arguments. This provides a
fantastic capacity to inline dynamically computed expressions, and optionally
show the code that produces them.
</p>
<figure id="org21ac268">
<img alt="inline-src-block-julia-demo.png" src="https://blog.tecosaur.com/tmio/figures/inline-src-block-julia-demo.png" />
<span class="figure-number">Figure 2: </span>A paragraph making use of <i>evaluated</i> inline source blocks. Note that the <kbd>⟨11⟩</kbd> is a prettified results macro (using a potential future org-mode patch).
</figure>
<p>
Functions as default heading arguments
</p>
<p>
Matt Huszagh has contributed a patch that allows functions to be used as values
for default header arguments. This is great for arguments where a sensible
default can be provided by evaluating a function on-the-fly.
</p>
<p>
Consider for example the arguments required to produce a simple image using R
with Babel:
</p>
<div class="org-src-container">
<pre class="src src-org"><span class="org-org-block-begin-line"> #+begin_src R :results graphics file :file myimage.svg</span>
<span class="org-org-block"> </span><span class="org-org-block"><span class="org-ess-modifiers">library</span></span><span class="org-org-block"><span class="org-ess-paren">(</span></span><span class="org-org-block">ggplot2</span><span class="org-org-block"><span class="org-ess-paren">)</span></span>
<span class="org-org-block"> </span><span class="org-org-block"><span class="org-ess-function-call">ggplot</span></span><span class="org-org-block"><span class="org-ess-paren">(</span></span><span class="org-org-block">mpg, </span><span class="org-org-block"><span class="org-ess-function-call">aes</span></span><span class="org-org-block"><span class="org-ess-paren">(</span></span><span class="org-org-block">displ, hwy, colour </span><span class="org-org-block"><span class="org-ess-operator">=</span></span><span class="org-org-block"> class</span><span class="org-org-block"><span class="org-ess-paren">))</span></span><span class="org-org-block"> </span><span class="org-org-block"><span class="org-ess-operator">+</span></span><span class="org-org-block"> </span><span class="org-org-block"><span class="org-ess-function-call">geom_point</span></span><span class="org-org-block"><span class="org-ess-paren">()</span></span>
<span class="org-org-block-end-line"> #+end_src</span>
</pre>
</div>
<p>
In a Jupyter-style (<kbd>.ipynb</kbd>) or throwaway document, we likely don't care about
the file name at all. With these new capabilities, we can provide a file name
dynamically as a default argument!
</p>
<p>
First we must write a function that when run at the source block will give us a
suitable file name, like so
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"> <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-keyword">defun</span> <span class="org-function-name">my/org-src-sha-to-image</span> <span class="org-rainbow-delimiters-depth-2">()</span>
<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-constant">concat</span> <span class="org-string">"generated-"</span>
<span class="org-rainbow-delimiters-depth-3">(</span><span class="org-constant">substring</span>
<span class="org-rainbow-delimiters-depth-4">(</span><span class="org-constant">sha1</span> <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-function-name">org-element-property</span> <span class="org-builtin">:value</span> <span class="org-rainbow-delimiters-depth-2">(</span><span class="org-function-name">org-element-at-point</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span><span class="org-rainbow-delimiters-depth-4">)</span>
<span class="org-highlight-numbers-number">0</span> <span class="org-highlight-numbers-number">8</span><span class="org-rainbow-delimiters-depth-3">)</span>
<span class="org-string">".svg"</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>
</pre>
</div>
<p>
Let's also write a function to guess whether the source block produces a plot by
checking if there's a plot command on the last line.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"> <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-keyword">defun</span> <span class="org-function-name">my/org-src-guess-results-type</span> <span class="org-rainbow-delimiters-depth-2">()</span>
<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-3">(</span><span class="org-function-name">string-match-p</span> <span class="org-string">"^ *</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">(?:</span></span><span class="org-string">plot</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">|</span></span><span class="org-string">ggplot</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">)</span></span><span class="org-string">([</span><span class="org-string"><span class="org-negation-char">^</span></span><span class="org-string">\n]+\n?\\'"</span>
<span class="org-rainbow-delimiters-depth-4">(</span><span class="org-function-name">org-element-property</span> <span class="org-builtin">:value</span> <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-function-name">org-element-at-point</span><span class="org-rainbow-delimiters-depth-1">)</span><span class="org-rainbow-delimiters-depth-4">)</span><span class="org-rainbow-delimiters-depth-3">)</span>
<span class="org-string">"graphics file"</span> <span class="org-string">"replace"</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>
</pre>
</div>
<p>
Then we can just use these function in place of a static value in the default
header arguments variable --- that's all it takes.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"> <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-keyword">setq</span> org-babel-default-header-args:R
<span class="org-highlight-quoted-quote">'</span><span class="org-rainbow-delimiters-depth-2">(</span><span class="org-rainbow-delimiters-depth-3">(</span><span class="org-builtin">:results</span> . my/org-src-guess-results-type<span class="org-rainbow-delimiters-depth-3">)</span>
<span class="org-rainbow-delimiters-depth-3">(</span><span class="org-builtin">:file</span> . my/org-src-sha-to-image<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>
</pre>
</div>
<p>
This means for most cases we can now get away without any header arguments at all.
</p>
<div class="org-src-container">
<pre class="src src-org"><span class="org-org-block-begin-line"> #+begin_src R</span>
<span class="org-org-block"> </span><span class="org-org-block"><span class="org-ess-modifiers">library</span></span><span class="org-org-block"><span class="org-ess-paren">(</span></span><span class="org-org-block">ggplot2</span><span class="org-org-block"><span class="org-ess-paren">)</span></span>
<span class="org-org-block"> </span><span class="org-org-block"><span class="org-ess-function-call">ggplot</span></span><span class="org-org-block"><span class="org-ess-paren">(</span></span><span class="org-org-block">mpg, </span><span class="org-org-block"><span class="org-ess-function-call">aes</span></span><span class="org-org-block"><span class="org-ess-paren">(</span></span><span class="org-org-block">displ, hwy, colour </span><span class="org-org-block"><span class="org-ess-operator">=</span></span><span class="org-org-block"> class</span><span class="org-org-block"><span class="org-ess-paren">))</span></span><span class="org-org-block"> </span><span class="org-org-block"><span class="org-ess-operator">+</span></span><span class="org-org-block"> </span><span class="org-org-block"><span class="org-ess-function-call">geom_point</span></span><span class="org-org-block"><span class="org-ess-paren">()</span></span>
<span class="org-org-block-end-line"> #+end_src</span>
</pre>
</div>
<p>
It's always lovely to see more ways of reducing boilerplate.
</p>
<p>
Proportional image widths
</p>
<p>
Previously, as long as <code>org-image-actual-width</code> was <code>nil</code> or a list of the form
<code>(default-value)</code>, <kbd>org-mode</kbd> would display images according to a <kbd>:width</kbd> attribute
(e.g. <kbd>#+attr_html: :width 400px</kbd>) by simply looking for the first <kbd>#+attr_</kbd>
affiliated keyword and reading the numeric component of the <kbd>:width</kbd> as the number
of pixels wide the image should be.
</p>
<p>
This has now become somewhat fancier. The image-width determining logic has been
extracted to a new function (<code>org-display-inline-image--width</code>) which will now
extract floating-point values like <kbd>0.7</kbd> and interpret them as that portion of the
accessible text width in the buffer.
</p>
<figure id="org069307b">
<img alt="proportional-image-width.png" src="https://blog.tecosaur.com/tmio/figures/proportional-image-width.png" />
<span class="figure-number">Figure 3: </span>A containing with an image set to half of the accesible text width
</figure>
<p>
This means that a width parameter like <kbd>#+attr_latex: :width 0.7\linewidth</kbd> the
image will displayed as 70% of the buffer text width.
This also supports percentage value, like <kbd>#+attr_html: :width 80%</kbd> by dividing
the number before the <kbd>%</kbd> by 100 as a floating-point value.
As always, if you don't like the way display width is inferred here you can
override it by putting a <kbd>#+attr_org: :width X</kbd> statement first.
</p>
<p>
Support for proportional image widths extends to the <code>(default-value)</code> form of
<code>org-image-actual-width</code>, as now if you set it to say <code>(0.9)</code> which will cause
images <i>without</i> any width specification to be displayed at 90% of the buffer text
width.
</p>
<p>
If you want to have some images displayed as their actual width you can use the
new special width parameter <kbd>t</kbd> to set this on a per-image basis with <kbd>#+attr_org:
:width t</kbd>. Now all you need to do is remember to put this first. Based on current
discussions on the mailing list though, soon <kbd>#+attr_org</kbd> will be prioritised when
determining display image width, no matter which order you put the attributes
in. I do like having one less thing to remember 🙂.
</p>
<p>
Other improvements
Allow citations immediately following an item bullet <span class="underline">TEC</span>
Allow citations immediately following a footnote definition <span class="underline">Nicolas Goaziou</span>
Update some obsolete function references <span class="underline">Marco Wahl</span>
<kbd>ob-gnuplot</kbd> is now maintained by Ihor Radchenko
Improve makescript support for <kbd>ORGVERSION</kbd> in tag-less mirrors <span class="underline">Nicholas Vollmer</span>
New <kbd>ob-julia</kbd>, now maintained by Pedro Bruel
Allow for no indentation, but preserving current indentation by setting
<code>org-indent-indentation-per-level</code> to <code>0</code> <span class="underline">David Lukes</span>
Eliminate some byte-compile warnings <span class="underline">Nicholas Vollmer</span> <span class="underline">Bastien</span>
Support Greek smart quotes <span class="underline">Juan Manuel Macías</span>
<kbd>org-mouse</kbd> support for intermediate-state checkboxes <span class="underline">Jim Porter</span>
Allow nested parenthesis in <code>org-compile-prefix-format</code> <kbd>%(sexp)</kbd> expressions <span class="underline">Ihor Radchenko</span>
<kbd>oc-csl</kbd> / citeproc improvements <span class="underline">András Simonyi</span>
Move more unmaintained/overly niche <kbd>ob-*</kbd> files to the contrib repo, reducing
the maintainer burden <span class="underline">Bastien</span>
Allow use of a function for <code>org-agenda-overriding-header</code> for dynamic headers
<span class="underline">Christopher League</span>
Improve <kbd>org-protocol</kbd> URI decoding <span class="underline">Max Nikulin</span>
Remove some obsolete LaTeX packages from the default packages list <span class="underline">TEC</span>
Add support for text and year citation styles to <kbd>oc-csl</kbd> <span class="underline">András Simonyi</span>
Produce lower-case keywords in <kbd>ox-org</kbd> <span class="underline">TEC</span>
Improve <kbd>ob-gnuplot</kbd> argument processing <span class="underline">Ihor Radchenko</span>
A collection of <kbd>oc-*</kbd> improvements <span class="underline">Nicholas Goaziou</span>
Support bare author citations in <kbd>oc-csl</kbd> <span class="underline">TEC</span>
Add <kbd>:options</kbd> LaTeX attribute to tables <span class="underline">Juan Manuel Macías</span>
Fix display error with <kbd>ob-plantuml</kbd> and html export <span class="underline">Su Lin</span>
More tests! <span class="underline">Ihor Radchenko</span>
Documentation improvements! <span class="underline">Marco Wahl</span> <span class="underline">Stefan Kangas</span> <span class="underline">Daniel Fleischer</span> <span class="underline">Wiliam
Denton</span> <span class="underline">Thomas Dye</span> <span class="underline">Bastien</span> <span class="underline">Bruce D'Arcus</span> <span class="underline">Kyle Meyer</span> <span class="underline">Nicolas Goaziou</span>
Bugfixes
Fix heading insertion in a case where point is before any heading <span class="underline">Marco Wahl</span>
Prevent stringp error when tangling Org from an org-src edit buffer <span class="underline">Mark Dawson</span>
Prevent <code>indent-tabs-mode</code> from messing with justification in ASCII exports
<span class="underline">Morgan Willcock</span>
Fix form of default Babel haskell header args <span class="underline">Ihor Radchenko</span>
No more duplicated logbook entries for repeated tasks <span class="underline">Ihor Radchenko</span>
A headline fontification edge case <span class="underline">Sébastien Miquel</span>
Refactor code that needed Emacs 28 <span class="underline">Kyle Meyer</span>
Make sure a terminating emphasis marker can't be used as a beginning emphasis
marker in fontification <span class="underline">Ihor Radchenko</span>
Allow footnotes at footnote definition start <span class="underline">Nicholas Goaziou</span>
Footnotes
</p>
<p>
[fn1] This is performed easily thanks to <code>file-modes-symbolic-to-number</code>, which
is used as the basis for both the <code>chmod</code> and <code>ls -l</code> shorthand interpretations.
</p>

View file

@ -1 +0,0 @@
<!-- SC_OFF --><div class="md"><p>I am quite new to Emacs and orgmode.</p> <p>When I use <code>org-insert-link</code> I am asked for a link and a description. I want to past the link or the description in there from my clipboard because I simply copied the URL from my browser window.</p> <p>But how can I do that? By default I use evil-mode. But the evil keybindings not working in that org-insert-link buffer. What would be a good and emacsoid solution here?</p> </div><!-- SC_ON --> &#32; submitted by &#32; <a href="https://www.reddit.com/user/wWA5RnA4n2P3w2WvfHq"> /u/wWA5RnA4n2P3w2WvfHq </a> <br/> <span><a href="https://www.reddit.com/r/orgmode/comments/r46wv5/orginsertlink_how_to_paste_text_or_use/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/orgmode/comments/r46wv5/orginsertlink_how_to_paste_text_or_use/">[comments]</a></span>

View file

@ -1 +0,0 @@
<!-- SC_OFF --><div class="md"><p>Hi,</p> <p>As many others i have decided to switch to linux and more specifically Arch linux. I followed the guide by LearnLinuxTV and after couple of attempts I managed to install it. There was internet connection at the start of the installation process, but when I was about to download and install gnome, the WiFi connection was gone.</p> <p>So I switched to ethernet and finished installing Gnome.</p> <p>When I booted the system I can access the internet only via cable, no wifi options what, so ever.</p> <p>Things I tried, so far:</p> <p>The following was installed:</p> <p><strong>pacman -S networkmanager wpa_supplicant wireless_tools netctl</strong> </p> <p>Additionally I installed: <strong>iwctl</strong></p> <p>Also tried to <strong><em>rfkill unblock wifi</em></strong>, <em>restart</em> <strong>iwctl.</strong></p> <p>The <strong>wlan0</strong> is simply not showing as it did during the installation.</p> <p>The only thing I haven&#39;t used, but saw it as possible solution was DCHP setup, but I am not sure how to execute it.</p> <p>I know there are other threads about this (multiple), but nothing worked or it did not feed the issue I was having.</p> <p>Any help is much appreciated!</p> </div><!-- SC_ON --> &#32; submitted by &#32; <a href="https://www.reddit.com/user/iSwear_iAm_working"> /u/iSwear_iAm_working </a> <br/> <span><a href="https://www.reddit.com/r/archlinux/comments/q7bxte/wifi_gone_after_installation_help/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/archlinux/comments/q7bxte/wifi_gone_after_installation_help/">[comments]</a></span>

View file

@ -1 +0,0 @@
<!-- SC_OFF --><div class="md"><p>Is there a way to set this variable in the properties or options of the file header?</p> <p>I know I can set it in file-local variables, with:</p> <pre><code># -*- mode: org; org-confirm-babel-evaluate: nil -*- </code></pre> <p>Or in a <code>.dir-locals.el</code>. However, when opening the file, I get prompted whether to allow setting the variable, which I don&#39;t want. If I press <code>!</code> at that prompt, to allow setting it in the future, too, it allows <em>any</em> file to set the variable without prompting, not just the one I opened (or others in the dame directory).</p> <p>Is there some way to set this in the file&#39;s Org headers instead?</p> </div><!-- SC_ON --> &#32; submitted by &#32; <a href="https://www.reddit.com/user/ieure"> /u/ieure </a> <br/> <span><a href="https://www.reddit.com/r/orgmode/comments/r8x3fq/set_orgconfirmbabelevaluate_with_property_or/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/orgmode/comments/r8x3fq/set_orgconfirmbabelevaluate_with_property_or/">[comments]</a></span>