{"id":16812032,"url":"https://github.com/undeadkernel/pacfiles-mode","last_synced_at":"2026-01-03T19:13:22.500Z","repository":{"id":75631431,"uuid":"140158347","full_name":"UndeadKernel/pacfiles-mode","owner":"UndeadKernel","description":"Emacs major mode to manage pacnew and pacsave files left by the pacman Arch tool","archived":false,"fork":false,"pushed_at":"2023-05-03T15:27:32.000Z","size":313,"stargazers_count":42,"open_issues_count":2,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-23T20:35:17.182Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UndeadKernel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-07-08T10:34:09.000Z","updated_at":"2024-08-20T22:48:54.000Z","dependencies_parsed_at":"2023-06-07T04:30:10.500Z","dependency_job_id":null,"html_url":"https://github.com/UndeadKernel/pacfiles-mode","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UndeadKernel%2Fpacfiles-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UndeadKernel%2Fpacfiles-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UndeadKernel%2Fpacfiles-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UndeadKernel%2Fpacfiles-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UndeadKernel","download_url":"https://codeload.github.com/UndeadKernel/pacfiles-mode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244022724,"owners_count":20385134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T10:20:27.358Z","updated_at":"2026-01-03T19:13:17.455Z","avatar_url":"https://github.com/UndeadKernel.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Release tag](https://img.shields.io/github/tag/UndeadKernel/pacfiles-mode.svg?label=release)\n[![MIT license](https://img.shields.io/github/license/UndeadKernel/pacfiles-mode.svg)](https://github.com/UndeadKernel/pacfiles-mode/blob/master/LICENSE)\n\n# pacfiles-mode\n\nEmacs major mode to manage `.pacnew` and `.pacsave` files left by Arch's pacman.\nTo merge files, *pacfiles-mode* automatically creates an Ediff merge session\nthat a user can interact with. After finishing the Ediff merge session,\n*pacfiles-mode* cleans up the mess that Ediff leaves behind. *pacfiles-mode*\nalso takes care of keeping the correct permissions of merged files, and\nrequests passwords (with TRAMP) to act as root when needed.\n\n*pacfiles-mode* is free software, licensed under the MIT License.\n\n![pacfiles-mode main interface](/../screenshots/main_ui.png \"Main user interface\")\n\n## Installation and Setup\n*pacfiles-mode* can be installed automatically from a package repository or\nmanually.\n\n### Automatic installation\n*pacfiles-mode* is in the [MELPA](https://melpa.org/) package repository. To\ninstall from MELPA, make sure the following is somewhere in your\n`~/.emacs.d/init.el`:\n\n``` emacs-lisp\n(require 'package)\n(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\"))\n```\nOpen emacs and execute `M-x package-refresh-contents RET` followed by `M-x\npackage-install RET pacfiles-mode RET`. *pacfiles-mode* will then be compiled\nand installed.\n\n### Manual installation\nTo manually install *pacfiles-mode*, clone this repository into `.emacs.d`:\n\n```shell\n$ cd ~/.emacs.d\n$ git clone https://github.com/UndeadKernel/pacfiles-mode.git\n```\n\nThen add the cloned folder to your `load-path` and require *pacfiles-mode* by\nadding the following to `~/.emacs.d/init.el`:\n\n``` emacs-lisp\n(add-to-list 'load-path \"~/.emacs.d/pacfiles-mode\")\n(require 'pacfiles-mode)\n```\n\u003c!-- ### With use package --\u003e\n\u003c!-- Add the following to your configuration file: --\u003e\n\u003c!--     (use-package ) --\u003e\n\n## Overview\nStart *pacfiles-mode* with the command `pacfiles`. Choose a file to merge by\nclicking (or pressing `RET`) on `[merge]`. An Ediff session will start; do not\nchange the name of the Ediff buffers. After finishing the merging process, save\nthe merged file (e.g., in Ediff's command buffer, use keybindings `w c`) without\nchanging its name or location and quit Ediff. To apply the merge file to the\nfile system, click (or press `RET`) on `[apply]`. Quit *pacfiles-mode* by\npressing `q`.\n\n## Main interface\n\n*pacfiles-mode* searches and lists all `.pacnew` and `.pacsave` update files\nfound in `/etc` (by default). These update files can be discarded or, with the\nhelp of [Ediff](https://www.gnu.org/software/emacs/manual/html_node/ediff/\n\"Ediff's manual\"), compared or merged. Ediff is automatically setup for the\nuser; permissions are also taken care for.\n\n### Pending files\n`.pacnew` or `.pacsave` file that have not been merged\nby the user are shown under the **pending** header. Three actions are\navailable on these files\n\n![Pending Actions](/../screenshots/pending_actions.png \"Pending Actions\")\n* `[merge]`: start an Ediff session to merge the update\n* `[diff]`: compare the update with its base file\n* `[delete]`: delete the update and keep the base file as is\n\nIf the `[diff]` button is not available, there is no base file to compare with.\nIn this case, `[merge]` will treat the update, as is, as the file to merge.\n\n### Merged files\n`.pacnew` and `.pacsave` files that have been merged, but not applied into the\nfile system, are shown under the **merged** header. Three actions are\navailable on these files:\n\n![Merged Actions](/../screenshots/merge_actions.png \"Merged Actions\")\n* `[apply]`: copy the merged file into the file system and delete the update\n  file\n* `[view]`: show the merge of the update and its base file\n* `[discard]`: delete the merge file, keep the update file and the base file\n  intact\n\n### Apply or discard all changes\n![Apply/Discard All Actions](/../screenshots/buttons_all.png \"Apply/Discard All\nActions\")\n\nThe `[Apply All]` and `[Discard All]` buttons do what you would expect them to do.\n\n## Ediff tricks and tips\nWhen merging an update, Ediff's setup will look like this:\n\n![Ediff interface](/../screenshots/ediff_ui.png \"Ediff interface\")\n\nEdiff's control buffer (on the bottom) will be focused and ready to receive user\ncommands. The following key bindings are most useful:\n\n* `n` / `p`: go to the next / previous place where there is a difference\n* `a`: place in the merge buffer the contents highlighted in the top left window\n  (always the update file)\n* `b`: place in the merge buffer the contents highlighted in the top right\n  window (always the base file to update)\n* `w c`: save the contents of the merge buffer\n* `q`: quit Ediff\n* `?`: show Ediff's help\n\nWhen saving the merge buffer, do not change the merge buffer's location or name.\nYou can switch to the merge buffer, buffer **C** in Ediff, and modify it as any\nother buffer.\n\n\n## Functions and Variables of *pacfiles-mode*\n\n### Commands\n* `pacfiles` or `pacfiles-start`: start *pacfiles-mode*.\n* `pacfiles-quit`: quit *pacfiles-mode*.\n* `pacfiles-revert-buffer`: reload the list of update files\n\n### Configuration variables\n* `pacfiles-updates-search-command`: command used to search for `.pacnew` and\n  `.pasave` files.\n* `pacfiles-activate-no-confirm`: if `t`, do not ask for user input when\n  applying or discarding a merged file.\n* `pacfiles-merge-file-tmp-location`: location where temporary merge files are\n  stored.\n\n### Keybindings\n* `n` and `p`: move forward or backwards to the next button.\n* `C-c C-n` and `C-c C-p`: move to the next and previous section headers.\n* `g` or `r`: refresh the list of files.\n* `TAB`: toggle hiding or showing headers\n\n## What's happening in the back\nWhen merging a `.pacnew` or `.pacsave` update with its corresponding base file,\n*pacfiles-mode* computes a hash of the base file. The hash is used to name a\ntemporary merge file with the format`\u003chash\u003e.pacmerge`. If *pacfiles-mode* finds\na `.pacmerge` file whose name matches the hash of a base file, the `.pacmerge`\nfile is associated to the base file as its merge. When applying a merge, this\ntemporary `.pacmerge` file replaces the base file and the corresponding update\nfile is deleted.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fundeadkernel%2Fpacfiles-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fundeadkernel%2Fpacfiles-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fundeadkernel%2Fpacfiles-mode/lists"}