unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [ELPA] Proposal to add consult-dir to ELPA
@ 2024-11-14  5:05 Karthik Chikmagalur
  2024-11-15  4:30 ` Philip Kaludercic
  0 siblings, 1 reply; 5+ messages in thread
From: Karthik Chikmagalur @ 2024-11-14  5:05 UTC (permalink / raw)
  To: emacs-devel

Hi,

I'd like to add my package consult-dir to ELPA.  The package is
developed at

https://github.com/karthink/consult-dir

Here is what it does:

Consult-dir allows you to easily insert directory paths into the
minibuffer prompt in Emacs.

When using the minibuffer, you can switch to any directory you've
visited recently, or to any project root, a bookmarked directory, or a
remote host via tramp.

This is useful

- For specifying a "destination" to any command that reads a file or
  directory name from the minibuffer.  You can use it when finding files
  or directories, copying files, attaching files to emails, and so on.
  It works without assumptions on the command being invoked, so you can
  use it even if you just want to copy some directory path into the
  kill-ring.

- When you want to quickly access a resource that is "far away" in the
  filesystem tree from `default-directory'.

I have found it to be a surprisingly versatile tool, and many users have
told me over the years that it solves a problem they didn't realize they
had.

I have signed the copyright papers, and there are no contributions to
the project from users over 3-4 lines in length.  Consult-dir's only
external dependency (Consult) is in ELPA.

Thank you,
Karthik



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ELPA] Proposal to add consult-dir to ELPA
  2024-11-14  5:05 [ELPA] Proposal to add consult-dir to ELPA Karthik Chikmagalur
@ 2024-11-15  4:30 ` Philip Kaludercic
  2024-11-15 19:06   ` Karthik Chikmagalur
  2024-11-17  4:37   ` Richard Stallman
  0 siblings, 2 replies; 5+ messages in thread
From: Philip Kaludercic @ 2024-11-15  4:30 UTC (permalink / raw)
  To: Karthik Chikmagalur; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]

Karthik Chikmagalur <karthikchikmagalur@gmail.com> writes:

> Hi,
>
> I'd like to add my package consult-dir to ELPA.  The package is
> developed at
>
> https://github.com/karthink/consult-dir

Here are a few comments and suggestions from reading through the code:


[-- Attachment #2: Type: text/plain, Size: 17693 bytes --]

diff --git a/consult-dir.el b/consult-dir.el
index 41fab53..cf25785 100644
--- a/consult-dir.el
+++ b/consult-dir.el
@@ -2,11 +2,11 @@
 
 ;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
 
-;; Author: Karthik Chikmagalur
+;; Author: Karthik Chikmagalur <karthik.chikmagalur@gmail.com>
 ;; Maintainer: Karthik Chikmagalur <karthik.chikmagalur@gmail.com>
 ;; Created: 2021
-;; Version: 0.1
-;; Package-Requires: ((emacs "27.1") (consult "1.0"))
+;; Version: 0.1 ;please bump this!
+;; Package-Requires: ((emacs "26.1") (project "0.3.0") (consult "1.0"))
 ;; Keywords: convenience
 ;; Homepage: https://github.com/karthink/consult-dir
 ;;
@@ -28,24 +28,25 @@
 ;;; Commentary:
 ;;
 ;; Consult-dir implements commands to easily switch between "active"
-;; directories. The directory candidates are collected from user bookmarks,
+;; directories.  The directory candidates are collected from user bookmarks,
 ;; projectile project roots (if available), project.el project roots and recentf
-;; file locations. The `default-directory' variable not changed in the process.
+;; file locations.  The `default-directory' variable not changed in the process.
 ;;
-;; Call `consult-dir' from the minibuffer to choose a directory with completion
-;; and insert it into the minibuffer prompt, shadowing or deleting any existing
-;; directory. The file name input is retained. This lets the user switch to
-;; distant directories very quickly when finding files, for instance.
+;; Call `consult-dir' from the minibuffer to choose a directory with
+;; completion and insert it into the minibuffer prompt, shadowing or
+;; deleting any existing directory.  The file name input is retained.
+;; This lets the user switch to distant directories very quickly when
+;; finding files, for instance.
 ;;
 ;; Call `consult-dir' from a regular buffer to choose a directory with
