From: Eli Zaretskii <eliz@gnu.org>
To: Christophe Junke <junke.christophe@gmail.com>
Cc: 31707@debbugs.gnu.org
Subject: bug#31707: [PATCH 1/1] ido: add ido-fallback special variable
Date: Sat, 09 Jun 2018 10:00:56 +0300 [thread overview]
Message-ID: <83bmcktpef.fsf@gnu.org> (raw)
In-Reply-To: <20180604083943.13769-1-junke.christophe@gmail.com> (message from Christophe Junke on Mon, 4 Jun 2018 10:39:43 +0200)
> From: Christophe Junke <junke.christophe@gmail.com>
> Date: Mon, 4 Jun 2018 10:39:43 +0200
> Cc: Christophe Junke <junke.christophe@gmail.com>
>
> The Ido module has been compiled with "lexical-binding: t" for some
> time now. Previously, when the bindings were dynamic, it was possible
> for other packages to modify the "fallback" variables declared inside
> "ido-file-internal" and "ido-buffer-internal".
>
> In particular, that was the case in magit-extras.el, which runs
> magit-status on current path when exiting Ido. This feature is now
> broken since "fallback" is lexical. For reference, the current code
> for "ido-enter-magit-status" does the following:
>
> (with-no-warnings ; FIXME these are internal variables
> (setq ido-exit 'fallback fallback 'magit-status))
> (exit-minibuffer)
>
> I think it would be cleaner to have it do:
>
> (ido-fallback-command 'magit-status)
>
> The current patch:
>
> - Introduces an ido-fallback special variable, which, when set,
> overrides the local, lexical, "fallback" variable; it does so only
> when ido-exit is set to 'fallback.
>
> - Adds an optional parameter to "ido-fallback-command" that is used to
> specify which fallback command to run on exit.
Thanks.
However, if the problem was caused by using lexical-binding in ido.el,
then I wonder why you need anything except one additional line:
(defvar ido-fallback)
This should make ido-fallback a dynamically-bound variable, and all
the rest should "just work" as it did before. Right?
next prev parent reply other threads:[~2018-06-09 7:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 8:39 bug#31707: [PATCH 1/1] ido: add ido-fallback special variable Christophe Junke
2018-06-09 7:00 ` Eli Zaretskii [this message]
2018-06-11 8:23 ` bug#31783: [PATCH v2] ido.el: define a special ido-fallback variable Christophe Junke
2018-06-11 12:19 ` Noam Postavsky
2018-06-11 12:54 ` Christophe Junke
2018-06-11 15:28 ` Eli Zaretskii
[not found] ` <CAFDFyRiHzxOB7Q6uV1hPYmuC3KfiqJRCmk=nrQ5wTPWUue_W4Q@mail.gmail.com>
2018-06-11 16:55 ` Eli Zaretskii
2018-06-22 0:34 ` Noam Postavsky
2018-06-22 6:34 ` Eli Zaretskii
2018-06-22 8:24 ` Christophe Junke
2018-06-22 9:02 ` Eli Zaretskii
2018-06-22 11:32 ` Noam Postavsky
2018-06-22 12:45 ` Eli Zaretskii
2018-06-24 1:52 ` bug#31707: [PATCH 1/1] ido: add ido-fallback special variable Noam Postavsky
2018-06-24 14:54 ` Eli Zaretskii
2018-06-26 0:40 ` Noam Postavsky
2018-06-11 18:52 ` bug#31783: [PATCH v2] ido.el: define a special ido-fallback variable Christophe Junke
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=83bmcktpef.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=31707@debbugs.gnu.org \
--cc=junke.christophe@gmail.com \
/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.