--- Begin Message ---
Subject: |
Issue on emacs --daemon with View command |
Date: |
Tue, 10 Nov 2015 14:11:35 +0100 |
Hi!
There is a problem with how the View command gets handled in order to
account for display-manager-less settings, but there is a problem with
the current approach of deciding so at package load time.
Rationale:
Emacs can be started as a daemon from anywhere, including a systemd
user session without any current DISPLAY variable active (mostly
because it may not even have been initialized), or maybe a ~/.profile
script launching it, and launching Xorg after that by whatever reason.
Then, an emacs client can be attached at any point which may (or may
not) have a related display manager.
Currently, AUCTeX selects the display manager at the beginning, which
would make this approach use dvi2tty always, irrespect to whether the
emacs client is actually a possibility.
Proposal:
I would recommend to either have an emacs function as the view
function, which evaluates whether it should run graphically or
text-mode view function at call-time, instead of load-time.
I have a preliminary patch already as a commit in my clone of auctex.
I attach the git request-pull output.
The following changes since commit 0c9b98aeeeb612c04824140627cb5e86a763dcf9:
Fix compatibility with XEmacs in tex-info.el (2015-11-09 22:45:20 +0100)
are available in the git repository at:
https://github.com/ssaavedra/auctex.git
for you to fetch changes up to 2b83bc2ef9252f4f69a158c244fe4fc806844baf:
Make View command work no matter how emacs started (2015-11-10 14:06:40 +0100)
Thanks. Regards,
--
Santiago Saavedra
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#21873: Issue on emacs --daemon with View command |
Date: |
Tue, 10 Nov 2015 20:12:16 +0100 |
Hi Santiago,
thanks for the patch, I applied it with minor changes (XEmacs doesn't
have `display-graphic-p', I kept the old test).
2015-11-10 17:46 GMT+01:00 Santiago Saavedra <address@hidden>:
> Sorry, I changed the commit, because there was a bug in the
> implementation. Here is the updated request.
>
>
> The following changes since commit 0c9b98aeeeb612c04824140627cb5e86a763dcf9:
>
> Fix compatibility with XEmacs in tex-info.el (2015-11-09 22:45:20 +0100)
>
> are available in the git repository at:
>
> https://github.com/ssaavedra/auctex.git
>
> for you to fetch changes up to 1a79e7ef99c2934e0cb9b1ab66098727e3833540:
For the future, a real patch is easier to handle, at least a direct
link to the patch[1].
> Make View command work no matter how emacs started (2015-11-10 17:44:36
> +0100)
>
> ----------------------------------------------------------------
> Santiago Saavedra (1):
> Make View command work no matter how emacs started
>
> tex.el | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
Luckily it was a minor change and mainly a reorganization of existing
code, but should you want to send further patches you would need to
assign the copyright to FSF in order for them to be installed in
AUCTeX ;-)
Bye,
Mosè
Note
[1]
https://github.com/ssaavedra/auctex/commit/1a79e7ef99c2934e0cb9b1ab66098727e3833540.patch
Just add ".patch" to the commit webpage address.
--- End Message ---