dev: merge branch 'master'
This commit is contained in:
commit
515001f4a3
9 changed files with 23 additions and 21 deletions
15
lisp/lib/strings.el
Normal file
15
lisp/lib/strings.el
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
;;; lisp/lib/strings.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom-pcre-quote (str)
|
||||||
|
"Like `reqexp-quote', but for PCREs."
|
||||||
|
(let ((special '(?. ?^ ?$ ?* ?+ ?? ?{ ?\\ ?\[ ?\| ?\())
|
||||||
|
(quoted nil))
|
||||||
|
(mapc (lambda (c)
|
||||||
|
(when (memq c special)
|
||||||
|
(push ?\\ quoted))
|
||||||
|
(push c quoted))
|
||||||
|
str)
|
||||||
|
(concat (nreverse quoted))))
|
||||||
|
|
||||||
|
;;; end of strings.el
|
|
@ -31,7 +31,6 @@
|
||||||
(package! better-jumper :pin "47622213783ece37d5337dc28d33b530540fc319")
|
(package! better-jumper :pin "47622213783ece37d5337dc28d33b530540fc319")
|
||||||
(package! dtrt-indent :pin "939c5e374ac0175bb7d561542e22e47a72d04aa8")
|
(package! dtrt-indent :pin "939c5e374ac0175bb7d561542e22e47a72d04aa8")
|
||||||
(package! helpful :pin "4ba24cac9fb14d5fdc32582cd947572040e82b2c")
|
(package! helpful :pin "4ba24cac9fb14d5fdc32582cd947572040e82b2c")
|
||||||
(package! pcre2el :pin "380723b2701cceb75c266440fb8db918f3340d50")
|
|
||||||
(package! smartparens :pin "f7cf316715e5018186c226aab8242c9e5ce131c8")
|
(package! smartparens :pin "f7cf316715e5018186c226aab8242c9e5ce131c8")
|
||||||
(package! ws-butler :pin "e3a38d93e01014cd47bf5af4924459bd145fd7c4")
|
(package! ws-butler :pin "e3a38d93e01014cd47bf5af4924459bd145fd7c4")
|
||||||
|
|
||||||
|
|
|
@ -270,7 +270,7 @@ The point of this is to avoid Emacs locking up indexing massive file trees."
|
||||||
((string= substr "|")
|
((string= substr "|")
|
||||||
"\\\\\\\\|")
|
"\\\\\\\\|")
|
||||||
((concat "\\\\" substr))))
|
((concat "\\\\" substr))))
|
||||||
(rxt-quote-pcre (doom-thing-at-point-or-region)))))
|
(doom-pcre-quote (doom-thing-at-point-or-region)))))
|
||||||
directory args
|
directory args
|
||||||
(or prompt
|
(or prompt
|
||||||
(format "Search project [%s]: "
|
(format "Search project [%s]: "
|
||||||
|
|
|
@ -63,7 +63,7 @@ input and search the whole buffer for it."
|
||||||
(consult-line
|
(consult-line
|
||||||
(replace-regexp-in-string
|
(replace-regexp-in-string
|
||||||
" " "\\\\ "
|
" " "\\\\ "
|
||||||
(rxt-quote-pcre
|
(doom-pcre-quote
|
||||||
(buffer-substring-no-properties start end))))
|
(buffer-substring-no-properties start end))))
|
||||||
(call-interactively #'consult-line)))))))
|
(call-interactively #'consult-line)))))))
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ If prefix ARG is set, include ignored/hidden files."
|
||||||
"Search current project for symbol at point.
|
"Search current project for symbol at point.
|
||||||
If prefix ARG is set, prompt for a known project to search from."
|
If prefix ARG is set, prompt for a known project to search from."
|
||||||
(interactive
|
(interactive
|
||||||
(list (rxt-quote-pcre (or (doom-thing-at-point-or-region) ""))
|
(list (doom-pcre-quote (or (doom-thing-at-point-or-region) ""))
|
||||||
(let ((projectile-project-root nil))
|
(let ((projectile-project-root nil))
|
||||||
(if current-prefix-arg
|
(if current-prefix-arg
|
||||||
(if-let (projects (projectile-relevant-known-projects))
|
(if-let (projects (projectile-relevant-known-projects))
|
||||||
|
@ -118,7 +118,7 @@ If prefix ARG is set, prompt for a known project to search from."
|
||||||
"Conduct a text search in the current project for symbol at point. If prefix
|
"Conduct a text search in the current project for symbol at point. If prefix
|
||||||
ARG is set, prompt for a known project to search from."
|
ARG is set, prompt for a known project to search from."
|
||||||
(interactive
|
(interactive
|
||||||
(list (rxt-quote-pcre (or (doom-thing-at-point-or-region) ""))))
|
(list (doom-pcre-quote (or (doom-thing-at-point-or-region) ""))))
|
||||||
(require 'org)
|
(require 'org)
|
||||||
(+default/search-project-for-symbol-at-point
|
(+default/search-project-for-symbol-at-point
|
||||||
symbol org-directory))
|
symbol org-directory))
|
||||||
|
|
|
@ -111,7 +111,6 @@ https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode
|
||||||
- [[doom-package:org-pomodoro]] if [[doom-module:+pomodoro]]
|
- [[doom-package:org-pomodoro]] if [[doom-module:+pomodoro]]
|
||||||
- [[doom-package:org-roam]] (v1) if [[doom-module:+roam]]
|
- [[doom-package:org-roam]] (v1) if [[doom-module:+roam]]
|
||||||
- [[doom-package:org-roam]] (v2) if [[doom-module:+roam2]]
|
- [[doom-package:org-roam]] (v2) if [[doom-module:+roam2]]
|
||||||
- [[doom-package:org-yt]]
|
|
||||||
- [[doom-package:ox-clip]]
|
- [[doom-package:ox-clip]]
|
||||||
- [[doom-package:ox-hugo]] if [[doom-module:+hugo]]
|
- [[doom-package:ox-hugo]] if [[doom-module:+hugo]]
|
||||||
- [[doom-package:ox-pandoc]] if [[doom-module:+pandoc]]
|
- [[doom-package:ox-pandoc]] if [[doom-module:+pandoc]]
|
||||||
|
|
|
@ -656,15 +656,7 @@ relative to `org-directory', unless it is an absolute path."
|
||||||
(setq org-display-remote-inline-images 'download) ; TRAMP urls
|
(setq org-display-remote-inline-images 'download) ; TRAMP urls
|
||||||
(org-link-set-parameters "http" :image-data-fun #'+org-http-image-data-fn)
|
(org-link-set-parameters "http" :image-data-fun #'+org-http-image-data-fn)
|
||||||
(org-link-set-parameters "https" :image-data-fun #'+org-http-image-data-fn)
|
(org-link-set-parameters "https" :image-data-fun #'+org-http-image-data-fn)
|
||||||
(org-link-set-parameters "img" :image-data-fun #'+org-inline-image-data-fn)
|
(org-link-set-parameters "img" :image-data-fun #'+org-inline-image-data-fn))
|
||||||
|
|
||||||
;; Add support for youtube links + previews
|
|
||||||
(require 'org-yt nil t)
|
|
||||||
|
|
||||||
(defadvice! +org-dont-preview-if-disabled-a (&rest _)
|
|
||||||
"Make `org-yt' respect `org-display-remote-inline-images'."
|
|
||||||
:before-while #'org-yt-image-data-fun
|
|
||||||
(not (eq org-display-remote-inline-images 'skip))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun +org-init-export-h ()
|
(defun +org-init-export-h ()
|
||||||
|
|
|
@ -39,9 +39,6 @@
|
||||||
|
|
||||||
(package! avy)
|
(package! avy)
|
||||||
(package! htmlize :pin "ed5e5b05fd260e8f161a488d56f10e7f6e01fb75")
|
(package! htmlize :pin "ed5e5b05fd260e8f161a488d56f10e7f6e01fb75")
|
||||||
(package! org-yt
|
|
||||||
:recipe (:host github :repo "TobiasZawada/org-yt")
|
|
||||||
:pin "56166f48e04d83668f70ed84706b7a4d8b1e5438")
|
|
||||||
(package! ox-clip :pin "a549cc8e1747beb6b7e567ffac27e31ba45cb8e8")
|
(package! ox-clip :pin "a549cc8e1747beb6b7e567ffac27e31ba45cb8e8")
|
||||||
(package! toc-org :pin "6d3ae0fc47ce79b1ea06cabe21a3c596395409cd")
|
(package! toc-org :pin "6d3ae0fc47ce79b1ea06cabe21a3c596395409cd")
|
||||||
(package! org-cliplink :pin "13e0940b65d22bec34e2de4bc8cba1412a7abfbc")
|
(package! org-cliplink :pin "13e0940b65d22bec34e2de4bc8cba1412a7abfbc")
|
||||||
|
|
|
@ -238,7 +238,7 @@ This backend prefers \"just working\" over accuracy."
|
||||||
Uses and requires `+ivy-file-search', `+helm-file-search', or `+vertico-file-search'.
|
Uses and requires `+ivy-file-search', `+helm-file-search', or `+vertico-file-search'.
|
||||||
Will return nil if neither is available. These require ripgrep to be installed."
|
Will return nil if neither is available. These require ripgrep to be installed."
|
||||||
(when identifier
|
(when identifier
|
||||||
(let ((query (rxt-quote-pcre identifier)))
|
(let ((query (doom-pcre-quote identifier)))
|
||||||
(ignore-errors
|
(ignore-errors
|
||||||
(cond ((modulep! :completion ivy)
|
(cond ((modulep! :completion ivy)
|
||||||
(+ivy-file-search :query query)
|
(+ivy-file-search :query query)
|
||||||
|
|
|
@ -12,6 +12,6 @@ Use `treemacs' command for old functionality."
|
||||||
(require 'treemacs)
|
(require 'treemacs)
|
||||||
(pcase (treemacs-current-visibility)
|
(pcase (treemacs-current-visibility)
|
||||||
(`visible (delete-window (treemacs-get-local-window)))
|
(`visible (delete-window (treemacs-get-local-window)))
|
||||||
(_ (if (doom-project-p)
|
(_ (if (treemacs--find-current-user-project)
|
||||||
(treemacs-add-and-display-current-project)
|
(treemacs-add-and-display-current-project-exclusively)
|
||||||
(treemacs)))))
|
(treemacs)))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue