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 22:24:49 -0400 Message-ID: References: <8270ebe2-8e9d-2bf9-fa1c-b6e968aabe5a@gmail.com> <878sg1ri0f.fsf@ebih.ebihd> <877dvlpf83.fsf@ebih.ebihd> <7fa40d4a-f713-9771-a7ed-8cb83e24bf59@gmail.com> <87zh8hnyqz.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="23324"; 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: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 03 04:25:16 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 1jrBO7-0005z7-PE for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 03 Jul 2020 04:25:15 +0200 Original-Received: from localhost ([::1]:38512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrBO6-0003xm-Qm for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 02 Jul 2020 22:25:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrBNn-0003xf-Ex for help-gnu-emacs@gnu.org; Thu, 02 Jul 2020 22:24:55 -0400 Original-Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]:38927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrBNl-0002Qs-NG for help-gnu-emacs@gnu.org; Thu, 02 Jul 2020 22:24:55 -0400 Original-Received: by mail-qk1-x733.google.com with SMTP id l6so27621628qkc.6 for ; Thu, 02 Jul 2020 19:24:53 -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=bc/nZk+mxKnNCwWZwSZO7LaKfC+vc4GKYh8YkAyBeno=; b=rilJDLBzuzDgSoNatZvNAgupMr5vQIn/puDUfmNYVnk1DT+bNxqjFDuUxC5mPYloNr RtlT4Wx1T29HMXnVGvKVrA0uNflyqgGarwgWCQ+CU0/oup0jip85dZVi18L8b8pOfsZK +cUWP3ssjuz26YDJGU/8DG9LwbZK/bi44FqEZy2ZTFeIPH6joA2sxaG5+p9nf3jav3SY 5dmZPzn4udXQbAdynVqASJ62+srTuDL+csuVgQxMA+8ZAlbrhYB58skewMYBoc9MWxiJ xOtQE/0U3poy99PR2EtBzUv6Y2C1mcsyzxzj+TDvUdcqjTkEwB8idFuKCQQtCOWamVUA wkDA== 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=bc/nZk+mxKnNCwWZwSZO7LaKfC+vc4GKYh8YkAyBeno=; b=mBAd0Ry5vRN1xgTj0D/c9aaYZxsj5q6W45oo0TdeAoLYAKGZuvvEH2PkbE173LwQyc HCJTyQxoiI5C4gS8rkBnwLLfdx2E6KvjvKUXj2EfmzrToIjKecPvsdxBmQekw/hWMwMG DWkoS3tT64LcQSiURQkZrqeEa8EGELjP9IGw5DJ/hGl8Te3UbcQR3TKBlvLEnoX8nMN6 ltHkQjfgZSe3IEyIStIyiFhoBLOKUR2PSeY5DmzO4nOb4WO5O01gYXOm5xi9xRLxBOC8 IxJvTNNw/iCDyZkjcoDD+rZkC8vYdhw97xaPSp2GLEjFKXS2xxPQXztTnxdZS9ww+dRt fNkw== X-Gm-Message-State: AOAM53375ASZT3vuKSkcMQGNC2YXCnNUzaNqeMov2+ZJjNjEuHMvZveP Iz3/SaMptdYBv3BzC/XkaytnK7E= X-Google-Smtp-Source: ABdhPJwR1G8wRBeQ1h8ZOLaSouJ0NvleiXCQBwYJ75WVHZ9jCfz7FuqhAgH7L8GPICvNcI5Es/nNrQ== X-Received: by 2002:a37:4f0e:: with SMTP id d14mr33995456qkb.8.1593743092470; Thu, 02 Jul 2020 19:24:52 -0700 (PDT) Original-Received: from [192.168.43.104] ([172.58.236.18]) by smtp.gmail.com with ESMTPSA id m7sm10018328qti.6.2020.07.02.19.24.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jul 2020 19:24:51 -0700 (PDT) In-Reply-To: <87zh8hnyqz.fsf@ebih.ebihd> Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::733; envelope-from=d.lewan2000@gmail.com; helo=mail-qk1-x733.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:123483 Archived-At: On 7/2/20 10:00 PM, Emanuel Berg via Users list for the GNU Emacs text editor wrote: > Douglas Lewan wrote: > >>> 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. > Gotcha, but then why not just have a single such > function that does the checking itself and aborts > further execution immediately after the initial, > failed attempt to find the file? Then 1 (onee) > function would be used, and with no need to > explicitely check if it succeeded? I understand. Such a solution has already been proposed here. I'm just responding to the world we currently live in. And, yes, encapsulation of such issues is a reasonable thing. -- ,Doug d.lewan2000@gmail.com (908) 720 7908 If this is what winning looks like, I'd hate to see what losing is.