<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pdf-tools.git/lisp/pdf-annot.el, branch dev</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/'/>
<entry>
<title>Minor language correction: it's -&gt; its</title>
<updated>2022-01-03T02:34:05+00:00</updated>
<author>
<name>Vedang Manerikar</name>
<email>ved.manerikar@gmail.com</email>
</author>
<published>2022-01-03T02:34:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=5a3a14470db4ab4d7310d7d7a647c9764c48d700'/>
<id>5a3a14470db4ab4d7310d7d7a647c9764c48d700</id>
<content type='text'>
The correct possessive with it is "its", not "it's".

Closes: politza#689
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The correct possessive with it is "its", not "it's".

Closes: politza#689
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure usage of 'dvipng in `pdf-annot-print-annotation-latex`</title>
<updated>2022-01-02T04:46:29+00:00</updated>
<author>
<name>Vedang Manerikar</name>
<email>ved.manerikar@gmail.com</email>
</author>
<published>2022-01-02T04:43:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=3a318a679d1a8003698ced8df3e019641aeb7a7d'/>
<id>3a318a679d1a8003698ced8df3e019641aeb7a7d</id>
<content type='text'>
Users might have changed `org-preview-latex-default-process` from it's
default of value 'dvipng. However, `pdf-tools` can only work with png
files, so bind it locally to ensure that `pdf-tools` can do the right
thing.

Author: Visuwesh &lt;visuwesh@tutanota.com&gt;
Squashed Commit. Closes: #58
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Users might have changed `org-preview-latex-default-process` from it's
default of value 'dvipng. However, `pdf-tools` can only work with png
files, so bind it locally to ensure that `pdf-tools` can do the right
thing.

Author: Visuwesh &lt;visuwesh@tutanota.com&gt;
Squashed Commit. Closes: #58
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix checkdoc errors in pdf-tools lisp code</title>
<updated>2021-12-31T04:16:16+00:00</updated>
<author>
<name>Vedang Manerikar</name>
<email>ved.manerikar@gmail.com</email>
</author>
<published>2021-12-29T12:38:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=ca83d662654ca7a2cc0d5f7b826a1163727df916'/>
<id>ca83d662654ca7a2cc0d5f7b826a1163727df916</id>
<content type='text'>
- Add / Fix docstrings for functions.
- Make punctuation changes as suggested by `checkdoc`

This commit makes changes in a subset of files of `pdf-tools`. Some of
the major files are still pending changes, and will be addressed in a
later commit.

Partially Fixes: #64
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add / Fix docstrings for functions.
- Make punctuation changes as suggested by `checkdoc`

This commit makes changes in a subset of files of `pdf-tools`. Some of
the major files are still pending changes, and will be addressed in a
later commit.

Partially Fixes: #64
</pre>
</div>
</content>
</entry>
<entry>
<title>Indentation and code-quality fixes</title>
<updated>2021-12-31T04:16:00+00:00</updated>
<author>
<name>Vedang Manerikar</name>
<email>ved.manerikar@gmail.com</email>
</author>
<published>2021-12-28T17:06:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=c5e6be69086b45af05b2f58f6df23167b6a5da79'/>
<id>c5e6be69086b45af05b2f58f6df23167b6a5da79</id>
<content type='text'>
- Remove :group arguments from `defcustom` declarations
  - `defcustom` picks up `defgroup` names from the same file, so
    specifying the group is not necessary
- Ensure that all function-names are properly quoted using #'
- Add an explicit header-option setting lexical-binding to t
- Ensure that cl-check-type uses `satisfies` for filenames
- Replace all `defadvice` with `advice-add`
- Replace `(list ...)` patterns with `\`(...)` patterns

Fixes: #62
Fixes: #32
Partially Fixes: #24
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Remove :group arguments from `defcustom` declarations
  - `defcustom` picks up `defgroup` names from the same file, so
    specifying the group is not necessary
- Ensure that all function-names are properly quoted using #'
- Add an explicit header-option setting lexical-binding to t
- Ensure that cl-check-type uses `satisfies` for filenames
- Replace all `defadvice` with `advice-add`
- Replace `(list ...)` patterns with `\`(...)` patterns

