From: Eli Zaretskii <eliz@gnu.org>
To: Sean Whitton <spwhitton@spwhitton.name>
Cc: 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net,
contovob@tcd.ie, philip@warpmail.net, dgutov@yandex.ru
Subject: bug#41890: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el
Date: Fri, 24 Jul 2020 09:01:27 +0300 [thread overview]
Message-ID: <83sgdhe9jc.fsf@gnu.org> (raw)
In-Reply-To: <878sf9u0rm.fsf@iris.silentflame.com> (message from Sean Whitton on Thu, 23 Jul 2020 19:04:13 -0700)
> Date: Thu, 23 Jul 2020 19:04:13 -0700
> Cc: "Basil L. Contovounesios" <contovob@tcd.ie>,
> "Philip K." <philip@warpmail.net>, 41890@debbugs.gnu.org,
> 42210@debbugs.gnu.org
>
> -(defun project-switch-to-buffer ()
> +(defun project-switch-to-buffer (&optional switching-function)
> "Switch to another buffer belonging to the current project.
> This function prompts for another buffer, offering as candidates
> buffers that belong to the same project as the current buffer.
> Two buffers belong to the same project if their project instances,
> -as reported by `project-current' in each buffer, are identical."
> +as reported by `project-current' in each buffer, are identical.
> +
> +Optional argument SWITCHING-FUNCTION is the function used to
> +switch the buffer. It defaults to `switch-to-buffer'."
> (interactive)
This interface strikes me as unusual and even unexpected for a command
that switches to another buffer. I would expect it to have an API
similar to that of switch-to-buffer: that it should accept the buffer
to switch to as an argument, and set up that argument in the
'interactive' spec according to the preferences of this command
(offering buffers in the same project etc.). The API you propose
makes it awkward, to say the least, to invoke this command from Lisp.
Granted, the original API doesn't allow such invocation, either, but
as long as we are changing this API, let's try fixing that, okay?
> +(defun project-display-buffer ()
> + "Display a buffer of the current project without selecting it.
This doesn't say where that buffer will be displayed. Please add that
important detail to the doc string.
> +(defun project-display-buffer-other-frame ()
> + "Display a buffer of the current project, preferably in another frame.
> +
> +See `project-switch-to-buffer' for what it means for a buffer to
> +belong to the current project."
The "preferably" part needs to be explained some more, perhaps by
pointing to display-buffer-other-frame for the details. Otherwise it
leaves some of the command's MO a mystery.
> +(defvar project-other-window-map
> + (let ((map (make-sparse-keymap)))
> + (define-key map "\C-o" #'project-display-buffer)
> + map)
> + "Keymap for additional project commands to display in other windows.")
Do you mean "commands _that_ display in other windows"? If so, please
use "that" instead of "to". Also, I think the doc string should
explain what do those commands display in those other windows.
> +(defvar project-other-frame-map
> + (let ((map (make-sparse-keymap)))
> + (define-key map "\C-o" #'project-display-buffer-other-frame)
> + map)
> + "Keymap for additional project commands to display in other frames.")
Same here.
> +;;;###autoload
> +(defun project-other-window-command ()
> + "Invoke a project command but display its buffer in another window.
^
Comma is missing there.
More importantly, the "its" part is ambiguous. What does it allude
to?
> +(defun project-other-frame-command ()
> + "Invoke a project command but display its buffer in another frame.
Same here.
> +(defun project-other-tab-command ()
> + "Invoke a project command but display its buffer in another tab.
Same here, except that in this case even the idea of "displaying in a
tab" is unclear. This needs rewording.
Thanks.
next prev parent reply other threads:[~2020-07-24 6:01 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 9:49 bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Theodor Thornhill
[not found] ` <83pn9z13xq.fsf@gnu.org>
2020-06-16 16:44 ` Theodor Thornhill
2020-06-16 17:16 ` Eli Zaretskii
2020-06-16 17:30 ` Theodor Thornhill
2020-06-16 18:14 ` Basil L. Contovounesios
2020-06-16 19:07 ` Theodor Thornhill
2020-06-16 19:12 ` Theodor Thornhill
2020-06-16 21:57 ` Juri Linkov
2020-06-16 22:47 ` Dmitry Gutov
2020-06-16 23:24 ` Juri Linkov
2020-06-16 23:42 ` Dmitry Gutov
2020-06-17 21:23 ` Juri Linkov
2020-06-17 22:16 ` Dmitry Gutov
2020-06-17 22:27 ` Juri Linkov
2020-06-17 22:38 ` Dmitry Gutov
2020-06-17 23:23 ` Juri Linkov
2020-06-17 23:36 ` Dmitry Gutov
2020-06-18 22:59 ` Juri Linkov
2020-06-18 23:08 ` Dmitry Gutov
2020-06-20 23:41 ` Juri Linkov
2020-06-21 0:25 ` Dmitry Gutov
2020-06-17 10:51 ` Philip K.
2020-06-16 20:31 ` Basil L. Contovounesios
2020-06-17 19:10 ` Theodor Thornhill
2020-06-17 19:40 ` Basil L. Contovounesios
2020-06-17 23:07 ` Dmitry Gutov
2020-06-16 21:23 ` Dmitry Gutov
2020-06-16 21:35 ` Dmitry Gutov
2020-06-17 14:28 ` Eli Zaretskii
2020-06-17 14:27 ` Eli Zaretskii
2020-06-17 15:49 ` Dmitry Gutov
2020-06-17 16:33 ` Eli Zaretskii
2020-06-17 22:23 ` Dmitry Gutov
2020-06-18 13:38 ` Eli Zaretskii
2020-06-18 15:47 ` Dmitry Gutov
2020-06-18 17:24 ` Eli Zaretskii
2020-06-18 18:18 ` Michael Albinus
2020-06-18 16:25 ` Stefan Monnier
2020-06-18 17:30 ` Eli Zaretskii
2020-06-18 18:22 ` Dmitry Gutov
2020-06-18 18:42 ` Eli Zaretskii
2020-06-18 18:54 ` Dmitry Gutov
2020-06-18 19:04 ` Eli Zaretskii
2020-06-18 21:12 ` Dmitry Gutov
2020-06-19 6:11 ` Eli Zaretskii
[not found] ` <3ad1ecbb-36d6-79c0-7a7b-6ff3a561e512@yandex.ru>
2020-06-18 14:09 ` Philip K.
2020-06-18 17:22 ` Basil L. Contovounesios
2020-06-18 18:50 ` Philip K.
2020-06-18 22:10 ` Juri Linkov
2020-06-18 23:01 ` Dmitry Gutov
2020-06-18 23:24 ` Juri Linkov
2020-06-18 23:31 ` Dmitry Gutov
2020-06-19 10:15 ` Simen Heggestøyl
2020-07-11 17:07 ` Sean Whitton
2020-07-12 15:18 ` Dmitry Gutov
2020-07-12 16:24 ` Sean Whitton
2020-07-12 20:12 ` Dmitry Gutov
2020-07-18 16:06 ` bug#42210: " Sean Whitton
2020-07-19 23:46 ` Dmitry Gutov
2020-07-20 0:30 ` Juri Linkov
2020-07-20 1:04 ` bug#41890: " Dmitry Gutov
2020-07-20 20:47 ` Juri Linkov
2020-07-20 21:00 ` Dmitry Gutov
2020-07-20 16:49 ` Sean Whitton
2020-07-20 20:41 ` bug#41890: " Juri Linkov
2020-07-20 21:02 ` Dmitry Gutov
2020-07-20 21:24 ` bug#41890: " Sean Whitton
2020-07-20 22:00 ` Dmitry Gutov
2020-07-21 0:33 ` Sean Whitton
2020-07-21 23:38 ` Juri Linkov
2020-07-22 0:38 ` Dmitry Gutov
2020-07-22 1:33 ` Sean Whitton
2020-07-22 19:28 ` bug#41890: " Sean Whitton
2020-07-23 23:46 ` Dmitry Gutov
2020-07-24 2:04 ` Sean Whitton
2020-07-24 6:01 ` Eli Zaretskii [this message]
2020-07-24 15:12 ` bug#41890: " Sean Whitton
2020-07-24 16:12 ` Eli Zaretskii
2020-07-24 21:20 ` Sean Whitton
2020-07-24 22:54 ` Dmitry Gutov
2020-07-24 23:13 ` Sean Whitton
2020-07-24 23:45 ` Dmitry Gutov
2020-07-25 6:14 ` Eli Zaretskii
2020-07-26 5:15 ` bug#41890: " Sean Whitton
2020-07-27 0:01 ` Dmitry Gutov
2020-07-22 1:31 ` Sean Whitton
2020-07-23 0:32 ` bug#41890: " Juri Linkov
2020-07-23 15:06 ` Sean Whitton
2020-07-20 10:21 ` Basil L. Contovounesios
2020-07-20 14:45 ` Eli Zaretskii
2020-07-12 23:48 ` Juri Linkov
2020-07-13 0:13 ` Dmitry Gutov
2020-07-13 0:23 ` Juri Linkov
2020-07-13 6:56 ` Philip K.
2020-07-13 10:47 ` Dmitry Gutov
2020-07-13 10:50 ` Dmitry Gutov
2020-07-13 11:02 ` Philip K.
2020-07-18 15:19 ` Sean Whitton
2020-07-13 23:49 ` Juri Linkov
2020-07-14 7:03 ` Philip K.
2020-07-14 22:34 ` Juri Linkov
2020-07-14 23:32 ` Dmitry Gutov
2020-07-15 23:59 ` Juri Linkov
2020-07-16 13:38 ` Dmitry Gutov
2020-07-15 19:21 ` Philip K.
2020-07-15 23:35 ` Dmitry Gutov
[not found] ` <902001d0-ab1c-b697-bfd0-b8ec195dc65f@yandex.ru>
2020-06-19 10:13 ` Simen Heggestøyl
2020-06-19 10:26 ` Philip K.
2020-06-19 10:50 ` Simen Heggestøyl
2020-06-19 12:25 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83sgdhe9jc.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=41890@debbugs.gnu.org \
--cc=42210@debbugs.gnu.org \
--cc=contovob@tcd.ie \
--cc=dgutov@yandex.ru \
--cc=juri@linkov.net \
--cc=philip@warpmail.net \
--cc=spwhitton@spwhitton.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.