From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#25163: 26.0.50; Unable to access `user-emacs-directory' (~/.emacs.d/) Date: Tue, 12 Jun 2018 21:24:33 -0400 Message-ID: <87a7rzxyum.fsf@gmail.com> References: <8760mrdrfd.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1528852995 24946 195.159.176.226 (13 Jun 2018 01:23:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 13 Jun 2018 01:23:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: , Richard Kim To: 25163@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 13 03:23:10 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSuVB-0006N2-Ri for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Jun 2018 03:23:10 +0200 Original-Received: from localhost ([::1]:59194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSuXI-0005Rv-NL for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Jun 2018 21:25:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSuX5-0005Ob-Ck for bug-gnu-emacs@gnu.org; Tue, 12 Jun 2018 21:25:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSuX0-0004AQ-Ek for bug-gnu-emacs@gnu.org; Tue, 12 Jun 2018 21:25:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37669) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fSuX0-0004AH-Ao for bug-gnu-emacs@gnu.org; Tue, 12 Jun 2018 21:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fSuX0-0001Ze-2W for bug-gnu-emacs@gnu.org; Tue, 12 Jun 2018 21:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Jun 2018 01:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25163 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25163-submit@debbugs.gnu.org id=B25163.15288530856021 (code B ref 25163); Wed, 13 Jun 2018 01:25:02 +0000 Original-Received: (at 25163) by debbugs.gnu.org; 13 Jun 2018 01:24:45 +0000 Original-Received: from localhost ([127.0.0.1]:45566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSuWj-0001Z3-0u for submit@debbugs.gnu.org; Tue, 12 Jun 2018 21:24:45 -0400 Original-Received: from mail-qt0-f175.google.com ([209.85.216.175]:35683) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSuWh-0001Yq-KU for 25163@debbugs.gnu.org; Tue, 12 Jun 2018 21:24:44 -0400 Original-Received: by mail-qt0-f175.google.com with SMTP id s9-v6so962523qtg.2 for <25163@debbugs.gnu.org>; Tue, 12 Jun 2018 18:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=jGt6WGemDLkjZgyp8hUN5Sf10wKEn8zO9pbAlo2wWT0=; b=DSw1uIjjSof3IiSu5dJb8xX3qe4NnWocMYtY/28DdYDIHPHkwGmCA8Rvom/mXgCZtZ u42NbmT/MOV6G/Wm39d+gYKlvbRK5vrsDru1ZOZDJW6JltwYQOT6DhzHZXP2KsXCTxvV lvMWp2J/C/yxSWjGTwjNimSNXHrL1KuG3OC/dsbruZyIDu3CwrH7KHc5GMEfPIZA8zyb NMtxX9V4+BIP5rNDprirqezMqkS3eSMRg/i9MW637pYQNlKktCrTPtCeMH7X+GaKI/5o HSJL5a1SkyCFY+36wufTcXuw7zNC8s+KYt7NvwbD0x0q5y+m7zexrL58Y6AyYPPPEalj mvBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=jGt6WGemDLkjZgyp8hUN5Sf10wKEn8zO9pbAlo2wWT0=; b=k8mAJ/kjJxY+AVdlBmyykA8YbQX+EKOwPDG/QvKvh+hG/Vn+YMuRa5Ti+I5GfrVevZ E3HPYNg3mitPLm8Vab5S8QFjzwLC8NO4l8T2EXAamWCcnnKxphmuBJmWaEpUIf5hor8p uxc4iq+8Y2mH5i3JGa1EMgjXdQpzw+EmKIVVtwC4F9FSPJVYQx/aQjfjqNmrVBU+0JeS Jdnhr8Blurkddbnx/0T86IQzCx+OcF1SFT0BcnLOPjQvOVIOASwCpuqO+znKrG5PQ5xk O+DCrzax+XHsLniHSs7YTu+wMc8FPOH6sUM+USoLikR5M2goUyonXz1GBb1Xb6015S/d Ws5w== X-Gm-Message-State: APt69E1v550gH+ROV6p09wnt36y8alEJCHhCguw/Pr84MltjL1IceQXm g4CNh7VVBbKDSXqiJz1QbcA= X-Google-Smtp-Source: ADUXVKIhfpBJhPpvhjcqchs8TcPM+QdMkgGrO48FsgIVGcZn1ZWbEhJst1R45pto7zbdHGECywBtNA== X-Received: by 2002:ac8:241:: with SMTP id o1-v6mr2769598qtg.39.1528853078271; Tue, 12 Jun 2018 18:24:38 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id c77-v6sm1332374qkj.3.2018.06.12.18.24.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Jun 2018 18:24:37 -0700 (PDT) In-Reply-To: <8760mrdrfd.fsf@users.sourceforge.net> (npostavs's message of "Sat, 10 Dec 2016 23:24:06 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:147351 Archived-At: I wrote: > Looks like the problem is that locate-user-emacs-file (and thus the > check for the warning) is called before any customizations (or --eval > args) are executed. > Perhaps the warning could be delayed until after init time? So, taking another look at this, the warning *is* currently delayed until after init time (as are all warnings occuring before init time). The problem is, delayed warnings are displayed just after init time, which is just before --eval args are executed. Maybe we should have --early-eval to go along with ~/.emacs.d/early-init.el? Or maybe just require suppressing this warning via site-start.el. The patch below makes that possible (maybe the first hunk isn't really needed, and we should just remove the user-emacs-directory-warning option in favour of setting warning-suppress-log-types instead): --- i/lisp/files.el +++ w/lisp/files.el @@ -990,6 +990,13 @@ user-emacs-directory-warning :group 'initialization :version "24.4") +(defvar warning-suppress-log-types) ; `warnings.el'. +(defun maybe-suppress-user-emacs-directory-warning () + "Apply `user-emacs-directory-warning' suppression." + (unless user-emacs-directory-warning + (add-to-list 'warning-suppress-log-types '(initialization user-emacs-directory)))) +(add-hook 'after-init-hook #'maybe-suppress-user-emacs-directory-warning) + (defun locate-user-emacs-file (new-name &optional old-name) "Return an absolute per-user Emacs-specific file name. If NEW-NAME exists in `user-emacs-directory', return it. @@ -1021,7 +1028,7 @@ locate-user-emacs-file (not (get 'user-emacs-directory-warning 'this-session))) ;; Only warn once per Emacs session. (put 'user-emacs-directory-warning 'this-session t) - (display-warning 'initialization + (display-warning `(initialization user-emacs-directory ,(intern errtype)) (format "\ Unable to %s `user-emacs-directory' (%s). Any data that would normally be written there may be lost!