bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41890: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for proj


From: Eli Zaretskii
Subject: bug#41890: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el
Date: Fri, 24 Jul 2020 19:12:39 +0300

> From: Sean Whitton <spwhitton@spwhitton.name>
> Cc: dgutov@yandex.ru, juri@linkov.net, contovob@tcd.ie, philip@warpmail.net,
>  41890@debbugs.gnu.org, 42210@debbugs.gnu.org
> Date: Fri, 24 Jul 2020 08:12:13 -0700
> 
> > 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.
> 
> I added the argument just so I could reuse the code in
> project-switch-to-buffer, so a simple alternative for the purposes of my
> patch would be to factor that code out into a new
> project--select-project-buffer defun.  Then no existing APIs would be
> changed.
> 
> Would that be sufficient?

What you added is not my problem, my problem is that there's no easy
way of calling this function 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?
> 
> This is a bit tricky actually -- what should the function do if some
> Lisp code passes it a buffer which is not part of the current project?

Just switch to that buffer, I think.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]