Fixes: #62
Fixes: #32
Partially Fixes: #24
</pre>
</div>
</content>
</entry>
<entry>
<title>define-minor-mode: Remove support for obsolete pos arguments</title>
<updated>2021-05-31T16:13:58+00:00</updated>
<author>
<name>Thomas Hisch</name>
<email>thomas.hisch@ims.co.at</email>
</author>
<published>2021-05-31T14:02:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=5f77dae43eb8f71e52e10ba8cf994883f74c3fb7'/>
<id>5f77dae43eb8f71e52e10ba8cf994883f74c3fb7</id>
<content type='text'>
This removes the positial arguemnt triplet from the define-minor-mode
calls, because they are obsolete since Emacs&lt;21. See the following
paragraph in the help section of define-minor-mode.

For backward compatibility with the Emacs&lt;21 calling convention, the
keywords of define-minor-mode can also be preceded by the obsolete
triplet INIT-VALUE LIGHTER KEYMAP.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes the positial arguemnt triplet from the define-minor-mode
calls, because they are obsolete since Emacs&lt;21. See the following
paragraph in the help section of define-minor-mode.

For backward compatibility with the Emacs&lt;21 calling convention, the
keywords of define-minor-mode can also be preceded by the obsolete
triplet INIT-VALUE LIGHTER KEYMAP.
</pre>
</div>
</content>
</entry>
<entry>
<title>Explicitly pass width through `pdf-view-create-image`</title>
<updated>2021-05-31T03:52:14+00:00</updated>
<author>
<name>Illia Ostapyshyn</name>
<email>ilya.ostapyshyn@gmail.com</email>
</author>
<published>2021-05-30T11:04:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=3e1d740dee85c42cc55b1bff552c4e098e2638d3'/>
<id>3e1d740dee85c42cc55b1bff552c4e098e2638d3</id>
<content type='text'>
This is to avoid repeatedly scaling the displayed image width when
applying highlighting. Fixes #19. Closes #22.

As it turns out, it wasn't only `isearch` and `occur` which were
broken, but everything that includes highlighting: selection and jump
to annotation (`C-c C-a l SPC`) as well.

