From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: Async Package.el Feedback Date: Tue, 7 Apr 2015 18:22:41 +0100 Message-ID: References: <21795.9431.463084.313806@gargle.gargle.HOWL> <21796.1453.613891.252869@retriever.mtv.corp.google.com> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1428427369 25682 80.91.229.3 (7 Apr 2015 17:22:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Apr 2015 17:22:49 +0000 (UTC) Cc: emacs-devel To: "T.V Raman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 07 19:22:49 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YfXD5-0008Qh-HI for ged-emacs-devel@m.gmane.org; Tue, 07 Apr 2015 19:22:47 +0200 Original-Received: from localhost ([::1]:47650 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfXD4-0005dj-NQ for ged-emacs-devel@m.gmane.org; Tue, 07 Apr 2015 13:22:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfXD1-0005Xl-2n for emacs-devel@gnu.org; Tue, 07 Apr 2015 13:22:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfXD0-0001w7-6h for emacs-devel@gnu.org; Tue, 07 Apr 2015 13:22:42 -0400 Original-Received: from mail-la0-x22a.google.com ([2a00:1450:4010:c03::22a]:36588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfXCz-0001w0-Vx for emacs-devel@gnu.org; Tue, 07 Apr 2015 13:22:42 -0400 Original-Received: by lagv1 with SMTP id v1so47493640lag.3 for ; Tue, 07 Apr 2015 10:22:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=pg2NTLuDeOKb/YPNki65hZ1SA3rHM88qoE3gIPR1H+I=; b=p1yHR3FYf1RV3YvSGCH2zUF+hsb57YWUBpgGcvv5mcrJ/CKuvuDhwy4JSTbrQi0VL2 gmUtlOZ6yra0gMcRpJ5K5ETFRrElzQwgXxQuHWNbQQXQMAQj3amAsoggQlU2h6hxts+z rXs2V6+OjIQzKqEy5px3mUN2l6nydJd+41RZwW8xCRg8xn5yEkEgKcGrgToJYGslQKWW C9WzE+OWAiU8PauzcWP/EwaxhRBBAydb3m6/Ka8CWCeNvMRpLNxV/pZT86URrSGhiYS0 lTII8keIqc+jesnBjZBTkXiVYRhUJIvMFkAQvbS2gRBzcMFSh3pV0ELZWIbwuweQX/g+ E2Vw== X-Received: by 10.112.63.165 with SMTP id h5mr18962128lbs.16.1428427361102; Tue, 07 Apr 2015 10:22:41 -0700 (PDT) Original-Received: by 10.25.150.131 with HTTP; Tue, 7 Apr 2015 10:22:41 -0700 (PDT) In-Reply-To: <21796.1453.613891.252869@retriever.mtv.corp.google.com> X-Google-Sender-Auth: TFLPc75B2C2QN4Z8oFw2GKaXo4o X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185096 Archived-At: I just did the following and I don't get any prompt. ln -s file1 file2 emacs -q M-x find-file file2 But if `file1' is a version controled file, then I do get the prompt (asRasmus explained). I think I'll do 2 things about this: 1. Read the contents of the file before visiting it, so if it already contains `package-initialize' we don't need to visit it at all. This will get rid of this prompt for users who version control their init file. 2. Do this visiting thing during package-initialize instead of during package-install, this way it should only happen once per session (unless the user manually initializes again, which is not a big issue). This way, if another unexpected corner case like this shows up, the user won't get faced with the problem 28 times in a row. Another possibility I've been considering would be to let go of this solution and switch to the second solution initially proposed on the other thread (checking a file or an enviroment variable to decide whether to package-initialize at startup or not). 2015-04-07 17:28 GMT+01:00 T.V Raman : > Simple way to repro: create symlink foo to file bar, then find-file > foo you'll see the dialog/prompt I'm talking about. > -- > > --