From: Eli Zaretskii <eliz@gnu.org>
To: changqi chen <ccq777@gmail.com>
Cc: 35726@debbugs.gnu.org, Aaron Jensen <aaronjensen@gmail.com>
Subject: bug#35726: Further information of line number bug.
Date: Wed, 15 May 2019 18:32:30 +0300 [thread overview]
Message-ID: <83sgtf91ip.fsf@gnu.org> (raw)
In-Reply-To: <CAL2RP3dDzVN7kiFue64WA0Pvvx16-+9AB1SSTDnbejzWB+XuGQ@mail.gmail.com> (message from changqi chen on Tue, 14 May 2019 00:21:33 -0400)
> From: changqi chen <ccq777@gmail.com>
> Date: Tue, 14 May 2019 00:21:33 -0400
>
> I use global-display-line-number-mode in my init.el. When I use emacsclient open first buffer, no matter which
> mode it is, line number does not show.
> I can manually enable it by M-x display-line-number-mode. If I open other file during my first buffer, different
> buffer mode, line number shows.
Thanks. This is a regression in Emacs 27; the problem doesn't exist
in Emacs 26.
The reason for this is the fix for bug#24218. It changed the order in
which we visit the file and create a new frame: where previously we
created the frame first, and only then visited the file, we now visit
the file in the original frame, and after that create a new frame with
the visiting buffer being the current buffer.
Since define-globalized-minor-mode invokes the turn-on function in
find-file-hook, both display-line-numbers-mode and linum-mode now see
a frame whose 'client' parameter is nil, and refuse to turn themselves
on to avoid bug#27210.
Thinking about this, I see several possible solutions:
1. Revert the fix for bug#24218 (since it's just an aesthetic issue).
Or maybe someone sees how to fix that bug in a way that doesn't
change the order of visiting the file and creating the client
frame.
2. Modify define-globalized-minor-mode to also use some other hook,
like maybe server-after-make-frame-hook. This has a downside that
we will need to scan all the buffers on the frame, which might
slow down client frame creation.
3. Remove from linum.el and display-line-numbers.el the condition
that causes this:
(and (daemonp) (null (frame-parameter nil 'client)))
I don't think that bug#27210 will affect display-line-numbers, and
linum is semi-deprecated.
Any other ideas?
next prev parent reply other threads:[~2019-05-15 15:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-14 2:07 bug#35726: 27.0.50; global-linum-mode doesn't work in emacsclient in several modes ccQ's Gmail
2019-05-14 4:21 ` bug#35726: Further information of line number bug changqi chen
2019-05-15 15:32 ` Eli Zaretskii [this message]
2019-05-15 17:35 ` npostavs
2019-05-15 18:05 ` Eli Zaretskii
2019-05-15 19:21 ` Aaron Jensen
2019-05-15 22:23 ` bug#35726: 27.0.50; global-linum-mode doesn't work in emacsclient in several modes Noam Postavsky
2019-06-07 14:33 ` Eli Zaretskii
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=83sgtf91ip.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=35726@debbugs.gnu.org \
--cc=aaronjensen@gmail.com \
--cc=ccq777@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.