The behavior was caused by passing the value of
`(pdf-view-image-size)` into the highlight functions
(`pdf-info-renderpage-text-regions` and
`pdf-info-renderpage-highlight`) and using the result as it is,
without re-adjusting the displayed image width as it's done when
displaying raw pages without any highlighted elements, see [this
line](https://github.com/vedang/pdf-tools/blob/df2eea87aa84711024b48b2184b1c1ca1b2d0e7b/lisp/pdf-view.el#L935)

This caused the image width to be multiplied with the
`frame-scale-factor` in `pdf-info-renderpage` and the width of the
returned raw image to be interpreted by `create-image` as the
requested width of the image as seen in the buffer.

Fixed by passing the width explicitly in every call to
`pdf-view-create-image`, except for [this
one](https://github.com/vedang/pdf-tools/blob/df2eea87aa84711024b48b2184b1c1ca1b2d0e7b/lisp/pdf-annot.el#L1365),
which seems to be responsible for latex fragment rendering.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is to avoid repeatedly scaling the displayed image width when
applying highlighting. Fixes #19. Closes #22.

As it turns out, it wasn't only `isearch` and `occur` which were
broken, but everything that includes highlighting: selection and jump
to annotation (`C-c C-a l SPC`) as well.

The behavior was caused by passing the value of
`(pdf-view-image-size)` into the highlight functions
(`pdf-info-renderpage-text-regions` and
`pdf-info-renderpage-highlight`) and using the result as it is,
without re-adjusting the displayed image width as it's done when
displaying raw pages without any highlighted elements, see [this
line](https://github.com/vedang/pdf-tools/blob/df2eea87aa84711024b48b2184b1c1ca1b2d0e7b/lisp/pdf-view.el#L935)

This caused the image width to be multiplied with the
`frame-scale-factor` in `pdf-info-renderpage` and the width of the
returned raw image to be interpreted by `create-image` as the
requested width of the image as seen in the buffer.

Fixed by passing the width explicitly in every call to
`pdf-view-create-image`, except for [this
one](https://github.com/vedang/pdf-tools/blob/df2eea87aa84711024b48b2184b1c1ca1b2d0e7b/lisp/pdf-annot.el#L1365),
which seems to be responsible for latex fragment rendering.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix: minor issues as found by package-lint and checkdoc</title>
<updated>2021-05-11T17:39:32+00:00</updated>
<author>
<name>Vedang Manerikar</name>
<email>ved.manerikar@gmail.com</email>
</author>
<published>2021-05-11T17:13:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=d262cf9e19d57c6567e06e51d109150c20753839'/>
<id>d262cf9e19d57c6567e06e51d109150c20753839</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typos</title>
<updated>2021-02-21T09:57:01+00:00</updated>
<author>
<name>Jonas Bernoulli</name>
<email>jonas@bernoul.li</email>
</author>
<published>2020-05-13T12:33:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=b08bcaab377a065e99c83170952d265d9ceead1e'/>
<id>b08bcaab377a065e99c83170952d265d9ceead1e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Don’t record temporary window selection changes</title>
<updated>2021-02-20T05:30:58+00:00</updated>
<author>
<name>Michal Nazarewicz</name>
<email>mina86@mina86.com</email>
</author>
<published>2021-02-10T18:31:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=34a794d8bd402003458b19ebc0a76c90098161c6'/>
<id>34a794d8bd402003458b19ebc0a76c90098161c6</id>
<content type='text'>
There are places with code similar to the following:

      (save-selected-window
        (select-window window)
        …)

For the purposes of this commit, this is roughly equivalent to:

      (let ((old-window (selected-window)))
        (select-window window)
        …
        (select-window old-window 'norecord))

That is, when ‘save-selected-window’ restores the state, it passes
‘norecord’ argument to ‘select-window’ function.  As a result, when
selected window is initially changed ‘buffer-list-update-hook’ is
called however it is not invoked when selected window is restored.
This confuses any code using that hook to track selected window.

To address this issue, change calls such as the above to use
‘norecord’ argument.  This way, ‘buffer-list-update-hook’ is called
neither when the new window is temporarily selected nor when old
window is restored.

For reference, this is indeed what documentation of ‘select-window’
says should be done:

&gt; Run ‘buffer-list-update-hook’ unless NORECORD is non-nil.  Note that
&gt; applications […] often select a window temporarily […]  to simplify
&gt; coding.  As a rule, such selections should not be recorded and
&gt; therefore will not pollute ‘buffer-list-update-hook’.  Selections
&gt; that "really count" are those causing a visible change in the next
&gt; redisplay of WINDOW’s frame and should always be recorded.

Fixes: https://github.com/mina86/auto-dim-other-buffers.el/issues/26
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are places with code similar to the following:

      (save-selected-window
        (select-window window)
        …)

For the purposes of this commit, this is roughly equivalent to:

      (let ((old-window (selected-window)))
        (select-window window)
        …
        (select-window old-window 'norecord))

That is, when ‘save-selected-window’ restores the state, it passes
‘norecord’ argument to ‘select-window’ function.  As a result, when
selected window is initially changed ‘buffer-list-update-hook’ is
called however it is not invoked when selected window is restored.
This confuses any code using that hook to track selected window.

To address this issue, change calls such as the above to use
‘norecord’ argument.  This way, ‘buffer-list-update-hook’ is called
neither when the new window is temporarily selected nor when old
window is restored.

For reference, this is indeed what documentation of ‘select-window’
says should be done:

&gt; Run ‘buffer-list-update-hook’ unless NORECORD is non-nil.  Note that
&gt; applications […] often select a window temporarily […]  to simplify
&gt; coding.  As a rule, such selections should not be recorded and
&gt; therefore will not pollute ‘buffer-list-update-hook’.  Selections
&gt; that "really count" are those causing a visible change in the next
&gt; redisplay of WINDOW’s frame and should always be recorded.

Fixes: https://github.com/mina86/auto-dim-other-buffers.el/issues/26
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid running hooks in a not yet completely set up buffer</title>
<updated>2019-06-28T18:54:43+00:00</updated>
<author>
<name>Andreas Politz</name>
<email>politza@hochschule-trier.de</email>
</author>
<published>2019-06-28T18:54:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=ba031d135a68d20cda9f652d890780c8d6dc0125'/>
<id>ba031d135a68d20cda9f652d890780c8d6dc0125</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
