summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-23Use mkstemp instead of tempnamfeature/replace-tempnamVedang Manerikar
This reverts commit fedd930a09a497c03df3ce5204ccbd80da724662. It should be possible to use the filename as generated by `mkstemp`, the problem was that we were using the wrong path-separator. So the diff from fedd930a09a497c03df3ce5204ccbd80da724662 is as follows: @@ -338,7 +338,11 @@ strchomp (char *str) return str; } - +#if HAVE_W32 +#define MKTEMP_SEPARATOR "\\" +#else +#define MKTEMP_SEPARATOR "/" +#endif /** * Create a new, temporary file and returns its name. * @@ -347,7 +351,7 @@ strchomp (char *str) static char* mktempfile() { - char template[] = P_tmpdir "epdfinfo_XXXXXX"; + char template[] = P_tmpdir MKTEMP_SEPARATOR "epdfinfo_XXXXXX"; I have tested the change on Mac OSX and Linux. It is tested on Windows 10 by @ShuguangSun. Closes: #110
2022-05-21Add a Makefile target to clean docker containersVedang Manerikar
No point leaving dead containers lying around. Relates to: #98
2022-05-21Create named containers when running docker/podman testsVedang Manerikar
This simplifies container operations and ensures that we don't have dead containers hanging around. Relates to: #98
2022-05-21Update the current Dockerfile templatesVedang Manerikar
- Move all package installation to the autobuild file. The Dockerfile should simply start a container and make sure that all the package repositories are updated. - Dockerfiles should spin up containers for the latest (ish) releases of the major Linux operating systems. - Disable Dockerfiles for environments which are not working correctly. List of operating systems where `epdfinfo` server compilation is tested and working correctly: - Debian (9, 10, 11) - Ubuntu (18, 20, 22) - Fedora (34, 35, 36) List of operating systems where `epdfinfo` server compilation is failing inside the containers, for unknown reasons: - Gentoo - Centos - Archlinux List of operating systems that need to be added to containerized testing: - MacOSX - Windows via Msys2 (Mingw32, Mingw64) - OpenBSD - FreeBSD - NixOS - Void - OpenSuse Relates to: #98
2022-05-21Remove usage of all private poppler headers in pdf-toolsPi-Cla
This commit also removes C++ entirely, as it is not needed anymore for correct compilation of `epdfinfo`. The following changes are made: - Remove private headers from all the server code. This involves: - Replace private header functionality with the correct public functions provided by poppler. - Remove unneeded headers around date checks - Delete dead-code (headers, m4 macros) - Remove C++, g++ and similar aliases from all the code. Also: - Remove related information from the README - Remove related information from CI and Dockerfiles Work done by: @Pi-Cla Closes: #105, #103, #109, #114
2022-05-11Revert "Use mkstemp instead of tempnam"Vedang Manerikar
This reverts commit 37bbe861755bc60c7cc333359fee3e2a5d919c77. As explained by @ShuguangSun (re: testing the change on Windows) on > Sorry. It is my fault. The issue is still there. The different is > that the temp dir is created now. However, it reports "Unable to > create temporary file". Reopens: #110
2022-05-11Use mkstemp instead of tempnamVedang Manerikar
This reverts commit 8ee31220a6ae3e41549bfffca7a89c481d270004 and brings in @JunyuanChen's change once again. We modify the commit to fix the problem on Windows by changing the code as follows: --- a/server/epdfinfo.c +++ b/server/epdfinfo.c @@ -347,6 +347,6 @@ static char* mktempfile() { - char template[] = "/tmp/epdfinfoXXXXXX"; + char template[] = P_tmpdir "/epdfinfoXXXXXX"; char *filename = malloc(sizeof(template)); memcpy(filename, template, sizeof(template)); This works correctly for Windows (as confirmed by @ShuguangSun), Mac (tested by @vedang) and Linux (tested by @Junyuanchen) Relates to: #101, #94 Closes: #110
2022-05-09Add an FAQ on running tests locallyVedang Manerikar
This addresses the question of getting immediate feedback on the changes that a developer is making. Of course, the test-suite itself is not extensive and needs to be added to. We will get to it, slow and steady. Related to: #105
2022-05-09Revert "Use mkstemp instead of tempnam"Vedang Manerikar
This reverts commit d63a1e7d87f9b0a19209f2eeb170bcf64612aa2f. In d63a1e7, @JunyuanChen fixed a long standing compilation warning by replacing `tempnam` with `mkstemp` in `epdfinfo`. However, the `mkstemp` implementation does not work correctly on MS Windows (probably because the path template is "wrong" for Windows). I am reverting the commit and opening a new issue #110 to track the correct implementation of `mkstemp` (or equivalent) on MS Windows. It would also be great to add a test against Windows CI to open a PDF and check that the operation completes successfully. Closes: #101
2022-05-09Add FAQ explaining workaround for M1 Mac compilation problemsVedang Manerikar
In short, the problem is that many people are using Emacs compiled for x86_64 on the M1 Mac, which is an ARM64 architecture. There is nothing that `pdf-tools` can do here, but the "fix" is straightforward: Install Emacs from https://emacsformacosx.com/, which is compiled correctly. Related to: politza/pdf-tools#652, #70 Closes: #107
2022-05-09Add workaround for compilation using C++17 standard libraryVedang Manerikar
As explained in #102 by @Pi-Cla and @uliw, `pdf-tools` relies on private headers provided by `poppler`. In order to compile these correctly, we need the standard library provided by C++17. `pdf-tools` is built and tested against C++11. This workaround provides the correct CXXFLAGS to compile the library and fixes the immediate broken compilation problem. There should be two "correct" fixes to these: 1. Remove dependence on private `poppler` headers. This is being tracked in #103 and #105 2. Upgrade `pdf-tools` to build and run against new C++ versions. This is being tracked in #109. Closes: #70, #76, #102, #108, politza/pdf-tools#706.
2022-05-01Use org-mode as the default mode for annotation editsVedang Manerikar
This makes it simpler / more Emacs-y to take notes in annotations that can then be exported.
2022-04-26Add pkgconf to opensuse buildPi-Cla
Nearly forgot to add pkgconf.
2022-04-26Add support for openSUSE except MicroPi-Cla
I am not qualified to add support for the Micros versions of openSUSE, but this supports the most commonly used versions.
2022-04-26Add to PKG_CONFIG_PATH, instead of replacing it.Vedang Manerikar
This is a better solution as it takes into account paths that have already been set up by users. Potentially fixes: #70
2022-04-26Guard against dead buffers in pdf-tools-install-noverifyDaniel Nicolai
I am not sure how to 'consistently' reproduce the issue that this commit fixes. But I was experiencing the issue as reported at https://github.com/syl20bnr/spacemacs/issues/15106, where for some reason `pdf-view-mode` did not open in evil `evilified-state`. After (a long time of) hunting down the cause, I found that `pdf-tools` (silently) errors when the `buffer-list` contains killed buffers. The error occurs because `pdf-tools-install-noverify` calls `with-current-buffer` with the killed buffer. This commit simply adds the `buffer-live-p` check before the `with-current-buffer` form gets called. Closes: #93 Potentially Fixes: syl20bnr/spacemacs#15106 Author: @dalanicolai
2022-04-25Install automake on Mingw systemsVedang Manerikar
This fixes the `server/autobuild` installation on Windows, as mentioned in #86. Fixes: #86
2022-04-25Add FAQ on supporting pdf-tools on your favorite OSVedang Manerikar
Along with adding instructions to the README, I'd like people to make changes to the `autobuild` script. Adding this FAQ to help people learn how to do that. Relates to: #92
2022-04-25Update the Emacs minimum supported version in READMEVedang Manerikar
With the release of Emacs 28, we are dropping support for Emacs 24 and 25 (`pdf-tools` is adopting the policy to support on the latest 3 Emacs major versions). This commit simply changes the README file, no actual change in the code has been made yet. I'll make the code changes as part of work towards the 1.0.0 release milestone. Relates to: #26
2022-04-25Clarify Fedora prereqs in the READMEPi-Cla
Closes: #92
2022-04-25Add epdfinfo prereqs for openSUSE in the READMEPi-Cla
Capture requirements for openSUSE Tumbleweed, Leap and MicroOS.
2022-04-25Use mkstemp instead of tempnamJunyuanChen
Removes the following warning when compiling `epdfinfo`: ``` build/server/epdfinfo.c:354: warning: the use of `tempnam' is dangerous, better use `mkstemp' ```
2022-04-25Add Emacs 28 to CircleCI build matrixPiotr Kwiecinski
2022-04-18Fix build-directory locatingBasil L. Contovounesios
* lisp/pdf-tools.el (pdf-tools-locate-build-directory): Look for 'server' directory not only in default-directory, but also in pdf-tools-directory. Fixes #90.
2022-02-14Add functions for left/right aligning and centeringNicholas Harrison
Useful convenience functions for scrolling the pdf horizontally. Closes: #59
2022-02-13Minor improvements in the installation section of the READMEVedang Manerikar
This should ideally have been part of the previous section, but well, we can't have Gerrit everywhere unfortunately.
2022-02-13Re-arrange server installation instructionsVedang Manerikar
Mention pre-built binaries provided by Debian, Ubuntu and MingW Closes: #79
2022-02-13Mention pre-built Windows binaries in READMEAndrás Svraka
This commit explains how to use the available pre-built binaries for `pdf-tools-server` for MSYS2-MINGW to ease installation on Windows. Currently the MINGW package is outdated but an update is in the works. Progress can be tracked at: msys2/MINGW-packages#10640 Closes: politza/pdf-tools#599 Closes: #77
2022-01-25Fix: build on NixOS without nixpkgs in the Nix pathYevhen Shymotiuk
People who use [Nix Flakes](https://nixos.wiki/wiki/Flakes) do not usually have `nixpkgs` in their `NIX_PATH`, which leads to failed builds, because `nix-shell` relies on it. I suppose some users might not have `nixpkgs` in `NIX_PATH` for other reasons also. I propose to use [NixOS/nixpkgs](https://github.com/NixOS/nixpkgs) in such cases Merges, Closes: #72
2022-01-25fix: fix breakage on AppveyorPiotr Kwiecinski
2022-01-07Fix: check-doc warnings in pdf-miscdevVedang Manerikar
Relates to: #64
2022-01-07Install base-devel, autoconf on AppveyorVedang Manerikar
Since 6th Jan, 2022, builds on Appveyor are failing because they cannot find `autoreconf`[1][2]. This should be implemented from `base-devel`, but even with `base-devel` available the builds are failing. Adding an explicit require on `autoconf` in the hope that this is fixed. 1: https://ci.appveyor.com/project/vedang/pdf-tools/builds/42114287 2: https://ci.appveyor.com/project/vedang/pdf-tools/builds/42101965 Relates to: #68
2022-01-07fix: parameter to pdf-misc-popup-context-menuShuguang Sun
A parameter `event' is required at least for emacs 29.0. Add `_event' to pacitify compiling warning.
2022-01-06Fix: link to demo videoVedang Manerikar
2022-01-03Add Void Linux OS and package manager to autobuild scriptgoiabae
Very simple addition to the autobuild script to include the xbps package manager and Void Linux. Closes: politza#685
2022-01-03Add `display-line-numbers-mode` to Known ProblemsVedang Manerikar
Squashed commit. Author: LuisFCOliveira <67265998+LuisFCOliveira@users.noreply.github.com> Closes: politza#684
2022-01-03Fix: error when using autobuild on Gentooborgorworgor
This fixes `autobuild` failing on Gentoo if the user hasn't compiled `dev-util/pkgconf`[1]. Autobuild fails due to the removed[2] repository `dev-util/pkgconfig`. The new name is now `dev-util/pkgconf`. 1: https://packages.gentoo.org/packages/dev-util/pkgconf 2: https://www.mail-archive.com/gentoo-dev@lists.gentoo.org/msg93072.html Closes: politza#695, politza#693
2022-01-03Fix: use correct multiversion package syntax on OpenBSDTimo Myyrä
OpenBSD pkg_add(1) uses `package%version` syntax to specify which version of the package to use when there are multiple versions packaged. Use it for `autoconf` and `automake`. Closes: politza#696
2022-01-03Minor language correction: it's -> itsVedang Manerikar
The correct possessive with it is "its", not "it's". Closes: politza#689
2022-01-02Add a link to the PDF Tools Wiki to the READMEVedang Manerikar
The PDF Tools Wiki is live! The plan is to build this into a wonderful self-serve website.
2022-01-02Prepare the README for setting up a wiki siteVedang Manerikar
Clean it up a little bit more. The file, as it is in this commit, has been used for the first export to https://pdftools.wiki 🥂💥 Relates to: #38
2022-01-02Update version and mark it as 1.0.0snapshotVedang Manerikar
NonGNU ELPA updates based on the package version number. Unfortunately, 1.0.0snapshot is considered older than 1.0, so I don't expect this to update anything in NonGNU ELPA, but it is a step in the right direction.
2022-01-02Ensure usage of 'dvipng in `pdf-annot-print-annotation-latex`Vedang Manerikar
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 <visuwesh@tutanota.com> Squashed Commit. Closes: #58
2021-12-31Missed adding keybindings breaking change to NEWSVedang Manerikar
This is already part of v0.91 and should be mentioned in NEWS since it's a breaking change.
2021-12-31Release v0.91 🍾🥂v0.91Vedang Manerikar
This is the last release to support Emacs 24.x. Release 1.0.0 will update the minimum supported Emacs version. NEWS: ** Make changes required by newer versions of Emacs A number of changes are made to support new elisp / package changes. There is no impact of this on existing users. - Emacs 27, Emacs 28 and Emacs 29 are supported now. - Synctex 1.21 is supported now. ** Improve overall install experience Running ~M-x pdf-tools-install~ should _just work_ now. ** Add support for high-resolution displays (Retina display on Mac) Setting ~pdf-view-use-scaling~ to a non-nil value now renders crisp images on high-resolution displays.
2021-12-31Clean up installation instructions in the READMEVedang Manerikar
- Make the headings clearer - Remove repetitive instructions
2021-12-31Use `l` and `r` for backward / forward in history.Vedang Manerikar
`l` and `r` are the conventional bindings for history navigation. The previous key-bindings `B` and `N` are kept as-is for people who were used to it. This is a breaking change because `r` was previously bound to `revert-buffer`. However, `g` is also bound to `revert-buffer` and is the conventional binding for `revert` so this should be okay. Fixes: #43
2021-12-31Reset slice when auto-slice is turned offVedang Manerikar
When `pdf-view-auto-slice-minor-mode` is turned off, remove slicing and re-display the window. Fixes: #44
2021-12-31Clean up NEWS and prepare for a v0.91 releaseVedang Manerikar
Collect the major changes made from the previous release into NEWS. Update the milestones for the upcoming v1.0 release. Relates to: #33
2021-12-31Add NonGNU ELPA badge to README.orgStefan Kangas
Closes: #63