-;; completion and then interactively find a file in that directory. The command
+;; completion and then interactively find a file in that directory.  The command
 ;; run with this directory is configurable via `consult-dir-default-command' and
 ;; defaults to `find-file'.
 ;;
 ;; Call `consult-dir-jump-file' from the minibuffer to asynchronously find a
-;; file anywhere under the directory that is currently in the prompt. This can
+;; file anywhere under the directory that is currently in the prompt.  This can
 ;; be used with `consult-dir' to quickly switch directories and find files at an
-;; arbitrary depth under them. `consult-dir-jump-file' uses `consult-find' under
+;; arbitrary depth under them.  `consult-dir-jump-file' uses `consult-find' under
 ;; the hood.
 ;;
 ;; To use this package, bind `consult-dir' and `consult-dir-jump-file' under the
@@ -59,7 +60,7 @@
 ;; - To make recent directories available, turn on `recentf-mode'.
 ;;
 ;; - To make projectile projects available, turn on projectile-mode and
-;; configure `consult-dir-project-list-function'. Note that Projectile is NOT
+;; configure `consult-dir-project-list-function'.  Note that Projectile is NOT
 ;; required to install this package.
 ;;
 ;; - To make project.el projects available, configure
@@ -75,7 +76,7 @@
 (require 'cl-lib)
 (require 'bookmark)
 (require 'recentf)
-(require 'seq)
+(require 'seq)				;as you only use `seq-filter', could you stick to `cl-filter' to avoid a `require'?
 (require 'consult)
 
 (declare-function projectile-load-known-projects "projectile")
@@ -89,41 +90,37 @@
 (defvar tramp-default-method)
 
 (defgroup consult-dir nil
-  "Consulting `completing-read'."
+  "Consulting `completing-read'."	;This feels like it doesn't describe the package sufficiently
   :group 'convenience
   :group 'minibuffer
