unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: 36828@debbugs.gnu.org, stepnem@gmail.com
Subject: bug#36828: 27.0.50; Uninstalled emacs shows installed documentation
Date: Sat, 26 Oct 2019 11:51:50 +0300	[thread overview]
Message-ID: <83v9sbvqhl.fsf@gnu.org> (raw)
In-Reply-To: <87eez0kxhq.fsf@telefonica.net> (message from Óscar Fuentes on Sat, 26 Oct 2019 05:16:01 +0200)

> From: Óscar Fuentes <ofv@wanadoo.es>
> Cc: stepnem@gmail.com,  36828@debbugs.gnu.org
> Date: Sat, 26 Oct 2019 05:16:01 +0200
> 
> Sorry for the long delay.

I no longer remember the details from what I discovered back there, so
expect some repeated questions, mistakes, and confusion.  Apologies in
advance.

> >> >> M-x describe-function shows the docstrings of the Emacs I'm executing,
> >> >
> >> > How do you know?  What is the value of doc-directory?
> >> 
> >> /home/oscar/dev/emacs/stable/build/etc/
> >> 
> >> The installed version is in /usr/local.
> >
> > Hmm... then this is not the use case I had in mind, and some other
> > factor is at work here.  Your use case is supposed to be handled by
> > this fragment from init_callproc:
> 
> What follows is the result of a debug session for the chunk of code you
> indicated.
> 
>   if (data_dir == 0)
>     {
>       Lisp_Object tem, srcdir;
>       Lisp_Object lispdir = Fcar (decode_env_path (0, PATH_DUMPLOADSEARCH, 0));
> 
>       srcdir = Fexpand_file_name (build_string ("../src/"), lispdir);
> 
>       tem = Fexpand_file_name (build_string ("NEWS"), Vdata_directory);
> 
> Vdata_directory is "/usr/local/share/emacs/27.0.50/etc/"
> 
> tem is "/usr/local/share/emacs/27.0.50/etc/NEWS"
> 
> srcdir is "/home/oscar/dev/emacs/emacs/src/"

I note that the directories you show now are different from what you
reported back then: more place for confusion.

> Execution never enters this block, because srcdir !=
> Vinvocation_directory (because this is an out-of-source build) and
> "/usr/local/share/emacs/27.0.50/etc/NEWS" exists (because emacs was
> installed on the past).
> 
> 	  Lisp_Object newdir;
> 	  newdir = Fexpand_file_name (build_string ("../etc/"), lispdir);
> 	  tem = Fexpand_file_name (build_string ("NEWS"), newdir);
> 	  if (!NILP (Ffile_exists_p (tem)))
> 	    Vdata_directory = newdir;
> 	}
>     }
> 
> The code basically ignores the local, non-installed NEWS when there is
> an installed NEWS and we are executing from an out-of-source build tree.
> 
> I propose the reverse: unconditionally test for the non-installed NEWS and
> adjust Vdata_directory if it exists. Something like this (untested for
> the installed emacs case):

I'm not sure I understand the relevance of data-directory to the issue
at hand.  AFAIR you were talking about the Info documentation, but
that is looked up in configure-info-directory; see
Info-default-directory-list.  We only use data-directory for that in
the NS builds, which I believe is not your case.

If this all is due to the fact I pointed to this code, then either I
was mistaken (sorry!), or there's something I discovered back then,
but forgot in the meantime.

So I guess we need to back up a notch and see how all this is related
to Info manuals?  Or what else am I missing?





  reply	other threads:[~2019-10-26  8:51 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-28 15:07 bug#36828: 27.0.50; Uninstalled emacs shows installed documentation Óscar Fuentes
2019-07-28 15:30 ` Eli Zaretskii
2019-07-28 15:56   ` Óscar Fuentes
2019-07-28 16:50     ` Eli Zaretskii
2019-07-29  0:36       ` Óscar Fuentes
2019-07-29 12:13         ` Štěpán Němec
2019-07-29 14:25           ` Óscar Fuentes
2019-07-29 14:41             ` Štěpán Němec
2019-07-29 14:38           ` Eli Zaretskii
2019-07-29 14:47             ` Štěpán Němec
2019-07-29 15:11               ` Eli Zaretskii
2019-07-29 15:20                 ` Eli Zaretskii
2019-07-29 16:08                 ` Štěpán Němec
2019-07-29 16:57                   ` Eli Zaretskii
2019-07-29 17:44                     ` Štěpán Němec
2019-07-29 18:13                       ` Eli Zaretskii
2019-07-29 18:33                         ` Štěpán Němec
2019-07-29 18:48                           ` Eli Zaretskii
2019-07-29 19:20                             ` Štěpán Němec
2019-07-29 19:31                               ` Eli Zaretskii
2019-07-29 18:42                         ` Óscar Fuentes
2019-07-29 19:26                           ` Eli Zaretskii
2019-07-29 21:09                             ` Óscar Fuentes
2019-07-30 15:08                               ` Eli Zaretskii
2019-08-07 14:25                                 ` Eli Zaretskii
2019-08-07 15:00                                   ` Óscar Fuentes
2019-08-07 15:03                                     ` Eli Zaretskii
2019-10-26  3:16                                 ` Óscar Fuentes
2019-10-26  8:51                                   ` Eli Zaretskii [this message]
2019-10-26 11:55                                     ` Óscar Fuentes
2019-10-26 12:29                                       ` Eli Zaretskii
2019-10-26 13:27                                         ` Óscar Fuentes
2019-10-26 13:45                                           ` Eli Zaretskii
2019-10-26 20:05                                             ` Óscar Fuentes
2019-10-26 20:21                                               ` Eli Zaretskii
2019-10-26 20:40                                                 ` Óscar Fuentes
2019-10-27  5:13                                                   ` Eli Zaretskii
2019-10-27 23:50                                                     ` Óscar Fuentes
2019-10-28 15:58                                                       ` Eli Zaretskii
2019-10-28 19:40                                                         ` Óscar Fuentes
2019-10-28 20:03                                                           ` Eli Zaretskii
2019-10-28 20:21                                                             ` Óscar Fuentes
2019-10-28 20:38                                                               ` Eli Zaretskii
2019-10-28 21:45                                                                 ` Óscar Fuentes
2019-10-29 11:56                                                                   ` Eli Zaretskii
2019-11-02 17:08                                                                     ` Óscar Fuentes
2019-10-29  3:09                                                         ` Richard Stallman
2019-10-26  3:33                                 ` Óscar Fuentes

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=83v9sbvqhl.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=36828@debbugs.gnu.org \
    --cc=ofv@wanadoo.es \
    --cc=stepnem@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 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).