Archived
1
0
Fork 0

Compare commits

..

No commits in common. "225249290dbc3890ab14b758a00bf8b72c1495d1" and "2e9149f2c718602ce411c7df01dcbccaf5d473c6" have entirely different histories.

307 changed files with 898 additions and 121659 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
(define-package "async" "20230323.643" "Asynchronous processing in Emacs" (define-package "async" "20230322.521" "Asynchronous processing in Emacs"
'((emacs "24.4")) '((emacs "24.4"))
:commit "34feabe1142863a2c96f75afda1a2ae4aa0813f6" :authors :commit "3f91ce8b963cd6909c6578f87b5545fd761f1547" :authors
'(("John Wiegley" . "jwiegley@gmail.com")) '(("John Wiegley" . "jwiegley@gmail.com"))
:maintainer :maintainer
'("Thierry Volpiatto" . "thievol@posteo.net") '("Thierry Volpiatto" . "thievol@posteo.net")

View file

@ -411,7 +411,7 @@ working directory."
(set-process-sentinel (set-process-sentinel
(get-buffer-process buf-err) (get-buffer-process buf-err)
(lambda (proc _change) (lambda (proc _change)
(unless (or async-debug (process-live-p proc)) (unless (or async-debug (buffer-live-p proc))
(kill-buffer (process-buffer proc))))) (kill-buffer (process-buffer proc)))))
(with-current-buffer buf (with-current-buffer buf
(set (make-local-variable 'async-callback) finish-func) (set (make-local-variable 'async-callback) finish-func)

View file

@ -1,105 +0,0 @@
;;; burly-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*-
;;
;;; Code:
(add-to-list 'load-path (directory-file-name
(or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "burly" "burly.el" (0 0 0 0))
;;; Generated autoloads from burly.el
(autoload 'burly-open-last-bookmark "burly" "\
Open the last-opened Burly bookmark.
Helpful for, e.g. quickly restoring an overview while working on
a project." t nil)
(autoload 'burly-kill-buffer-url "burly" "\
Copy BUFFER's URL to the kill ring.
\(fn BUFFER)" t nil)
(autoload 'burly-kill-frames-url "burly" "\
Copy current frameset's URL to the kill ring." t nil)
(autoload 'burly-kill-windows-url "burly" "\
Copy current frame's window configuration URL to the kill ring." t nil)
(autoload 'burly-open-url "burly" "\
Open Burly URL.
\(fn URL)" t nil)
(autoload 'burly-bookmark-frames "burly" "\
Bookmark the current frames as NAME.
\(fn NAME)" t nil)
(autoload 'burly-bookmark-windows "burly" "\
Bookmark the current frame's window configuration as NAME.
\(fn NAME)" t nil)
(autoload 'burly-open-bookmark "burly" "\
Restore a window configuration to the current frame from a Burly BOOKMARK.
\(fn BOOKMARK)" t nil)
(autoload 'burly-bookmark-handler "burly" "\
Handler function for Burly BOOKMARK.
\(fn BOOKMARK)" nil nil)
(register-definition-prefixes "burly" '("burly-"))
;;;***
;;;### (autoloads nil "burly-tabs" "burly-tabs.el" (0 0 0 0))
;;; Generated autoloads from burly-tabs.el
(defvar burly-tabs-mode nil "\
Non-nil if Burly-Tabs mode is enabled.
See the `burly-tabs-mode' command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `burly-tabs-mode'.")
(custom-autoload 'burly-tabs-mode "burly-tabs" nil)
(autoload 'burly-tabs-mode "burly-tabs" "\
Integrate Burly with `tab-bar-mode'.
When active, Burly bookmarks are opened in new tabs and named
accordingly.
This is a minor mode. If called interactively, toggle the
`Burly-Tabs mode' mode. If the prefix argument is positive,
enable the mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is `toggle'. Enable
the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate `(default-value \\='burly-tabs-mode)'.
The mode's hook is called both when the mode is enabled and when
it is disabled.
\(fn &optional ARG)" t nil)
(register-definition-prefixes "burly-tabs" '("burly-"))
;;;***
;;;### (autoloads nil nil ("burly-pkg.el") (0 0 0 0))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; coding: utf-8
;; End:
;;; burly-autoloads.el ends here

View file

@ -1,13 +0,0 @@
(define-package "burly" "20221024.2019" "Save and restore frame/window configurations with buffers"
'((emacs "27.1")
(map "2.1"))
:commit "f570fa87ee72a451f535cfb038d81798a01a7e20" :authors
'(("Adam Porter" . "adam@alphapapa.net"))
:maintainer
'("Adam Porter" . "adam@alphapapa.net")
:keywords
'("convenience")
:url "https://github.com/alphapapa/burly.el")
;; Local Variables:
;; no-byte-compile: t
;; End:

View file

@ -1,90 +0,0 @@
;;; burly-tabs.el --- Burly's support for tab-bar -*- lexical-binding: t; -*-
;; Copyright (C) 2022 Adam Porter
;; Author: Adam Porter <adam@alphapapa.net>
;; Keywords: tab-bar, tabs, frames
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; This library provides support for `tab-bar-mode'.
;;; Code:
;; TODO: In Emacs 28, add an entry to the tab context menu. See
;; <https://lists.gnu.org/archive/html/emacs-devel/2021-09/msg00590.html>.
;;;; Requirements
(require 'cl-lib)
(require 'map)
(require 'tab-bar)
(require 'burly)
;;;; Commands
;;;###autoload
(define-minor-mode burly-tabs-mode
"Integrate Burly with `tab-bar-mode'.
When active, Burly bookmarks are opened in new tabs and named
accordingly."
:global t
:group 'burly
(unless (version<= "28.1" emacs-version)
(user-error "`burly-tabs-mode' requires Emacs 28.1 or later"))
(if burly-tabs-mode
(progn
(advice-add #'burly--windows-set :before #'burly-tabs--windows-set-before-advice)
(advice-add #'burly--windows-set :after #'burly-tabs--windows-set-after-advice))
;; Disable mode.
(advice-remove #'burly--windows-set #'burly-tabs--windows-set-before-advice)
(advice-remove #'burly--windows-set #'burly-tabs--windows-set-after-advice)))
(cl-defun burly-tabs-reset-tab (&optional (tab (tab-bar--current-tab-find)))
"Reset TAB to its saved configuration.
Resets TAB to the Burly bookmark that it was created from."
(interactive)
(pcase-let* ((`(,_ . ,(map burly-bookmark-name)) tab))
(unless burly-bookmark-name
(user-error "Tab has no associated Burly bookmark (`burly-tabs-mode' must be enabled when opening a bookmark)"))
(burly-open-bookmark burly-bookmark-name)))
(defalias 'burly-reset-tab #'burly-tabs-reset-tab)
;;;; Functions
(defun burly-tabs--windows-set-before-advice (&rest _ignore)
"Cause bookmark to be opened in a tab by that name.
If a tab already exists named the value of
`burly-opened-bookmark-name', select it; otherwise call
`tab-bar-new-tab'. To be used as advice to
`burly-open-bookmark'."
(if (tab-bar--tab-index-by-name burly-opened-bookmark-name)
(tab-bar-select-tab-by-name burly-opened-bookmark-name)
(tab-bar-new-tab)))
(defun burly-tabs--windows-set-after-advice (&rest _ignore)
"Set current tab's `burly-bookmark-name' to BOOKMARK-NAME.
To be used as advice to `burly--windows-set'."
(tab-rename burly-opened-bookmark-name)
(let ((current-tab (tab-bar--current-tab-find)))
(setf (alist-get 'burly-bookmark-name (cdr current-tab))
burly-opened-bookmark-name)))
(provide 'burly-tabs)
;;; burly-tabs.el ends here

View file

@ -1,590 +0,0 @@
;;; burly.el --- Save and restore frame/window configurations with buffers -*- lexical-binding: t; -*-
;; Copyright (C) 2020 Adam Porter
;; Author: Adam Porter <adam@alphapapa.net>
;; URL: https://github.com/alphapapa/burly.el
;; Version: 0.3-pre
;; Package-Requires: ((emacs "27.1") (map "2.1"))
;; Keywords: convenience
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; This package provides tools to save and restore frame and window
;; configurations in Emacs, including buffers that may not be live
;; anymore. In this way, it's like a lightweight "workspace" manager,
;; allowing you to easily restore one or more frames, including their
;; windows, the windows' layout, and their buffers.
;; Internally it uses Emacs's bookmarks system to restore buffers to
;; their previous contents and location. This provides power and
;; extensibility, since many major modes already integrate with
;; Emacs's bookmarks system. However, in case a mode's bookmarking
;; function isn't satisfactory, Burly allows the user to customize
;; buffer-restoring functions for specific modes.
;; For Org mode, Burly provides such custom functions so that narrowed
;; and indirect Org buffers are properly restored, and headings are
;; located by outline path in case they've moved since a bookmark was
;; made (the org-bookmark-heading package also provides this through
;; the Emacs bookmark system, but users may not have it installed, and
;; the functionality is too useful to not include here by default).
;; Internally, buffers and window configurations are also encoded as
;; URLs, and users may also save and open those URLs instead of using
;; Emacs bookmarks. (The name "Burly" comes from "buffer URL.")
;;; Code:
;;;; Requirements
(require 'bookmark)
(require 'cl-lib)
(require 'map)
(require 'subr-x)
(require 'thingatpt)
(require 'url-parse)
(require 'url-util)
;;;; Variables
(defvar burly--window-state nil
"Used to work around `bookmark--jump-via' affecting window configuration.")
(defvar burly-opened-bookmark-name nil
"The name of the last bookmark opened by Burly.")
;;;; Customization
(defgroup burly nil
"Save and restore window configurations and their buffers."
:group 'convenience
:link '(url-link "https://github.com/alphapapa/burly.el")
:link '(custom-manual "(Burly)Usage"))
(defcustom burly-bookmark-prefix "Burly: "
"Prefix string for the name of new Burly bookmarks."
:type 'string)
(defcustom burly-major-mode-alist
(list (cons 'org-mode
(list (cons 'make-url-fn #'burly--org-mode-buffer-url)
(cons 'follow-url-fn #'burly-follow-url-org-mode))))
"Alist mapping major modes to the appropriate Burly functions."
:type '(alist :key-type symbol
:value-type (set (cons (const make-url-fn) (function :tag "Make-URL function"))
(cons (const follow-url-fn) (function :tag "Follow-URL function")))))
(defcustom burly-frameset-filter-alist '((name . nil))
"Alist of frame parameters and filtering functions.
See variable `frameset-filter-alist'."
:type '(alist :key-type (symbol :tag "Frame parameter")
:value-type (choice (const :tag "Always copied" nil)
(const :tag "Never copied" :never)
(function :tag "Filter function"))))
(defcustom burly-window-persistent-parameters
(list (cons 'burly-url 'writable)
(cons 'header-line-format 'writable)
(cons 'mode-line-format 'writable)
(cons 'tab-line-format 'writable)
(cons 'no-other-window 'writable)
(cons 'no-delete-other-windows 'writable)
(cons 'window-preserved-size 'writable)
(cons 'window-side 'writable)
(cons 'window-slot 'writable))
"Additional window parameters to persist.
See Info node `(elisp)Window Parameters'. See also option
`burly-set-window-persistent-parameters'."
:type '(alist :key-type (symbol :tag "Window parameter")
:value-type (choice (const :tag "Not saved" nil)
(const :tag "Saved" writable))))
(defcustom burly-set-window-persistent-parameters t
"Sync `window-persistent-parameters' with `burly' option.
When this option is non-nil, `window-persistent-parameters' is
set to the value of `burly-window-persistent-parameters' when
Burly restores a window configuration.
By default, `window-persistent-parameters' does not save many of
the parameters that are in the default value of
`burly-window-persistent-parameters', which causes, e.g. a
built-in command like `window-toggle-side-windows' to not persist
such parameters when side windows are toggled (which could,
e.g. cause a window's `mode-line-format' to not persist). So
enabling this option solves that.
Note: When this option is non-nil,
`burly-window-persistent-parameters' should be set heeding the
warning in the manual about not using the `writable' value for
parameters whose values do not have a read syntax."
:type 'boolean)
;;;; Commands
;;;###autoload
(defun burly-open-last-bookmark ()
"Open the last-opened Burly bookmark.
Helpful for, e.g. quickly restoring an overview while working on
a project."
(interactive)
(unless burly-opened-bookmark-name
(user-error "Use command `burly-open-bookmark' first"))
(burly-open-bookmark burly-opened-bookmark-name))
;;;###autoload
(defun burly-kill-buffer-url (buffer)
"Copy BUFFER's URL to the kill ring."
(interactive "bBuffer: ")
(let ((url (burly-buffer-url (get-buffer buffer))))
(kill-new url)
(message "%s" url)))
;;;###autoload
(defun burly-kill-frames-url ()
"Copy current frameset's URL to the kill ring."
(interactive)
(let ((url (burly-frames-url)))
(kill-new url)
(message "%s" url)))
;;;###autoload
(defun burly-kill-windows-url ()
"Copy current frame's window configuration URL to the kill ring."
(interactive)
(let ((url (burly-windows-url)))
(kill-new url)
(message "%s" url)))
;;;###autoload
(defun burly-open-url (url)
"Open Burly URL."
;; FIXME: If point is on an "emacs+burly..." URL, but it's after the "emacs+burly"
;; part, `thing-at-point-url-at-point' doesn't pick up the whole URL.
(interactive (list (or (thing-at-point-url-at-point t)
(read-string "URL: "))))
(cl-assert (string-prefix-p "emacs+burly+" url) t "burly-open-url: URL not an emacs+burly one:")
(pcase-let* ((urlobj (url-generic-parse-url url))
((cl-struct url type) urlobj)
(subtype (car (last (split-string type "+" 'omit-nulls)))))
(pcase-exhaustive subtype
((or "bookmark" "file" "name") (pop-to-buffer (burly-url-buffer url)))
("frames" (burly--frameset-restore urlobj))
("windows" (burly--windows-set urlobj)))))
;;;###autoload
(defun burly-bookmark-frames (name)
"Bookmark the current frames as NAME."
(interactive
(list (completing-read "Save Burly bookmark: " (burly-bookmark-names)
nil nil burly-bookmark-prefix)))
(let ((record (list (cons 'url (burly-frames-url))
(cons 'handler #'burly-bookmark-handler))))
(bookmark-store name record nil)))
;;;###autoload
(defun burly-bookmark-windows (name)
"Bookmark the current frame's window configuration as NAME."
(interactive
(list (completing-read "Save Burly bookmark: " (burly-bookmark-names)
nil nil burly-bookmark-prefix)))
(let ((record (list (cons 'url (burly-windows-url))
(cons 'handler #'burly-bookmark-handler))))
(bookmark-store name record nil)))
;;;###autoload
(defun burly-open-bookmark (bookmark)
"Restore a window configuration to the current frame from a Burly BOOKMARK."
(interactive
(list (completing-read "Open Burly bookmark: " (burly-bookmark-names)
nil nil burly-bookmark-prefix)))
(cl-assert (and bookmark (not (string-empty-p bookmark))) nil
"(burly-open-bookmark): Invalid Burly bookmark: '%s'" bookmark)
(bookmark-jump bookmark))
;;;; Functions
;;;;; Buffers
(defun burly-url-buffer (url)
"Return buffer for URL."
(cl-assert (string-prefix-p "emacs+burly+" url) t "burly-url-buffer: URL not an emacs+burly one: %s" url)
(pcase-let* ((urlobj (url-generic-parse-url url))
((cl-struct url type) urlobj)
(subtype (car (last (split-string type "+" 'omit-nulls)))))
(pcase-exhaustive subtype
("bookmark" (burly--bookmark-url-buffer urlobj))
("file" (burly--file-url-buffer urlobj))
("name" (let ((buffer-name (decode-coding-string (cdr (url-path-and-query urlobj))
'utf-8-unix)))
(or (get-buffer buffer-name)
(with-current-buffer (get-buffer-create (concat "*Burly (error): " buffer-name "*"))
(insert "Burly was unable to get a buffer named: " buffer-name "\n"
"URL: " url "\n"
"Please report this error to the developer\n\n")
(current-buffer))))))))
(defun burly-buffer-url (buffer)
"Return URL for BUFFER."
(let* ((major-mode (buffer-local-value 'major-mode buffer))
(make-url-fn (map-nested-elt burly-major-mode-alist (list major-mode 'make-url-fn))))
(cond (make-url-fn (funcall make-url-fn buffer))
(t (or (with-current-buffer buffer
(when-let* ((record (ignore-errors
(bookmark-make-record))))
(cl-labels ((encode (element)
(cl-typecase element
(string (encode-coding-string element 'utf-8-unix))
(proper-list (mapcar #'encode element))
(cons (cons (encode (car element))
(encode (cdr element))))
(t element))))
;; Encode all strings in record with UTF-8.
;; NOTE: If we stop using URLs in the future, maybe this won't be needed.
(setf record (encode record)))
(burly--bookmark-record-url record)))
;; Buffer can't seem to be bookmarked, so record it as
;; a name-only buffer. For some reason, it works
;; better to use the buffer name in the query string
;; rather than the filename/path part.
(url-recreate-url (url-parse-make-urlobj "emacs+burly+name" nil nil nil nil
(concat "?" (encode-coding-string (buffer-name buffer)
'utf-8-unix))
nil nil 'fullness)))))))
;;;;; Files
(defun burly--file-url-buffer (urlobj)
"Return buffer for \"emacs+burly+file:\" URLOBJ."
(pcase-let* ((`(,path . ,query-string) (url-path-and-query urlobj))
(query (url-parse-query-string query-string))
(buffer (find-file-noselect path))
(major-mode (buffer-local-value 'major-mode buffer))
(follow-fn (map-nested-elt burly-major-mode-alist (list major-mode 'follow-url-fn))))
(cl-assert follow-fn nil "Major mode not in `burly-major-mode-alist': %s" major-mode)
(funcall follow-fn :buffer buffer :query query)))
;;;;; Frames
;; Looks like frameset.el should make this pretty easy.
(require 'frameset)
(cl-defun burly-frames-url (&optional (frames (frame-list)))
"Return URL for frameset of FRAMES.
FRAMES defaults to all live frames."
(dolist (frame frames)
;; Set URL window parameter for each window before saving state.
(burly--windows-set-url (window-list frame 'never)))
(let* ((window-persistent-parameters (append burly-window-persistent-parameters
window-persistent-parameters))
(frameset-filter-alist (append burly-frameset-filter-alist frameset-filter-alist))
(query (frameset-save frames))
(print-length nil) ; Important!
(filename (concat "?" (url-hexify-string (prin1-to-string query))))
(url (url-recreate-url (url-parse-make-urlobj "emacs+burly+frames" nil nil nil nil
filename))))
(dolist (frame frames)
;; Clear window parameters.
(burly--windows-set-url (window-list frame 'never) 'nullify))
url))
(defun burly--frameset-restore (urlobj)
"Restore FRAMESET according to URLOBJ."
(setf window-persistent-parameters (copy-sequence burly-window-persistent-parameters))
(pcase-let* ((`(,_ . ,query-string) (url-path-and-query urlobj))
(frameset (read (url-unhex-string query-string)))
(frameset-filter-alist (append burly-frameset-filter-alist frameset-filter-alist)))
;; Restore buffers. (Apparently `cl-loop''s in-ref doesn't work with
;; its destructuring, so we can't just `setf' on `window-state'.)
(setf (frameset-states frameset)
(cl-loop for (frame-parameters . window-state) in (frameset-states frameset)
collect (cons frame-parameters (burly--bufferize-window-state window-state))))
(condition-case err
(frameset-restore frameset)
(error (delay-warning 'burly (format "Error while restoring frameset: ERROR:%S FRAMESET:%S" err frameset))))))
;;;;; Windows
(cl-defun burly-windows-url (&optional (frame (selected-frame)))
"Return URL for window configuration on FRAME."
(with-selected-frame frame
(let* ((query (burly--window-state frame))
(print-length nil) ; Important!
(filename (concat "?" (url-hexify-string (prin1-to-string query)))))
(url-recreate-url (url-parse-make-urlobj "emacs+burly+windows" nil nil nil nil
filename)))))
(cl-defun burly--window-state (&optional (frame (selected-frame)))
"Return window state for FRAME.
Sets `burly-url' window parameter in each window before
serializing."
(with-selected-frame frame
;; Set URL window parameter for each window before saving state.
(burly--windows-set-url (window-list nil 'never))
(let* ((window-persistent-parameters (append burly-window-persistent-parameters
window-persistent-parameters))
(window-state (window-state-get nil 'writable)))
;; Clear window parameters we set (because they aren't kept
;; current, so leaving them could be confusing).
(burly--windows-set-url (window-list nil 'never) 'nullify)
window-state)))
(defun burly--windows-set-url (windows &optional nullify)
"Set `burly-url' window parameter in WINDOWS.
If NULLIFY, set the parameter to nil."
(dolist (window windows)
(let ((value (if nullify nil (burly-buffer-url (window-buffer window)))))
(set-window-parameter window 'burly-url value))))
(defun burly--windows-set (urlobj)
"Set window configuration according to URLOBJ."
(setf window-persistent-parameters (copy-sequence burly-window-persistent-parameters))
(pcase-let* ((window-persistent-parameters (append burly-window-persistent-parameters
window-persistent-parameters))
(`(,_ . ,query-string) (url-path-and-query urlobj))
;; FIXME: Remove this condition-case eventually, after giving users time to update their bookmarks.
(state (condition-case nil
(read (url-unhex-string query-string))
(invalid-read-syntax (display-warning 'burly "Please recreate that Burly bookmark (storage format changed)")
(read query-string))))
(state (burly--bufferize-window-state state)))
(window-state-put state (frame-root-window))
;; HACK: Since `bookmark--jump-via' insists on calling a
;; buffer-display function after handling the bookmark, we add a
;; function to `bookmark-after-jump-hook' to restore the window
;; configuration that we just set.
(setf burly--window-state (window-state-get (frame-root-window) 'writable))
(push #'burly--bookmark-window-state-hack bookmark-after-jump-hook)))
(defun burly--bufferize-window-state (state)
"Return window state STATE with its buffers reincarnated."
(cl-labels ((bufferize-state
;; Set windows' buffers in STATE.
(state) (pcase state
(`(leaf . ,_attrs) (bufferize-leaf state))
((pred atom) state)
(`(,_key . ,(pred atom)) state)
((pred list) (mapcar #'bufferize-state state))))
(bufferize-leaf
(leaf) (pcase-let* ((`(leaf . ,attrs) leaf)
((map parameters buffer) attrs)
((map burly-url) parameters)
(`(,_buffer-name . ,buffer-attrs) buffer)
(new-buffer (burly-url-buffer burly-url)))
(setf (map-elt attrs 'buffer) (cons new-buffer buffer-attrs))
(cons 'leaf attrs))))
(if-let ((leaf-pos (cl-position 'leaf state)))
;; A one-window frame: the elements following `leaf' are that window's params.
(append (cl-subseq state 0 leaf-pos)
(bufferize-leaf (cl-subseq state leaf-pos)))
;; Multi-window frame.
(bufferize-state state))))
;;;;; Bookmarks
(defun burly--bookmark-window-state-hack (&optional _)
"Put window state from `burly--window-state'.
This function is to be called in `bookmark-after-jump-hook' to
work around `bookmark--jump-via's calling a buffer-display
function which changes the window configuration after
`burly--windows-set' has set it. This function removes itself
from the hook."
(unwind-protect
(progn
(cl-assert burly--window-state)
(window-state-put burly--window-state (frame-root-window)))
(setf bookmark-after-jump-hook (delete #'burly--bookmark-window-state-hack bookmark-after-jump-hook)
burly--window-state nil)))
;;;###autoload
(defun burly-bookmark-handler (bookmark)
"Handler function for Burly BOOKMARK."
(let ((previous-name burly-opened-bookmark-name))
;; Set opened bookmark name before actually opening it so that the
;; tabs-mode advice functions can use it beforehand.
(setf burly-opened-bookmark-name (car bookmark))
(condition-case err
(burly-open-url (alist-get 'url (bookmark-get-bookmark-record bookmark)))
(error (setf burly-opened-bookmark-name previous-name)
(signal (car err) (cdr err))))))
(defun burly--bookmark-record-url (record)
"Return a URL for bookmark RECORD."
(cl-assert record)
(pcase-let* ((`(,name . ,props) record)
(print-length nil) ; Important!
(query (cl-loop for prop in props
;; HACK: Remove unreadable values from props.
do (cl-loop for value in-ref (cdr prop)
when (or (bufferp value))
do (setf value nil))
collect (list (car prop) (prin1-to-string (cdr prop)))))
(filename (concat (url-hexify-string name) "?" (url-build-query-string (remove nil query)))))
(url-recreate-url (url-parse-make-urlobj "emacs+burly+bookmark" nil nil nil nil
filename nil nil 'fullness))))
(defun burly--bookmark-url-buffer (urlobj)
"Return buffer for bookmark specified by URLOBJ.
URLOBJ should be a URL object as returned by
`url-generic-parse-url'."
(pcase-let* ((`(,path . ,query-string) (url-path-and-query urlobj))
(query (url-parse-query-string query-string))
;; Convert back to alist.
(props (cl-loop for prop in query
for key = (intern (car prop))
for value = (pcase key
('handler (intern (cadr prop)))
('help-args (read (cadr prop)))
('help-fn (ignore-errors
;; NOTE: Due to changes in help-mode.el which serialize natively
;; compiled subrs in the bookmark record, which cannot be read
;; back (which actually break the entire bookmark system when
;; such a record is saved in the bookmarks file), we have to
;; workaround a failure to read here. See bug#56643.
(read (cadr prop))))
('position (cl-parse-integer (cadr prop)))
(_ (read (cadr prop))))
collect (cons key value)))
(record (cons path props)))
(cl-labels ((decode (element)
(cl-typecase element
(string (decode-coding-string element 'utf-8-unix))
(proper-list (mapcar #'decode element))
(cons (cons
(decode (car element))
(decode (cdr element))))
(t element))))
;; Decode all strings in record with UTF-8.
;; NOTE: If we stop using URLs in the future, maybe this won't be needed.
(setf record (decode record)))
(save-window-excursion
(condition-case err
(bookmark-jump record)
(error (delay-warning 'burly (format "Error while opening bookmark: ERROR:%S RECORD:%S" err record))))
(current-buffer))))
(defun burly-bookmark-names ()
"Return list of all Burly bookmark names."
(cl-loop for bookmark in bookmark-alist
for (_name . params) = bookmark
when (equal #'burly-bookmark-handler (alist-get 'handler params))
collect (car bookmark)))
;;;;; Org buffers
;; We only require Org when compiling the file. At runtime, Org will
;; be loaded before we call any of its functions, because we load the
;; Org file into a buffer first, which activates `org-mode'.
(eval-when-compile
(require 'org))
(declare-function org-before-first-heading-p "org")
(declare-function org-back-to-heading "org")
(declare-function org-find-olp "org")
(declare-function org-tree-to-indirect-buffer "org")
(declare-function org-narrow-to-subtree "org")
(declare-function org-heading-components "org")
(declare-function org-up-heading-safe "org")
(defun burly--org-mode-buffer-url (buffer)
"Return URL for Org BUFFER."
(with-current-buffer buffer
(cl-assert (or (buffer-file-name buffer)
(buffer-file-name (buffer-base-buffer buffer)))
nil "Buffer has no file name: %s" buffer)
(let* ((narrowed (buffer-narrowed-p))
(indirect (buffer-base-buffer buffer))
(top-olp
;; For narrowing purposes, start with the heading at the top of the buffer.
(when (buffer-narrowed-p)
(save-excursion
(goto-char (point-min))
;; `org-get-outline-path' replaces links in headings with their
;; descriptions, which prevents using them in regexp searches.
(when (org-heading-components)
(org-with-wide-buffer
(nreverse (cl-loop collect (substring-no-properties (nth 4 (org-heading-components)))
while (org-up-heading-safe))))))))
(point-olp
(when (ignore-errors (org-heading-components))
(org-with-wide-buffer
(nreverse (cl-loop collect (substring-no-properties (nth 4 (org-heading-components)))
while (org-up-heading-safe))))))
(pos (point))
(relative-pos (when top-olp
(- (point) (save-excursion
(org-back-to-heading)
(point)))))
(print-length nil) ; Important!
(query (list (list "pos" pos)
(when top-olp
(list "top-olp" (prin1-to-string top-olp)))
(when point-olp
(list "point-olp" (prin1-to-string point-olp)))
(when relative-pos
(list "relative-pos" relative-pos))
(when indirect
(list "indirect" "t"))
(when narrowed
(list "narrowed" "t"))))
(buffer-file (or (buffer-file-name buffer)
(buffer-file-name (buffer-base-buffer buffer))))
(filename (concat buffer-file "?" (url-build-query-string (remove nil query)))))
(url-recreate-url (url-parse-make-urlobj "emacs+burly+file" nil nil nil nil
filename nil nil 'fullness)))))
(cl-defun burly-follow-url-org-mode (&key buffer query)
"In BUFFER, jump to heading and position from QUERY, and return a buffer.
If QUERY specifies that the buffer should be indirect, a new,
indirect buffer is returned. Otherwise BUFFER is returned."
;; `pcase's map support uses `alist-get', which does not work with string keys
;; unless its TESTFN arg is bound to, e.g. `equal', but `map-elt' has deprecated
;; its TESTFN arg, and there's no way to pass it or bind it when using `pcase'
;; anyway. So we rebind `alist-get' to a function that uses `assoc-string'.
(with-current-buffer buffer
(cl-letf (((symbol-function 'alist-get)
(lambda (key alist &optional _default _remove _testfn)
;; Only the first value in the list of values is returned, so multiple
;; values are not supported. I don't expect this to be a problem...
(cadr (assoc-string key alist)))))
(pcase-let* (((map ("pos" pos)
("indirect" indirect)
("narrowed" narrowed)
("top-olp" top-olp)
("point-olp" point-olp)
("relative-pos" relative-pos))
query)
(heading-pos (when top-olp
(org-find-olp (read top-olp) 'this-buffer))))
(widen)
(if heading-pos
(goto-char heading-pos)
(goto-char (string-to-number pos)))
(cond (indirect (org-tree-to-indirect-buffer))
(narrowed (progn
(org-narrow-to-subtree)
(goto-char (org-find-olp (read point-olp) 'this-buffer)))))
(when (and heading-pos relative-pos)
(forward-char (string-to-number relative-pos)))
(current-buffer)))))
;;;; Footer
(provide 'burly)
;;; burly.el ends here

View file

@ -1,325 +0,0 @@
This is README.info, produced by makeinfo version 5.2 from README.texi.
INFO-DIR-SECTION Emacs
START-INFO-DIR-ENTRY
* Burly: (burly). Save and restore window configurations and their buffers.
END-INFO-DIR-ENTRY

File: README.info, Node: Top, Next: Installation, Up: (dir)
Burly.el
********
This package provides tools to save and restore frame and window
configurations in Emacs, including buffers that may not be live anymore.
In this way, its like a lightweight "workspace" manager, allowing you
to easily restore one or more frames, including their windows, the
windows layout, and their buffers.
Internally it uses Emacss bookmarks system to restore buffers to
their previous contents and location. This provides power and
extensibility, since many major modes already integrate with Emacss
bookmarks system. However, in case a modes bookmarking function isnt
satisfactory, Burly allows the user to customize buffer-restoring
functions for specific modes.
For Org mode, Burly provides such custom functions so that narrowed
and indirect Org buffers are properly restored, and headings are located
by outline path in case theyve moved since a bookmark was made (the
org-bookmark-heading (https://github.com/alphapapa/org-bookmark-heading)
package also provides this through the Emacs bookmark system, but users
may not have it installed, and the functionality is too useful to not
include here by default).
Internally, buffers and frame/window configurations are also encoded
as URLs, and users may also save and open those URLs instead of using
Emacs bookmarks. (The name "Burly" comes from "buffer URL.") For
example, a URL to the Installation/Quelpa heading in this file, as Im
writing it, looks like this:
emacs+burly+file:///home/me/src/emacs/burly.el/README.org?pos=2651&outline-path=%28%22Installation%22%20%22Quelpa%22%29&relative-pos=308
In terms of built-in features, Burly may be seen as integrating or
leveraging the built-in libraries bookmark.el, window.el, and
frameset.el.
* Menu:
* Installation::
* Usage::
* Changelog::
* Development::
* Credits::
* License::
— The Detailed Node Listing —
Installation
* MELPA::
* Quelpa::
* Manual::
Usage
* Bookmark commands::
* URL commands::
* Tab bar::
* Tips::
Changelog
* 0.3-pre: 03-pre.
* 0.2: 02.
* 0.1: 01.

File: README.info, Node: Installation, Next: Usage, Prev: Top, Up: Top
1 Installation
**************
* Menu:
* MELPA::
* Quelpa::
* Manual::

File: README.info, Node: MELPA, Next: Quelpa, Up: Installation
1.1 MELPA
=========
If you installed from MELPA, youre done. Just run one of the commands
below.

File: README.info, Node: Quelpa, Next: Manual, Prev: MELPA, Up: Installation
1.2 Quelpa
==========
The easiest way is to install with quelpa-use-package
(https://github.com/quelpa/quelpa-use-package), like this:
(use-package burly
:quelpa (burly :fetcher github :repo "alphapapa/burly.el"))

File: README.info, Node: Manual, Prev: Quelpa, Up: Installation
1.3 Manual
==========
1. Install version 2.1 or later of the map library from GNU ELPA.
2. Copy burly.el into a directory in your load-path, then
(require 'burly).

File: README.info, Node: Usage, Next: Changelog, Prev: Installation, Up: Top
2 Usage
*******
* Menu:
* Bookmark commands::
* URL commands::
* Tab bar::
* Tips::

File: README.info, Node: Bookmark commands, Next: URL commands, Up: Usage
2.1 Bookmark commands
=====================
Most users will probably use Burly by bookmarking frame and window
configurations and accessing them with these commands:
burly-bookmark-frames: Bookmark the current frames and their
window configurations.
burly-bookmark-windows: Bookmark the current frames window
configuration.
burly-open-bookmark: Select and open a Burly bookmark.
burly-open-last-bookmark: Open the last-opened Burly bookmark.
Helpful for, e.g. quickly restoring an overview while working on a
project.
Note that bookmarks created by Burly are regular Emacs bookmarks, so
they can be managed by Emacss built-in bookmark commands, e.g.
list-bookmarks, bookmark-delete, etc.

File: README.info, Node: URL commands, Next: Tab bar, Prev: Bookmark commands, Up: Usage
2.2 URL commands
================
These commands work on URL strings. While most users probably wont use
these, they may be useful for building custom tooling.
burly-open-url: Open a Burly URL (at point, or prompt for one),
displaying the buffer(s) in the current window or frame.
burly-kill-buffer-url: Copy BUFFERs URL to the kill ring.
burly-kill-frames-url: Copy the current framesets URL to the
kill ring.
burly-kill-windows-url: Copy the current frames window
configuration URL to the kill ring.

File: README.info, Node: Tab bar, Next: Tips, Prev: URL commands, Up: Usage
2.3 Tab bar
===========
Burly supports Emacss tab-bar-mode with burly-tabs-mode. When
active, Burly bookmarks are opened in new tabs, and the tabs are named
according to the bookmarks. Reopening a Burly bookmark uses the
designated tab, if it already exists, and tabs may be reset to their
bookmarked state with the command burly-reset-tab (which you might
bind to C-x t R).

File: README.info, Node: Tips, Prev: Tab bar, Up: Usage
2.4 Tips
========
• You can customize settings in the burly group.
• An Info manual is included with this package.

File: README.info, Node: Changelog, Next: Development, Prev: Usage, Up: Top
3 Changelog
***********
* Menu:
* 0.3-pre: 03-pre.
* 0.2: 02.
* 0.1: 01.

File: README.info, Node: 03-pre, Next: 02, Up: Changelog
3.1 0.3-pre
===========
*Added*
• Command burly-tabs-mode, which integrates Burly with
tab-bar-mode. When active, Burly bookmarks are opened in new
tabs, and the tabs are named according to the bookmark.
• Command burly-reset-tab, which resets a tab to the state of the
bookmark which opened it.
*Changed*
• Emacs version 28.1 or later is required.
*Fixed*
• Buffers that cant be restored by name no longer cause an error
which aborts restoration of the rest of the bookmarks buffers.
• Added workaround for regression in Emacs 28 regarding bookmarks for
help-mode buffers. (See Emacs bug 56643
(https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56643).)

File: README.info, Node: 02, Next: 01, Prev: 03-pre, Up: Changelog
3.2 0.2
=======
*Added*
• Bookmark commands use completing-read and offer existing Burly
bookmark names, making it easier to update bookmarks. (Thanks to
Erik Sjöstrand (https://github.com/Kungsgeten).)
• Command burly-open-last-bookmark.
• Option burly-set-window-persistent-parameters, which synchronizes
window-persistent-parameters with
burly-window-persistent-parameters, ensuring that built-in Emacs
commands like window-toggle-side-windows persist parameters that
are persisted with Burly.
*Changed*
• Option burly-window-persistent-parameterss default value
includes more window parameters, like header/mode line, side, slot,
etc, making it easier to restore an overview of a project or
"workspace."
• Emacs version 27.1 or later is required.
*Fixed*
• Narrow Org buffers to correct heading (at the top of the buffer
rather than at point).
• Buffers whose names have multibyte characters. (Fixes #43
(https://github.com/alphapapa/burly.el/issues/43). Thanks to Liu
Hui (https://github.com/ilupin) for reporting.)
• Bind print-level to nil where prin1-to-string is used (in case
the value is non-nil in a users config, which would cause
truncated values).

File: README.info, Node: 01, Prev: 02, Up: Changelog
3.3 0.1
=======
Initial release.

File: README.info, Node: Development, Next: Credits, Prev: Changelog, Up: Top
4 Development
*************
Bug reports, feature requests, suggestions — _oh my_!

File: README.info, Node: Credits, Next: License, Prev: Development, Up: Top
5 Credits
*********
• Thanks to Clemens Radermacher (https://github.com/clemera) and
Robert Weiner (https://github.com/rswgnu) for their suggestions.
• Thanks to Trey Peacock (https://github.com/tpeacock19) for
extensive feedback on pre-release versions.

File: README.info, Node: License, Prev: Credits, Up: Top
6 License
*********
GPLv3

Tag Table:
Node: Top219
Node: Installation2378
Node: MELPA2529
Node: Quelpa2701
Node: Manual3014
Node: Usage3283
Node: Bookmark commands3454
Node: URL commands4320
Node: Tab bar5001
Node: Tips5490
Node: Changelog5685
Node: 03-pre5847
Node: 026658
Node: 018079
Node: Development8173
Node: Credits8344
Node: License8704

End Tag Table

Local Variables:
coding: utf-8
End:

View file

@ -1,19 +0,0 @@
This is the file .../info/dir, which contains the
topmost node of the Info hierarchy, called (dir)Top.
The first time you invoke Info you start off looking at this node.

File: dir, Node: Top This is the top of the INFO tree
This (the Directory node) gives a menu of major topics.
Typing "q" exits, "H" lists all Info commands, "d" returns here,
"h" gives a primer for first-timers,
"mEmacs<Return>" visits the Emacs manual, etc.
In Emacs, you can click mouse button 2 on a menu item or cross reference
to select it.
* Menu:
Emacs
* Burly: (burly). Save and restore window configurations and
their buffers.

View file

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View file

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View file

@ -1,6 +1,6 @@
(define-package "dashboard" "20230331.2304" "A startup screen extracted from Spacemacs" (define-package "dashboard" "20230317.413" "A startup screen extracted from Spacemacs"
'((emacs "26.1")) '((emacs "26.1"))
:commit "0f970d298931f9de7b511086728af140bf44a642" :authors :commit "b648a45684677aa29cdb00e4d14d02dd9fa9cb68" :authors
'(("Rakan Al-Hneiti" . "rakan.alhneiti@gmail.com")) '(("Rakan Al-Hneiti" . "rakan.alhneiti@gmail.com"))
:maintainer :maintainer
'("Jesús Martínez" . "jesusmartinez93@gmail.com") '("Jesús Martínez" . "jesusmartinez93@gmail.com")

View file

@ -69,7 +69,6 @@
(defvar org-todo-keywords-1) (defvar org-todo-keywords-1)
(defvar all-the-icons-dir-icon-alist) (defvar all-the-icons-dir-icon-alist)
(defvar package-activated-list) (defvar package-activated-list)
(defvar elpaca-after-init-time)
(declare-function string-pixel-width "subr-x.el") ; TODO: remove this after 29.1 (declare-function string-pixel-width "subr-x.el") ; TODO: remove this after 29.1
(declare-function shr-string-pixel-width "shr.el") ; TODO: remove this after 29.1 (declare-function shr-string-pixel-width "shr.el") ; TODO: remove this after 29.1
@ -182,8 +181,6 @@ Example:
(when (boundp 'straight--profile-cache) (when (boundp 'straight--profile-cache)
(setq package-count (+ (hash-table-count straight--profile-cache) package-count))) (setq package-count (+ (hash-table-count straight--profile-cache) package-count)))
(when (fboundp 'elpaca--queued) (when (fboundp 'elpaca--queued)
(setq time (format "%f seconds" (float-time (time-subtract elpaca-after-init-time
before-init-time))))
(setq package-count (length (elpaca--queued)))) (setq package-count (length (elpaca--queued))))
(if (zerop package-count) (if (zerop package-count)
(format "Emacs started in %s" time) (format "Emacs started in %s" time)
@ -475,8 +472,8 @@ If MESSAGEBUF is not nil then MSG is also written in message buffer."
"Insert a page break line in dashboard buffer." "Insert a page break line in dashboard buffer."
(dashboard-append dashboard-page-separator)) (dashboard-append dashboard-page-separator))
(defun dashboard-insert-heading (heading &optional shortcut icon) (defun dashboard-insert-heading (heading &optional shortcut)
"Insert a widget HEADING in dashboard buffer, adding SHORTCUT, ICON if provided." "Insert a widget HEADING in dashboard buffer, adding SHORTCUT if provided."
(when (and (dashboard-display-icons-p) dashboard-set-heading-icons) (when (and (dashboard-display-icons-p) dashboard-set-heading-icons)
;; Try loading `all-the-icons' ;; Try loading `all-the-icons'
(unless (or (fboundp 'all-the-icons-octicon) (unless (or (fboundp 'all-the-icons-octicon)
@ -500,7 +497,6 @@ If MESSAGEBUF is not nil then MSG is also written in message buffer."
((string-equal heading "Projects:") ((string-equal heading "Projects:")
(all-the-icons-octicon (cdr (assoc 'projects dashboard-heading-icons)) (all-the-icons-octicon (cdr (assoc 'projects dashboard-heading-icons))
:height 1.2 :v-adjust 0.0 :face 'dashboard-heading)) :height 1.2 :v-adjust 0.0 :face 'dashboard-heading))
((not (null icon)) icon)
(t " "))) (t " ")))
(insert " ")) (insert " "))

View file

@ -1,12 +0,0 @@
(define-package "dashboard" "20230331.2304" "A startup screen extracted from Spacemacs"
'((emacs "26.1"))
:commit "0f970d298931f9de7b511086728af140bf44a642" :authors
'(("Rakan Al-Hneiti" . "rakan.alhneiti@gmail.com"))
:maintainer
'("Jesús Martínez" . "jesusmartinez93@gmail.com")
:keywords
'("startup" "screen" "tools" "dashboard")
:url "https://github.com/emacs-dashboard/emacs-dashboard")
;; Local Variables:
;; no-byte-compile: t
;; End:

View file

@ -568,18 +568,13 @@ inactive windows."
:group 'faces :group 'faces
:link '(url-link :tag "Homepage" "https://github.com/seagle0128/doom-modeline")) :link '(url-link :tag "Homepage" "https://github.com/seagle0128/doom-modeline"))
(defface doom-modeline
'((t ()))
"Default face."
:group 'doom-modeline-faces)
(defface doom-modeline-emphasis (defface doom-modeline-emphasis
'((t (:inherit (doom-modeline mode-line-emphasis)))) '((t (:inherit mode-line-emphasis)))
"Face used for emphasis." "Face used for emphasis."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-highlight (defface doom-modeline-highlight
'((t (:inherit (doom-modeline mode-line-highlight)))) '((t (:inherit mode-line-highlight)))
"Face used for highlighting." "Face used for highlighting."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
@ -589,12 +584,12 @@ inactive windows."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-buffer-file (defface doom-modeline-buffer-file
'((t (:inherit (doom-modeline mode-line-buffer-id bold)))) '((t (:inherit (mode-line-buffer-id bold))))
"Face used for the filename part of the mode-line buffer path." "Face used for the filename part of the mode-line buffer path."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-buffer-modified (defface doom-modeline-buffer-modified
'((t (:inherit (doom-modeline warning bold) :background unspecified))) '((t (:inherit (warning bold) :background unspecified)))
"Face used for the \\='unsaved\\=' symbol in the mode-line." "Face used for the \\='unsaved\\=' symbol in the mode-line."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
@ -604,17 +599,17 @@ inactive windows."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-buffer-minor-mode (defface doom-modeline-buffer-minor-mode
'((t (:inherit (doom-modeline font-lock-doc-face) :slant normal))) '((t (:inherit font-lock-doc-face :slant normal)))
"Face used for the minor-modes segment in the mode-line." "Face used for the minor-modes segment in the mode-line."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-project-parent-dir (defface doom-modeline-project-parent-dir
'((t (:inherit (doom-modeline font-lock-comment-face bold)))) '((t (:inherit (font-lock-comment-face bold))))
"Face used for the project parent directory of the mode-line buffer path." "Face used for the project parent directory of the mode-line buffer path."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-project-dir (defface doom-modeline-project-dir
'((t (:inherit (doom-modeline font-lock-string-face bold)))) '((t (:inherit (font-lock-string-face bold))))
"Face used for the project directory of the mode-line buffer path." "Face used for the project directory of the mode-line buffer path."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
@ -630,7 +625,7 @@ This applies to `anzu', `evil-substitute', `iedit' etc."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-host (defface doom-modeline-host
'((t (:inherit (doom-modeline italic)))) '((t (:inherit italic)))
"Face for remote hosts in the mode-line." "Face for remote hosts in the mode-line."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
@ -640,27 +635,27 @@ This applies to `anzu', `evil-substitute', `iedit' etc."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-input-method-alt (defface doom-modeline-input-method-alt
'((t (:inherit (doom-modeline font-lock-doc-face bold) :slant normal))) '((t (:inherit (font-lock-doc-face bold) :slant normal)))
"Alternative face for input method in the mode-line." "Alternative face for input method in the mode-line."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-debug (defface doom-modeline-debug
'((t (:inherit (doom-modeline font-lock-doc-face bold) :slant normal))) '((t (:inherit (font-lock-doc-face bold) :slant normal)))
"Face for debug-level messages in the mode-line. Used by vcs, checker, etc." "Face for debug-level messages in the mode-line. Used by vcs, checker, etc."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-info (defface doom-modeline-info
'((t (:inherit (doom-modeline success bold)))) '((t (:inherit (success bold))))
"Face for info-level messages in the mode-line. Used by vcs, checker, etc." "Face for info-level messages in the mode-line. Used by vcs, checker, etc."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-warning (defface doom-modeline-warning
'((t (:inherit (doom-modeline warning bold)))) '((t (:inherit (warning bold))))
"Face for warnings in the mode-line. Used by vcs, checker, etc." "Face for warnings in the mode-line. Used by vcs, checker, etc."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-urgent (defface doom-modeline-urgent
'((t (:inherit (doom-modeline error bold)))) '((t (:inherit (error bold))))
"Face for errors in the mode-line. Used by vcs, checker, etc." "Face for errors in the mode-line. Used by vcs, checker, etc."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
@ -671,7 +666,7 @@ Also see the face `doom-modeline-unread-number'."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-unread-number (defface doom-modeline-unread-number
'((t (:inherit doom-modeline :slant italic :weight normal))) '((t (:slant italic :weight normal)))
"Face for unread number in the mode-line. Used by GitHub, mu4e, etc." "Face for unread number in the mode-line. Used by GitHub, mu4e, etc."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
@ -686,23 +681,23 @@ Also see the face `doom-modeline-unread-number'."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-debug-visual (defface doom-modeline-debug-visual
'((((background light)) :foreground "#D4843E" :inherit doom-modeline) '((((background light)) :foreground "#D4843E")
(((background dark)) :foreground "#915B2D" :inherit doom-modeline)) (((background dark)) :foreground "#915B2D"))
"Face to use for the mode-line while debugging." "Face to use for the mode-line while debugging."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-evil-emacs-state (defface doom-modeline-evil-emacs-state
'((t (:inherit (doom-modeline font-lock-builtin-face bold)))) '((t (:inherit (font-lock-builtin-face bold))))
"Face for the Emacs state tag in evil indicator." "Face for the Emacs state tag in evil indicator."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-evil-insert-state (defface doom-modeline-evil-insert-state
'((t (:inherit (doom-modeline font-lock-keyword-face bold)))) '((t (:inherit (font-lock-keyword-face bold))))
"Face for the insert state tag in evil indicator." "Face for the insert state tag in evil indicator."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-evil-motion-state (defface doom-modeline-evil-motion-state
'((t (:inherit (doom-modeline font-lock-doc-face bold) :slant normal))) '((t (:inherit (font-lock-doc-face bold) :slant normal)))
"Face for the motion state tag in evil indicator." "Face for the motion state tag in evil indicator."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
@ -757,12 +752,12 @@ Also see the face `doom-modeline-unread-number'."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-boon-insert-state (defface doom-modeline-boon-insert-state
'((t (:inherit (doom-modeline font-lock-keyword-face bold)))) '((t (:inherit (font-lock-keyword-face bold))))
"Face for the insert state tag in boon indicator." "Face for the insert state tag in boon indicator."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-boon-special-state (defface doom-modeline-boon-special-state
'((t (:inherit (doom-modeline font-lock-builtin-face bold)))) '((t (:inherit (font-lock-builtin-face bold))))
"Face for the special state tag in boon indicator." "Face for the special state tag in boon indicator."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
@ -772,72 +767,72 @@ Also see the face `doom-modeline-unread-number'."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-persp-name (defface doom-modeline-persp-name
'((t (:inherit (doom-modeline font-lock-comment-face italic)))) '((t (:inherit (font-lock-comment-face italic))))
"Face for the persp name." "Face for the persp name."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-persp-buffer-not-in-persp (defface doom-modeline-persp-buffer-not-in-persp
'((t (:inherit (doom-modeline font-lock-doc-face bold italic)))) '((t (:inherit (font-lock-doc-face bold italic))))
"Face for the buffers which are not in the persp." "Face for the buffers which are not in the persp."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-repl-success (defface doom-modeline-repl-success
'((t (:inherit doom-modeline-info :weight normal))) '((t (:inherit success :weight normal)))
"Face for REPL success state." "Face for REPL success state."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-repl-warning (defface doom-modeline-repl-warning
'((t (:inherit doom-modeline-warning :weight normal))) '((t (:inherit warning :weight normal)))
"Face for REPL warning state." "Face for REPL warning state."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-lsp-success (defface doom-modeline-lsp-success
'((t (:inherit doom-modeline-info :weight normal))) '((t (:inherit success :weight normal)))
"Face for LSP success state." "Face for LSP success state."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-lsp-warning (defface doom-modeline-lsp-warning
'((t (:inherit doom-modeline-warning :weight normal))) '((t (:inherit warning :weight normal)))
"Face for LSP warning state." "Face for LSP warning state."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-lsp-error (defface doom-modeline-lsp-error
'((t (:inherit doom-modeline-urgent :weight normal))) '((t (:inherit error :weight normal)))
"Face for LSP error state." "Face for LSP error state."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-lsp-running (defface doom-modeline-lsp-running
'((t (:inherit (doom-modeline compilation-mode-line-run) :weight normal :slant normal))) '((t (:inherit compilation-mode-line-run :weight normal :slant normal)))
"Face for LSP running state." "Face for LSP running state."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-battery-charging (defface doom-modeline-battery-charging
'((t (:inherit doom-modeline-info :weight normal))) '((t (:inherit success :weight normal)))
"Face for battery charging status." "Face for battery charging status."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-battery-full (defface doom-modeline-battery-full
'((t (:inherit doom-modeline-info :weight normal))) '((t (:inherit success :weight normal)))
"Face for battery full status." "Face for battery full status."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-battery-normal (defface doom-modeline-battery-normal
'((t (:inherit (doom-modeline mode-line) :weight normal))) '((t (:inherit mode-line :weight normal)))
"Face for battery normal status." "Face for battery normal status."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-battery-warning (defface doom-modeline-battery-warning
'((t (:inherit doom-modeline-warning :weight normal))) '((t (:inherit warning :weight normal)))
"Face for battery warning status." "Face for battery warning status."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-battery-critical (defface doom-modeline-battery-critical
'((t (:inherit doom-modeline-urgent :weight normal))) '((t (:inherit error :weight normal)))
"Face for battery critical status." "Face for battery critical status."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-battery-error (defface doom-modeline-battery-error
'((t (:inherit doom-modeline-urgent :weight normal))) '((t (:inherit error :weight normal)))
"Face for battery error status." "Face for battery error status."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
@ -847,12 +842,12 @@ Also see the face `doom-modeline-unread-number'."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-time (defface doom-modeline-time
'((t (:inherit doom-modeline-buffer-file))) '((t (:inherit (mode-line-buffer-id bold))))
"Face for display time." "Face for display time."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
(defface doom-modeline-compilation (defface doom-modeline-compilation
'((t (:inherit doom-modeline-warning :weight normal :slant italic :height 0.9))) '((t (:inherit warning :slant italic :height 0.9)))
"Face for compilation progress." "Face for compilation progress."
:group 'doom-modeline-faces) :group 'doom-modeline-faces)
@ -936,10 +931,6 @@ used as an advice to window creation functions."
(display-graphic-p) (display-graphic-p)
(featurep 'all-the-icons))) (featurep 'all-the-icons)))
(defun doom-modeline-mwheel-available-p ()
"Whether mouse wheel is available."
(and (featurep 'mwheel) (bound-and-true-p mouse-wheel-mode)))
;; Keep `doom-modeline-current-window' up-to-date ;; Keep `doom-modeline-current-window' up-to-date
(defun doom-modeline--selected-window () (defun doom-modeline--selected-window ()
"Get the selected window." "Get the selected window."
@ -985,7 +976,6 @@ used as an advice to window creation functions."
mode-line-emphasis mode-line-emphasis
mode-line-highlight mode-line-highlight
mode-line-buffer-id mode-line-buffer-id
doom-modeline
solaire-mode-line-face solaire-mode-line-face
solaire-mode-line-active-face solaire-mode-line-active-face
paradox-mode-line-face paradox-mode-line-face
@ -993,6 +983,12 @@ used as an advice to window creation functions."
flycheck-color-mode-line-warning-face flycheck-color-mode-line-warning-face
flycheck-color-mode-line-info-face flycheck-color-mode-line-info-face
flycheck-color-mode-line-success-face)) flycheck-color-mode-line-success-face))
(dolist (face (face-list))
(let ((f (symbol-name face)))
(and
(string-match-p "^\\(doom-modeline\\|all-the-icons\\)" f)
(not (string-match-p "\\(-inactive\\|-dired\\|-ivy\\|-ibuffer\\)" f))
(add-to-list 'doom-modeline--remap-faces face))))
(defvar doom-modeline--remap-face-cookie-alist nil) (defvar doom-modeline--remap-face-cookie-alist nil)
(defun doom-modeline-focus () (defun doom-modeline-focus ()
@ -1203,10 +1199,10 @@ See https://github.com/seagle0128/doom-modeline/issues/301."
(when-let ((props (get-text-property 0 'face icon))) (when-let ((props (get-text-property 0 'face icon)))
(when (listp props) (when (listp props)
(cl-destructuring-bind (&key family height inherit &allow-other-keys) props (cl-destructuring-bind (&key family height inherit &allow-other-keys) props
(propertize icon 'face `(:inherit (doom-modeline ,(or face inherit props)) (propertize icon 'face `(:inherit ,(or face inherit props 'mode-line)
:family ,(or family "") :family ,(or family "")
:height ,(or height 1.0)))))) :height ,(or height 1.0))))))
(propertize icon 'face `(:inherit (doom-modeline ,face))))) (propertize icon 'face face)))
(defun doom-modeline-icon (icon-set icon-name unicode text &rest args) (defun doom-modeline-icon (icon-set icon-name unicode text &rest args)
"Display icon of ICON-NAME with ARGS in mode-line. "Display icon of ICON-NAME with ARGS in mode-line.
@ -1215,8 +1211,7 @@ ICON-SET includes `octicon', `faicon', `material', `alltheicons' and `fileicon',
etc. etc.
UNICODE is the unicode char fallback. TEXT is the ASCII char fallback. UNICODE is the unicode char fallback. TEXT is the ASCII char fallback.
ARGS is same as `all-the-icons-octicon' and others." ARGS is same as `all-the-icons-octicon' and others."
(let ((face `(:inherit (doom-modeline (let ((face (or (plist-get args :face) 'mode-line)))
,(or (plist-get args :face) 'mode-line)))))
(cond (cond
;; Icon ;; Icon
((and (doom-modeline-icon-displayable-p) ((and (doom-modeline-icon-displayable-p)
@ -1330,11 +1325,9 @@ Return nil if no project was found."
((and (memq doom-modeline-project-detection '(auto project)) ((and (memq doom-modeline-project-detection '(auto project))
(fboundp 'project-current)) (fboundp 'project-current))
(when-let ((project (project-current))) (when-let ((project (project-current)))
(expand-file-name (expand-file-name (if (fboundp 'project-root)
(if (fboundp 'project-root) (project-root project)
(project-root project) (cdr project)))))))))
(car (with-no-warnings
(project-roots project)))))))))))
(defun doom-modeline-project-p () (defun doom-modeline-project-p ()
"Check if the file is in a project." "Check if the file is in a project."

View file

@ -1,8 +1,8 @@
(define-package "doom-modeline" "20230406.623" "A minimal and modern mode-line" (define-package "doom-modeline" "20230306.250" "A minimal and modern mode-line"
'((emacs "25.1") '((emacs "25.1")
(compat "28.1.1.1") (compat "28.1.1.1")
(shrink-path "0.2.0")) (shrink-path "0.2.0"))
:commit "a86ec8effe242cab8aba09ec0a2c7fed555c1fce" :authors :commit "236fa330c631228e9a513dea2f4598a29b7e8444" :authors
'(("Vincent Zhang" . "seagle0128@gmail.com")) '(("Vincent Zhang" . "seagle0128@gmail.com"))
:maintainer :maintainer
'("Vincent Zhang" . "seagle0128@gmail.com") '("Vincent Zhang" . "seagle0128@gmail.com")

View file

@ -260,7 +260,7 @@
:face 'all-the-icons-dsilver :face 'all-the-icons-dsilver
:height 0.9 :height 0.9
:v-adjust 0.0) :v-adjust 0.0)
(doom-modeline-propertize-icon icon)) icon)
'help-echo (format "Major-mode: %s" (format-mode-line mode-name)) 'help-echo (format "Major-mode: %s" (format-mode-line mode-name))
'display '(raise -0.135)))))) 'display '(raise -0.135))))))
(add-hook 'find-file-hook #'doom-modeline-update-buffer-file-icon) (add-hook 'find-file-hook #'doom-modeline-update-buffer-file-icon)
@ -875,7 +875,7 @@ mouse-2: Show help for minor mode")
(format "error: %d, warning: %d, info: %d\n" .error .warning .info))) (format "error: %d, warning: %d, info: %d\n" .error .warning .info)))
"mouse-1: Show all errors "mouse-1: Show all errors
mouse-3: Next error" mouse-3: Next error"
(if (doom-modeline-mwheel-available-p) (if (featurep 'mwheel)
"\nwheel-up/wheel-down: Previous/next error"))) "\nwheel-up/wheel-down: Previous/next error")))
('running "Checking...") ('running "Checking...")
('no-checker "No Checker") ('no-checker "No Checker")
@ -888,7 +888,7 @@ mouse-3: Next error"
#'flycheck-list-errors) #'flycheck-list-errors)
(define-key map [mode-line mouse-3] (define-key map [mode-line mouse-3]
#'flycheck-next-error) #'flycheck-next-error)
(when (doom-modeline-mwheel-available-p) (when (featurep 'mwheel)
(define-key map [mode-line mouse-wheel-down-event] (define-key map [mode-line mouse-wheel-down-event]
(lambda (event) (lambda (event)
(interactive "e") (interactive "e")
@ -1049,13 +1049,13 @@ mouse-2: Show help for minor mode"
(t (format "error: %d, warning: %d, note: %d (t (format "error: %d, warning: %d, note: %d
mouse-1: List all problems%s" mouse-1: List all problems%s"
.error .warning .note .error .warning .note
(if (doom-modeline-mwheel-available-p) (if (featurep 'mwheel)
"\nwheel-up/wheel-down: Previous/next problem")))) "\nwheel-up/wheel-down: Previous/next problem"))))
'mouse-face 'doom-modeline-highlight 'mouse-face 'doom-modeline-highlight
'local-map (let ((map (make-sparse-keymap))) 'local-map (let ((map (make-sparse-keymap)))
(define-key map [mode-line mouse-1] (define-key map [mode-line mouse-1]
#'flymake-show-diagnostics-buffer) #'flymake-show-diagnostics-buffer)
(when (doom-modeline-mwheel-available-p) (when (featurep 'mwheel)
(define-key map (vector 'mode-line (define-key map (vector 'mode-line
mouse-wheel-down-event) mouse-wheel-down-event)
(lambda (event) (lambda (event)

File diff suppressed because it is too large Load diff

View file

@ -1,14 +0,0 @@
(define-package "doom-modeline" "20230406.623" "A minimal and modern mode-line"
'((emacs "25.1")
(compat "28.1.1.1")
(shrink-path "0.2.0"))
:commit "a86ec8effe242cab8aba09ec0a2c7fed555c1fce" :authors
'(("Vincent Zhang" . "seagle0128@gmail.com"))
:maintainer
'("Vincent Zhang" . "seagle0128@gmail.com")
:keywords
'("faces" "mode-line")
:url "https://github.com/seagle0128/doom-modeline")
;; Local Variables:
;; no-byte-compile: t
;; End:

View file

@ -190,7 +190,6 @@ This is used only as a let binding.")
(define-key map (kbd "M-.") 'helm-ff-run-etags) (define-key map (kbd "M-.") 'helm-ff-run-etags)
(define-key map (kbd "M-R") 'helm-ff-run-rename-file) (define-key map (kbd "M-R") 'helm-ff-run-rename-file)
(define-key map (kbd "M-C") 'helm-ff-run-copy-file) (define-key map (kbd "M-C") 'helm-ff-run-copy-file)
(define-key map (kbd "M-k") 'helm-ff-run-kill-default-directory)
(when (executable-find "rsync") (when (executable-find "rsync")
(define-key map (kbd "M-V") 'helm-ff-run-rsync-file)) (define-key map (kbd "M-V") 'helm-ff-run-rsync-file))
(define-key map (kbd "C-M-SPC") 'helm-ff-mark-similar-files) (define-key map (kbd "C-M-SPC") 'helm-ff-mark-similar-files)
@ -3848,16 +3847,6 @@ to avoid an unnecessary call to `file-truename'."
"Delete current candidate without quitting." "Delete current candidate without quitting."
'quick-delete 'helm-ff-quick-delete) 'quick-delete 'helm-ff-quick-delete)
(defun helm-ff-kill-default-directory (_candidate)
(with-helm-window
(kill-new helm-ff-default-directory)
(message "`%s' copied to kill-ring" helm-ff-default-directory)))
(helm-make-persistent-command-from-action helm-ff-run-kill-default-directory
"Kill `helm-ff-default-directory'."
'kill-default-directory
'helm-ff-kill-default-directory)
(defun helm-ff-dot-file-p (file) (defun helm-ff-dot-file-p (file)
"Check if FILE is `.' or `..'." "Check if FILE is `.' or `..'."
(member (helm-basename file) '("." ".."))) (member (helm-basename file) '("." "..")))

View file

@ -101,10 +101,8 @@ Argument TOBUF is the `helm-candidate-buffer'."
(defun helm-info-goto (node-line) (defun helm-info-goto (node-line)
"The helm-info action to jump to NODE-LINE." "The helm-info action to jump to NODE-LINE."
(let ((alive (buffer-live-p (get-buffer "*info*")))) (Info-goto-node (car node-line))
(Info-goto-node (car node-line)) (helm-goto-line (cdr node-line)))
(when alive (revert-buffer nil t))
(helm-goto-line (cdr node-line))))
(defvar helm-info--node-regexp (defvar helm-info--node-regexp
"^\\* +\\(.+\\):[[:space:]]+\\(.*\\)\\(?:[[:space:]]*\\)(line +\\([0-9]+\\))" "^\\* +\\(.+\\):[[:space:]]+\\(.*\\)\\(?:[[:space:]]*\\)(line +\\([0-9]+\\))"

View file

@ -883,8 +883,8 @@ that use `helm-comp-read'. See `helm-M-x' for example."
:history (and (symbolp input-history) input-history) :history (and (symbolp input-history) input-history)
:buffer buffer)) :buffer buffer))
(remove-hook 'helm-after-update-hook 'helm-comp-read--move-to-first-real-candidate)) (remove-hook 'helm-after-update-hook 'helm-comp-read--move-to-first-real-candidate))
;; If `history' is a symbol save it, except when it is t. ;; If `history' is a symbol save it.
(when (and result history (symbolp history) (not (eq history t))) (when (and result history (symbolp history))
(set history (set history
;; RESULT may be a a string or a list of strings bug #2461. ;; RESULT may be a a string or a list of strings bug #2461.
(delete-dups (append (mapcar #'substring-no-properties (helm-mklist result)) (delete-dups (append (mapcar #'substring-no-properties (helm-mklist result))
@ -1684,6 +1684,7 @@ The `helm-find-files' history `helm-ff-history' is used here."
(helm-split-window-default-side (helm-split-window-default-side
(if (eq helm-split-window-default-side 'same) (if (eq helm-split-window-default-side 'same)
'below helm-split-window-default-side)) 'below helm-split-window-default-side))
helm-split-window-inside-p
helm-reuse-last-window-split-state helm-reuse-last-window-split-state
;; Helm handlers should always have a non nil INITIAL arg. ;; Helm handlers should always have a non nil INITIAL arg.
(init (or initial dir default-directory))) (init (or initial dir default-directory)))

View file

@ -1,7 +1,7 @@
(define-package "helm" "20230406.839" "Helm is an Emacs incremental and narrowing framework" (define-package "helm" "20230319.2009" "Helm is an Emacs incremental and narrowing framework"
'((helm-core "3.9.0") '((helm-core "3.9.0")
(popup "0.5.3")) (popup "0.5.3"))
:commit "5c9d28da67d3f42fd27c7f7fcf0701b899fbaa8a" :authors :commit "f1ef8689514b20cd2c2a6c6be987d2c40a8f4a09" :authors
'(("Thierry Volpiatto" . "thievol@posteo.net")) '(("Thierry Volpiatto" . "thievol@posteo.net"))
:maintainer :maintainer
'("Thierry Volpiatto" . "thievol@posteo.net") '("Thierry Volpiatto" . "thievol@posteo.net")

View file

@ -1,308 +0,0 @@
;;; helm-info.el --- Browse info index with helm -*- lexical-binding: t -*-
;; Copyright (C) 2012 ~ 2023 Thierry Volpiatto
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Code:
(require 'cl-lib)
(require 'helm)
(require 'helm-lib)
(require 'helm-utils)
(require 'info)
(declare-function Info-index-nodes "info" (&optional file))
(declare-function Info-goto-node "info" (&optional fork))
(declare-function Info-find-node "info" (filename nodename &optional no-going-back))
(declare-function ring-insert "ring")
(declare-function ring-empty-p "ring")
(declare-function ring-ref "ring")
(defvar Info-history)
(defvar Info-directory-list)
;; `Info-minibuf-history' is not declared in Emacs, see emacs bug/58786.
(when (and (> emacs-major-version 28)
(not (boundp 'Info-minibuf-history)))
(defvar Info-minibuf-history nil))
;;; Customize
(defgroup helm-info nil
"Info-related applications and libraries for Helm."
:group 'helm)
(defcustom helm-info-default-sources
'(helm-source-info-elisp
helm-source-info-cl
helm-source-info-eieio
helm-source-info-pages)
"Default sources to use for looking up symbols at point in Info
files with `helm-info-at-point'."
:group 'helm-info
:type '(repeat (choice symbol)))
;;; Build info-index sources with `helm-info-source' class.
(cl-defun helm-info-init (&optional (file (helm-get-attr 'info-file)))
"Initialize candidates for info FILE.
If FILE have nodes, loop through all nodes and accumulate candidates
found in each node, otherwise scan only the current info buffer."
;; Allow reinit candidate buffer when using edebug.
(helm-aif (and debug-on-error
(helm-candidate-buffer))
(kill-buffer it))
(unless (helm-candidate-buffer)
(save-selected-window
(info file " *helm info temp buffer*")
(let ((tobuf (helm-candidate-buffer 'global))
Info-history)
(helm-aif (Info-index-nodes)
(dolist (node it)
(Info-goto-node node)
(helm-info-scan-current-buffer tobuf))
(helm-info-scan-current-buffer tobuf))
(bury-buffer)))))
(defun helm-info-scan-current-buffer (tobuf)
"Scan current info buffer and print lines to TOBUF.
Argument TOBUF is the `helm-candidate-buffer'."
(let (start end line)
(goto-char (point-min))
(while (search-forward "\n* " nil t)
(unless (search-forward "Menu:\n" (1+ (point-at-eol)) t)
(setq start (point-at-bol)
;; Fix Bug#1503 by getting the invisible
;; info displayed on next line in long strings.
;; e.g "* Foo.\n (line 12)" instead of
;; "* Foo.(line 12)"
end (or (save-excursion
(goto-char (point-at-bol))
(re-search-forward "(line +[0-9]+)" nil t))
(point-at-eol))
;; Long string have a new line inserted before the
;; invisible spec, remove it.
line (replace-regexp-in-string
"\n" "" (buffer-substring start end)))
(with-current-buffer tobuf
(insert line)
(insert "\n"))))))
(defun helm-info-goto (node-line)
"The helm-info action to jump to NODE-LINE."
(let ((alive (buffer-live-p (get-buffer "*info*"))))
(Info-goto-node (car node-line))
(when alive (revert-buffer nil t))
(helm-goto-line (cdr node-line))))
(defvar helm-info--node-regexp
"^\\* +\\(.+\\):[[:space:]]+\\(.*\\)\\(?:[[:space:]]*\\)(line +\\([0-9]+\\))"
"A regexp that should match file name, node name and line number in
a line like this:
\* bind: Bash Builtins. (line 21).")
(defun helm-info-display-to-real (line)
"Transform LINE to an acceptable argument for `info'.
If line have a node use the node, otherwise use directly first name found."
(let ((info-file (helm-get-attr 'info-file))
nodename linum)
(when (string-match helm-info--node-regexp line)
(setq nodename (match-string 2 line)
linum (match-string 3 line)))
(if nodename
(cons (format "(%s)%s"
info-file
(replace-regexp-in-string ":\\'" "" nodename))
(string-to-number (or linum "1")))
(cons (format "(%s)%s"
info-file
(helm-aand (replace-regexp-in-string "^* " "" line)
(replace-regexp-in-string "::?.*\\'" "" it)))
1))))
(defclass helm-info-source (helm-source-in-buffer)
((info-file :initarg :info-file
:initform nil
:custom 'string)
(init :initform #'helm-info-init)
(display-to-real :initform #'helm-info-display-to-real)
(get-line :initform #'buffer-substring)
(action :initform '(("Goto node" . helm-info-goto)))))
(defmacro helm-build-info-source (fname &rest args)
`(helm-make-source (concat "Info Index: " ,fname) 'helm-info-source
:info-file ,fname ,@args))
(defun helm-build-info-index-command (name doc source buffer)
"Define a Helm command NAME with documentation DOC.
Arg SOURCE will be an existing helm source named
`helm-source-info-<NAME>' and BUFFER a string buffer name."
(defalias (intern (concat "helm-info-" name))
(lambda ()
(interactive)
(helm :sources source
:buffer buffer
:candidate-number-limit 1000))
doc))
(defun helm-define-info-index-sources (var-value &optional commands)
"Define Helm sources named helm-source-info-<NAME>.
Sources are generated for all entries of
`helm-default-info-index-list'.
If COMMANDS arg is non-nil, also build commands named
`helm-info-<NAME>'.
Where NAME is an element of `helm-default-info-index-list'."
(cl-loop for str in var-value
for sym = (intern (concat "helm-source-info-" str))
do (set sym (helm-build-info-source str))
when commands
do (helm-build-info-index-command
str (format "Predefined helm for %s info." str)
sym (format "*helm info %s*" str))))
(defun helm-info-index-set (var value)
(set var value)
(helm-define-info-index-sources value t))
;;; Search Info files
;; `helm-info' is the main entry point here. It prompts the user for an Info
;; file, then a term in the file's index to jump to.
(defvar helm-info-searched (make-ring 32)
"Ring of previously searched Info files.")
(defun helm-get-info-files ()
"Return list of Info files to use for `helm-info'.
Elements of the list are strings of Info file names without
extensions (e.g., \"emacs\" for file \"emacs.info.gz\"). Info
files are found by searching directories in
`Info-directory-list'."
(info-initialize) ; Build Info-directory-list from INFOPATH (Bug#2118)
(let ((files (cl-loop for d in (or Info-directory-list
Info-default-directory-list)
when (file-directory-p d)
append (directory-files d nil "\\.info"))))
(helm-fast-remove-dups
(cl-loop for f in files collect
(helm-file-name-sans-extension f))
:test 'equal)))
(defcustom helm-default-info-index-list
(helm-get-info-files)
"Info files to search in with `helm-info'."
:group 'helm-info
:type '(repeat (choice string))
:set 'helm-info-index-set)
(defun helm-info-search-index (candidate)
"Search the index of CANDIDATE's Info file using the function
helm-info-<CANDIDATE>."
(let ((helm-info-function
(intern-soft (concat "helm-info-" candidate))))
(when (fboundp helm-info-function)
(funcall helm-info-function)
(ring-insert helm-info-searched candidate))))
(defun helm-def-source--info-files ()
"Return a Helm source for Info files."
(helm-build-sync-source "Helm Info"
:candidates
(lambda () (copy-sequence helm-default-info-index-list))
:candidate-number-limit 999
:candidate-transformer
(lambda (candidates)
(sort candidates #'string-lessp))
:nomark t
:action '(("Search index" . helm-info-search-index))))
;;;###autoload
(defun helm-info (&optional refresh)
"Preconfigured `helm' for searching Info files' indices.
With a prefix argument \\[universal-argument], set REFRESH to
non-nil.
Optional parameter REFRESH, when non-nil, re-evaluates
`helm-default-info-index-list'. If the variable has been
customized, set it to its saved value. If not, set it to its
standard value. See `custom-reevaluate-setting' for more.
REFRESH is useful when new Info files are installed. If
`helm-default-info-index-list' has not been customized, the new
Info files are made available."
(interactive "P")
(let ((default (unless (ring-empty-p helm-info-searched)
(ring-ref helm-info-searched 0))))
(when refresh
(custom-reevaluate-setting 'helm-default-info-index-list))
(helm :sources (helm-def-source--info-files)
:buffer "*helm Info*"
:preselect (and default
(concat "\\_<" (regexp-quote default) "\\_>")))))
;;;; Info at point
;; `helm-info-at-point' is the main entry point here. It searches for the
;; symbol at point through the Info sources defined in
;; `helm-info-default-sources' and jumps to it.
(defvar helm-info--pages-cache nil
"Cache for all Info pages on the system.")
(defvar helm-source-info-pages
(helm-build-sync-source "Info Pages"
:init #'helm-info-pages-init
:candidates (lambda () helm-info--pages-cache)
:action '(("Show with Info" .
(lambda (node-str)
(info (replace-regexp-in-string
"^[^:]+: " "" node-str)))))
:requires-pattern 2)
"Helm source for Info pages.")
(defun helm-info-pages-init ()
"Collect candidates for initial Info node Top."
(or helm-info--pages-cache
(let ((info-topic-regexp "\\* +\\([^:]+: ([^)]+)[^.]*\\)\\."))
(save-selected-window
(info "dir" " *helm info temp buffer*")
(Info-find-node "dir" "top")
(goto-char (point-min))
(while (re-search-forward info-topic-regexp nil t)
(push (match-string-no-properties 1)
helm-info--pages-cache))
(kill-buffer)))))
;;;###autoload
(defun helm-info-at-point ()
"Preconfigured `helm' for searching info at point."
(interactive)
;; Symbol at point is used as default as long as one of the sources
;; in `helm-info-default-sources' is member of
;; `helm-sources-using-default-as-input'.
(cl-loop for src in helm-info-default-sources
for name = (if (symbolp src)
(assoc 'name (symbol-value src))
(assoc 'name src))
unless name
do (warn "Couldn't build source `%S' without its info file" src))
(helm :sources helm-info-default-sources
:buffer "*helm info*"))
(provide 'helm-info)
;;; helm-info.el ends here

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,2 @@
;;; Generated package description from helm-ls-git.el -*- no-byte-compile: t -*-
(define-package "helm-ls-git" "20221007.1113" "list git files." '((helm "1.7.8")) :commit "dbee5c668c49e5b77907f1d9887e2a44f7b196a3")

View file

@ -3,8 +3,8 @@
;; Copyright (C) 2012 ~ 2022 Thierry Volpiatto ;; Copyright (C) 2012 ~ 2022 Thierry Volpiatto
;; Package-Requires: ((helm "1.7.8")) ;; Package-Requires: ((helm "1.7.8"))
;; Package-Version: 20230405.957 ;; Package-Version: 20221007.1113
;; Package-Commit: 356e7f0c2725fc4ab6d2eb5bb4752ac1a8133039 ;; Package-Commit: dbee5c668c49e5b77907f1d9887e2a44f7b196a3
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by ;; it under the terms of the GNU General Public License as published by
@ -537,7 +537,6 @@ See docstring of `helm-ls-git-ls-switches'.
(lambda (_candidate) (lambda (_candidate)
(funcall helm-ls-git-status-command (funcall helm-ls-git-status-command
(helm-default-directory))) (helm-default-directory)))
"Git Log" 'helm-ls-git-show-log-for-file
"Switch to shell" 'helm-ls-git-switch-to-shell "Switch to shell" 'helm-ls-git-switch-to-shell
"Git grep files (`C-u' only current directory)" "Git grep files (`C-u' only current directory)"
'helm-ls-git-grep 'helm-ls-git-grep
@ -656,7 +655,7 @@ See docstring of `helm-ls-git-ls-switches'.
(setq unread-command-events nil)) (setq unread-command-events nil))
(helm-force-update)))))) (helm-force-update))))))
(defun helm-ls-git-log (&optional branch num file) (defun helm-ls-git-log (&optional branch num)
"Run git log branch -n num and return the resulting string." "Run git log branch -n num and return the resulting string."
(when (and branch (string-match "->" branch)) (when (and branch (string-match "->" branch))
(setq branch (car (last (split-string branch "->"))))) (setq branch (car (last (split-string branch "->")))))
@ -677,7 +676,6 @@ See docstring of `helm-ls-git-ls-switches'.
helm-ls-git-log--last-number-commits) helm-ls-git-log--last-number-commits)
,(or branch ""))) ,(or branch "")))
output) output)
(when file (setq switches (append switches `("--follow" ,file))))
(unless helm-ls-git-log--is-full (unless helm-ls-git-log--is-full
(setq helm-ls-git-log--last-number-commits (setq helm-ls-git-log--last-number-commits
(number-to-string (number-to-string
@ -704,10 +702,7 @@ See docstring of `helm-ls-git-ls-switches'.
branch helm-ls-git-log--last-number-commits)) branch helm-ls-git-log--last-number-commits))
helm-ls-git-log--last-log)) helm-ls-git-log--last-log))
(defun helm-ls-git-show-log-for-file (file) (defun helm-ls-git-show-log (branch)
(helm-ls-git-show-log (helm-ls-git--branch) file))
(defun helm-ls-git-show-log (branch &optional file)
(let ((name (if (helm-ls-git-detached-state-p) (let ((name (if (helm-ls-git-detached-state-p)
(helm-ls-git--branch) (helm-ls-git--branch)
(replace-regexp-in-string "[ *]" "" branch))) (replace-regexp-in-string "[ *]" "" branch)))
@ -720,12 +715,10 @@ See docstring of `helm-ls-git-ls-switches'.
:header-name (lambda (sname) (format "%s (%s)" sname name)) :header-name (lambda (sname) (format "%s (%s)" sname name))
:init (lambda () :init (lambda ()
(helm-init-candidates-in-buffer 'global (helm-init-candidates-in-buffer 'global
(helm-ls-git-log (helm-ls-git-log name (helm-aif (or prefarg
name (helm-aif (or prefarg ;; for force-update.
;; for force-update. current-prefix-arg)
current-prefix-arg) (prefix-numeric-value it))))
(prefix-numeric-value it))
file))
(setq prefarg nil)) (setq prefarg nil))
:get-line 'buffer-substring :get-line 'buffer-substring
:marked-with-props 'withprop :marked-with-props 'withprop
@ -1860,26 +1853,27 @@ Commands:
map) map)
"Keymap used in `helm-ls-git-rebase-todo-mode' buffers.") "Keymap used in `helm-ls-git-rebase-todo-mode' buffers.")
(defun helm-ls-git-rebase-todo-move-1 (arg) (defun helm-ls-git-rebase-todo-move-down ()
"Move commit line one line down or up according to ARG. "Move commit line one line down."
ARG can be 1 for down or -1 for up." (interactive)
(beginning-of-line) (beginning-of-line)
(let* ((next (+ 1 (line-end-position))) (let* ((next (+ 1 (line-end-position)))
(line (buffer-substring (point) next))) (line (buffer-substring (point) next)))
(delete-region (point) next) (delete-region (point) next)
(forward-line arg) (forward-line 1)
(insert line) (insert line)
(forward-line -1))) (forward-line -1)))
(defun helm-ls-git-rebase-todo-move-down ()
"Move commit line one line down."
(interactive)
(helm-ls-git-rebase-todo-move-1 1))
(defun helm-ls-git-rebase-todo-move-up () (defun helm-ls-git-rebase-todo-move-up ()
"Move commit line on line up." "Move commit line on line up."
(interactive) (interactive)
(helm-ls-git-rebase-todo-move-1 -1)) (beginning-of-line)
(let* ((next (+ 1 (line-end-position)))
(line (buffer-substring (point) next)))
(delete-region (point) next)
(forward-line -1)
(insert line)
(forward-line -1)))
(defun helm-ls-git-rebase-action (action) (defun helm-ls-git-rebase-action (action)
"Replace the current rebase command at bol by ACTION. "Replace the current rebase command at bol by ACTION.

View file

@ -0,0 +1,2 @@
;;; Generated package description from helm-ls-git.el -*- no-byte-compile: t -*-
(define-package "helm-ls-git" "20221118.503" "list git files." '((helm "1.7.8")) :commit "c5893f0cd92b20dcdcd5dc89d9ba6200a95c3f80")

View file

@ -3,8 +3,8 @@
;; Copyright (C) 2012 ~ 2022 Thierry Volpiatto ;; Copyright (C) 2012 ~ 2022 Thierry Volpiatto
;; Package-Requires: ((helm "1.7.8")) ;; Package-Requires: ((helm "1.7.8"))
;; Package-Version: 20230405.957 ;; Package-Version: 20221118.503
;; Package-Commit: 356e7f0c2725fc4ab6d2eb5bb4752ac1a8133039 ;; Package-Commit: c5893f0cd92b20dcdcd5dc89d9ba6200a95c3f80
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by ;; it under the terms of the GNU General Public License as published by
@ -537,7 +537,6 @@ See docstring of `helm-ls-git-ls-switches'.
(lambda (_candidate) (lambda (_candidate)
(funcall helm-ls-git-status-command (funcall helm-ls-git-status-command
(helm-default-directory))) (helm-default-directory)))
"Git Log" 'helm-ls-git-show-log-for-file
"Switch to shell" 'helm-ls-git-switch-to-shell "Switch to shell" 'helm-ls-git-switch-to-shell
"Git grep files (`C-u' only current directory)" "Git grep files (`C-u' only current directory)"
'helm-ls-git-grep 'helm-ls-git-grep
@ -656,7 +655,7 @@ See docstring of `helm-ls-git-ls-switches'.
(setq unread-command-events nil)) (setq unread-command-events nil))
(helm-force-update)))))) (helm-force-update))))))
(defun helm-ls-git-log (&optional branch num file) (defun helm-ls-git-log (&optional branch num)
"Run git log branch -n num and return the resulting string." "Run git log branch -n num and return the resulting string."
(when (and branch (string-match "->" branch)) (when (and branch (string-match "->" branch))
(setq branch (car (last (split-string branch "->"))))) (setq branch (car (last (split-string branch "->")))))
@ -677,7 +676,6 @@ See docstring of `helm-ls-git-ls-switches'.
helm-ls-git-log--last-number-commits) helm-ls-git-log--last-number-commits)
,(or branch ""))) ,(or branch "")))
output) output)
(when file (setq switches (append switches `("--follow" ,file))))
(unless helm-ls-git-log--is-full (unless helm-ls-git-log--is-full
(setq helm-ls-git-log--last-number-commits (setq helm-ls-git-log--last-number-commits
(number-to-string (number-to-string
@ -704,10 +702,7 @@ See docstring of `helm-ls-git-ls-switches'.
branch helm-ls-git-log--last-number-commits)) branch helm-ls-git-log--last-number-commits))
helm-ls-git-log--last-log)) helm-ls-git-log--last-log))
(defun helm-ls-git-show-log-for-file (file) (defun helm-ls-git-show-log (branch)
(helm-ls-git-show-log (helm-ls-git--branch) file))
(defun helm-ls-git-show-log (branch &optional file)
(let ((name (if (helm-ls-git-detached-state-p) (let ((name (if (helm-ls-git-detached-state-p)
(helm-ls-git--branch) (helm-ls-git--branch)
(replace-regexp-in-string "[ *]" "" branch))) (replace-regexp-in-string "[ *]" "" branch)))
@ -720,12 +715,10 @@ See docstring of `helm-ls-git-ls-switches'.
:header-name (lambda (sname) (format "%s (%s)" sname name)) :header-name (lambda (sname) (format "%s (%s)" sname name))
:init (lambda () :init (lambda ()
(helm-init-candidates-in-buffer 'global (helm-init-candidates-in-buffer 'global
(helm-ls-git-log (helm-ls-git-log name (helm-aif (or prefarg
name (helm-aif (or prefarg ;; for force-update.
;; for force-update. current-prefix-arg)
current-prefix-arg) (prefix-numeric-value it))))
(prefix-numeric-value it))
file))
(setq prefarg nil)) (setq prefarg nil))
:get-line 'buffer-substring :get-line 'buffer-substring
:marked-with-props 'withprop :marked-with-props 'withprop

View file

@ -1,2 +0,0 @@
;;; Generated package description from helm-ls-git.el -*- no-byte-compile: t -*-
(define-package "helm-ls-git" "20230405.957" "list git files." '((helm "1.7.8")) :commit "356e7f0c2725fc4ab6d2eb5bb4752ac1a8133039")

View file

@ -1,2 +1,2 @@
;;; Generated package description from helpful.el -*- no-byte-compile: t -*- ;;; Generated package description from helpful.el -*- no-byte-compile: t -*-
(define-package "helpful" "20230323.414" "A better *help* buffer" '((emacs "25") (dash "2.18.0") (s "1.11.0") (f "0.20.0") (elisp-refs "1.2")) :commit "e9ec6fc2ae10db2b9b59ed656021845d11881a0a" :authors '(("Wilfred Hughes" . "me@wilfred.me.uk")) :maintainer '("Wilfred Hughes" . "me@wilfred.me.uk") :keywords '("help" "lisp") :url "https://github.com/Wilfred/helpful") (define-package "helpful" "20221024.134" "A better *help* buffer" '((emacs "25") (dash "2.18.0") (s "1.11.0") (f "0.20.0") (elisp-refs "1.2")) :commit "60c1cd49f72e930b8796e5644bd222e8fc466740" :authors '(("Wilfred Hughes" . "me@wilfred.me.uk")) :maintainer '("Wilfred Hughes" . "me@wilfred.me.uk") :keywords '("help" "lisp") :url "https://github.com/Wilfred/helpful")

View file

@ -4,8 +4,8 @@
;; Author: Wilfred Hughes <me@wilfred.me.uk> ;; Author: Wilfred Hughes <me@wilfred.me.uk>
;; URL: https://github.com/Wilfred/helpful ;; URL: https://github.com/Wilfred/helpful
;; Package-Version: 20230323.414 ;; Package-Version: 20221024.134
;; Package-Commit: e9ec6fc2ae10db2b9b59ed656021845d11881a0a ;; Package-Commit: 60c1cd49f72e930b8796e5644bd222e8fc466740
;; Keywords: help, lisp ;; Keywords: help, lisp
;; Version: 0.20 ;; Version: 0.20
;; Package-Requires: ((emacs "25") (dash "2.18.0") (s "1.11.0") (f "0.20.0") (elisp-refs "1.2")) ;; Package-Requires: ((emacs "25") (dash "2.18.0") (s "1.11.0") (f "0.20.0") (elisp-refs "1.2"))
@ -982,8 +982,7 @@ vector suitable for `key-description', and COMMAND is a smbol."
;; Text of the form \\[foo-command] ;; Text of the form \\[foo-command]
(rx "\\[" (group (+ (not (in "]")))) "]") (rx "\\[" (group (+ (not (in "]")))) "]")
(lambda (it) (lambda (it)
(let* ((button-face (if (>= emacs-major-version 28) 'help-key-binding 'button)) (let* ((symbol-name (match-string 1 it))
(symbol-name (match-string 1 it))
(symbol (intern symbol-name)) (symbol (intern symbol-name))
(key (where-is-internal symbol keymap t)) (key (where-is-internal symbol keymap t))
(key-description (key-description
@ -994,8 +993,7 @@ vector suitable for `key-description', and COMMAND is a smbol."
key-description key-description
'helpful-describe-exactly-button 'helpful-describe-exactly-button
'symbol symbol 'symbol symbol
'callable-p t 'callable-p t)))
'face button-face)))
str str
t t
t)) t))
@ -1636,9 +1634,7 @@ Includes keybindings for aliases, unlike
(push (push
(format "%s %s" (format "%s %s"
(propertize map 'face 'font-lock-variable-name-face) (propertize map 'face 'font-lock-variable-name-face)
(if (>= emacs-major-version 28) key)
(propertize key 'face 'help-key-binding)
key))
(if (eq map 'global-map) global-lines mode-lines))))) (if (eq map 'global-map) global-lines mode-lines)))))
(setq global-lines (-sort #'string< global-lines)) (setq global-lines (-sort #'string< global-lines))
(setq mode-lines (-sort #'string< mode-lines)) (setq mode-lines (-sort #'string< mode-lines))
@ -1766,7 +1762,7 @@ POSITION-HEADS takes the form ((123 (defun foo)) (456 (defun bar)))."
(with-temp-buffer (with-temp-buffer
(declare-function cl--generic-describe "cl-generic" (function)) (declare-function cl--generic-describe "cl-generic" (function))
(cl--generic-describe func) (cl--generic-describe func)
(goto-char (point-min)) (setf (point) (point-min))
(when (re-search-forward "^Implementations:$" nil t) (when (re-search-forward "^Implementations:$" nil t)
(setq content (buffer-substring (point) (point-max))))) (setq content (buffer-substring (point) (point-max)))))
(when content (when content
@ -2950,10 +2946,6 @@ See also `helpful-max-buffers'."
(defvar helpful-mode-map (defvar helpful-mode-map
(let* ((map (make-sparse-keymap))) (let* ((map (make-sparse-keymap)))
(define-key map (kbd "g") #'helpful-update) (define-key map (kbd "g") #'helpful-update)
(define-key map [remap revert-buffer] #'helpful-update)
(when (fboundp 'revert-buffer-quick)
(define-key map [remap revert-buffer-quick] #'helpful-update))
(define-key map (kbd "RET") #'helpful-visit-reference) (define-key map (kbd "RET") #'helpful-visit-reference)
(define-key map (kbd "TAB") #'forward-button) (define-key map (kbd "TAB") #'forward-button)
@ -2972,39 +2964,6 @@ See also `helpful-max-buffers'."
;; TODO: find a cleaner solution. ;; TODO: find a cleaner solution.
(defvar bookmark-make-record-function) (defvar bookmark-make-record-function)
(defun helpful--add-support-for-org-links ()
"Improve support for org \"help\" links through helpful."
(helpful--support-storing-org-links)
(helpful--prefer-helpful-when-following-org-link))
(defun helpful--support-storing-org-links ()
"Make `org-store-link' in a helpful buffer return a \"help\" link."
(when (and (fboundp 'org-link-set-parameters)
(not (-contains-p (org-link-types) "helpful")))
(org-link-set-parameters "helpful"
:store #'helpful--org-link-store)))
(defun helpful--org-link-store ()
"Store \"help\" type link when in a helpful buffer."
(when (derived-mode-p 'helpful-mode)
;; Create a "help" link instead of a dedicated "helpful" link: the
;; author of the Org document uses helful, but this is not
;; necessarily the case of the reader of the document.
(org-link-store-props :type "help"
:link (format "help:%s" helpful--sym)
:description nil)))
(defun helpful--prefer-helpful-when-following-org-link ()
"Prefer helpful when using `org-open-at-point' on a \"help\" link."
(when (fboundp 'org-link-set-parameters)
(let ((follow-function (org-link-get-parameter "help" :follow)))
(when (not (equal follow-function #'helpful--org-link-follow))
(org-link-set-parameters "help"
:follow #'helpful--org-link-follow)))))
(defun helpful--org-link-follow (link _)
(helpful-symbol (intern link)))
(define-derived-mode helpful-mode special-mode "Helpful" (define-derived-mode helpful-mode special-mode "Helpful"
"Major mode for *Helpful* buffers." "Major mode for *Helpful* buffers."
(add-hook 'xref-backend-functions #'elisp--xref-backend nil t) (add-hook 'xref-backend-functions #'elisp--xref-backend nil t)
@ -3015,13 +2974,7 @@ See also `helpful-max-buffers'."
;; Enable users to bookmark helpful buffers. ;; Enable users to bookmark helpful buffers.
(set (make-local-variable 'bookmark-make-record-function) (set (make-local-variable 'bookmark-make-record-function)
#'helpful--bookmark-make-record) #'helpful--bookmark-make-record))
;; This function should normally only be called once after Org and
;; helpful are loaded. To avoid using `eval-after-load' (which is
;; only recommended in user init files), the function is called each
;; time the major mode is used.
(helpful--add-support-for-org-links))
(provide 'helpful) (provide 'helpful)
;;; helpful.el ends here ;;; helpful.el ends here

View file

@ -0,0 +1,2 @@
;;; Generated package description from helpful.el -*- no-byte-compile: t -*-
(define-package "helpful" "20221209.1743" "A better *help* buffer" '((emacs "25") (dash "2.18.0") (s "1.11.0") (f "0.20.0") (elisp-refs "1.2")) :commit "94c25337b2de2f9da60914a7c0c6cca9584c0231" :authors '(("Wilfred Hughes" . "me@wilfred.me.uk")) :maintainer '("Wilfred Hughes" . "me@wilfred.me.uk") :keywords '("help" "lisp") :url "https://github.com/Wilfred/helpful")

View file

@ -4,8 +4,8 @@
;; Author: Wilfred Hughes <me@wilfred.me.uk> ;; Author: Wilfred Hughes <me@wilfred.me.uk>
;; URL: https://github.com/Wilfred/helpful ;; URL: https://github.com/Wilfred/helpful
;; Package-Version: 20230323.414 ;; Package-Version: 20221209.1743
;; Package-Commit: e9ec6fc2ae10db2b9b59ed656021845d11881a0a ;; Package-Commit: 94c25337b2de2f9da60914a7c0c6cca9584c0231
;; Keywords: help, lisp ;; Keywords: help, lisp
;; Version: 0.20 ;; Version: 0.20
;; Package-Requires: ((emacs "25") (dash "2.18.0") (s "1.11.0") (f "0.20.0") (elisp-refs "1.2")) ;; Package-Requires: ((emacs "25") (dash "2.18.0") (s "1.11.0") (f "0.20.0") (elisp-refs "1.2"))
@ -2950,10 +2950,6 @@ See also `helpful-max-buffers'."
(defvar helpful-mode-map (defvar helpful-mode-map
(let* ((map (make-sparse-keymap))) (let* ((map (make-sparse-keymap)))
(define-key map (kbd "g") #'helpful-update) (define-key map (kbd "g") #'helpful-update)
(define-key map [remap revert-buffer] #'helpful-update)
(when (fboundp 'revert-buffer-quick)
(define-key map [remap revert-buffer-quick] #'helpful-update))
(define-key map (kbd "RET") #'helpful-visit-reference) (define-key map (kbd "RET") #'helpful-visit-reference)
(define-key map (kbd "TAB") #'forward-button) (define-key map (kbd "TAB") #'forward-button)

View file

@ -0,0 +1,2 @@
;;; Generated package description from markdown-mode.el -*- no-byte-compile: t -*-
(define-package "markdown-mode" "20230306.2344" "Major mode for Markdown-formatted text" '((emacs "26.1")) :commit "ece1dd845904b08ab78598dc7e1a2eaf7875d1c4" :authors '(("Jason R. Blevins" . "jblevins@xbeta.org")) :maintainer '("Jason R. Blevins" . "jblevins@xbeta.org") :keywords '("markdown" "github flavored markdown" "itex") :url "https://jblevins.org/projects/markdown-mode/")

View file

@ -7,8 +7,8 @@
;; Maintainer: Jason R. Blevins <jblevins@xbeta.org> ;; Maintainer: Jason R. Blevins <jblevins@xbeta.org>
;; Created: May 24, 2007 ;; Created: May 24, 2007
;; Version: 2.6-alpha ;; Version: 2.6-alpha
;; Package-Version: 20230331.913 ;; Package-Version: 20230306.2344
;; Package-Commit: ad3a816f7be97deb83fc0a7fa41305c79009bac5 ;; Package-Commit: ece1dd845904b08ab78598dc7e1a2eaf7875d1c4
;; Package-Requires: ((emacs "26.1")) ;; Package-Requires: ((emacs "26.1"))
;; Keywords: Markdown, GitHub Flavored Markdown, itex ;; Keywords: Markdown, GitHub Flavored Markdown, itex
;; URL: https://jblevins.org/projects/markdown-mode/ ;; URL: https://jblevins.org/projects/markdown-mode/
@ -863,10 +863,6 @@ Group 3 matches the text.")
"[^ \n\t][ \t]*\\( \\)\n" "[^ \n\t][ \t]*\\( \\)\n"
"Regular expression for matching line breaks.") "Regular expression for matching line breaks.")
(defconst markdown-regex-escape
"\\(\\\\\\)."
"Regular expression for matching escape sequences.")
(defconst markdown-regex-wiki-link (defconst markdown-regex-wiki-link
"\\(?:^\\|[^\\]\\)\\(?1:\\(?2:\\[\\[\\)\\(?3:[^]|]+\\)\\(?:\\(?4:|\\)\\(?5:[^]]+\\)\\)?\\(?6:\\]\\]\\)\\)" "\\(?:^\\|[^\\]\\)\\(?1:\\(?2:\\[\\[\\)\\(?3:[^]|]+\\)\\(?:\\(?4:|\\)\\(?5:[^]]+\\)\\)?\\(?6:\\]\\]\\)\\)"
"Regular expression for matching wiki links. "Regular expression for matching wiki links.
@ -2222,7 +2218,6 @@ Depending on your font, some reasonable choices are:
(4 'markdown-highlighting-face) (4 'markdown-highlighting-face)
(5 markdown-markup-properties))) (5 markdown-markup-properties)))
(,markdown-regex-line-break . (1 'markdown-line-break-face prepend)) (,markdown-regex-line-break . (1 'markdown-line-break-face prepend))
(,markdown-regex-escape . ((1 markdown-markup-properties prepend)))
(markdown-fontify-sub-superscripts) (markdown-fontify-sub-superscripts)
(markdown-match-inline-attributes . ((0 markdown-markup-properties prepend))) (markdown-match-inline-attributes . ((0 markdown-markup-properties prepend)))
(markdown-match-leanpub-sections . ((0 markdown-markup-properties))) (markdown-match-leanpub-sections . ((0 markdown-markup-properties)))
@ -3511,30 +3506,17 @@ SEQ may be an atom or a sequence."
`(display ,display-string)))))))) `(display ,display-string))))))))
t)) t))
(defun markdown--fontify-hrs-view-mode (hr-char)
(if (and hr-char (display-supports-face-attributes-p '(:extend t)))
(add-text-properties
(match-beginning 0) (match-end 0)
`(face
(:inherit markdown-hr-face :underline t :extend t)
font-lock-multiline t
display "\n"))
(let ((hr-len (and hr-char (/ (1- (window-body-width)) (char-width hr-char)))))
(add-text-properties
(match-beginning 0) (match-end 0)
`(face
markdown-hr-face font-lock-multiline t
display ,(make-string hr-len hr-char))))))
(defun markdown-fontify-hrs (last) (defun markdown-fontify-hrs (last)
"Add text properties to horizontal rules from point to LAST." "Add text properties to horizontal rules from point to LAST."
(when (markdown-match-hr last) (when (markdown-match-hr last)
(let ((hr-char (markdown--first-displayable markdown-hr-display-char))) (let* ((hr-char (markdown--first-displayable markdown-hr-display-char))
(if (and markdown-hide-markup hr-char) (hr-len (and hr-char (/ (window-max-chars-per-line) (char-width hr-char)))))
(markdown--fontify-hrs-view-mode hr-char) (add-text-properties
(add-text-properties (match-beginning 0) (match-end 0)
(match-beginning 0) (match-end 0) `(face markdown-hr-face
`(face markdown-hr-face font-lock-multiline t))) font-lock-multiline t
,@(when (and markdown-hide-markup hr-char)
`(display ,(make-string hr-len hr-char)))))
t))) t)))
(defun markdown-fontify-sub-superscripts (last) (defun markdown-fontify-sub-superscripts (last)

View file

@ -1,2 +0,0 @@
;;; Generated package description from markdown-mode.el -*- no-byte-compile: t -*-
(define-package "markdown-mode" "20230331.913" "Major mode for Markdown-formatted text" '((emacs "26.1")) :commit "ad3a816f7be97deb83fc0a7fa41305c79009bac5" :authors '(("Jason R. Blevins" . "jblevins@xbeta.org")) :maintainer '("Jason R. Blevins" . "jblevins@xbeta.org") :keywords '("markdown" "github flavored markdown" "itex") :url "https://jblevins.org/projects/markdown-mode/")

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
;;; modus-operandi-deuteranopia-theme.el --- Deuteranopia-optimized theme with a white background -*- lexical-binding:t -*- ;;; modus-operandi-deuteranopia-theme.el --- Elegant, highly legible and customizable light theme -*- lexical-binding:t -*-
;; Copyright (C) 2019-2023 Free Software Foundation, Inc. ;; Copyright (C) 2019-2023 Free Software Foundation, Inc.
@ -44,7 +44,7 @@
(require 'modus-themes)) (require 'modus-themes))
(deftheme modus-operandi-deuteranopia (deftheme modus-operandi-deuteranopia
"Deuteranopia-optimized theme with a white background. "Elegant, highly legible and customizable light theme.
This variant is optimized for users with red-green color This variant is optimized for users with red-green color
deficiency (deuteranopia). It conforms with the highest deficiency (deuteranopia). It conforms with the highest
legibility standard for color contrast between background and legibility standard for color contrast between background and

Some files were not shown because too many files have changed in this diff Show more