unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Peter Oliver <p.d.oliver@mavit.org.uk>
Cc: 63317@debbugs.gnu.org
Subject: bug#63317: 29.0.90; ediff-auto-refine is set at require-time rather than runtime
Date: Sat, 06 May 2023 09:11:23 +0300	[thread overview]
Message-ID: <83r0rugfas.fsf@gnu.org> (raw)
In-Reply-To: <fa5c06e6-464b-d123-6a63-fb2186170484@mavit.org.uk> (message from Peter Oliver on Fri, 5 May 2023 21:15:11 +0100 (BST))

> Date: Fri, 5 May 2023 21:15:11 +0100 (BST)
> From: Peter Oliver <p.d.oliver@mavit.org.uk>
> 
> If ediff is loaded from a GUI, ediff-auto-refine defaults to "on", which is the desired behaviour.
> 
> However, if your ~/.emacs contains "(require 'ediff)", and you start emacs with the --daemon option, variable ediff-auto-refine will instead default to "nix", even if you later try to use ediff from a GUI started with "emacsclient --create-frame".

If you want the daemon session to do something that requires a GUI
frame, you need to have the relevant customizations in
server-after-make-frame-hook, so that the customizations run when such
a frame is already created.  In this case, I suggest to have that hook
change the value of ediff-auto-refine depending on whether the created
frame is a GUI frame or a TTY frame.  (Or, if you personally never
create TTY client frames, you can set ediff-auto-refine to "on"
unconditionally in that hook.)

Or maybe do that in some appropriate Ediff hook.

We cannot do this automatically, not via the default value of the
option, because a daemon session can be used for both GUI and TTY
frames (and can have frames of both types active at the same time in
the same session).

So I don't see a bug here, just a need for more elaborate
customizations in daemon sessions.





  reply	other threads:[~2023-05-06  6:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 20:15 bug#63317: 29.0.90; ediff-auto-refine is set at require-time rather than runtime Peter Oliver
2023-05-06  6:11 ` Eli Zaretskii [this message]
2023-05-08 10:30   ` Peter Oliver

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r0rugfas.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=63317@debbugs.gnu.org \
    --cc=p.d.oliver@mavit.org.uk \
    /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 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).