profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/qhuyduong/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Huy Duong qhuyduong Ho Chi Minh City, Vietnam Software Engineering

qhuyduong/arm_adb 71

ADB for ARM/AARCH64

qhuyduong/yabai-status-bar 16

Yabai status bar widget for uebersicht

qhuyduong/dotfiles 7

Collection of useful configuration files for Linux (zsh, nvim, i3, tmux, etc.)

qhuyduong/dbext.vim 1

Provides database access to many dbms (Oracle, Sybase, Microsoft, MySQL, DBI,..)

qhuyduong/airline-themes 0

vim-airline themes for emacs powerline

qhuyduong/autotools_helloworld 0

This demonstrates samples project created by autotools

qhuyduong/boringssl 0

Mirror of BoringSSL

qhuyduong/custom-alacritty-applescripts-for-alfred 0

Custom Alacritty Applescripts for Alfred

qhuyduong/desktop-settings 0

This repo has been archived. Our code is now hosted at

pull request commenthlissner/doom-emacs

getting_started.org: Gentoo Linux install guide

You might want to mention that the xft use flag must be enabled for app-editors/emacs in order for the fonts to render correctly.

See #4876

mjkalyan

comment created time in 11 hours

issue commenthlissner/doom-emacs

Broken icons on the dashboard

@savageCW

In order for the fonts to render correctly on Gentoo you need to enable the xft use-flag for app-editors/emacs.

This can be done like so...

# echo "app-editors/emacs xft" >> /etc/portage/package.use/emacs
savageCW

comment created time in 11 hours

PR opened hlissner/doom-emacs

Point FAQ to Github, not Discourse

<!--

YOUR PR WILL NOT BE ACCEPTED IF IT DOES NOT MEET THE FOLLOWING CRITERIA:

  • [x] It targets the develop branch
  • [ ] I've searched for similar pull requests and found nothing
  • [ ] This change is NOT in Doom's do-not-PR list: https://doomemacs.org/d/do-not-pr (GRR, this requires Discourse also???)
  • [ ] If I've bumped any packages, I've done so according to https://doomemacs.org/d/how2bump
  • [x] I've linked any relevant issues and PRs below
  • [x] All my commit messages are descriptive and distinct

-->

This changes the FAQ link to a link that works for all users.

Is there a reason this currently points to Discourse which (seems to) force one to have a login to even see the content?

I tried to check the "do-not-PR" list but it has the same issue - of evidently being locked behind needing a Discourse account?

+1 -1

0 comment

1 changed file

pr created time in 19 hours

pull request commenthlissner/doom-emacs

Add Selectrum module Round 2

@iyefrat - on the "bibtex-actions improvements?" todo issue about menus.

We actually have a WIP progress PR to add embark-act at-point functionality, which includes as well a keymap specific to that.

Ideally, I'd like to get these "simple menus" with descriptoins working in which-key and, by extension, Doom.

https://github.com/bdarcus/bibtex-actions/pull/57/commits/33a9617194b31dbfd036513a7cf05b6b8c2a534e

But I never had any success, and it seems it has to wait on an unmerged, and stagnant, which-key PR.

If necessary, I can just provide the Doom-specific mapping, so we get nice and consistent menus with embark-act both at-point and in-buffer.

Emiller88

comment created time in a day

PR opened hlissner/doom-emacs

Reviewers
Fixed #5176: centaur-tabs' gt/gT asking for more key input.

<!--

YOUR PR WILL NOT BE ACCEPTED IF IT DOES NOT MEET THE FOLLOWING CRITERIA:

  • [x] It targets the develop branch
  • [x] I've searched for similar pull requests and found nothing
  • [x] This change is NOT in Doom's do-not-PR list: https://doomemacs.org/d/do-not-pr
  • [x] If I've bumped any packages, I've done so according to https://doomemacs.org/d/how2bump
  • [x] I've linked any relevant issues and PRs below
  • [x] All my commit messages are descriptive and distinct

-->

Fixes #5176 <!-- remove if not applicable -->

