Update packages
This commit is contained in:
parent
ad950747df
commit
2bb2db0638
28 changed files with 1327 additions and 33 deletions
|
@ -9,7 +9,7 @@
|
|||
'(column-number-mode t)
|
||||
'(custom-safe-themes
|
||||
(quote
|
||||
("64d8237b42b3b01f1487a908836574a5e531ea5efab54b9afa19fb8fda471ab3" "4bdc0dfc53ae06323e031baf691f414babf13c9c9c35014dd07bb42c4db27c24" "d6c5b8dc6049f2e9dabdfcafa9ef2079352640e80dffe3e6cc07c0f89cbf9748" "fa2b58bb98b62c3b8cf3b6f02f058ef7827a8e497125de0254f56e373abee088" "fa2af0c40576f3bde32290d7f4e7aa865eb6bf7ebe31eb9e37c32aa6f4ae8d10" "e396098fd5bef4f0dd6cedd01ea48df1ecb0554d8be0d8a924fb1d926f02f90f" "acfac6b14461a344f97fad30e2362c26a3fe56a9f095653832d8fc029cb9d05c" "85d1dbf2fc0e5d30f236712b831fb24faf6052f3114964fdeadede8e1b329832" "4639288d273cbd3dc880992e6032f9c817f17c4a91f00f3872009a099f5b3f84" "14c848e2c4a0a11fcd118e2519078aa50bb6020f89035423b40fff421fb24fbd" "cdb4ffdecc682978da78700a461cdc77456c3a6df1c1803ae2dd55c59fa703e3" "9e31aff9afe3c20a33dd966b4c54c6a5151f07659362e4b06bde38ded5370dae" "24fc62afe2e5f0609e436aa2427b396adf9a958a8fa660edbaab5fb13c08aae6" "82358261c32ebedfee2ca0f87299f74008a2e5ba5c502bde7aaa15db20ee3731" "4515feff287a98863b7b7f762197a78a7c2bfb6ec93879e7284dff184419268c" default)))
|
||||
("bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476" "64d8237b42b3b01f1487a908836574a5e531ea5efab54b9afa19fb8fda471ab3" "4bdc0dfc53ae06323e031baf691f414babf13c9c9c35014dd07bb42c4db27c24" "d6c5b8dc6049f2e9dabdfcafa9ef2079352640e80dffe3e6cc07c0f89cbf9748" "fa2b58bb98b62c3b8cf3b6f02f058ef7827a8e497125de0254f56e373abee088" "fa2af0c40576f3bde32290d7f4e7aa865eb6bf7ebe31eb9e37c32aa6f4ae8d10" "e396098fd5bef4f0dd6cedd01ea48df1ecb0554d8be0d8a924fb1d926f02f90f" "acfac6b14461a344f97fad30e2362c26a3fe56a9f095653832d8fc029cb9d05c" "85d1dbf2fc0e5d30f236712b831fb24faf6052f3114964fdeadede8e1b329832" "4639288d273cbd3dc880992e6032f9c817f17c4a91f00f3872009a099f5b3f84" "14c848e2c4a0a11fcd118e2519078aa50bb6020f89035423b40fff421fb24fbd" "cdb4ffdecc682978da78700a461cdc77456c3a6df1c1803ae2dd55c59fa703e3" "9e31aff9afe3c20a33dd966b4c54c6a5151f07659362e4b06bde38ded5370dae" "24fc62afe2e5f0609e436aa2427b396adf9a958a8fa660edbaab5fb13c08aae6" "82358261c32ebedfee2ca0f87299f74008a2e5ba5c502bde7aaa15db20ee3731" "4515feff287a98863b7b7f762197a78a7c2bfb6ec93879e7284dff184419268c" default)))
|
||||
'(default-frame-alist
|
||||
(quote
|
||||
((fullscreen . maximized)
|
||||
|
@ -84,7 +84,7 @@
|
|||
'(package-enable-at-startup t)
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(pickle poet-theme flymake-eslint json-mode elpy darkroom dockerfile-mode ein spacemacs-theme flucui-themes leuven-theme htmlize scss-mode berrys-theme web-mode python-docstring sphinx-doc sphinx-frontend sphinx-mode ox-nikola racket-mode slime gherkin-mode powershell typescript-mode ob-http ob-ipython ob-restclient nord-theme restclient request restclient-test yaml-mode magit)))
|
||||
(dashboard pickle poet-theme flymake-eslint json-mode elpy darkroom dockerfile-mode ein spacemacs-theme flucui-themes leuven-theme htmlize scss-mode berrys-theme web-mode python-docstring sphinx-doc sphinx-frontend sphinx-mode ox-nikola racket-mode slime gherkin-mode powershell typescript-mode ob-http ob-ipython ob-restclient nord-theme restclient request restclient-test yaml-mode magit)))
|
||||
'(python-shell-interpreter "python3" t)
|
||||
'(register-preview-delay 2)
|
||||
'(register-separator 43)
|
||||
|
|
|
@ -1509,7 +1509,7 @@
|
|||
("Phillip Lord" . "phillip.lord@russet.org.uk"))
|
||||
(:url . "http://elpa.gnu.org/packages/persist.html"))])
|
||||
(phps-mode .
|
||||
[(0 3 21)
|
||||
[(0 3 23)
|
||||
((emacs
|
||||
(26)))
|
||||
"Major mode for PHP with Semantic integration" tar
|
||||
|
|
8
elpa/dashboard-20191210.1041/banners/1.txt
Normal file
8
elpa/dashboard-20191210.1041/banners/1.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
######## ## ## ### ###### ######
|
||||
## ### ### ## ## ## ## ## ##
|
||||
## #### #### ## ## ## ##
|
||||
###### ## ### ## ## ## ## ######
|
||||
## ## ## ######### ## ##
|
||||
## ## ## ## ## ## ## ## ##
|
||||
######## ## ## ## ## ###### ######
|
6
elpa/dashboard-20191210.1041/banners/2.txt
Normal file
6
elpa/dashboard-20191210.1041/banners/2.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
_______ .___ ___. ___ ______ _______.
|
||||
| ____|| \/ | / \ / | / |
|
||||
| |__ | \ / | / ^ \ | ,----' | (----`
|
||||
| __| | |\/| | / /_\ \ | | \ \
|
||||
| |____ | | | | / _____ \ | `----.----) |
|
||||
|_______||__| |__| /__/ \__\ \______|_______/
|
8
elpa/dashboard-20191210.1041/banners/3.txt
Normal file
8
elpa/dashboard-20191210.1041/banners/3.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
_______ _____ ______ ________ ________ ________
|
||||
|\ ___ \ |\ _ \ _ \|\ __ \|\ ____\|\ ____\
|
||||
\ \ __/|\ \ \\\__\ \ \ \ \|\ \ \ \___|\ \ \___|_
|
||||
\ \ \_|/_\ \ \\|__| \ \ \ __ \ \ \ \ \_____ \
|
||||
\ \ \_|\ \ \ \ \ \ \ \ \ \ \ \ \____\|____|\ \
|
||||
\ \_______\ \__\ \ \__\ \__\ \__\ \_______\____\_\ \
|
||||
\|_______|\|__| \|__|\|__|\|__|\|_______|\_________\
|
||||
\|_________|
|
BIN
elpa/dashboard-20191210.1041/banners/emacs.png
Normal file
BIN
elpa/dashboard-20191210.1041/banners/emacs.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
BIN
elpa/dashboard-20191210.1041/banners/logo.png
Normal file
BIN
elpa/dashboard-20191210.1041/banners/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
41
elpa/dashboard-20191210.1041/dashboard-autoloads.el
Normal file
41
elpa/dashboard-20191210.1041/dashboard-autoloads.el
Normal file
|
@ -0,0 +1,41 @@
|
|||
;;; dashboard-autoloads.el --- automatically extracted autoloads
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(add-to-list 'load-path (directory-file-name
|
||||
(or (file-name-directory #$) (car load-path))))
|
||||
|
||||
|
||||
;;;### (autoloads nil "dashboard" "dashboard.el" (0 0 0 0))
|
||||
;;; Generated autoloads from dashboard.el
|
||||
|
||||
(autoload 'dashboard-setup-startup-hook "dashboard" "\
|
||||
Setup post initialization hooks.
|
||||
If a command line argument is provided,
|
||||
assume a filename and skip displaying Dashboard.
|
||||
|
||||
\(fn)" nil nil)
|
||||
|
||||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "dashboard" '("dashboard-")))
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "dashboard-widgets" "dashboard-widgets.el"
|
||||
;;;;;; (0 0 0 0))
|
||||
;;; Generated autoloads from dashboard-widgets.el
|
||||
|
||||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "dashboard-widgets" '("dashboard-" "recentf-list")))
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil nil ("dashboard-pkg.el") (0 0 0 0))
|
||||
|
||||
;;;***
|
||||
|
||||
;; Local Variables:
|
||||
;; version-control: never
|
||||
;; no-byte-compile: t
|
||||
;; no-update-autoloads: t
|
||||
;; coding: utf-8
|
||||
;; End:
|
||||
;;; dashboard-autoloads.el ends here
|
13
elpa/dashboard-20191210.1041/dashboard-pkg.el
Normal file
13
elpa/dashboard-20191210.1041/dashboard-pkg.el
Normal file
|
@ -0,0 +1,13 @@
|
|||
(define-package "dashboard" "20191210.1041" "A startup screen extracted from Spacemacs"
|
||||
'((emacs "25.3")
|
||||
(page-break-lines "0.11"))
|
||||
:keywords
|
||||
'("startup" "screen" "tools" "dashboard")
|
||||
:authors
|
||||
'(("Rakan Al-Hneiti"))
|
||||
:maintainer
|
||||
'("Rakan Al-Hneiti")
|
||||
:url "https://github.com/emacs-dashboard/emacs-dashboard")
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
675
elpa/dashboard-20191210.1041/dashboard-widgets.el
Normal file
675
elpa/dashboard-20191210.1041/dashboard-widgets.el
Normal file
|
@ -0,0 +1,675 @@
|
|||
;;; dashboard-widgets.el --- A startup screen extracted from Spacemacs -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (c) 2016-2019 Rakan Al-Hneiti & Contributors
|
||||
;;
|
||||
;; Author: Rakan Al-Hneiti
|
||||
;; URL: https://github.com/emacs-dashboard/emacs-dashboard
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
;;
|
||||
;; Created: October 05, 2016
|
||||
;; Package-Version: 1.7.0-SNAPSHOT
|
||||
;; Keywords: startup, screen, tools, dashboard
|
||||
;; Package-Requires: ((emacs "25.3") (page-break-lines "0.11"))
|
||||
;;; Commentary:
|
||||
|
||||
;; An extensible Emacs dashboard, with sections for
|
||||
;; bookmarks, projectile projects, org-agenda and more.
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; Compiler pacifier
|
||||
(declare-function all-the-icons-icon-for-dir "ext:all-the-icons.el")
|
||||
(declare-function all-the-icons-icon-for-file "ext:all-the-icons.el")
|
||||
(declare-function bookmark-get-filename "ext:bookmark.el")
|
||||
(declare-function bookmark-all-names "ext:bookmark.el")
|
||||
(declare-function calendar-date-compare "ext:calendar.el")
|
||||
(declare-function projectile-cleanup-known-projects "ext:projectile.el")
|
||||
(declare-function projectile-load-known-projects "ext:projectile.el")
|
||||
(declare-function projectile-mode "ext:projectile.el")
|
||||
(declare-function projectile-relevant-known-projects "ext:projectile.el")
|
||||
(declare-function org-agenda-format-item "ext:org-agenda.el")
|
||||
(declare-function org-compile-prefix-format "ext:org-agenda.el")
|
||||
(declare-function org-entry-is-done-p "ext:org.el")
|
||||
(declare-function org-get-category "ext:org.el")
|
||||
(declare-function org-get-deadline-time "ext:org.el")
|
||||
(declare-function org-get-heading "ext:org.el")
|
||||
(declare-function org-get-scheduled-time "ext:org.el")
|
||||
(declare-function org-get-tags "ext:org.el")
|
||||
(declare-function org-map-entries "ext:org.el")
|
||||
(declare-function org-outline-level "ext:org.el")
|
||||
(defvar all-the-icons-dir-icon-alist)
|
||||
(defvar package-activated-list)
|
||||
|
||||
(defcustom dashboard-page-separator "\n\f\n"
|
||||
"Separator to use between the different pages."
|
||||
:type 'string
|
||||
:group 'dashboard)
|
||||
|
||||
(defcustom dashboard-image-banner-max-height 0
|
||||
"Maximum height of banner image.
|
||||
|
||||
This setting applies only if Emacs is compiled with Imagemagick
|
||||
support. When value is non-zero the image banner will be resized
|
||||
to the specified height, with aspect ratio preserved."
|
||||
:type 'integer
|
||||
:group 'dashboard)
|
||||
|
||||
(defcustom dashboard-image-banner-max-width 0
|
||||
"Maximum width of banner image.
|
||||
|
||||
This setting applies if Emacs is compiled with Imagemagick
|
||||
support. When value is non-zero the image banner will be resized
|
||||
to the specified width, with aspect ratio preserved."
|
||||
:type 'integer
|
||||
:group 'dashboard)
|
||||
|
||||
(defcustom dashboard-set-heading-icons nil
|
||||
"When non nil, heading sections will have icons."
|
||||
:type 'boolean
|
||||
:group 'dashboard)
|
||||
|
||||
(defcustom dashboard-set-file-icons nil
|
||||
"When non nil, file lists will have icons."
|
||||
:type 'boolean
|
||||
:group 'dashboard)
|
||||
|
||||
(defcustom dashboard-set-navigator nil
|
||||
"When non nil, a navigator will be displayed under the banner."
|
||||
:type 'boolean
|
||||
:group 'dashboard)
|
||||
|
||||
(defcustom dashboard-set-init-info t
|
||||
"When non nil, init info will be displayed under the banner."
|
||||
:type 'boolean
|
||||
:group 'dashboard)
|
||||
|
||||
(defcustom dashboard-set-footer t
|
||||
"When non nil, a footer will be displayed at the bottom."
|
||||
:type 'boolean
|
||||
:group 'dashboard)
|
||||
|
||||
(defcustom dashboard-show-shortcuts t
|
||||
"Whether to show shortcut keys for each section."
|
||||
:type 'boolean
|
||||
:group 'dashboard)
|
||||
|
||||
(defcustom dashboard-org-agenda-categories nil
|
||||
"Specify the Categories to consider when using agenda in dashboard.
|
||||
Example:
|
||||
'(\"Tasks\" \"Habits\")"
|
||||
:type 'list
|
||||
:group 'dashboard)
|
||||
|
||||
(defconst dashboard-banners-directory
|
||||
(concat (file-name-directory
|
||||
(locate-library "dashboard"))
|
||||
"/banners/"))
|
||||
|
||||
(defconst dashboard-banner-official-png
|
||||
(expand-file-name (concat dashboard-banners-directory "emacs.png"))
|
||||
"Emacs banner image.")
|
||||
|
||||
(defconst dashboard-banner-logo-png
|
||||
(expand-file-name (concat dashboard-banners-directory "logo.png"))
|
||||
"Emacs banner image.")
|
||||
|
||||
(defconst dashboard-banner-length 75
|
||||
"Width of a banner.")
|
||||
|
||||
(defvar dashboard-banner-logo-title "Welcome to Emacs!"
|
||||
"Specify the startup banner.")
|
||||
|
||||
(defvar dashboard-navigator-buttons nil
|
||||
"Specify the navigator buttons.
|
||||
The format is: 'icon title help action face prefix suffix'.
|
||||
|
||||
Example:
|
||||
'((\"☆\" \"Star\" \"Show stars\" (lambda (&rest _) (show-stars)) 'warning \"[\" \"]\"))")
|
||||
|
||||
(defvar dashboard-init-info
|
||||
;; Check if package.el was loaded and if package loading was enabled
|
||||
(if (bound-and-true-p package-alist)
|
||||
(format "%d packages loaded in %s"
|
||||
(length package-activated-list) (emacs-init-time))
|
||||
(if (and (boundp 'straight--profile-cache) (hash-table-p straight--profile-cache))
|
||||
(format "%d packages loaded in %s"
|
||||
(hash-table-size straight--profile-cache) (emacs-init-time))
|
||||
(format "Emacs started in %s" (emacs-init-time))))
|
||||
"Init info with packages loaded and init time.")
|
||||
|
||||
(defvar dashboard-footer
|
||||
(let ((list '("The one true editor, Emacs!"
|
||||
"Who the hell uses VIM anyway? Go Evil!"
|
||||
"Free as free speech, free as free Beer"
|
||||
"Richard Stallman is proud of you"
|
||||
"Happy coding!"
|
||||
"Vi Vi Vi, the editor of the beast"
|
||||
"Welcome to the church of Emacs"
|
||||
"While any text editor can save your files,\
|
||||
only Emacs can save your soul"
|
||||
"I showed you my source code, pls respond"
|
||||
)))
|
||||
(nth (random (1- (1+ (length list)))) list))
|
||||
"A footer with some short message.")
|
||||
|
||||
(defvar dashboard-footer-icon
|
||||
(if (and (display-graphic-p)
|
||||
(or (fboundp 'all-the-icons-fileicon)
|
||||
(require 'all-the-icons nil 'noerror)))
|
||||
(all-the-icons-fileicon "emacs"
|
||||
:height 1.1
|
||||
:v-adjust -0.05
|
||||
:face 'font-lock-keyword-face)
|
||||
(propertize ">" 'face 'dashboard-footer))
|
||||
"Footer's icon.")
|
||||
|
||||
(defvar dashboard-startup-banner 'official
|
||||
"Specify the startup banner.
|
||||
Default value is `official', it displays
|
||||
the Emacs logo. `logo' displays Emacs alternative logo.
|
||||
An integer value is the index of text
|
||||
banner. A string value must be a path to a .PNG file.
|
||||
If the value is nil then no banner is displayed.")
|
||||
|
||||
(defvar dashboard-buffer-last-width nil
|
||||
"Previous width of dashboard-buffer.")
|
||||
|
||||
(defvar dashboard-item-generators '((recents . dashboard-insert-recents)
|
||||
(bookmarks . dashboard-insert-bookmarks)
|
||||
(projects . dashboard-insert-projects)
|
||||
(agenda . dashboard-insert-agenda)
|
||||
(registers . dashboard-insert-registers)))
|
||||
|
||||
(defvar dashboard-items '((recents . 5)
|
||||
(bookmarks . 5)
|
||||
(agenda . 5))
|
||||
"Association list of items to show in the startup buffer.
|
||||
Will be of the form `(list-type . list-size)`.
|
||||
If nil it is disabled. Possible values for list-type are:
|
||||
`recents' `bookmarks' `projects' `agenda' `registers'")
|
||||
|
||||
(defvar dashboard-items-default-length 20
|
||||
"Length used for startup lists with otherwise unspecified bounds.
|
||||
Set to nil for unbounded.")
|
||||
|
||||
(defvar dashboard-heading-icons '((recents . "history")
|
||||
(bookmarks . "bookmark")
|
||||
(agenda . "calendar")
|
||||
(projects . "rocket")
|
||||
(registers . "database"))
|
||||
"Association list for the icons of the heading sections.
|
||||
Will be of the form `(list-type . icon-name-string)`.
|
||||
If nil it is disabled. Possible values for list-type are:
|
||||
`recents' `bookmarks' `projects' `agenda' `registers'")
|
||||
|
||||
(defvar recentf-list nil)
|
||||
|
||||
;;
|
||||
;; Faces
|
||||
;;
|
||||
(defface dashboard-text-banner
|
||||
'((t (:inherit font-lock-keyword-face)))
|
||||
"Face used for text banners."
|
||||
:group 'dashboard)
|
||||
|
||||
(defface dashboard-banner-logo-title
|
||||
'((t :inherit default))
|
||||
"Face used for the banner title."
|
||||
:group 'dashboard)
|
||||
|
||||
(defface dashboard-navigator
|
||||
'((t (:inherit font-lock-keyword-face)))
|
||||
"Face used for the navigator."
|
||||
:group 'dashboard)
|
||||
|
||||
(defface dashboard-heading
|
||||
'((t (:inherit font-lock-keyword-face)))
|
||||
"Face used for widget headings."
|
||||
:group 'dashboard)
|
||||
|
||||
(defface dashboard-footer
|
||||
'((t (:inherit font-lock-doc-face)))
|
||||
"Face used for widget headings."
|
||||
:group 'dashboard)
|
||||
|
||||
(define-obsolete-face-alias
|
||||
'dashboard-text-banner-face 'dashboard-text-banner "1.2.6")
|
||||
(define-obsolete-face-alias
|
||||
'dashboard-banner-logo-title-face 'dashboard-banner-logo-title "1.2.6")
|
||||
(define-obsolete-face-alias
|
||||
'dashboard-heading-face 'dashboard-heading "1.2.6")
|
||||
|
||||
;;
|
||||
;; Generic widget helpers
|
||||
;;
|
||||
(defun dashboard-subseq (seq start end)
|
||||
"Return the subsequence of SEQ from START to END..
|
||||
Uses `cl-subseq`, but accounts for end points greater than the size of the
|
||||
list.
|
||||
Return entire list if `END' is omitted."
|
||||
(let ((len (length seq)))
|
||||
(cl-subseq seq start (and (number-or-marker-p end)
|
||||
(min len end)))))
|
||||
|
||||
(defmacro dashboard-insert-shortcut (shortcut-char
|
||||
search-label
|
||||
&optional no-next-line)
|
||||
"Insert a shortcut SHORTCUT-CHAR for a given SEARCH-LABEL.
|
||||
Optionally, provide NO-NEXT-LINE to move the cursor forward a line."
|
||||
`(progn
|
||||
(eval-when-compile (defvar dashboard-mode-map))
|
||||
(let ((sym (make-symbol (format "Jump to \"%s\"" ,search-label))))
|
||||
(fset sym (lambda ()
|
||||
(interactive)
|
||||
(unless (search-forward ,search-label (point-max) t)
|
||||
(search-backward ,search-label (point-min) t))
|
||||
,@(unless no-next-line
|
||||
'((forward-line 1)))
|
||||
(back-to-indentation)))
|
||||
(eval-after-load 'dashboard
|
||||
(define-key dashboard-mode-map ,shortcut-char sym)))))
|
||||
|
||||
(defun dashboard-append (msg &optional _messagebuf)
|
||||
"Append MSG to dashboard buffer.
|
||||
If MESSAGEBUF is not nil then MSG is also written in message buffer."
|
||||
(with-current-buffer (get-buffer-create "*dashboard*")
|
||||
(goto-char (point-max))
|
||||
(let ((buffer-read-only nil))
|
||||
(insert msg))))
|
||||
|
||||
(defun dashboard-modify-heading-icons (alist)
|
||||
"Append ALIST items to dashboard-heading-icons to modify icons."
|
||||
(dolist (icon alist)
|
||||
(add-to-list 'dashboard-heading-icons icon)))
|
||||
|
||||
(defun dashboard-insert-page-break ()
|
||||
"Insert a page break line in dashboard buffer."
|
||||
(dashboard-append dashboard-page-separator))
|
||||
|
||||
(defun dashboard-insert-heading (heading &optional shortcut)
|
||||
"Insert a widget HEADING in dashboard buffer, adding SHORTCUT if provided."
|
||||
(when (and (display-graphic-p)
|
||||
dashboard-set-heading-icons)
|
||||
;; Try loading `all-the-icons'
|
||||
(unless (require 'all-the-icons nil 'noerror)
|
||||
(error "Package `all-the-icons' isn't installed"))
|
||||
|
||||
(insert (cond
|
||||
((string-equal heading "Recent Files:")
|
||||
(all-the-icons-octicon (cdr (assoc 'recents dashboard-heading-icons))
|
||||
:height 1.2 :v-adjust 0.0 :face 'dashboard-heading))
|
||||
((string-equal heading "Bookmarks:")
|
||||
(all-the-icons-octicon (cdr (assoc 'bookmarks dashboard-heading-icons))
|
||||
:height 1.2 :v-adjust 0.0 :face 'dashboard-heading))
|
||||
((or (string-equal heading "Agenda for today:")
|
||||
(string-equal heading "Agenda for the coming week:"))
|
||||
(all-the-icons-octicon (cdr (assoc 'agenda dashboard-heading-icons))
|
||||
:height 1.2 :v-adjust 0.0 :face 'dashboard-heading))
|
||||
((string-equal heading "Registers:")
|
||||
(all-the-icons-octicon (cdr (assoc 'registers dashboard-heading-icons))
|
||||
:height 1.2 :v-adjust 0.0 :face 'dashboard-heading))
|
||||
((string-equal heading "Projects:")
|
||||
(all-the-icons-octicon (cdr (assoc 'projects dashboard-heading-icons))
|
||||
:height 1.2 :v-adjust 0.0 :face 'dashboard-heading))
|
||||
(t " ")))
|
||||
(insert " "))
|
||||
|
||||
(insert (propertize heading 'face 'dashboard-heading))
|
||||
(if shortcut (insert (format " (%s)" shortcut))))
|
||||
|
||||
(defun dashboard-center-line (string)
|
||||
"Center a STRING accoring to it's size."
|
||||
(insert (make-string (max 0 (floor (/ (- dashboard-banner-length
|
||||
(+ (length string) 1)) 2))) ?\ )))
|
||||
|
||||
;;
|
||||
;; BANNER
|
||||
;;
|
||||
(defun dashboard-insert-ascii-banner-centered (file)
|
||||
"Insert banner from FILE."
|
||||
(let ((ascii-banner
|
||||
(with-temp-buffer
|
||||
(insert-file-contents file)
|
||||
(let ((banner-width 0))
|
||||
(while (not (eobp))
|
||||
(let ((line-length (- (line-end-position) (line-beginning-position))))
|
||||
(if (< banner-width line-length)
|
||||
(setq banner-width line-length)))
|
||||
(forward-line 1))
|
||||
(goto-char 0)
|
||||
(let ((margin
|
||||
(max 0 (floor (/ (- dashboard-banner-length banner-width) 2)))))
|
||||
(while (not (eobp))
|
||||
(insert (make-string margin ?\ ))
|
||||
(forward-line 1))))
|
||||
(buffer-string))))
|
||||
(put-text-property 0 (length ascii-banner) 'face 'dashboard-text-banner ascii-banner)
|
||||
(insert ascii-banner)))
|
||||
|
||||
(defun dashboard-insert-image-banner (banner)
|
||||
"Display an image BANNER."
|
||||
(when (file-exists-p banner)
|
||||
(let* ((title dashboard-banner-logo-title)
|
||||
(spec
|
||||
(if (image-type-available-p 'imagemagick)
|
||||
(apply 'create-image banner 'imagemagick nil
|
||||
(append (when (> dashboard-image-banner-max-width 0)
|
||||
(list :max-width dashboard-image-banner-max-width))
|
||||
(when (> dashboard-image-banner-max-height 0)
|
||||
(list :max-height dashboard-image-banner-max-height))))
|
||||
(create-image banner)))
|
||||
(size (image-size spec))
|
||||
(width (car size))
|
||||
(left-margin (max 0 (floor (- dashboard-banner-length width) 2))))
|
||||
(goto-char (point-min))
|
||||
(insert "\n")
|
||||
(insert (make-string left-margin ?\ ))
|
||||
(insert-image spec)
|
||||
(insert "\n\n")
|
||||
(when title
|
||||
(dashboard-center-line title)
|
||||
(insert (format "%s\n\n" (propertize title 'face 'dashboard-banner-logo-title)))))))
|
||||
|
||||
;;
|
||||
;; INIT INFO
|
||||
;;
|
||||
(defun dashboard-insert-init-info ()
|
||||
"Insert init info when dashboard-set-init-info is t."
|
||||
(when dashboard-set-init-info
|
||||
(dashboard-center-line dashboard-init-info)
|
||||
(insert
|
||||
(propertize dashboard-init-info 'face 'font-lock-comment-face))))
|
||||
|
||||
(defun dashboard-get-banner-path (index)
|
||||
"Return the full path to banner with index INDEX."
|
||||
(concat dashboard-banners-directory (format "%d.txt" index)))
|
||||
|
||||
(defun dashboard-choose-banner ()
|
||||
"Return the full path of a banner based on the dotfile value."
|
||||
(when dashboard-startup-banner
|
||||
(cond ((eq 'official dashboard-startup-banner)
|
||||
(if (and (display-graphic-p) (image-type-available-p 'png))
|
||||
dashboard-banner-official-png
|
||||
(dashboard-get-banner-path 1)))
|
||||
((eq 'logo dashboard-startup-banner)
|
||||
(if (and (display-graphic-p) (image-type-available-p 'png))
|
||||
dashboard-banner-logo-png
|
||||
(dashboard-get-banner-path 1)))
|
||||
((integerp dashboard-startup-banner)
|
||||
(dashboard-get-banner-path dashboard-startup-banner))
|
||||
((and dashboard-startup-banner
|
||||
(image-type-available-p (intern (file-name-extension
|
||||
dashboard-startup-banner)))
|
||||
(display-graphic-p))
|
||||
(if (file-exists-p dashboard-startup-banner)
|
||||
dashboard-startup-banner
|
||||
(message (format "could not find banner %s"
|
||||
dashboard-startup-banner))
|
||||
(dashboard-get-banner-path 1)))
|
||||
(t (dashboard-get-banner-path 1)))))
|
||||
|
||||
(defun dashboard-insert-banner ()
|
||||
"Insert Banner at the top of the dashboard."
|
||||
(goto-char (point-max))
|
||||
(let ((banner (dashboard-choose-banner))
|
||||
(buffer-read-only nil))
|
||||
(progn
|
||||
(when banner
|
||||
(if (image-type-available-p (intern (file-name-extension banner)))
|
||||
(dashboard-insert-image-banner banner)
|
||||
(dashboard-insert-ascii-banner-centered banner))
|
||||
(dashboard-insert-navigator)
|
||||
(dashboard-insert-init-info)))))
|
||||
|
||||
(defun dashboard-insert-navigator ()
|
||||
"Insert Navigator of the dashboard."
|
||||
(when (and dashboard-set-navigator dashboard-navigator-buttons)
|
||||
(dolist (line dashboard-navigator-buttons)
|
||||
(dolist (btn line)
|
||||
(let* ((icon (car btn))
|
||||
(title (cadr btn))
|
||||
(help (or (cadr (cdr btn)) ""))
|
||||
(action (or (cadr (cddr btn)) #'ignore))
|
||||
(face (or (cadr (cddr (cdr btn))) 'dashboard-navigator))
|
||||
(prefix (or (cadr (cddr (cddr btn))) (propertize "[" 'face face)))
|
||||
(suffix (or (cadr (cddr (cddr (cdr btn)))) (propertize "]" 'face face))))
|
||||
(widget-create 'item
|
||||
:tag (concat
|
||||
(when icon
|
||||
(propertize icon 'face `(:inherit
|
||||
,(get-text-property 0 'face icon)
|
||||
:inherit
|
||||
,face)))
|
||||
(when (and icon title
|
||||
(not (string-equal icon ""))
|
||||
(not (string-equal title "")))
|
||||
(propertize " " 'face 'variable-pitch))
|
||||
(when title (propertize title 'face face)))
|
||||
:help-echo help
|
||||
:action action
|
||||
:button-face `(:underline nil)
|
||||
:mouse-face 'highlight
|
||||
:button-prefix prefix
|
||||
:button-suffix suffix
|
||||
:format "%[%t%]")
|
||||
(insert " ")))
|
||||
(let* ((width (current-column)))
|
||||
(beginning-of-line)
|
||||
(dashboard-center-line (make-string width ?\s))
|
||||
(end-of-line))
|
||||
(insert "\n"))
|
||||
(insert "\n")))
|
||||
|
||||
(defmacro dashboard-insert-section (section-name list list-size shortcut action &rest widget-params)
|
||||
"Add a section with SECTION-NAME and LIST of LIST-SIZE items to the dashboard.
|
||||
SHORTCUT is the keyboard shortcut used to access the section.
|
||||
ACTION is theaction taken when the user activates the widget button.
|
||||
WIDGET-PARAMS are passed to the \"widget-create\" function."
|
||||
`(progn
|
||||
(dashboard-insert-heading ,section-name
|
||||
(if (and ,list dashboard-show-shortcuts) ,shortcut))
|
||||
(if ,list
|
||||
(when (dashboard-insert-section-list
|
||||
,section-name
|
||||
(dashboard-subseq ,list 0 ,list-size)
|
||||
,action
|
||||
,@widget-params)
|
||||
(dashboard-insert-shortcut ,shortcut ,section-name))
|
||||
(insert "\n --- No items ---"))))
|
||||
|
||||
;;
|
||||
;; Section list
|
||||
;;
|
||||
(defmacro dashboard-insert-section-list (section-name list action &rest rest)
|
||||
"Insert into SECTION-NAME a LIST of items, expanding ACTION and passing REST to widget creation."
|
||||
`(when (car ,list)
|
||||
(mapc
|
||||
(lambda (el)
|
||||
(let ((tag ,@rest))
|
||||
(insert "\n ")
|
||||
|
||||
(when (and (display-graphic-p)
|
||||
dashboard-set-file-icons
|
||||
(featurep 'all-the-icons))
|
||||
(let* ((path (car (last (split-string ,@rest " - "))))
|
||||
(icon (if (and (not (file-remote-p path))
|
||||
(file-directory-p path))
|
||||
(all-the-icons-icon-for-dir path nil "")
|
||||
(cond
|
||||
((string-equal ,section-name "Agenda for today:")
|
||||
(all-the-icons-octicon "primitive-dot" :height 1.0 :v-adjust 0.01))
|
||||
((file-remote-p path)
|
||||
(all-the-icons-octicon "radio-tower" :height 1.1 :v-adjust 0.01))
|
||||
(t (all-the-icons-icon-for-file (file-name-nondirectory path)))))))
|
||||
(setq tag (concat icon " " ,@rest))))
|
||||
|
||||
(widget-create 'item
|
||||
:tag tag
|
||||
:action ,action
|
||||
:button-face `(:underline nil)
|
||||
:mouse-face 'highlight
|
||||
:button-prefix ""
|
||||
:button-suffix ""
|
||||
:format "%[%t%]")))
|
||||
,list)))
|
||||
|
||||
;; Footer
|
||||
(defun dashboard-insert-footer ()
|
||||
"Insert footer of dashboard."
|
||||
(when dashboard-set-footer
|
||||
(insert "\n")
|
||||
(dashboard-center-line dashboard-footer)
|
||||
(insert dashboard-footer-icon)
|
||||
(insert " ")
|
||||
(insert (propertize dashboard-footer 'face 'dashboard-footer))
|
||||
(insert "\n")))
|
||||
|
||||
;;
|
||||
;; Recentf
|
||||
;;
|
||||
(defun dashboard-insert-recents (list-size)
|
||||
"Add the list of LIST-SIZE items from recently edited files."
|
||||
(recentf-mode)
|
||||
(dashboard-insert-section
|
||||
"Recent Files:"
|
||||
recentf-list
|
||||
list-size
|
||||
"r"
|
||||
`(lambda (&rest ignore) (find-file-existing ,el))
|
||||
(abbreviate-file-name el)))
|
||||
|
||||
;;
|
||||
;; Bookmarks
|
||||
;;
|
||||
(defun dashboard-insert-bookmarks (list-size)
|
||||
"Add the list of LIST-SIZE items of bookmarks."
|
||||
(require 'bookmark)
|
||||
(dashboard-insert-section
|
||||
"Bookmarks:"
|
||||
(dashboard-subseq (bookmark-all-names)
|
||||
0 list-size)
|
||||
list-size
|
||||
"m"
|
||||
`(lambda (&rest ignore) (bookmark-jump ,el))
|
||||
(let ((file (bookmark-get-filename el)))
|
||||
(if file
|
||||
(format "%s - %s" el (abbreviate-file-name file))
|
||||
el))))
|
||||
|
||||
;;
|
||||
;; Projectile
|
||||
;;
|
||||
(defun dashboard-insert-projects (list-size)
|
||||
"Add the list of LIST-SIZE items of projects."
|
||||
(require 'projectile)
|
||||
(projectile-cleanup-known-projects)
|
||||
(projectile-load-known-projects)
|
||||
(dashboard-insert-section
|
||||
"Projects:"
|
||||
(dashboard-subseq (projectile-relevant-known-projects)
|
||||
0 list-size)
|
||||
list-size
|
||||
"p"
|
||||
`(lambda (&rest ignore) (projectile-switch-project-by-name ,el))
|
||||
(abbreviate-file-name el)))
|
||||
|
||||
;;
|
||||
;; Org Agenda
|
||||
;;
|
||||
(defun dashboard-timestamp-to-gregorian-date (timestamp)
|
||||
"Convert TIMESTAMP to a gregorian date.
|
||||
|
||||
The result can be used with functions like
|
||||
`calendar-date-compare'."
|
||||
(let ((decoded-timestamp (decode-time timestamp)))
|
||||
(list (nth 4 decoded-timestamp)
|
||||
(nth 3 decoded-timestamp)
|
||||
(nth 5 decoded-timestamp))))
|
||||
|
||||
(defun dashboard-date-due-p (timestamp &optional due-date)
|
||||
"Check if TIMESTAMP is today or in the past.
|
||||
|
||||
If DUE-DATE is nil, compare TIMESTAMP to today; otherwise,
|
||||
compare to the date in DUE-DATE.
|
||||
|
||||
The time part of both TIMESTAMP and DUE-DATE is ignored, only the
|
||||
date part is considered."
|
||||
(unless due-date
|
||||
(setq due-date (current-time)))
|
||||
(setq due-date (time-add due-date 86400))
|
||||
(let* ((gregorian-date (dashboard-timestamp-to-gregorian-date timestamp))
|
||||
(gregorian-due-date (dashboard-timestamp-to-gregorian-date due-date)))
|
||||
(calendar-date-compare (list gregorian-date)
|
||||
(list gregorian-due-date))))
|
||||
|
||||
(defun dashboard-get-agenda ()
|
||||
"Get agenda items for today or for a week from now."
|
||||
(org-compile-prefix-format 'agenda)
|
||||
(let ((due-date nil))
|
||||
(if (and (boundp 'show-week-agenda-p) show-week-agenda-p)
|
||||
(setq due-date (time-add (current-time) (* 86400 7)))
|
||||
(setq due-date nil)
|
||||
)
|
||||
(let* ((filtered-entries nil))
|
||||
(org-map-entries
|
||||
(lambda ()
|
||||
(let* ((schedule-time (org-get-scheduled-time (point)))
|
||||
(deadline-time (org-get-deadline-time (point)))
|
||||
(item (org-agenda-format-item
|
||||
(format-time-string "%Y-%m-%d" schedule-time)
|
||||
(org-get-heading t t)
|
||||
(org-outline-level)
|
||||
(org-get-category)
|
||||
(org-get-tags)
|
||||
t))
|
||||
(loc (point))
|
||||
(file (buffer-file-name)))
|
||||
(if (or (equal dashboard-org-agenda-categories nil)
|
||||
(member (org-get-category) dashboard-org-agenda-categories))
|
||||
(when (and (not (org-entry-is-done-p))
|
||||
(or (and schedule-time (dashboard-date-due-p schedule-time due-date))
|
||||
(and deadline-time (dashboard-date-due-p deadline-time due-date))))
|
||||
(setq filtered-entries
|
||||
(append filtered-entries
|
||||
(list (list item schedule-time deadline-time loc file))))))))
|
||||
nil
|
||||
'agenda)
|
||||
filtered-entries)))
|
||||
|
||||
(defun dashboard-insert-agenda (list-size)
|
||||
"Add the list of LIST-SIZE items of agenda."
|
||||
(require 'org-agenda)
|
||||
(require 'calendar)
|
||||
(let ((agenda (dashboard-get-agenda)))
|
||||
(dashboard-insert-section
|
||||
(or (and (boundp 'show-week-agenda-p) show-week-agenda-p "Agenda for the coming week:")
|
||||
"Agenda for today:")
|
||||
agenda
|
||||
list-size
|
||||
"a"
|
||||
`(lambda (&rest ignore)
|
||||
(let ((buffer (find-file-other-window (nth 4 ',el))))
|
||||
(with-current-buffer buffer
|
||||
(goto-char (nth 3 ',el)))
|
||||
(switch-to-buffer buffer)))
|
||||
(format "%s" (nth 0 el)))))
|
||||
|
||||
;;
|
||||
;; Registers
|
||||
;;
|
||||
(defun dashboard-insert-registers (list-size)
|
||||
"Add the list of LIST-SIZE items of registers."
|
||||
(require 'register)
|
||||
(dashboard-insert-section
|
||||
"Registers:"
|
||||
register-alist
|
||||
list-size
|
||||
"e"
|
||||
(lambda (&rest _ignore) (jump-to-register (car el)))
|
||||
(format "%c - %s" (car el) (register-describe-oneline (car el)))))
|
||||
|
||||
(provide 'dashboard-widgets)
|
||||
;;; dashboard-widgets.el ends here
|
BIN
elpa/dashboard-20191210.1041/dashboard-widgets.elc
Normal file
BIN
elpa/dashboard-20191210.1041/dashboard-widgets.elc
Normal file
Binary file not shown.
254
elpa/dashboard-20191210.1041/dashboard.el
Normal file
254
elpa/dashboard-20191210.1041/dashboard.el
Normal file
|
@ -0,0 +1,254 @@
|
|||
;;; dashboard.el --- A startup screen extracted from Spacemacs -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (c) 2016-2019 Rakan Al-Hneiti & Contributors
|
||||
;;
|
||||
;; Author: Rakan Al-Hneiti
|
||||
;; URL: https://github.com/emacs-dashboard/emacs-dashboard
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
;;
|
||||
;; Created: October 05, 2016
|
||||
;; Package-Version: 1.7.0-SNAPSHOT
|
||||
;; Keywords: startup, screen, tools, dashboard
|
||||
;; Package-Requires: ((emacs "25.3") (page-break-lines "0.11"))
|
||||
;;; Commentary:
|
||||
|
||||
;; An extensible Emacs dashboard, with sections for
|
||||
;; bookmarks, projectile projects, org-agenda and more.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'seq)
|
||||
(require 'page-break-lines)
|
||||
(require 'recentf)
|
||||
|
||||
(require 'dashboard-widgets)
|
||||
|
||||
;; Custom splash screen
|
||||
(defvar dashboard-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "C-p") 'dashboard-previous-line)
|
||||
(define-key map (kbd "C-n") 'dashboard-next-line)
|
||||
(define-key map (kbd "<up>") 'dashboard-previous-line)
|
||||
(define-key map (kbd "<down>") 'dashboard-next-line)
|
||||
(define-key map (kbd "k") 'dashboard-previous-line)
|
||||
(define-key map (kbd "j") 'dashboard-next-line)
|
||||
(define-key map [tab] 'widget-forward)
|
||||
(define-key map (kbd "C-i") 'widget-forward)
|
||||
(define-key map [backtab] 'widget-backward)
|
||||
(define-key map (kbd "RET") 'dashboard-return)
|
||||
(define-key map [down-mouse-1] 'widget-button-click)
|
||||
(define-key map (kbd "g") #'dashboard-refresh-buffer)
|
||||
(define-key map (kbd "}") #'dashboard-next-section)
|
||||
(define-key map (kbd "{") #'dashboard-previous-section)
|
||||
map)
|
||||
"Keymap for dashboard mode.")
|
||||
|
||||
(define-derived-mode dashboard-mode special-mode "Dashboard"
|
||||
"Dashboard major mode for startup screen.
|
||||
\\<dashboard-mode-map>
|
||||
"
|
||||
:group 'dashboard
|
||||
:syntax-table nil
|
||||
:abbrev-table nil
|
||||
(whitespace-mode -1)
|
||||
(linum-mode -1)
|
||||
(page-break-lines-mode 1)
|
||||
(setq inhibit-startup-screen t)
|
||||
(setq buffer-read-only t
|
||||
truncate-lines t))
|
||||
|
||||
(defgroup dashboard nil
|
||||
"Extensible startup screen."
|
||||
:group 'applications)
|
||||
|
||||
(defcustom dashboard-center-content nil
|
||||
"Whether to center content within the window."
|
||||
:type 'boolean
|
||||
:group 'dashboard)
|
||||
|
||||
(defconst dashboard-buffer-name "*dashboard*"
|
||||
"Dashboard's buffer name.")
|
||||
|
||||
(defvar dashboard--section-starts nil
|
||||
"List of section starting positions.")
|
||||
|
||||
(defun dashboard-previous-section ()
|
||||
"Navigate back to previous section."
|
||||
(interactive)
|
||||
(let ((current-section-start nil)
|
||||
(current-position (point))
|
||||
(previous-section-start nil))
|
||||
(dolist (elt dashboard--section-starts)
|
||||
(when (and current-section-start
|
||||
(not previous-section-start))
|
||||
(setq previous-section-start elt))
|
||||
(when (and (not current-section-start)
|
||||
(< elt current-position))
|
||||
(setq current-section-start elt)))
|
||||
(goto-char (if (eq current-position current-section-start)
|
||||
previous-section-start
|
||||
current-section-start))))
|
||||
|
||||
(defun dashboard-next-section ()
|
||||
"Navigate forward to next section."
|
||||
(interactive)
|
||||
(let ((current-position (point))
|
||||
(next-section-start nil)
|
||||
(section-starts (reverse dashboard--section-starts)))
|
||||
(dolist (elt section-starts)
|
||||
(when (and (not next-section-start)
|
||||
(> elt current-position))
|
||||
(setq next-section-start elt)))
|
||||
(when next-section-start
|
||||
(goto-char next-section-start))))
|
||||
|
||||
(defun dashboard-previous-line (arg)
|
||||
"Move point up and position it at that line’s item.
|
||||
Optional prefix ARG says how many lines to move; default is one line."
|
||||
(interactive "^p")
|
||||
(dashboard-next-line (- arg)))
|
||||
|
||||
(defun dashboard-next-line (arg)
|
||||
"Move point down and position it at that line’s item.
|
||||
Optional prefix ARG says how many lines to move; default is one line."
|
||||
;; code heavily inspired by `dired-next-line'
|
||||
(interactive "^p")
|
||||
(let ((line-move-visual nil)
|
||||
(goal-column nil))
|
||||
(line-move arg t))
|
||||
;; We never want to move point into an invisible line. Dashboard doesn’t
|
||||
;; use invisible text currently but when it does we’re ready!
|
||||
(while (and (invisible-p (point))
|
||||
(not (if (and arg (< arg 0)) (bobp) (eobp))))
|
||||
(forward-char (if (and arg (< arg 0)) -1 1)))
|
||||
(beginning-of-line-text))
|
||||
|
||||
(defun dashboard-return ()
|
||||
"Hit return key in dashboard buffer."
|
||||
(interactive)
|
||||
(let ((start-ln (line-number-at-pos))
|
||||
(fd-cnt 0)
|
||||
(diff-line nil)
|
||||
(entry-pt nil))
|
||||
(save-excursion
|
||||
(while (and (not diff-line)
|
||||
(not (= (point) (point-min)))
|
||||
(not (get-char-property (point) 'button))
|
||||
(not (= (point) (point-max))))
|
||||
(forward-char 1)
|
||||
(setq fd-cnt (1+ fd-cnt))
|
||||
(unless (= start-ln (line-number-at-pos))
|
||||
(setq diff-line t)))
|
||||
(unless (= (point) (point-max))
|
||||
(setq entry-pt (point))))
|
||||
(when (= fd-cnt 1)
|
||||
(setq entry-pt (1- (point))))
|
||||
(if entry-pt
|
||||
(widget-button-press entry-pt)
|
||||
(call-interactively #'widget-button-press))))
|
||||
|
||||
(defun dashboard-maximum-section-length ()
|
||||
"For the just-inserted section, calculate the length of the longest line."
|
||||
(let ((max-line-length 0))
|
||||
(save-excursion
|
||||
(dashboard-previous-section)
|
||||
(while (not (eobp))
|
||||
(setq max-line-length
|
||||
(max max-line-length
|
||||
(- (line-end-position) (line-beginning-position))))
|
||||
(forward-line)))
|
||||
max-line-length))
|
||||
|
||||
(defun dashboard-insert-startupify-lists ()
|
||||
"Insert the list of widgets into the buffer."
|
||||
(interactive)
|
||||
(let ((buffer-exists (buffer-live-p (get-buffer dashboard-buffer-name)))
|
||||
(recentf-is-on (recentf-enabled-p))
|
||||
(origial-recentf-list recentf-list)
|
||||
(dashboard-num-recents (or (cdr (assoc 'recents dashboard-items)) 0))
|
||||
(max-line-length 0))
|
||||
;; disable recentf mode,
|
||||
;; so we don't flood the recent files list with org mode files
|
||||
;; do this by making a copy of the part of the list we'll use
|
||||
;; let dashboard widgets change that
|
||||
;; then restore the orginal list afterwards
|
||||
;; (this avoids many saves/loads that would result from
|
||||
;; disabling/enabling recentf-mode)
|
||||
(if recentf-is-on
|
||||
(setq recentf-list (seq-take recentf-list dashboard-num-recents)))
|
||||
(when (or (not (eq dashboard-buffer-last-width (window-width)))
|
||||
(not buffer-exists))
|
||||
(setq dashboard-banner-length (window-width)
|
||||
dashboard-buffer-last-width dashboard-banner-length)
|
||||
(with-current-buffer (get-buffer-create dashboard-buffer-name)
|
||||
(let ((buffer-read-only nil))
|
||||
(erase-buffer)
|
||||
(dashboard-insert-banner)
|
||||
(dashboard-insert-page-break)
|
||||
(setq dashboard--section-starts nil)
|
||||
(mapc (lambda (els)
|
||||
(let* ((el (or (car-safe els) els))
|
||||
(list-size
|
||||
(or (cdr-safe els)
|
||||
dashboard-items-default-length))
|
||||
(item-generator
|
||||
(cdr-safe (assoc el dashboard-item-generators))))
|
||||
(add-to-list 'dashboard--section-starts (point))
|
||||
(funcall item-generator list-size)
|
||||
(setq max-line-length
|
||||
(max max-line-length (dashboard-maximum-section-length)))
|
||||
(dashboard-insert-page-break)))
|
||||
dashboard-items)
|
||||
(when dashboard-center-content
|
||||
(goto-char (car (last dashboard--section-starts)))
|
||||
(let ((margin (floor (/ (max (- (window-width) max-line-length) 0) 2))))
|
||||
(while (not (eobp))
|
||||
(and (not (eq ? (char-after)))
|
||||
(insert (make-string margin ?\ )))
|
||||
(forward-line 1))))
|
||||
(dashboard-insert-footer))
|
||||
(dashboard-mode)
|
||||
(goto-char (point-min))))
|
||||
(if recentf-is-on
|
||||
(setq recentf-list origial-recentf-list))))
|
||||
|
||||
(add-hook 'window-setup-hook
|
||||
(lambda ()
|
||||
(add-hook 'window-size-change-functions 'dashboard-resize-on-hook)
|
||||
(dashboard-resize-on-hook)))
|
||||
|
||||
(defun dashboard-refresh-buffer ()
|
||||
"Refresh buffer."
|
||||
(interactive)
|
||||
(kill-buffer dashboard-buffer-name)
|
||||
(dashboard-insert-startupify-lists)
|
||||
(switch-to-buffer dashboard-buffer-name))
|
||||
|
||||
(defun dashboard-resize-on-hook (&optional _)
|
||||
"Re-render dashboard on window size change."
|
||||
(let ((space-win (get-buffer-window dashboard-buffer-name))
|
||||
(frame-win (frame-selected-window)))
|
||||
(when (and space-win
|
||||
(not (window-minibuffer-p frame-win)))
|
||||
(with-selected-window space-win
|
||||
(dashboard-insert-startupify-lists)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun dashboard-setup-startup-hook ()
|
||||
"Setup post initialization hooks.
|
||||
If a command line argument is provided,
|
||||
assume a filename and skip displaying Dashboard."
|
||||
(when (< (length command-line-args) 2 )
|
||||
(add-hook 'after-init-hook (lambda ()
|
||||
;; Display useful lists of items
|
||||
(dashboard-insert-startupify-lists)))
|
||||
(add-hook 'emacs-startup-hook '(lambda ()
|
||||
(switch-to-buffer "*dashboard*")
|
||||
(goto-char (point-min))
|
||||
(redisplay)))))
|
||||
|
||||
(provide 'dashboard)
|
||||
;;; dashboard.el ends here
|
BIN
elpa/dashboard-20191210.1041/dashboard.elc
Normal file
BIN
elpa/dashboard-20191210.1041/dashboard.elc
Normal file
Binary file not shown.
2
elpa/dashboard-readme.txt
Normal file
2
elpa/dashboard-readme.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
An extensible Emacs dashboard, with sections for
|
||||
bookmarks, projectile projects, org-agenda and more.
|
|
@ -1,4 +1,4 @@
|
|||
(define-package "leuven-theme" "20190831.1008" "Awesome Emacs color theme on white background" 'nil :keywords
|
||||
(define-package "leuven-theme" "20191211.1608" "Awesome Emacs color theme on white background" 'nil :keywords
|
||||
'("color" "theme")
|
||||
:authors
|
||||
'(("Fabrice Niessen <(concat \"fniessen\" at-sign \"pirilampo.org\")>"))
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")>
|
||||
;; URL: https://github.com/fniessen/emacs-leuven-theme
|
||||
;; Version: 20190831.1207
|
||||
;; Version: 20191211.1707
|
||||
;; Keywords: color theme
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
@ -364,10 +364,11 @@ more...")
|
|||
`(bbdb-field-name ((,class (:weight bold :foreground "steel blue"))))
|
||||
`(bbdb-field-value ((,class (:foreground "steel blue"))))
|
||||
`(bbdb-name ((,class (:underline t :foreground "#FF6633"))))
|
||||
`(bmkp-light-fringe-autonamed ((,class (:foreground "#5A5A5A" :background "#D4D4D4"))))
|
||||
`(bmkp-light-autonamed ((,class (:background "#F0F0F0"))))
|
||||
`(bmkp-light-fringe-autonamed ((,class (:foreground "#5A5A5A" :background "#D4D4D4"))))
|
||||
`(bmkp-light-fringe-non-autonamed ((,class (:foreground "#FFFFCC" :background "#01FFFB")))) ; default
|
||||
`(bmkp-light-non-autonamed ((,class (:background "#BFFFFE"))))
|
||||
`(bmkp-no-local ((,class (:background "pink"))))
|
||||
`(browse-kill-ring-separator-face ((,class (:foreground "red"))))
|
||||
`(calendar-month-header ((,class (:weight bold :foreground "#4F4A3D" :background "#FFFFCC"))))
|
||||
`(calendar-today ((,class (:weight bold :foreground "#4F4A3D" :background "#FFFFCC"))))
|
|
@ -0,0 +1,89 @@
|
|||
;;; page-break-lines-autoloads.el --- automatically extracted autoloads
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(add-to-list 'load-path (directory-file-name
|
||||
(or (file-name-directory #$) (car load-path))))
|
||||
|
||||
|
||||
;;;### (autoloads nil "page-break-lines" "page-break-lines.el" (0
|
||||
;;;;;; 0 0 0))
|
||||
;;; Generated autoloads from page-break-lines.el
|
||||
|
||||
(defvar page-break-lines-char 9472 "\
|
||||
Character used to render page break lines.")
|
||||
|
||||
(custom-autoload 'page-break-lines-char "page-break-lines" t)
|
||||
|
||||
(defvar page-break-lines-lighter " PgLn" "\
|
||||
Mode-line indicator for `page-break-lines-mode'.")
|
||||
|
||||
(custom-autoload 'page-break-lines-lighter "page-break-lines" t)
|
||||
|
||||
(defvar page-break-lines-max-width nil "\
|
||||
If non-nil, maximum width (in characters) of page break indicator.
|
||||
If nil, indicator will span the width of the frame.")
|
||||
|
||||
(custom-autoload 'page-break-lines-max-width "page-break-lines" t)
|
||||
|
||||
(defvar page-break-lines-modes '(emacs-lisp-mode lisp-mode scheme-mode compilation-mode outline-mode help-mode) "\
|
||||
Modes in which to enable `page-break-lines-mode'.")
|
||||
|
||||
(custom-autoload 'page-break-lines-modes "page-break-lines" t)
|
||||
|
||||
(defface page-break-lines '((t :inherit font-lock-comment-face :bold nil :italic nil)) "\
|
||||
Face used to colorize page break lines.
|
||||
If using :bold or :italic, please ensure `page-break-lines-char'
|
||||
is available in that variant of your font, otherwise it may be
|
||||
displayed as a junk character." :group (quote page-break-lines))
|
||||
|
||||
(autoload 'page-break-lines-mode "page-break-lines" "\
|
||||
Toggle Page Break Lines mode.
|
||||
|
||||
In Page Break mode, page breaks (^L characters) are displayed as a
|
||||
horizontal line of `page-break-lines-char' characters.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(define-obsolete-function-alias 'turn-on-page-break-lines-mode 'page-break-lines-mode)
|
||||
|
||||
(autoload 'page-break-lines-mode-maybe "page-break-lines" "\
|
||||
Enable `page-break-lines-mode' in the current buffer if desired.
|
||||
When `major-mode' is listed in `page-break-lines-modes', then
|
||||
`page-break-lines-mode' will be enabled.
|
||||
|
||||
\(fn)" nil nil)
|
||||
|
||||
(defvar global-page-break-lines-mode nil "\
|
||||
Non-nil if Global Page-Break-Lines mode is enabled.
|
||||
See the `global-page-break-lines-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 `global-page-break-lines-mode'.")
|
||||
|
||||
(custom-autoload 'global-page-break-lines-mode "page-break-lines" nil)
|
||||
|
||||
(autoload 'global-page-break-lines-mode "page-break-lines" "\
|
||||
Toggle Page-Break-Lines mode in all buffers.
|
||||
With prefix ARG, enable Global Page-Break-Lines mode if ARG is positive;
|
||||
otherwise, disable it. If called from Lisp, enable the mode if
|
||||
ARG is omitted or nil.
|
||||
|
||||
Page-Break-Lines mode is enabled in all buffers where
|
||||
`page-break-lines-mode-maybe' would do it.
|
||||
See `page-break-lines-mode' for more information on Page-Break-Lines mode.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "page-break-lines" '("page-break-lines--update-display-table")))
|
||||
|
||||
;;;***
|
||||
|
||||
;; Local Variables:
|
||||
;; version-control: never
|
||||
;; no-byte-compile: t
|
||||
;; no-update-autoloads: t
|
||||
;; coding: utf-8
|
||||
;; End:
|
||||
;;; page-break-lines-autoloads.el ends here
|
|
@ -0,0 +1,2 @@
|
|||
;;; -*- no-byte-compile: t -*-
|
||||
(define-package "page-break-lines" "20190519.2238" "Display ^L page breaks as tidy horizontal lines" '((emacs "24.4")) :commit "2e1d274e11071bb8daea4d6f4c0369c84466de7a" :keywords '("convenience" "faces") :authors '(("Steve Purcell" . "steve@sanityinc.com")) :maintainer '("Steve Purcell" . "steve@sanityinc.com") :url "https://github.com/purcell/page-break-lines")
|
185
elpa/page-break-lines-20190519.2238/page-break-lines.el
Normal file
185
elpa/page-break-lines-20190519.2238/page-break-lines.el
Normal file
|
@ -0,0 +1,185 @@
|
|||
;;; page-break-lines.el --- Display ^L page breaks as tidy horizontal lines
|
||||
|
||||
;; Copyright (C) 2012-2015 Steve Purcell
|
||||
|
||||
;; Author: Steve Purcell <steve@sanityinc.com>
|
||||
;; URL: https://github.com/purcell/page-break-lines
|
||||
;; Package-Version: 20190519.2238
|
||||
;; Package-X-Original-Version: 0
|
||||
;; Package-Requires: ((emacs "24.4"))
|
||||
;; Keywords: convenience, faces
|
||||
|
||||
;; 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/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library provides a global mode which displays form feed
|
||||
;; characters as horizontal rules.
|
||||
|
||||
;; Install from Melpa or Marmalade, or add to `load-path' and use
|
||||
;; (require 'page-break-lines).
|
||||
|
||||
;; Use `page-break-lines-mode' to enable the mode in specific buffers,
|
||||
;; or customize `page-break-lines-modes' and enable the mode globally with
|
||||
;; `global-page-break-lines-mode'.
|
||||
|
||||
;; Issues and limitations:
|
||||
|
||||
;; If `page-break-lines-char' is displayed at a different width to
|
||||
;; regular characters, the rule may be either too short or too long:
|
||||
;; rules may then wrap if `truncate-lines' is nil. On some systems,
|
||||
;; Emacs may erroneously choose a different font for the page break
|
||||
;; symbol, which choice can be overridden using code such as:
|
||||
|
||||
;; (set-fontset-font "fontset-default"
|
||||
;; (cons page-break-lines-char page-break-lines-char)
|
||||
;; (face-attribute 'default :family))
|
||||
|
||||
;; Use `describe-char' on a page break char to determine whether this
|
||||
;; is the case.
|
||||
|
||||
;; Additionally, the use of `text-scale-increase' or
|
||||
;; `text-scale-decrease' will cause the rule width to be incorrect,
|
||||
;; because the reported window width (in characters) will continue to
|
||||
;; be the width in the frame's default font, not the scaled font used to
|
||||
;; display the rule.
|
||||
|
||||
;; Adapted from code http://www.emacswiki.org/emacs/PageBreaks
|
||||
|
||||
;;; Code:
|
||||
|
||||
(defgroup page-break-lines nil
|
||||
"Display ugly ^L page breaks as tidy horizontal lines."
|
||||
:prefix "page-break-lines-"
|
||||
:group 'faces)
|
||||
|
||||
;;;###autoload
|
||||
(defcustom page-break-lines-char ?─
|
||||
"Character used to render page break lines."
|
||||
:type 'character
|
||||
:group 'page-break-lines)
|
||||
|
||||
;;;###autoload
|
||||
(defcustom page-break-lines-lighter " PgLn"
|
||||
"Mode-line indicator for `page-break-lines-mode'."
|
||||
:type '(choice (const :tag "No lighter" "") string)
|
||||
:group 'page-break-lines)
|
||||
|
||||
;;;###autoload
|
||||
(defcustom page-break-lines-max-width nil
|
||||
"If non-nil, maximum width (in characters) of page break indicator.
|
||||
If nil, indicator will span the width of the frame."
|
||||
:type '(choice integer (const :tag "Full width" nil))
|
||||
:group 'page-break-lines)
|
||||
|
||||
;;;###autoload
|
||||
(defcustom page-break-lines-modes
|
||||
'(emacs-lisp-mode lisp-mode scheme-mode compilation-mode outline-mode help-mode)
|
||||
"Modes in which to enable `page-break-lines-mode'."
|
||||
:type '(repeat symbol)
|
||||
:group 'page-break-lines)
|
||||
|
||||
;;;###autoload
|
||||
(defface page-break-lines
|
||||
'((t :inherit font-lock-comment-face :bold nil :italic nil))
|
||||
"Face used to colorize page break lines.
|
||||
If using :bold or :italic, please ensure `page-break-lines-char'
|
||||
is available in that variant of your font, otherwise it may be
|
||||
displayed as a junk character."
|
||||
:group 'page-break-lines)
|
||||
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(define-minor-mode page-break-lines-mode
|
||||
"Toggle Page Break Lines mode.
|
||||
|
||||
In Page Break mode, page breaks (^L characters) are displayed as a
|
||||
horizontal line of `page-break-lines-char' characters."
|
||||
:lighter page-break-lines-lighter
|
||||
:group 'page-break-lines
|
||||
(page-break-lines--update-display-tables))
|
||||
|
||||
;;;###autoload
|
||||
(define-obsolete-function-alias 'turn-on-page-break-lines-mode 'page-break-lines-mode)
|
||||
|
||||
(dolist (hook '(window-configuration-change-hook
|
||||
window-size-change-functions
|
||||
after-setting-font-hook
|
||||
display-line-numbers-mode-hook))
|
||||
(add-hook hook 'page-break-lines--update-display-tables))
|
||||
|
||||
|
||||
|
||||
(defun page-break-lines--update-display-table (window)
|
||||
"Modify a display-table that displays page-breaks prettily.
|
||||
If the buffer inside WINDOW has `page-break-lines-mode' enabled,
|
||||
its display table will be modified as necessary."
|
||||
(with-current-buffer (window-buffer window)
|
||||
(with-selected-window window
|
||||
(if page-break-lines-mode
|
||||
(progn
|
||||
(unless buffer-display-table
|
||||
(setq buffer-display-table (make-display-table)))
|
||||
(let ((default-height (face-attribute 'default :height nil 'default)))
|
||||
(set-face-attribute 'page-break-lines nil :height default-height)
|
||||
(let* ((cwidth (char-width page-break-lines-char))
|
||||
(wwidth-pix (- (window-width nil t)
|
||||
(if (bound-and-true-p display-line-numbers)
|
||||
(line-number-display-width t)
|
||||
0)))
|
||||
(width (- (/ wwidth-pix (frame-char-width) cwidth)
|
||||
(if (display-graphic-p) 0 1)))
|
||||
(width (if page-break-lines-max-width
|
||||
(min width page-break-lines-max-width)
|
||||
width))
|
||||
(glyph (make-glyph-code page-break-lines-char 'page-break-lines))
|
||||
(new-display-entry (vconcat (make-list width glyph))))
|
||||
(unless (equal new-display-entry (elt buffer-display-table ?\^L))
|
||||
(aset buffer-display-table ?\^L new-display-entry)))))
|
||||
(when (and (apply 'derived-mode-p page-break-lines-modes)
|
||||
buffer-display-table)
|
||||
(aset buffer-display-table ?\^L nil))))))
|
||||
|
||||
(defun page-break-lines--update-display-tables (&optional frame)
|
||||
"Function called for updating display table in windows of FRAME."
|
||||
(unless (minibufferp)
|
||||
(mapc 'page-break-lines--update-display-table (window-list frame 'no-minibuffer))))
|
||||
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defun page-break-lines-mode-maybe ()
|
||||
"Enable `page-break-lines-mode' in the current buffer if desired.
|
||||
When `major-mode' is listed in `page-break-lines-modes', then
|
||||
`page-break-lines-mode' will be enabled."
|
||||
(if (and (not (minibufferp))
|
||||
(apply 'derived-mode-p page-break-lines-modes))
|
||||
(page-break-lines-mode 1)))
|
||||
|
||||
;;;###autoload
|
||||
(define-global-minor-mode global-page-break-lines-mode
|
||||
page-break-lines-mode page-break-lines-mode-maybe
|
||||
:require 'page-break-lines
|
||||
:group 'page-break-lines)
|
||||
|
||||
|
||||
(provide 'page-break-lines)
|
||||
|
||||
;; Local Variables:
|
||||
;; coding: utf-8
|
||||
;; checkdoc-minor-mode: t
|
||||
;; End:
|
||||
|
||||
;;; page-break-lines.el ends here
|
BIN
elpa/page-break-lines-20190519.2238/page-break-lines.elc
Normal file
BIN
elpa/page-break-lines-20190519.2238/page-break-lines.elc
Normal file
Binary file not shown.
|
@ -1,2 +0,0 @@
|
|||
;;; -*- no-byte-compile: t -*-
|
||||
(define-package "request" "20191127.1554" "Compatible layer for URL request in Emacs" '((emacs "24.4")) :commit "7eff9e7cc2809f41be4d6b9f732e2b06adb42628" :authors '(("Takafumi Arakaki <aka.tkf at gmail.com>")) :maintainer '("Takafumi Arakaki <aka.tkf at gmail.com>") :url "https://github.com/tkf/emacs-request")
|
2
elpa/request-20191211.2051/request-pkg.el
Normal file
2
elpa/request-20191211.2051/request-pkg.el
Normal file
|
@ -0,0 +1,2 @@
|
|||
;;; -*- no-byte-compile: t -*-
|
||||
(define-package "request" "20191211.2051" "Compatible layer for URL request in Emacs" '((emacs "24.4")) :commit "d2957086f5012e8a5dd5cfaedf8fec778f69e6e2" :authors '(("Takafumi Arakaki <aka.tkf at gmail.com>")) :maintainer '("Takafumi Arakaki <aka.tkf at gmail.com>") :url "https://github.com/tkf/emacs-request")
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
;; Author: Takafumi Arakaki <aka.tkf at gmail.com>
|
||||
;; URL: https://github.com/tkf/emacs-request
|
||||
;; Package-Version: 20191127.1554
|
||||
;; Package-Version: 20191211.2051
|
||||
;; Package-Requires: ((emacs "24.4"))
|
||||
;; Version: 0.3.2
|
||||
|
||||
|
@ -632,6 +632,12 @@ then send to PARSER."
|
|||
(setf (request-response-data response)
|
||||
(if parser (funcall parser) (buffer-string))))))))
|
||||
|
||||
(defsubst request-url-file-p (url)
|
||||
"Return non-nil if URL looks like a file URL."
|
||||
(let ((scheme (and (stringp url) (url-type (url-generic-parse-url url)))))
|
||||
(and (stringp scheme)
|
||||
(not (string-match-p "^http" scheme)))))
|
||||
|
||||
(cl-defun request--callback (buffer
|
||||
&key
|
||||
parser success error complete
|
||||
|
@ -653,12 +659,8 @@ then send to PARSER."
|
|||
(data (request-response-data response))
|
||||
(done-p (request-response-done-p response)))
|
||||
(let* ((response-url (request-response-url response))
|
||||
(scheme (and (stringp response-url)
|
||||
(url-type (url-generic-parse-url response-url))))
|
||||
(curl-file-p (and (stringp scheme)
|
||||
(not (string-match-p "^http" scheme))
|
||||
(eq (request-response--backend response) 'curl))))
|
||||
;; curl does not add a header for say file:///foo/bar
|
||||
(curl-file-p (and (eq (request-response--backend response) 'curl)
|
||||
(request-url-file-p response-url))))
|
||||
(unless curl-file-p
|
||||
(request--clean-header response)
|
||||
(request--cut-header response)))
|
||||
|
@ -902,15 +904,15 @@ Currently it is used only for testing.")
|
|||
(cl-defun request--curl-command
|
||||
(url &key type data headers response files* unix-socket encoding
|
||||
&allow-other-keys
|
||||
&aux
|
||||
(cookie-jar (convert-standard-filename
|
||||
(expand-file-name (request--curl-cookie-jar)))))
|
||||
&aux (cookie-jar (convert-standard-filename
|
||||
(expand-file-name (request--curl-cookie-jar)))))
|
||||
"BUG: Simultaneous requests are a known cause of cookie-jar corruption."
|
||||
(append
|
||||
(list request-curl "--silent" "--include"
|
||||
"--location"
|
||||
"--cookie" cookie-jar "--cookie-jar" cookie-jar
|
||||
"--write-out" request--curl-write-out-template)
|
||||
(list request-curl
|
||||
"--silent" "--location"
|
||||
"--cookie" cookie-jar "--cookie-jar" cookie-jar)
|
||||
(unless (request-url-file-p url)
|
||||
(list "--include" "--write-out" request--curl-write-out-template))
|
||||
request-curl-options
|
||||
(when (plist-get (request--curl-capabilities) :compression) (list "--compressed"))
|
||||
(when unix-socket (list "--unix-socket" unix-socket))
|
||||
|
@ -1058,11 +1060,12 @@ removed from the buffer before it is shown to the parser function.
|
|||
(process-put proc :request-response response)
|
||||
(set-process-coding-system proc 'no-conversion 'no-conversion)
|
||||
(set-process-query-on-exit-flag proc nil)
|
||||
(set-process-sentinel proc 'request--curl-callback)
|
||||
(when semaphore
|
||||
(set-process-sentinel proc (lambda (&rest args)
|
||||
(apply #'request--curl-callback args)
|
||||
(apply semaphore args))))))
|
||||
(let ((callback-2 (apply-partially #'request--curl-callback url)))
|
||||
(if semaphore
|
||||
(set-process-sentinel proc (lambda (&rest args)
|
||||
(apply callback-2 args)
|
||||
(apply semaphore args)))
|
||||
(set-process-sentinel proc callback-2)))))
|
||||
|
||||
(defun request--curl-read-and-delete-tail-info ()
|
||||
"Read a sexp at the end of buffer and remove it and preceding character.
|
||||
|
@ -1104,11 +1107,13 @@ See \"set-cookie-av\" in http://www.ietf.org/rfc/rfc2965.txt")
|
|||
(when (looking-at-p "HTTP/1\\.[0-1] 200 Connection established")
|
||||
(delete-region (point) (progn (request--goto-next-body) (point)))))
|
||||
|
||||
(defun request--curl-preprocess ()
|
||||
(defun request--curl-preprocess (&optional url)
|
||||
"Pre-process current buffer before showing it to user."
|
||||
(let (history)
|
||||
(cl-destructuring-bind (&key num-redirects url-effective)
|
||||
(request--curl-read-and-delete-tail-info)
|
||||
(if (request-url-file-p url)
|
||||
`(:num-redirects 0 :url-effective ,url)
|
||||
(request--curl-read-and-delete-tail-info))
|
||||
(goto-char (point-min))
|
||||
(request--consume-100-continue)
|
||||
(request--consume-200-connection-established)
|
||||
|
@ -1151,7 +1156,7 @@ START-URL is the URL requested."
|
|||
for response in (cdr history)
|
||||
do (setf (request-response-url response) url)))
|
||||
|
||||
(defun request--curl-callback (proc event)
|
||||
(defun request--curl-callback (url proc event)
|
||||
(let* ((buffer (process-buffer proc))
|
||||
(response (process-get proc :request-response))
|
||||
(settings (request-response-settings response)))
|
||||
|
@ -1168,7 +1173,7 @@ START-URL is the URL requested."
|
|||
(cl-destructuring-bind (&key code history error url-effective &allow-other-keys)
|
||||
(condition-case err
|
||||
(with-current-buffer buffer
|
||||
(request--curl-preprocess))
|
||||
(request--curl-preprocess url))
|
||||
((debug error)
|
||||
(list :error err)))
|
||||
(request--curl-absolutify-location-history (plist-get settings :url)
|
||||
|
@ -1205,7 +1210,12 @@ START-URL is the URL requested."
|
|||
settings)
|
||||
(let ((proc (get-buffer-process (request-response--buffer response))))
|
||||
(auto-revert-set-timer)
|
||||
(when auto-revert-use-notify (request-auto-revert-notify-rm-watch))
|
||||
(when auto-revert-use-notify
|
||||
(if noninteractive
|
||||
(dolist (buf (buffer-list))
|
||||
(with-current-buffer buf
|
||||
(request-auto-revert-notify-rm-watch)))
|
||||
(request-auto-revert-notify-rm-watch)))
|
||||
(with-local-quit
|
||||
(cl-loop with iter = 0
|
||||
until (or (>= iter 10) finished)
|
Binary file not shown.
2
init.el
2
init.el
|
@ -29,7 +29,7 @@ There are two things you can do about this warning:
|
|||
(when (eq system-type 'gnu/linux)
|
||||
(load-theme 'nord))
|
||||
(unless (eq system-type 'gnu/linux)
|
||||
(load-theme 'leuven))
|
||||
(load-theme 'spacemacs-dark))
|
||||
|
||||
;; Load my custom bundles
|
||||
(add-to-list 'load-path (expand-file-name "~/.emacs.d/bundle"))
|
||||
|
|
Loading…
Add table
Reference in a new issue