From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Douglas Lewan Newsgroups: gmane.emacs.help Subject: Re: wrong type error in local variables Date: Thu, 2 Jul 2020 21:40:16 -0400 Message-ID: <7fa40d4a-f713-9771-a7ed-8cb83e24bf59@gmail.com> References: <8270ebe2-8e9d-2bf9-fa1c-b6e968aabe5a@gmail.com> <878sg1ri0f.fsf@ebih.ebihd> <877dvlpf83.fsf@ebih.ebihd> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37234"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 To: Emanuel Berg , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 03 03:40:47 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jrAh5-0009cL-8h for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 03 Jul 2020 03:40:47 +0200 Original-Received: from localhost ([::1]:58754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrAh4-0001WA-87 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 02 Jul 2020 21:40:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrAgi-0001Ub-6V for help-gnu-emacs@gnu.org; Thu, 02 Jul 2020 21:40:24 -0400 Original-Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]:38980) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrAgg-0001TB-KC for help-gnu-emacs@gnu.org; Thu, 02 Jul 2020 21:40:23 -0400 Original-Received: by mail-qt1-x829.google.com with SMTP id o38so22853212qtf.6 for ; Thu, 02 Jul 2020 18:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=Hy003LUY545SIg5NNGIIGyUggz/rODf8/GMZFPfmJLk=; b=j4XkPTy82mq3pjW3n8a1ciHIfZs5vV7/mLiZl+euMsLylzYDCe1hn7RxO1vdbGH/e8 CevRQDX00lJnsBhQdjBhpdF5ixfq1QurK8EgIo97rrHzoqy3sPhKwpo6cX/vuzgJh57c F6WXmnQlXrEYf3QLspIA9HJncwOHcYcvjaZ3e/4HxsQdmJ5b86uia29/zvvc23BKtT4r 6PWDVv0bB7jhXECsIMtC96SfmMEQwqjX+l6v8n5hxXZII+yPdlNy9VNz9KjnFPQnsR/L 4tkzuCU5zuVSzGzrclV32Nqt86khxEIpNgMmyBxu1CdOZ3D2+nyNfuyVbFb9WT8lv/eW rBpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Hy003LUY545SIg5NNGIIGyUggz/rODf8/GMZFPfmJLk=; b=PgeMQ8lWmtZ9OLw/9WWvOyM5lKxiAYf7urDtd+mw/r5zOHdQ3dPFyv8cbRD8dKut5U akIkgj9PeVVNXZ1KkPISEv+WpJg81TIry6EeaWziV1L7pIamuvgGtS3grtPXNhbkKKl8 Bz7yF0AAqqyBMC5i/QXCNoCEKpBDFHvRWoPA/QvGI46d3VddhegrQ3qAYHKFuIU8ttPQ qAfNRcf/o0/m6N+pR0Xts/berHBU6vY2lnUq+TZ93yKSl3+HZg0tnB2W5gpHbmEOdJpR b+7k1cXkZ16NdW9yDLsr/6rQSurQ8LwX8ghLvQx3phVSZoosmMyLj7KHMvd2F+az7MQC 1TKg== X-Gm-Message-State: AOAM533hbeK3/H+oQF6VU6RsX9FOTZ7dSCoe24VIa+NRJL8+ab+Pn+mq CKNAOnRHcS31wsdlAGU8malZgNA= X-Google-Smtp-Source: ABdhPJyarPCLP05tjwL1Bvjiit8cmRpWhpk8/xq0nsfDyTBR0CHuZuSfthhgmuhSk4JFfO16doE5Fg== X-Received: by 2002:ac8:3981:: with SMTP id v1mr33976147qte.134.1593740421089; Thu, 02 Jul 2020 18:40:21 -0700 (PDT) Original-Received: from [192.168.43.104] ([172.58.236.18]) by smtp.gmail.com with ESMTPSA id j7sm9912427qtd.53.2020.07.02.18.40.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jul 2020 18:40:19 -0700 (PDT) In-Reply-To: <877dvlpf83.fsf@ebih.ebihd> Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::829; envelope-from=d.lewan2000@gmail.com; helo=mail-qt1-x829.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:123481 Archived-At: On 7/2/20 9:19 PM, Emanuel Berg via Users list for the GNU Emacs text editor wrote: > Stefan Monnier wrote: > >>>> `find-file` should not be called from Elisp. >>>> Use `find-file-noselect` instead. >>> Oups, if so I have 15 changes to make. Why doesn't >>> the byte compiler say this? >> Because noone has added the annotation for it yet >> (tho there are various comments in the code that >> say so). > Okay, but what exactly is the problem with it, > from Lisp? > The problem is that it changes the buffer. If a (find-file) fails and you were depending on the change of the current buffer all kinds of other things might go wrong. If you use (find-file-noselect), then the current buffer doesn't change and any attempt to use that buffer would fail. In particular, you should be verifying that the (find-file-noselect) succeeded. -- ,Doug d.lewan2000@gmail.com (908) 720 7908 If this is what winning looks like, I'd hate to see what losing is.