{{{ Summarize what you've changed HERE and why }}} I changed the +tabs:next-or-goto and +tabs:previous-or-goto functions to use (interactive "P") so they accept the prefix as tab index. This reduce the extra key strike when you just want next ore previous, and works with a big tab index. Also the current implementation doesn't work with index.

+6 -6

0 comment

1 changed file

pr created time in a day

issue commenthlissner/doom-emacs

centaur-tabs' `gt`/`gT` asking for more key input.

Yep, tried it and it works as expected.

acristoffers

comment created time in a day

issue commenthlissner/doom-emacs

centaur-tabs' `gt`/`gT` asking for more key input.

@acristoffers Hi, I tried to edebug this and found out <C> will set the extra key's byte as the value of index. So I think this function should be like this

(evil-define-command +tabs:next-or-goto (index)
  "Switch to the next tab, or to INDEXth tab if a count is given."
  (interactive "P")
  (if index
      (centaur-tabs-select-visible-nth-tab index)
    (centaur-tabs-forward)))

which takes the prefix as the tab index. Or it needs to to parse the key to number as the real index.

acristoffers

comment created time in a day

issue commenthlissner/doom-emacs

centaur-tabs' `gt`/`gT` asking for more key input.

Simply replacing current-prefix-arg by index and restarting emacs resulted in the functionality not working anymore. gt took me to the last tab and then gT did nothing.

acristoffers

comment created time in a day

issue commenthlissner/doom-emacs

centaur-tabs' `gt`/`gT` asking for more key input.

I think the current-prefix-arg in:

(evil-define-command +tabs:next-or-goto (index)
  "Switch to the next tab, or to INDEXth tab if a count is given."
  (interactive "<C>")
  (if current-prefix-arg
      (centaur-tabs-select-visible-nth-tab current-prefix-arg)
    (centaur-tabs-forward)))

should be index, it's reading the prefix rather than the extra key?

acristoffers

comment created time in a day

Pull request review commenthlissner/doom-emacs

Add Selectrum module Round 2

+;;; completion/selectrum/config.el -*- lexical-binding: t; -*-++(use-package! selectrum+  :hook (doom-first-input . selectrum-mode)+  :init+  (setq selectrum-display-action nil+        selectrum-extend-current-candidate-highlight t+        selectrum-fix-vertical-window-height 17+        selectrum-max-window-height 17+        projectile-completion-system 'default)+  (when (featurep! +prescient)+    (setq completion-styles '(substring partial-completion)))+  :config+  (defadvice! +selectrum-refresh-on-cycle (&rest _)+    :after 'marginalia-cycle+    (when (bound-and-true-p selectrum-mode) (selectrum-exhibit)))+  (defun +selectrum/backward-updir ()+    "Delete char before or go up directory for file cagetory selectrum buffers."+    (interactive)+    (if (and (eq (char-before) ?/)+             (eq (selectrum--get-meta 'category) 'file))+        (let ((new-path (minibuffer-contents)))+          (delete-region (minibuffer-prompt-end) (point-max))+          (insert (abbreviate-file-name+                   (file-name-directory+                    (directory-file-name+                     (expand-file-name new-path))))))+      (call-interactively 'backward-delete-char)))+  (map! :map selectrum-minibuffer-map+        [backspace] #'+selectrum/backward-updir))++(use-package! selectrum-prescient+  :when (featurep! +prescient)+  :hook (selectrum-mode . selectrum-prescient-mode)+  :hook (selectrum-mode . prescient-persist-mode)+  :config+  (setq selectrum-preprocess-candidates-function #'selectrum-prescient--preprocess)+  (add-hook 'selectrum-candidate-selected-hook #'selectrum-prescient--remember)+  (add-hook 'selectrum-candidate-inserted-hook #'selectrum-prescient--remember))++(use-package! orderless+  :when (not (featurep! +prescient))+  :demand t+  :config+  (defun +selectrum-orderless-dispatch (pattern _index _total)+    (cond+     ;; Ensure that $ works with Consult commands, which add disambiguation suffixes+     ((string-suffix-p "$" pattern) `(orderless-regexp . ,(concat (substring pattern 0 -1) "[\x100000-\x10FFFD]*$")))+     ;; Ignore single !+     ((string= "!" pattern) `(orderless-literal . ""))+     ;; Without literal+     ((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1)))+     ;; Initialism matching+     ((string-prefix-p "`" pattern) `(orderless-initialism . ,(substring pattern 1)))+     ((string-suffix-p "`" pattern) `(orderless-initialism . ,(substring pattern 0 -1)))+     ;; Literal matching+     ((string-prefix-p "=" pattern) `(orderless-literal . ,(substring pattern 1)))+     ((string-suffix-p "=" pattern) `(orderless-literal . ,(substring pattern 0 -1)))+     ;; Flex matching+     ((string-prefix-p "~" pattern) `(orderless-flex . ,(substring pattern 1)))+     ((string-suffix-p "~" pattern) `(orderless-flex . ,(substring pattern 0 -1)))))+  (setq completion-styles '(orderless)

yeah but the weird thing is that it seems under C-h f for example, it seems to prioritize the shorter matches first, while in company it seems to just sort them in alphabetical order. Do selectrum and vertico add some extra sorting on the list of matched candidates or something?

Emiller88

comment created time in 2 days

Pull request review commenthlissner/doom-emacs

Add Selectrum module Round 2

+;;; completion/selectrum/config.el -*- lexical-binding: t; -*-++(use-package! selectrum+  :hook (doom-first-input . selectrum-mode)+  :init+  (setq selectrum-display-action nil+        selectrum-extend-current-candidate-highlight t+        selectrum-fix-vertical-window-height 17+        selectrum-max-window-height 17+        projectile-completion-system 'default)+  (when (featurep! +prescient)+    (setq completion-styles '(substring partial-completion)))+  :config+  (defadvice! +selectrum-refresh-on-cycle (&rest _)+    :after 'marginalia-cycle+    (when (bound-and-true-p selectrum-mode) (selectrum-exhibit)))+  (defun +selectrum/backward-updir ()+    "Delete char before or go up directory for file cagetory selectrum buffers."+    (interactive)+    (if (and (eq (char-before) ?/)+             (eq (selectrum--get-meta 'category) 'file))+        (let ((new-path (minibuffer-contents)))+          (delete-region (minibuffer-prompt-end) (point-max))+          (insert (abbreviate-file-name+                   (file-name-directory+                    (directory-file-name+                     (expand-file-name new-path))))))+      (call-interactively 'backward-delete-char)))+  (map! :map selectrum-minibuffer-map+        [backspace] #'+selectrum/backward-updir))++(use-package! selectrum-prescient+  :when (featurep! +prescient)+  :hook (selectrum-mode . selectrum-prescient-mode)+  :hook (selectrum-mode . prescient-persist-mode)+  :config+  (setq selectrum-preprocess-candidates-function #'selectrum-prescient--preprocess)+  (add-hook 'selectrum-candidate-selected-hook #'selectrum-prescient--remember)+  (add-hook 'selectrum-candidate-inserted-hook #'selectrum-prescient--remember))++(use-package! orderless+  :when (not (featurep! +prescient))+  :demand t+  :config+  (defun +selectrum-orderless-dispatch (pattern _index _total)+    (cond+     ;; Ensure that $ works with Consult commands, which add disambiguation suffixes+     ((string-suffix-p "$" pattern) `(orderless-regexp . ,(concat (substring pattern 0 -1) "[\x100000-\x10FFFD]*$")))+     ;; Ignore single !+     ((string= "!" pattern) `(orderless-literal . ""))+     ;; Without literal+     ((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1)))+     ;; Initialism matching+     ((string-prefix-p "`" pattern) `(orderless-initialism . ,(substring pattern 1)))+     ((string-suffix-p "`" pattern) `(orderless-initialism . ,(substring pattern 0 -1)))+     ;; Literal matching+     ((string-prefix-p "=" pattern) `(orderless-literal . ,(substring pattern 1)))+     ((string-suffix-p "=" pattern) `(orderless-literal . ,(substring pattern 0 -1)))+     ;; Flex matching+     ((string-prefix-p "~" pattern) `(orderless-flex . ,(substring pattern 1)))+     ((string-suffix-p "~" pattern) `(orderless-flex . ,(substring pattern 0 -1)))))+  (setq completion-styles '(orderless)+        completion-category-defaults nil+        ;; note that despite override in the name orderless can still be used in find-file etc.+        completion-category-overrides '((file (styles . (partial-completion))))+        orderless-style-dispatchers '(+selectrum-orderless-dispatch)+        orderless-component-separator "[ &]"+        selectrum-refine-candidates-function #'orderless-filter+        selectrum-highlight-candidates-function #'orderless-highlight-matches))++(use-package! consult+  :defer t+  :init+  (fset 'multi-occur #'consult-multi-occur)+  (define-key!+    [remap apropos]                       #'consult-apropos+    [remap bookmark-jump]                 #'consult-bookmark+    [remap evil-show-marks]               #'consult-mark+    [remap goto-line]                     #'consult-goto-line+    [remap imenu]                         #'consult-imenu+    [remap locate]                        #'consult-locate+    [remap load-theme]                    #'consult-theme+    [remap man]                           #'consult-man+    [remap recentf-open-files]            #'consult-recent-file+    [remap switch-to-buffer]              #'consult-buffer+    [remap switch-to-buffer-other-window] #'consult-buffer-other-window+    [remap switch-to-buffer-other-frame]  #'consult-buffer-other-frame+    [remap yank-pop]                      #'consult-yank-pop+    [remap persp-switch-to-buffer]        #'+selectrum/switch-workspace-buffer)+  (setq completion-in-region-function #'consult-completion-in-region)+  :config+  (recentf-mode)+  (setq consult-project-root-function #'doom-project-root+        completion-in-region-function #'consult-completion-in-region+        consult-narrow-key "<"+        consult-line-numbers-widen t+        consult-async-input-debounce 0.5+        consult-async-input-throttle 0.8)+  (consult-customize+   consult-ripgrep consult-git-grep consult-grep+   consult-bookmark consult-recent-file+   +default/search-project +default/search-project-for-symbol-at-point+   +default/search-other-project +selectrum/search-symbol-at-point+   +default/search-cwd +default/search-other-cwd+   +default/search-notes-for-symbol-at-point+   consult--source-file consult--source-project-file consult--source-bookmark+   :preview-key (list (kbd "C-SPC") (kbd "C-M-j") (kbd "C-M-k"))))++(use-package! consult-flycheck+  :when (featurep! :checkers syntax)+  :after (consult flycheck))++(use-package! embark+  :init+  (setq embark-action-indicator+        (lambda (map _target)+          (which-key--show-keymap "Embark" map nil nil 'no-paging)+          #'which-key--hide-popup-ignore-command)+        embark-become-indicator embark-action-indicator)+  (map! "C-;"               #'embark-act  ; to be moved to :config default if accepted

ah, right.

Emiller88

comment created time in 2 days

Pull request review commenthlissner/doom-emacs

Add Selectrum module Round 2

+;;; completion/selectrum/config.el -*- lexical-binding: t; -*-++(use-package! selectrum+  :hook (doom-first-input . selectrum-mode)+  :init+  (setq selectrum-display-action nil+        selectrum-extend-current-candidate-highlight t+        selectrum-fix-vertical-window-height 17+        selectrum-max-window-height 17+        projectile-completion-system 'default)+  (when (featurep! +prescient)+    (setq completion-styles '(substring partial-completion)))+  :config+  (defadvice! +selectrum-refresh-on-cycle (&rest _)+    :after 'marginalia-cycle+    (when (bound-and-true-p selectrum-mode) (selectrum-exhibit)))+  (defun +selectrum/backward-updir ()+    "Delete char before or go up directory for file cagetory selectrum buffers."+    (interactive)+    (if (and (eq (char-before) ?/)+             (eq (selectrum--get-meta 'category) 'file))+        (let ((new-path (minibuffer-contents)))+          (delete-region (minibuffer-prompt-end) (point-max))+          (insert (abbreviate-file-name+                   (file-name-directory+                    (directory-file-name+                     (expand-file-name new-path))))))+      (call-interactively 'backward-delete-char)))+  (map! :map selectrum-minibuffer-map+        [backspace] #'+selectrum/backward-updir))++(use-package! selectrum-prescient+  :when (featurep! +prescient)+  :hook (selectrum-mode . selectrum-prescient-mode)+  :hook (selectrum-mode . prescient-persist-mode)+  :config+  (setq selectrum-preprocess-candidates-function #'selectrum-prescient--preprocess)+  (add-hook 'selectrum-candidate-selected-hook #'selectrum-prescient--remember)+  (add-hook 'selectrum-candidate-inserted-hook #'selectrum-prescient--remember))++(use-package! orderless+  :when (not (featurep! +prescient))+  :demand t+  :config+  (defun +selectrum-orderless-dispatch (pattern _index _total)+    (cond+     ;; Ensure that $ works with Consult commands, which add disambiguation suffixes+     ((string-suffix-p "$" pattern) `(orderless-regexp . ,(concat (substring pattern 0 -1) "[\x100000-\x10FFFD]*$")))+     ;; Ignore single !+     ((string= "!" pattern) `(orderless-literal . ""))+     ;; Without literal+     ((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1)))+     ;; Initialism matching+     ((string-prefix-p "`" pattern) `(orderless-initialism . ,(substring pattern 1)))+     ((string-suffix-p "`" pattern) `(orderless-initialism . ,(substring pattern 0 -1)))+     ;; Literal matching+     ((string-prefix-p "=" pattern) `(orderless-literal . ,(substring pattern 1)))+     ((string-suffix-p "=" pattern) `(orderless-literal . ,(substring pattern 0 -1)))+     ;; Flex matching+     ((string-prefix-p "~" pattern) `(orderless-flex . ,(substring pattern 1)))+     ((string-suffix-p "~" pattern) `(orderless-flex . ,(substring pattern 0 -1)))))+  (setq completion-styles '(orderless)

In my opinion completion at point (Company, Corfu etc) should be treated differently than minibuffer completion. Therefore you may want to configure a separate completion style for company. Unfortunately this is not possible ootb and requires advices to Company/Corfu such that a special completion style is used.

Emiller88

comment created time in 2 days

Pull request review commenthlissner/doom-emacs

Add Selectrum module Round 2

+;;; completion/selectrum/config.el -*- lexical-binding: t; -*-++(use-package! selectrum+  :hook (doom-first-input . selectrum-mode)+  :init+  (setq selectrum-display-action nil+        selectrum-extend-current-candidate-highlight t+        selectrum-fix-vertical-window-height 17+        selectrum-max-window-height 17+        projectile-completion-system 'default)+  (when (featurep! +prescient)+    (setq completion-styles '(substring partial-completion)))+  :config+  (defadvice! +selectrum-refresh-on-cycle (&rest _)+    :after 'marginalia-cycle+    (when (bound-and-true-p selectrum-mode) (selectrum-exhibit)))+  (defun +selectrum/backward-updir ()+    "Delete char before or go up directory for file cagetory selectrum buffers."+    (interactive)+    (if (and (eq (char-before) ?/)+             (eq (selectrum--get-meta 'category) 'file))+        (let ((new-path (minibuffer-contents)))+          (delete-region (minibuffer-prompt-end) (point-max))+          (insert (abbreviate-file-name+                   (file-name-directory+                    (directory-file-name+                     (expand-file-name new-path))))))+      (call-interactively 'backward-delete-char)))+  (map! :map selectrum-minibuffer-map+        [backspace] #'+selectrum/backward-updir))++(use-package! selectrum-prescient+  :when (featurep! +prescient)+  :hook (selectrum-mode . selectrum-prescient-mode)+  :hook (selectrum-mode . prescient-persist-mode)+  :config+  (setq selectrum-preprocess-candidates-function #'selectrum-prescient--preprocess)+  (add-hook 'selectrum-candidate-selected-hook #'selectrum-prescient--remember)+  (add-hook 'selectrum-candidate-inserted-hook #'selectrum-prescient--remember))++(use-package! orderless+  :when (not (featurep! +prescient))+  :demand t+  :config+  (defun +selectrum-orderless-dispatch (pattern _index _total)+    (cond+     ;; Ensure that $ works with Consult commands, which add disambiguation suffixes+     ((string-suffix-p "$" pattern) `(orderless-regexp . ,(concat (substring pattern 0 -1) "[\x100000-\x10FFFD]*$")))+     ;; Ignore single !+     ((string= "!" pattern) `(orderless-literal . ""))+     ;; Without literal+     ((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1)))+     ;; Initialism matching+     ((string-prefix-p "`" pattern) `(orderless-initialism . ,(substring pattern 1)))+     ((string-suffix-p "`" pattern) `(orderless-initialism . ,(substring pattern 0 -1)))+     ;; Literal matching+     ((string-prefix-p "=" pattern) `(orderless-literal . ,(substring pattern 1)))+     ((string-suffix-p "=" pattern) `(orderless-literal . ,(substring pattern 0 -1)))+     ;; Flex matching+     ((string-prefix-p "~" pattern) `(orderless-flex . ,(substring pattern 1)))+     ((string-suffix-p "~" pattern) `(orderless-flex . ,(substring pattern 0 -1)))))+  (setq completion-styles '(orderless)+        completion-category-defaults nil+        ;; note that despite override in the name orderless can still be used in find-file etc.+        completion-category-overrides '((file (styles . (partial-completion))))+        orderless-style-dispatchers '(+selectrum-orderless-dispatch)+        orderless-component-separator "[ &]"+        selectrum-refine-candidates-function #'orderless-filter+        selectrum-highlight-candidates-function #'orderless-highlight-matches))++(use-package! consult+  :defer t+  :init+  (fset 'multi-occur #'consult-multi-occur)+  (define-key!+    [remap apropos]                       #'consult-apropos+    [remap bookmark-jump]                 #'consult-bookmark+    [remap evil-show-marks]               #'consult-mark+    [remap goto-line]                     #'consult-goto-line+    [remap imenu]                         #'consult-imenu+    [remap locate]                        #'consult-locate+    [remap load-theme]                    #'consult-theme+    [remap man]                           #'consult-man+    [remap recentf-open-files]            #'consult-recent-file+    [remap switch-to-buffer]              #'consult-buffer+    [remap switch-to-buffer-other-window] #'consult-buffer-other-window+    [remap switch-to-buffer-other-frame]  #'consult-buffer-other-frame+    [remap yank-pop]                      #'consult-yank-pop+    [remap persp-switch-to-buffer]        #'+selectrum/switch-workspace-buffer)+  (setq completion-in-region-function #'consult-completion-in-region)+  :config+  (recentf-mode)+  (setq consult-project-root-function #'doom-project-root+        completion-in-region-function #'consult-completion-in-region+        consult-narrow-key "<"+        consult-line-numbers-widen t+        consult-async-input-debounce 0.5+        consult-async-input-throttle 0.8)+  (consult-customize+   consult-ripgrep consult-git-grep consult-grep+   consult-bookmark consult-recent-file+   +default/search-project +default/search-project-for-symbol-at-point+   +default/search-other-project +selectrum/search-symbol-at-point+   +default/search-cwd +default/search-other-cwd+   +default/search-notes-for-symbol-at-point+   consult--source-file consult--source-project-file consult--source-bookmark+   :preview-key (list (kbd "C-SPC") (kbd "C-M-j") (kbd "C-M-k"))))

Very good. Consult generally also has a focus on responsiveness or at least it can be configured to be responsive. But these configurations must really be done on a per command basis, since it all depends. For example consult-buffer previews are always responsive in my configuration. But this is not generally the case - in some setups buffer switching is more expensive and profits from debouncing.

Emiller88

comment created time in 2 days

Pull request review commenthlissner/doom-emacs

Add Selectrum module Round 2

+;;; completion/selectrum/config.el -*- lexical-binding: t; -*-++(use-package! selectrum+  :hook (doom-first-input . selectrum-mode)+  :init+  (setq selectrum-display-action nil+        selectrum-extend-current-candidate-highlight t+        selectrum-fix-vertical-window-height 17+        selectrum-max-window-height 17+        projectile-completion-system 'default)+  (when (featurep! +prescient)+    (setq completion-styles '(substring partial-completion)))+  :config+  (defadvice! +selectrum-refresh-on-cycle (&rest _)+    :after 'marginalia-cycle+    (when (bound-and-true-p selectrum-mode) (selectrum-exhibit)))+  (defun +selectrum/backward-updir ()+    "Delete char before or go up directory for file cagetory selectrum buffers."+    (interactive)+    (if (and (eq (char-before) ?/)+             (eq (selectrum--get-meta 'category) 'file))+        (let ((new-path (minibuffer-contents)))+          (delete-region (minibuffer-prompt-end) (point-max))+          (insert (abbreviate-file-name+                   (file-name-directory+                    (directory-file-name+                     (expand-file-name new-path))))))+      (call-interactively 'backward-delete-char)))+  (map! :map selectrum-minibuffer-map+        [backspace] #'+selectrum/backward-updir))++(use-package! selectrum-prescient+  :when (featurep! +prescient)+  :hook (selectrum-mode . selectrum-prescient-mode)+  :hook (selectrum-mode . prescient-persist-mode)+  :config+  (setq selectrum-preprocess-candidates-function #'selectrum-prescient--preprocess)+  (add-hook 'selectrum-candidate-selected-hook #'selectrum-prescient--remember)+  (add-hook 'selectrum-candidate-inserted-hook #'selectrum-prescient--remember))++(use-package! orderless+  :when (not (featurep! +prescient))+  :demand t+  :config+  (defun +selectrum-orderless-dispatch (pattern _index _total)+    (cond+     ;; Ensure that $ works with Consult commands, which add disambiguation suffixes+     ((string-suffix-p "$" pattern) `(orderless-regexp . ,(concat (substring pattern 0 -1) "[\x100000-\x10FFFD]*$")))+     ;; Ignore single !+     ((string= "!" pattern) `(orderless-literal . ""))+     ;; Without literal+     ((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1)))+     ;; Initialism matching+     ((string-prefix-p "`" pattern) `(orderless-initialism . ,(substring pattern 1)))+     ((string-suffix-p "`" pattern) `(orderless-initialism . ,(substring pattern 0 -1)))+     ;; Literal matching+     ((string-prefix-p "=" pattern) `(orderless-literal . ,(substring pattern 1)))+     ((string-suffix-p "=" pattern) `(orderless-literal . ,(substring pattern 0 -1)))+     ;; Flex matching+     ((string-prefix-p "~" pattern) `(orderless-flex . ,(substring pattern 1)))+     ((string-suffix-p "~" pattern) `(orderless-flex . ,(substring pattern 0 -1)))))+  (setq completion-styles '(orderless)+        completion-category-defaults nil+        ;; note that despite override in the name orderless can still be used in find-file etc.+        completion-category-overrides '((file (styles . (partial-completion))))+        orderless-style-dispatchers '(+selectrum-orderless-dispatch)+        orderless-component-separator "[ &]"+        selectrum-refine-candidates-function #'orderless-filter+        selectrum-highlight-candidates-function #'orderless-highlight-matches))++(use-package! consult+  :defer t+  :init+  (fset 'multi-occur #'consult-multi-occur)+  (define-key!+    [remap apropos]                       #'consult-apropos+    [remap bookmark-jump]                 #'consult-bookmark+    [remap evil-show-marks]               #'consult-mark+    [remap goto-line]                     #'consult-goto-line+    [remap imenu]                         #'consult-imenu+    [remap locate]                        #'consult-locate+    [remap load-theme]                    #'consult-theme+    [remap man]                           #'consult-man+    [remap recentf-open-files]            #'consult-recent-file+    [remap switch-to-buffer]              #'consult-buffer+    [remap switch-to-buffer-other-window] #'consult-buffer-other-window+    [remap switch-to-buffer-other-frame]  #'consult-buffer-other-frame+    [remap yank-pop]                      #'consult-yank-pop+    [remap persp-switch-to-buffer]        #'+selectrum/switch-workspace-buffer)+  (setq completion-in-region-function #'consult-completion-in-region)+  :config+  (recentf-mode)+  (setq consult-project-root-function #'doom-project-root+        completion-in-region-function #'consult-completion-in-region+        consult-narrow-key "<"+        consult-line-numbers-widen t+        consult-async-input-debounce 0.5+        consult-async-input-throttle 0.8)+  (consult-customize+   consult-ripgrep consult-git-grep consult-grep+   consult-bookmark consult-recent-file+   +default/search-project +default/search-project-for-symbol-at-point+   +default/search-other-project +selectrum/search-symbol-at-point+   +default/search-cwd +default/search-other-cwd+   +default/search-notes-for-symbol-at-point+   consult--source-file consult--source-project-file consult--source-bookmark+   :preview-key (list (kbd "C-SPC") (kbd "C-M-j") (kbd "C-M-k"))))++(use-package! consult-flycheck+  :when (featurep! :checkers syntax)+  :after (consult flycheck))++(use-package! embark+  :init+  (setq embark-action-indicator+        (lambda (map _target)+          (which-key--show-keymap "Embark" map nil nil 'no-paging)+          #'which-key--hide-popup-ignore-command)+        embark-become-indicator embark-action-indicator)+  (map! "C-;"               #'embark-act  ; to be moved to :config default if accepted

It does the same as RET, however it is useful if you want to keep the minibuffer open.

Emiller88

comment created time in 2 days

issue openedhlissner/doom-emacs

Error loading hook "js"

What did you expect to happen?

I expect *.js files to open with no errors.

What actually happened?

When opening a *.js file, I get the following message:

Error (js-mode-hook): Error running hook "js" because: (error Autoloading file /usr/share/emacs/27.2/lisp/progmodes/js.elc failed to define function js)

Describe your attempts to resolve the issue

No response

Steps to reproduce

Just open any *.js file.

System Information

https://ynh.mmksoft.uk/privatebin/?b9ce1ed102dd6270#AEq4gktAJ8JhuwYvKpEr3mAuQQc4snkNDkY63LySRkTy

created time in 2 days

Pull request review commenthlissner/doom-emacs

Add Selectrum module Round 2

+;;; completion/selectrum/config.el -*- lexical-binding: t; -*-++(use-package! selectrum+  :hook (doom-first-input . selectrum-mode)+  :init+  (setq selectrum-display-action nil+        selectrum-extend-current-candidate-highlight t+        selectrum-fix-vertical-window-height 17+        selectrum-max-window-height 17+        projectile-completion-system 'default)+  (when (featurep! +prescient)+    (setq completion-styles '(substring partial-completion)))+  :config+  (defadvice! +selectrum-refresh-on-cycle (&rest _)+    :after 'marginalia-cycle+    (when (bound-and-true-p selectrum-mode) (selectrum-exhibit)))+  (defun +selectrum/backward-updir ()+    "Delete char before or go up directory for file cagetory selectrum buffers."+    (interactive)+    (if (and (eq (char-before) ?/)+             (eq (selectrum--get-meta 'category) 'file))+        (let ((new-path (minibuffer-contents)))+          (delete-region (minibuffer-prompt-end) (point-max))+          (insert (abbreviate-file-name+                   (file-name-directory+                    (directory-file-name+                     (expand-file-name new-path))))))+      (call-interactively 'backward-delete-char)))+  (map! :map selectrum-minibuffer-map+        [backspace] #'+selectrum/backward-updir))++(use-package! selectrum-prescient+  :when (featurep! +prescient)+  :hook (selectrum-mode . selectrum-prescient-mode)+  :hook (selectrum-mode . prescient-persist-mode)+  :config+  (setq selectrum-preprocess-candidates-function #'selectrum-prescient--preprocess)+  (add-hook 'selectrum-candidate-selected-hook #'selectrum-prescient--remember)+  (add-hook 'selectrum-candidate-inserted-hook #'selectrum-prescient--remember))++(use-package! orderless+  :when (not (featurep! +prescient))+  :demand t+  :config+  (defun +selectrum-orderless-dispatch (pattern _index _total)+    (cond+     ;; Ensure that $ works with Consult commands, which add disambiguation suffixes+     ((string-suffix-p "$" pattern) `(orderless-regexp . ,(concat (substring pattern 0 -1) "[\x100000-\x10FFFD]*$")))+     ;; Ignore single !+     ((string= "!" pattern) `(orderless-literal . ""))+     ;; Without literal+     ((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1)))+     ;; Initialism matching+     ((string-prefix-p "`" pattern) `(orderless-initialism . ,(substring pattern 1)))+     ((string-suffix-p "`" pattern) `(orderless-initialism . ,(substring pattern 0 -1)))+     ;; Literal matching+     ((string-prefix-p "=" pattern) `(orderless-literal . ,(substring pattern 1)))+     ((string-suffix-p "=" pattern) `(orderless-literal . ,(substring pattern 0 -1)))+     ;; Flex matching+     ((string-prefix-p "~" pattern) `(orderless-flex . ,(substring pattern 1)))+     ((string-suffix-p "~" pattern) `(orderless-flex . ,(substring pattern 0 -1)))))+  (setq completion-styles '(orderless)

@daanturo Hmm. I'm not sure if this is the best way to solve this, I need to look into it more to make sure there aren't any unintended consequences. There also seem to be some discussions in orderless issues that relate to this as well.

Emiller88

comment created time in 2 days

Pull request review commenthlissner/doom-emacs

Add Selectrum module Round 2

+;;; completion/selectrum/config.el -*- lexical-binding: t; -*-++(use-package! selectrum+  :hook (doom-first-input . selectrum-mode)+  :init+  (setq selectrum-display-action nil+        selectrum-extend-current-candidate-highlight t+        selectrum-fix-vertical-window-height 17+        selectrum-max-window-height 17+        projectile-completion-system 'default)+  (when (featurep! +prescient)+    (setq completion-styles '(substring partial-completion)))+  :config+  (defadvice! +selectrum-refresh-on-cycle (&rest _)+    :after 'marginalia-cycle+    (when (bound-and-true-p selectrum-mode) (selectrum-exhibit)))+  (defun +selectrum/backward-updir ()+    "Delete char before or go up directory for file cagetory selectrum buffers."+    (interactive)+    (if (and (eq (char-before) ?/)+             (eq (selectrum--get-meta 'category) 'file))+        (let ((new-path (minibuffer-contents)))+          (delete-region (minibuffer-prompt-end) (point-max))+          (insert (abbreviate-file-name+                   (file-name-directory+                    (directory-file-name+                     (expand-file-name new-path))))))+      (call-interactively 'backward-delete-char)))+  (map! :map selectrum-minibuffer-map+        [backspace] #'+selectrum/backward-updir))++(use-package! selectrum-prescient+  :when (featurep! +prescient)+  :hook (selectrum-mode . selectrum-prescient-mode)+  :hook (selectrum-mode . prescient-persist-mode)+  :config+  (setq selectrum-preprocess-candidates-function #'selectrum-prescient--preprocess)+  (add-hook 'selectrum-candidate-selected-hook #'selectrum-prescient--remember)+  (add-hook 'selectrum-candidate-inserted-hook #'selectrum-prescient--remember))++(use-package! orderless+  :when (not (featurep! +prescient))+  :demand t+  :config+  (defun +selectrum-orderless-dispatch (pattern _index _total)+    (cond+     ;; Ensure that $ works with Consult commands, which add disambiguation suffixes+     ((string-suffix-p "$" pattern) `(orderless-regexp . ,(concat (substring pattern 0 -1) "[\x100000-\x10FFFD]*$")))+     ;; Ignore single !+     ((string= "!" pattern) `(orderless-literal . ""))+     ;; Without literal+     ((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1)))+     ;; Initialism matching+     ((string-prefix-p "`" pattern) `(orderless-initialism . ,(substring pattern 1)))+     ((string-suffix-p "`" pattern) `(orderless-initialism . ,(substring pattern 0 -1)))+     ;; Literal matching+     ((string-prefix-p "=" pattern) `(orderless-literal . ,(substring pattern 1)))+     ((string-suffix-p "=" pattern) `(orderless-literal . ,(substring pattern 0 -1)))+     ;; Flex matching+     ((string-prefix-p "~" pattern) `(orderless-flex . ,(substring pattern 1)))+     ((string-suffix-p "~" pattern) `(orderless-flex . ,(substring pattern 0 -1)))))+  (setq completion-styles '(orderless)+        completion-category-defaults nil+        ;; note that despite override in the name orderless can still be used in find-file etc.+        completion-category-overrides '((file (styles . (partial-completion))))+        orderless-style-dispatchers '(+selectrum-orderless-dispatch)+        orderless-component-separator "[ &]"+        selectrum-refine-candidates-function #'orderless-filter+        selectrum-highlight-candidates-function #'orderless-highlight-matches))++(use-package! consult+  :defer t+  :init+  (fset 'multi-occur #'consult-multi-occur)+  (define-key!+    [remap apropos]                       #'consult-apropos+    [remap bookmark-jump]                 #'consult-bookmark+    [remap evil-show-marks]               #'consult-mark+    [remap goto-line]                     #'consult-goto-line+    [remap imenu]                         #'consult-imenu+    [remap locate]                        #'consult-locate+    [remap load-theme]                    #'consult-theme+    [remap man]                           #'consult-man+    [remap recentf-open-files]            #'consult-recent-file+    [remap switch-to-buffer]              #'consult-buffer+    [remap switch-to-buffer-other-window] #'consult-buffer-other-window+    [remap switch-to-buffer-other-frame]  #'consult-buffer-other-frame+    [remap yank-pop]                      #'consult-yank-pop+    [remap persp-switch-to-buffer]        #'+selectrum/switch-workspace-buffer)+  (setq completion-in-region-function #'consult-completion-in-region)+  :config+  (recentf-mode)+  (setq consult-project-root-function #'doom-project-root+        completion-in-region-function #'consult-completion-in-region+        consult-narrow-key "<"+        consult-line-numbers-widen t+        consult-async-input-debounce 0.5+        consult-async-input-throttle 0.8)+  (consult-customize+   consult-ripgrep consult-git-grep consult-grep+   consult-bookmark consult-recent-file+   +default/search-project +default/search-project-for-symbol-at-point+   +default/search-other-project +selectrum/search-symbol-at-point+   +default/search-cwd +default/search-other-cwd+   +default/search-notes-for-symbol-at-point+   consult--source-file consult--source-project-file consult--source-bookmark+   :preview-key (list (kbd "C-SPC") (kbd "C-M-j") (kbd "C-M-k"))))

@minad Oh this is a very good addition to consult! There was a good chance that automatic previews on consult-theme would end up being deactivated by default due to doom's focus on responsiveness, but this might keep them around. At the very least I'll keep this around in my private config :grin:

Emiller88

comment created time in 2 days

Pull request review commenthlissner/doom-emacs

Add Selectrum module Round 2

+;;; completion/selectrum/config.el -*- lexical-binding: t; -*-++(use-package! selectrum+  :hook (doom-first-input . selectrum-mode)+  :init+  (setq selectrum-display-action nil+        selectrum-extend-current-candidate-highlight t+        selectrum-fix-vertical-window-height 17+        selectrum-max-window-height 17+        projectile-completion-system 'default)+  (when (featurep! +prescient)+    (setq completion-styles '(substring partial-completion)))+  :config+  (defadvice! +selectrum-refresh-on-cycle (&rest _)+    :after 'marginalia-cycle+    (when (bound-and-true-p selectrum-mode) (selectrum-exhibit)))+  (defun +selectrum/backward-updir ()+    "Delete char before or go up directory for file cagetory selectrum buffers."+    (interactive)+    (if (and (eq (char-before) ?/)+             (eq (selectrum--get-meta 'category) 'file))+        (let ((new-path (minibuffer-contents)))+          (delete-region (minibuffer-prompt-end) (point-max))+          (insert (abbreviate-file-name+                   (file-name-directory+                    (directory-file-name+                     (expand-file-name new-path))))))+      (call-interactively 'backward-delete-char)))+  (map! :map selectrum-minibuffer-map+        [backspace] #'+selectrum/backward-updir))++(use-package! selectrum-prescient+  :when (featurep! +prescient)+  :hook (selectrum-mode . selectrum-prescient-mode)+  :hook (selectrum-mode . prescient-persist-mode)+  :config+  (setq selectrum-preprocess-candidates-function #'selectrum-prescient--preprocess)+  (add-hook 'selectrum-candidate-selected-hook #'selectrum-prescient--remember)+  (add-hook 'selectrum-candidate-inserted-hook #'selectrum-prescient--remember))++(use-package! orderless+  :when (not (featurep! +prescient))+  :demand t+  :config+  (defun +selectrum-orderless-dispatch (pattern _index _total)+    (cond+     ;; Ensure that $ works with Consult commands, which add disambiguation suffixes+     ((string-suffix-p "$" pattern) `(orderless-regexp . ,(concat (substring pattern 0 -1) "[\x100000-\x10FFFD]*$")))+     ;; Ignore single !+     ((string= "!" pattern) `(orderless-literal . ""))+     ;; Without literal+     ((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1)))+     ;; Initialism matching+     ((string-prefix-p "`" pattern) `(orderless-initialism . ,(substring pattern 1)))+     ((string-suffix-p "`" pattern) `(orderless-initialism . ,(substring pattern 0 -1)))+     ;; Literal matching+     ((string-prefix-p "=" pattern) `(orderless-literal . ,(substring pattern 1)))+     ((string-suffix-p "=" pattern) `(orderless-literal . ,(substring pattern 0 -1)))+     ;; Flex matching+     ((string-prefix-p "~" pattern) `(orderless-flex . ,(substring pattern 1)))+     ((string-suffix-p "~" pattern) `(orderless-flex . ,(substring pattern 0 -1)))))+  (setq completion-styles '(orderless)+        completion-category-defaults nil+        ;; note that despite override in the name orderless can still be used in find-file etc.+        completion-category-overrides '((file (styles . (partial-completion))))+        orderless-style-dispatchers '(+selectrum-orderless-dispatch)+        orderless-component-separator "[ &]"+        selectrum-refine-candidates-function #'orderless-filter+        selectrum-highlight-candidates-function #'orderless-highlight-matches))++(use-package! consult+  :defer t+  :init+  (fset 'multi-occur #'consult-multi-occur)+  (define-key!+    [remap apropos]                       #'consult-apropos+    [remap bookmark-jump]                 #'consult-bookmark+    [remap evil-show-marks]               #'consult-mark+    [remap goto-line]                     #'consult-goto-line+    [remap imenu]                         #'consult-imenu+    [remap locate]                        #'consult-locate+    [remap load-theme]                    #'consult-theme+    [remap man]                           #'consult-man+    [remap recentf-open-files]            #'consult-recent-file+    [remap switch-to-buffer]              #'consult-buffer+    [remap switch-to-buffer-other-window] #'consult-buffer-other-window+    [remap switch-to-buffer-other-frame]  #'consult-buffer-other-frame+    [remap yank-pop]                      #'consult-yank-pop+    [remap persp-switch-to-buffer]        #'+selectrum/switch-workspace-buffer)+  (setq completion-in-region-function #'consult-completion-in-region)+  :config+  (recentf-mode)+  (setq consult-project-root-function #'doom-project-root+        completion-in-region-function #'consult-completion-in-region+        consult-narrow-key "<"+        consult-line-numbers-widen t+        consult-async-input-debounce 0.5+        consult-async-input-throttle 0.8)+  (consult-customize+   consult-ripgrep consult-git-grep consult-grep+   consult-bookmark consult-recent-file+   +default/search-project +default/search-project-for-symbol-at-point+   +default/search-other-project +selectrum/search-symbol-at-point+   +default/search-cwd +default/search-other-cwd+   +default/search-notes-for-symbol-at-point+   consult--source-file consult--source-project-file consult--source-bookmark+   :preview-key (list (kbd "C-SPC") (kbd "C-M-j") (kbd "C-M-k"))))++(use-package! consult-flycheck+  :when (featurep! :checkers syntax)+  :after (consult flycheck))++(use-package! embark+  :init+  (setq embark-action-indicator+        (lambda (map _target)+          (which-key--show-keymap "Embark" map nil nil 'no-paging)+          #'which-key--hide-popup-ignore-command)+        embark-become-indicator embark-action-indicator)+  (map! "C-;"               #'embark-act  ; to be moved to :config default if accepted

@minad Yeah probably. It seems like embark-dwim is primarily meant to be used on buffers, yeah? Since when using embark on the minibuffer it does the same thing as RET as far as i can tell from the keymaps.

Emiller88

comment created time in 2 days

Pull request review commenthlissner/doom-emacs

Add Selectrum module Round 2

+;;; completion/selectrum/config.el -*- lexical-binding: t; -*-++(use-package! selectrum+  :hook (doom-first-input . selectrum-mode)+  :init+  (setq selectrum-display-action nil+        selectrum-extend-current-candidate-highlight t+        selectrum-fix-vertical-window-height 17+        selectrum-max-window-height 17+        projectile-completion-system 'default)+  (when (featurep! +prescient)+    (setq completion-styles '(substring partial-completion)))+  :config+  (defadvice! +selectrum-refresh-on-cycle (&rest _)+    :after 'marginalia-cycle+    (when (bound-and-true-p selectrum-mode) (selectrum-exhibit)))+  (defun +selectrum/backward-updir ()+    "Delete char before or go up directory for file cagetory selectrum buffers."+    (interactive)+    (if (and (eq (char-before) ?/)+             (eq (selectrum--get-meta 'category) 'file))+        (let ((new-path (minibuffer-contents)))+          (delete-region (minibuffer-prompt-end) (point-max))+          (insert (abbreviate-file-name+                   (file-name-directory+                    (directory-file-name+                     (expand-file-name new-path))))))+      (call-interactively 'backward-delete-char)))+  (map! :map selectrum-minibuffer-map+        [backspace] #'+selectrum/backward-updir))++(use-package! selectrum-prescient+  :when (featurep! +prescient)+  :hook (selectrum-mode . selectrum-prescient-mode)+  :hook (selectrum-mode . prescient-persist-mode)+  :config+  (setq selectrum-preprocess-candidates-function #'selectrum-prescient--preprocess)+  (add-hook 'selectrum-candidate-selected-hook #'selectrum-prescient--remember)+  (add-hook 'selectrum-candidate-inserted-hook #'selectrum-prescient--remember))++(use-package! orderless+  :when (not (featurep! +prescient))+  :demand t+  :config+  (defun +selectrum-orderless-dispatch (pattern _index _total)+    (cond+     ;; Ensure that $ works with Consult commands, which add disambiguation suffixes+     ((string-suffix-p "$" pattern) `(orderless-regexp . ,(concat (substring pattern 0 -1) "[\x100000-\x10FFFD]*$")))+     ;; Ignore single !+     ((string= "!" pattern) `(orderless-literal . ""))+     ;; Without literal+     ((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1)))+     ;; Initialism matching+     ((string-prefix-p "`" pattern) `(orderless-initialism . ,(substring pattern 1)))+     ((string-suffix-p "`" pattern) `(orderless-initialism . ,(substring pattern 0 -1)))+     ;; Literal matching+     ((string-prefix-p "=" pattern) `(orderless-literal . ,(substring pattern 1)))+     ((string-suffix-p "=" pattern) `(orderless-literal . ,(substring pattern 0 -1)))+     ;; Flex matching+     ((string-prefix-p "~" pattern) `(orderless-flex . ,(substring pattern 1)))+     ((string-suffix-p "~" pattern) `(orderless-flex . ,(substring pattern 0 -1)))))+  (setq completion-styles '(orderless)

Code completion with company was so weird when completion-styles is set to '(orderless) only.

In Emacs Lisp mode, when I type set, the first candidate to appear was (setf seq-elt) even though set, setq, setf, etc. were expected instead. image

Appending, rather than setting so a single style, seems to revert company to it's old behavior but M-x is still sorted.

(add-to-list 'completion-styles 'orderless t)
Emiller88

comment created time in 2 days

issue commenthlissner/doom-emacs

doom/increase-font-size and doom/decrease-font-size unexpectedly change weight and slant

Thanks for the issue report, I mentioned it in #5146 but have not got time to test further and try to resolve it.

Iosevka, Lekton and IBM Mono could also then be added to this list of affected fonts.

dfpetrin

comment created time in 2 days

issue openedhlissner/doom-emacs

`org-mode` freezes on some files

What did you expect to happen?

I expect to be able to type into an org-buffer without freezes.

What actually happened?

When starting org-mode, when I don't type during more than a few seconds the buffer sometimes freezes until I press C-g. I then need to type quickly and continuously otherwise I may hit another freeze.

This freeze is not systematic. I encounter much more often on some big files (around 46K or 67K). Sometimes, I get this bug many times in a raw, and sometimes I don't encounter it during much longer.

I tried to check in the message buffer, I can't see any error.

Describe your attempts to resolve the issue

No response

Steps to reproduce

  1. Open in doom emacs a big org-mode file
  2. Naviguate in the file, start to type, and do sometimes some ~5 seconds breaks. "Hopefully" your buffer will freeze.

System Information

https://pastebin.com/Hpa1KTED

created time in 2 days

created repositoryhuytd/with-draft-js

created time in 2 days

pull request commenthlissner/doom-emacs

Fix #5128: No format-on-save by lsp-formatters

This works for me!

RBckmnn

comment created time in 2 days

issue openedhlissner/doom-emacs

doom/increase-font-size and doom/decrease-font-size unexpectedly change weight and slant

What did you expect to happen?

When I do doom/increase-font-size (s-=) or doom/decrease-font-size (s--), the size should increase, but all other aspects of the font should remain unchanged.

What actually happened?

Along with the size change, other font properties change too. This only happens for some fonts. (All fonts are either shipped with macOS (Georgia) or were installed from homebrew.)

Fonts which work as expected: Fira Mono Georgia

Fonts which behave unexpectedly (become bold and italic in addition to changing size): Fira Code EB Garamond

Running doom/reset-font-size (s-+) reverts the other properties in addition to the size.

This does not happen when doing vanilla emacs font size changes (C-x C-=, C-x C--). The issue persists in vanilla Doom (Sandbox C-c C-d).

Describe your attempts to resolve the issue

Some digging I did in the source while troubleshooting... :

Before/after s-= for a font without the issue:

(setq doom-font (font-spec :family "Fira Mono" :size 12))
=> #<font-spec nil nil Fira\ Mono nil nil nil nil nil 12 nil nil nil nil>
M-x doom/increase-font-size
doom-font
=> #<font-spec nil nil Fira\ Mono nil iso10646-1 normal normal normal 16 nil 100 0 ((:name . "-*-Fira Mono-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1"))>

Before/after s-= for a font with the issue:

(setq doom-font (font-spec :family "Fira Code" :size 12))
=> #<font-spec nil nil Fira\ Code nil nil nil nil nil 12 nil nil nil nil>
M-x doom/increase-font-size
doom-font
=> #<font-spec nil nil Fira\ Code nil iso10646-1 bold italic normal 16 nil 100 0 ((:name . "-*-Fira Code-bold-italic-normal-*-12-*-*-*-m-0-iso10646-1"))>

The bold italic is arising from the x-resolve-font-name call in doom--normalize-font:

(defun doom--normalize-font (font)
  (let* ((font (cond ((stringp font) (aref (font-info font) 0))
                     ((fontp font)   (font-xlfd-name font))
                     ((vectorp font) (x-compose-font-name font))))
         (font (x-resolve-font-name font))
         (font (font-spec :name font)))
    (unless (font-get font :size)
      (font-put font :size
                (font-get (font-spec :name (face-font 'default))
                          :size)))
    font))

x-resolve-font-name calls x-list-fonts and returns the first font name which matches the pattern. Since a font specified by a font-spec call like (font-spec :family "Fira Code" :size 12) returns a font with the parameters aside from family and size left as wildcards, the return list is all fonts in the family, and the first one in the list in these cases turns out to be the bold italic one.

So, a workaround that is working for me is to be more specific when setting doom-font: (setq doom-font (font-spec :family "Fira Code" :slant 'normal :weight 'normal :size 12))

However, I know this used to work fine without specifying the slant and weight explicitly, so I tried to dig a bit further to see what the cause was.

:name is not a property of font-spec so I tried changing it to :family assuming that may have been the bug, but that threw another error. I don't know for sure what the expected output from doom--normalize-font is so decided to stop here to report the bug.

Steps to reproduce

  1. Since this seems to vary with font, it's easiest to use one of the fonts I used: brew install font-fira-code
  2. Open Doom emacs
  3. Launch vanilla Doom sandbox
  4. Eval:
(setq doom-font (font-spec :family "Fira Code" :size 12))
  1. M-x doom/increase-font-size

System Information

https://pastebin.com/801r18Gg

created time in 3 days

issue commenthlissner/doom-emacs

Multi core native compilation?

I'd like doom to incorporate multi core native compilation. After a doom sync -u, there's 1200 files to compile, and only one of 6 physical cores are in use!

This is the relevant code https://github.com/emacs-mirror/emacs/blob/master/lisp/emacs-lisp/comp.el#L3860-L3879

Try C-h v comp-num-cpus. If that is nil, try evaluating the sexp that ends on this line https://github.com/emacs-mirror/emacs/blob/master/lisp/emacs-lisp/comp.el#L3878

this should give you the number of cores that native-comp uses

tsoernes

comment created time in 3 days

pull request commenthlissner/doom-emacs

Fixed broken link to Noel Welsh tutorial

Duplicate of #4709

Remember to check https://discourse.doomemacs.org/do-not-pr in the future (the PR template asks you to)

mark-rand

comment created time in 3 days

PR opened hlissner/doom-emacs

Fixed broken link to Noel Welsh tutorial

<!--

YOUR PR WILL NOT BE ACCEPTED IF IT DOES NOT MEET THE FOLLOWING CRITERIA:

  • [/] It targets the develop branch
  • [/] I've searched for similar pull requests and found nothing
  • [/] This change is NOT in Doom's do-not-PR list: https://doomemacs.org/d/do-not-pr
  • [/] If I've bumped any packages, I've done so according to https://doomemacs.org/d/how2bump
  • [/] I've linked any relevant issues and PRs below
  • [/] All my commit messages are descriptive and distinct

-->

{{{ Summarize what you've changed HERE and why }}} Just fixed a link

+1 -1

0 comment

1 changed file

pr created time in 3 days

release rubocop/rubocop

v1.17.0

released time in 3 days

issue openedhlissner/doom-emacs

Briefly summarize your issue here

What did you expect to happen?

M-ret in an org mode headline will not insert a heading above the current one.

What actually happened?

Hitting M-ret always inserts a headline below the current one.

Describe your attempts to resolve the issue

No response

Steps to reproduce

  1. Open emacs
  2. Open an org file
  3. Place cursor at beginning of line on a headline
  4. Git M-ret

New headline always created under the current one.

System Information

https://pastebin.com/yYMGxX0D

created time in 3 days

pull request commenthlissner/doom-emacs

Mu4e Module Revamp

Wow; a pretty shocking response from him.

I wouldn't call it shocking. I don't agree with his decision but he's of course fully in his right to say what goes in and what doesn't. IMHO, the best way forward is to either try to convince him to allow it in or simply accept the visual inconsistency. It's hardly a deal-breaker not to have unified bullet points.....

tecosaur

comment created time in 4 days