-  :group 'consult
+  :group 'consult			;I would stick to one group.
   :prefix "consult-dir-")
 
 (defcustom consult-dir-shadow-filenames t
   "Shadow file names instead of replacing them when using `consult-dir'."
-  :group 'consult-dir
   :type 'boolean)
 
 (defcustom consult-dir-default-command #'find-file
   "Command to run after selecting a directory using `consult-dir'.
 
 The default is to invoke `find-file' from the chosen
-directory. Setting it to `consult-dir-dired' will instead open
+directory.  Setting it to `consult-dir-dired' will instead open
 the chosen directory in dired.
 
 Any arbitrary function (of no variables) can be specified
-instead. It is run with `default-directory' set to the directory
+instead.  It is run with `default-directory' set to the directory
 chosen using `consult-dir'."
-  :group 'consult-dir
   :type '(choice (function-item :tag "Find file" find-file)
                  (function-item :tag "Open directory" consult-dir-dired)
                  (function :tag "Custom function")))
 
 (defcustom consult-dir-tramp-default-remote-path "~"
   "Default path to use for remote directories when using `consult-dir'."
-  :group 'consult-dir
-  :type 'string)
+  :type 'directory)
 
 (defcustom consult-dir-tramp-local-hosts '("/sudo:root@localhost:/")
   "A list of local hosts to include."
-  :group 'consult-dir
-  :type '(repeat string))
+  :type '(repeat repeat))
 
 (defcustom consult-dir-project-list-function #'consult-dir-project-dirs
   "Function that returns the list of project directories.
@@ -134,30 +131,30 @@ The options are
 
 1. project.el project directories (the default)
 2. projectile project directories
-3. Any user-defined function. This function should take no
+3. Any user-defined function.  This function should take no
 arguments and return a list of directories."
-  :type '(radio
+  :type '(radio				;any reason for `radio' instead of `choice' as above (or vice versa)
           (function-item :tag "Project.el projects" consult-dir-project-dirs)
           (function-item :tag "Projectile projects" consult-dir-projectile-dirs)
           (function :tag "User-defined function")))
 
 (defcustom consult-dir-sources
-  '(consult-dir--source-bookmark
-    consult-dir--source-default
-    consult-dir--source-project         ;projectile if available, project.el otherwise
-    consult-dir--source-recentf
-    consult-dir--source-tramp-local)
+  (list #'consult-dir--source-bookmark
+        #'consult-dir--source-default
+        #'consult-dir--source-project         ;projectile if available, project.el otherwise
+        #'consult-dir--source-recentf
+        #'consult-dir--source-tramp-local)
   "Directory sources for `consult-dir'.
 
 There are several built-in sources available, including
 bookmarked directories, recently visited file locations, project
 directories and more, see customization options.
 
-You can add your own directory sources to the list. The entry
+You can add your own directory sources to the list.  The entry
 must be a variable in the plist format specified by Consult, see
 the documentation of `consult--multi' for details."
   :type
-  '(repeat (choice
+  '(repeat (choice			;I believe you could also use `set'?
             (const :tag "Bookmarked directories"
                    consult-dir--source-bookmark)
             (const :tag "Current directory and project root"
@@ -172,7 +169,7 @@ the documentation of `consult--multi' for details."
                    consult-dir--source-tramp-ssh)
             (symbol :tag "Custom directory source"))))
 
-(defcustom consult-dir-jump-file-command 'consult-find
+(defcustom consult-dir-jump-file-command #'consult-find
   "Consult command used by `consult-dir-jump-file'.
 
 Available options are `consult-find' and `consult-fd' (both
@@ -188,14 +185,14 @@ possess the same signature as `consult-find'."
   :type 'boolean)
 
 (defun consult-dir-dired ()
-    (interactive)
-    (dired default-directory))
+  (interactive)
+  (dired default-directory))
 
 (defun consult-dir--tramp-parse-config (config)
   "Given a CONFIG, parse the hosts from it and return the results as a list."
   (let ((hosts))
     (when (and (file-exists-p config)
-               (require 'tramp nil t))
+               (require 'tramp nil t))	;why are you assuming that TRAMP is not available post Emacs 27?
       (dolist (cand (tramp-parse-sconfig config))
         (let ((user (if (car cand) (concat (car cand) "@")))
               (host (cadr cand)))
@@ -213,25 +210,25 @@ possess the same signature as `consult-find'."
 (defun consult-dir--default-dirs ()
   "Return the default directory and project root if available."
   (let ((fulldir (expand-file-name default-directory))
-                       (dir (abbreviate-file-name default-directory))
-                       (root (consult--project-root)))
-                   (cond ((and root (equal fulldir root)) (list dir))
-                         (root (list dir (abbreviate-file-name root)))
-                         (t (list dir)))))
+        (dir (abbreviate-file-name default-directory))
+        (root (consult--project-root)))
+    (cond ((and root (equal fulldir root)) (list dir))
+          (root (list dir (abbreviate-file-name root)))
+          (t (list dir)))))
 
 (defun consult-dir--bookmark-dirs ()
   "Return bookmarks that are directories."
   (bookmark-maybe-load-default-file)
   (let ((file-narrow ?f))
-    (thread-last bookmark-alist
-      (cl-remove-if     (lambda (cand) (bookmark-get-handler cand)))
-      (cl-remove-if-not (lambda (cand)
-                          (let ((bm (bookmark-get-bookmark-record cand)))
-                            (when-let ((file (alist-get 'filename bm)))
-                              (if (file-remote-p file)
-                                  (string-suffix-p "/" file)
-                                (file-directory-p file))))))
-      (mapcar (lambda (cand) (propertize (car cand) 'consult--type file-narrow))))))
+    ;; This should do the same, but I didn't test it:
+    (cl-loop for cand in bookmark-alist
+             unless (bookmark-get-handler cand)
+             when (let ((bm (bookmark-get-bookmark-record cand)))
+                    (when-let ((file (alist-get 'filename bm)))
+                      (if (file-remote-p file)
+                          (string-suffix-p "/" file)
+                        (file-directory-p file))))
+             collect (propertize (car cand) 'consult--type file-narrow))))
 
 (defun consult-dir-project-dirs ()
   "Return a list of project directories managed by project.el."
@@ -258,11 +255,11 @@ Used to avoid duplicating source entries in
 (defun consult-dir--project-list-make (&optional refresh)
   "Make hash table to store the list of projects.
 
-The table is stored in `consult-dir--project-list-hash'. When
+The table is stored in `consult-dir--project-list-hash.  When
 REFRESH is non-nil force the hash to be rebuilt."
   (when consult-dir-project-list-function
     (let* ((proj-list (funcall consult-dir-project-list-function))
-           (proj-sx (sxhash proj-list)))
+           (proj-sx (sxhash-equal proj-list)))
       (unless (or refresh
                   (equal proj-sx (car consult-dir--project-list-hash)))
         (setq consult-dir--project-list-hash
@@ -281,74 +278,74 @@ Entries that are also in the list of projects are removed."
   (let* ((current-dirs (consult-dir--default-dirs))
          (proj-list-hash (consult-dir--project-list-make))
          (in-other-source-p (lambda (dir) (not (or (and proj-list-hash (gethash dir proj-list-hash))
-                                              (member dir current-dirs)))))
+                                                   (member dir current-dirs)))))
          (file-directory-safe (lambda (f) (or (and (if (file-remote-p f)
                                                        (string-suffix-p "/" f)
                                                      (file-directory-p f))
                                                    (file-name-as-directory f))
                                               (file-name-directory f)))))
     (thread-last recentf-list
-      (mapcar file-directory-safe)
-      (delete-dups)
-      (mapcar #'abbreviate-file-name)
-      (seq-filter in-other-source-p))))
+                 (mapcar file-directory-safe)
+                 (delete-dups)
+                 (mapcar #'abbreviate-file-name)
+                 (seq-filter in-other-source-p))))
 
 (defvar consult-dir--source-recentf
-  `(:name "Recentf dirs"
-    :narrow ?r
-    :category file
-    :face consult-file
-    :history file-name-history
-    :enabled ,(lambda () recentf-mode)
-    :items ,#'consult-dir--recentf-dirs)
+  `( :name "Recentf dirs"
+     :narrow ?r
+     :category file
+     :face consult-file
+     :history file-name-history
+     :enabled ,(lambda () recentf-mode)
+     :items ,#'consult-dir--recentf-dirs)
   "Recentf directory source for `consult-dir--pick'.")
 
 (defvar consult-dir--source-bookmark
-  `(:name "Bookmarks"
-    :narrow ?m
-    :category bookmark
-    :face consult-file
-    :history bookmark-history
-    :items ,#'consult-dir--bookmark-dirs)
+  `( :name "Bookmarks"
+     :narrow ?m
+     :category bookmark
+     :face consult-file
+     :history bookmark-history
+     :items ,#'consult-dir--bookmark-dirs)
   "Bookmark directory source for `consult-dir--pick'.")
 
 (defvar consult-dir--source-default
-  `(:name "This directory/project"
-    :narrow ?.
-    :category file
-    :face consult-file
-    :history file-name-history
-    :items ,#'consult-dir--default-dirs)
+  `( :name "This directory/project"
+     :narrow ?.
+     :category file
+     :face consult-file
+     :history file-name-history
+     :items ,#'consult-dir--default-dirs)
   "Current project directory for `consult-dir--pick'.")
 
 (defvar consult-dir--source-project
-  `(:name "Projects"
-    :narrow ?p
-    :category file
-    :face consult-file
-    :history file-name-history
-    :enabled ,(lambda () consult-dir-project-list-function)
-    :items ,(lambda () (let ((current-dirs (consult-dir--default-dirs)))
-                    (seq-filter (lambda (proj) (not (member proj current-dirs)))
-                                (consult-dir--project-dirs)))))
+  `( :name "Projects"
+     :narrow ?p
+     :category file
+     :face consult-file
+     :history file-name-history
+     :enabled ,(lambda () consult-dir-project-list-function)
+     :items ,(lambda () (let ((current-dirs (consult-dir--default-dirs)))
+                          (seq-filter (lambda (proj) (not (member proj current-dirs)))
+                                      (consult-dir--project-dirs)))))
   "Project directory source for `consult-dir--pick'.")
 
 (defvar consult-dir--source-tramp-local
-  `(:name     "Local"
-    :narrow   ?l
-    :category file
-    :face     consult-file
-    :history  file-name-history
-    :items    ,consult-dir-tramp-local-hosts)
+  `( :name     "Local"
+     :narrow   ?l
+     :category file
+     :face     consult-file
+     :history  file-name-history
+     :items    ,consult-dir-tramp-local-hosts)
   "Local host candidate source for `consult-dir'.")
 
 (defvar consult-dir--source-tramp-ssh
-  `(:name     "SSH Config"
-    :narrow   ?s
-    :category file
-    :face     consult-file
-    :history  file-name-history
-    :items    ,#'consult-dir--tramp-ssh-hosts)
+  `( :name     "SSH Config"
+     :narrow   ?s
+     :category file
+     :face     consult-file
+     :history  file-name-history
+     :items    ,#'consult-dir--tramp-ssh-hosts)
   "SSH Config candiadate source for `consult-dir'.")
 
 (defun consult-dir--pick (&optional prompt)
@@ -371,30 +368,30 @@ Optional argument PROMPT is the prompt."
          (search (file-name-nondirectory mc)))
     (run-at-time 0 nil
                  (lambda () (funcall consult-dir-jump-file-command
-                        dir
-                        (concat search
-                                (unless (string-empty-p search)
-                                  (plist-get (consult--async-split-style)
-                                             :initial))))))
+                                     dir
+                                     (concat search
+                                             (unless (string-empty-p search)
+                                               (plist-get (consult--async-split-style)
+                                                          :initial))))))
     (abort-recursive-edit)))
 
 ;;;###autoload
 (defun consult-dir ()
-    "Choose a directory and act on it.
+  "Choose a directory and act on it.
 
 The action taken on the directory is the value of
-`consult-dir-default-command'. The default is to call
+`consult-dir-default-command.  The default is to call
 `find-file' starting at this directory.
 
 When called from the minibuffer, insert the directory into the
-minibuffer prompt instead. Existing minibuffer contents will be
+minibuffer prompt instead.  Existing minibuffer contents will be
 shadowed or deleted depending on the value of
 `consult-dir-shadow-filenames'.
 
 The list of sources for directory paths is
 `consult-dir-sources', which can be customized."
-    (interactive)
-    (if (minibufferp)
+  (interactive)
+  (if (minibufferp)
       (let* ((enable-recursive-minibuffers t)
              (file-name (file-name-nondirectory (minibuffer-contents)))
              (new-dir (consult-dir--pick))
@@ -405,9 +402,8 @@ The list of sources for directory paths is
               (insert "/" new-full-name)
             (delete-minibuffer-contents)
             (insert new-full-name))))
-      (let* ((new-dir (consult-dir--pick "In directory: "))
-             (default-directory new-dir))
-        (call-interactively consult-dir-default-command))))
+    (let ((default-directory (consult-dir--pick "In directory: ")))
+      (call-interactively consult-dir-default-command))))
 
 (provide 'consult-dir)
 ;;; consult-dir.el ends here

[-- Attachment #3: Type: text/plain, Size: 1504 bytes --]


> Here is what it does:
>
> Consult-dir allows you to easily insert directory paths into the
> minibuffer prompt in Emacs.
>
> When using the minibuffer, you can switch to any directory you've
> visited recently, or to any project root, a bookmarked directory, or a
> remote host via tramp.
>
> This is useful
>
> - For specifying a "destination" to any command that reads a file or
>   directory name from the minibuffer.  You can use it when finding files
>   or directories, copying files, attaching files to emails, and so on.
>   It works without assumptions on the command being invoked, so you can
>   use it even if you just want to copy some directory path into the
>   kill-ring.
>
> - When you want to quickly access a resource that is "far away" in the
>   filesystem tree from `default-directory'.
>
> I have found it to be a surprisingly versatile tool, and many users have
> told me over the years that it solves a problem they didn't realize they
> had.

What is not clear to me is why this is not a part of Consult, if it is
as useful as you say.  Have you discussed this with Daniel?  In any
case, it would be useful to explain that somewhere.

> I have signed the copyright papers, and there are no contributions to
> the project from users over 3-4 lines in length.  Consult-dir's only
> external dependency (Consult) is in ELPA.

1+ (though I have suggested to depend on project so as to lower the
dependency on Emacs).

> Thank you,
> Karthik
>
>

-- 
	Philip Kaludercic on siskin

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [ELPA] Proposal to add consult-dir to ELPA
  2024-11-15  4:30 ` Philip Kaludercic
@ 2024-11-15 19:06   ` Karthik Chikmagalur
  2024-11-16  1:01     ` Philip Kaludercic
  2024-11-17  4:37   ` Richard Stallman
  1 sibling, 1 reply; 5+ messages in thread
From: Karthik Chikmagalur @ 2024-11-15 19:06 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-devel

Thanks for the review, I'll apply your suggestions and get back to you
when I can.

>> I have found it to be a surprisingly versatile tool, and many users have
>> told me over the years that it solves a problem they didn't realize they
>> had.
>
> What is not clear to me is why this is not a part of Consult, if it is
> as useful as you say.  Have you discussed this with Daniel?  In any
> case, it would be useful to explain that somewhere.

This discussion was had in
https://github.com/minad/consult/issues/373#issuecomment-889841426.

The conclusion was that it would be better to have this be a separate
package.  Here is the relevant part of the exchange:

> DANIEL: ...I am not sure. And since Omar still has his bookmark
> directory jumper, there is probably a need for such a feature. Maybe
> one should also reconsider adding some new commands to Consult itself
> which fill the gap. Generally I am hesitant to stuff much more
> functionality into Consult itself, but a directory selection command
> does not sound unreasonable.
>
> ME: If you're interested in adding this to Consult, I can submit a
> PR. I'm okay with it living in a separate package though.
>
> DANIEL: Currently not, since I don't have a clear picture of what I
> want. But if it turns out that we find something small and generic I
> would be happy to add it. But adding multiple new sources, many commands
> etc, does not seem to me like a good idea at this point. I'd rather
> modularize the ecosystem more. Right now Consult is already pretty much
> a kitchen sink, but my general guideline is to maintain mostly reusable
> components here. For example consult-org-heading is a generic Org
> jumper, and you can glue it together with other commands or with Embark
> in order to get richer actions on the headings. Another example is the
> recently added consult-line-multi, which allows you to specify a query
> argument to restrict the set of buffers. This way I avoid having to add
> more special consult-line-all-buffers-of-this-and-that-type style
> commands.

>> I have signed the copyright papers, and there are no contributions to
>> the project from users over 3-4 lines in length.  Consult-dir's only
>> external dependency (Consult) is in ELPA.
>
> 1+ (though I have suggested to depend on project so as to lower the
> dependency on Emacs).

Why is adding another dependency a good idea? Isn't Emacs guaranteed to
ship a supported version of `package.el'?

Karthik



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ELPA] Proposal to add consult-dir to ELPA
  2024-11-15 19:06   ` Karthik Chikmagalur
@ 2024-11-16  1:01     ` Philip Kaludercic
  0 siblings, 0 replies; 5+ messages in thread
From: Philip Kaludercic @ 2024-11-16  1:01 UTC (permalink / raw)
  To: Karthik Chikmagalur; +Cc: emacs-devel

Karthik Chikmagalur <karthikchikmagalur@gmail.com> writes:

> Thanks for the review, I'll apply your suggestions and get back to you
> when I can.
>
>>> I have found it to be a surprisingly versatile tool, and many users have
>>> told me over the years that it solves a problem they didn't realize they
>>> had.
>>
>> What is not clear to me is why this is not a part of Consult, if it is
>> as useful as you say.  Have you discussed this with Daniel?  In any
>> case, it would be useful to explain that somewhere.
>
> This discussion was had in
> https://github.com/minad/consult/issues/373#issuecomment-889841426.
>
> The conclusion was that it would be better to have this be a separate
> package.  Here is the relevant part of the exchange:
>
>> DANIEL: ...I am not sure. And since Omar still has his bookmark
>> directory jumper, there is probably a need for such a feature. Maybe
>> one should also reconsider adding some new commands to Consult itself
>> which fill the gap. Generally I am hesitant to stuff much more
>> functionality into Consult itself, but a directory selection command
>> does not sound unreasonable.
>>
>> ME: If you're interested in adding this to Consult, I can submit a
>> PR. I'm okay with it living in a separate package though.
>>
>> DANIEL: Currently not, since I don't have a clear picture of what I
>> want. But if it turns out that we find something small and generic I
>> would be happy to add it. But adding multiple new sources, many commands
>> etc, does not seem to me like a good idea at this point. I'd rather
>> modularize the ecosystem more. Right now Consult is already pretty much
>> a kitchen sink, but my general guideline is to maintain mostly reusable
>> components here. For example consult-org-heading is a generic Org
>> jumper, and you can glue it together with other commands or with Embark
>> in order to get richer actions on the headings. Another example is the
>> recently added consult-line-multi, which allows you to specify a query
>> argument to restrict the set of buffers. This way I avoid having to add
>> more special consult-line-all-buffers-of-this-and-that-type style
>> commands.

This conversation is from 2021, and you are saying this is still the
state of the discussion?  Just to be clear, it doesn't matter much
either way, I just want to make sure there is no latent interest in
merging the two packages.

>>> I have signed the copyright papers, and there are no contributions to
>>> the project from users over 3-4 lines in length.  Consult-dir's only
>>> external dependency (Consult) is in ELPA.
>>
>> 1+ (though I have suggested to depend on project so as to lower the
>> dependency on Emacs).
>
> Why is adding another dependency a good idea? Isn't Emacs guaranteed to
> ship a supported version of `package.el'?

Yes, but IIRC the functionality you were using was not available in
Emacs 26, but you could install a newer version from ELPA with the
missing functionality.

> Karthik

-- 
	Philip Kaludercic on siskin



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ELPA] Proposal to add consult-dir to ELPA
  2024-11-15  4:30 ` Philip Kaludercic
  2024-11-15 19:06   ` Karthik Chikmagalur
@ 2024-11-17  4:37   ` Richard Stallman
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2024-11-17  4:37 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: karthikchikmagalur, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

I'd like to suggest a feature that it appears does not exist.
That is to define a hook which would be a list of functions
to filter the list of buffers to consult.  Each functiob might
receive one argument, the list of buffers, and return a replacement list
(which could be a modified version of the argument, or the argument
unmodifier).


-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-17  4:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-14  5:05 [ELPA] Proposal to add consult-dir to ELPA Karthik Chikmagalur
2024-11-15  4:30 ` Philip Kaludercic
2024-11-15 19:06   ` Karthik Chikmagalur
2024-11-16  1:01     ` Philip Kaludercic
2024-11-17  4:37   ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).