From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#56110: 27+; switching from line-mode to char-mode Date: Sat, 25 Jun 2022 14:17:53 +0200 Message-ID: <87wnd5aqdq.fsf@web.de> References: <875ykvs9gq.fsf@electra.home.arpa> <87wndaw84w.fsf@web.de> <87sfnyw6m7.fsf@web.de> <877d58obnn.fsf@web.de> <87k097mi81.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22189"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: "C. Michailidis" , 56110@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 25 14:21:59 2022 Return-path: Envelope-to: geb-bug-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 1o54nX-0005WN-6S for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Jun 2022 14:21:59 +0200 Original-Received: from localhost ([::1]:38938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o54nW-0005jE-4V for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Jun 2022 08:21:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o54kg-0003ve-4J for bug-gnu-emacs@gnu.org; Sat, 25 Jun 2022 08:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50433) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o54kf-00023P-SO for bug-gnu-emacs@gnu.org; Sat, 25 Jun 2022 08:19:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o54kf-0000fQ-OQ for bug-gnu-emacs@gnu.org; Sat, 25 Jun 2022 08:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jun 2022 12:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56110 X-GNU-PR-Package: emacs Original-Received: via spool by 56110-submit@debbugs.gnu.org id=B56110.16561594862494 (code B ref 56110); Sat, 25 Jun 2022 12:19:01 +0000 Original-Received: (at 56110) by debbugs.gnu.org; 25 Jun 2022 12:18:06 +0000 Original-Received: from localhost ([127.0.0.1]:44330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o54jl-0000eA-VI for submit@debbugs.gnu.org; Sat, 25 Jun 2022 08:18:06 -0400 Original-Received: from mout.web.de ([212.227.17.12]:56755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o54jj-0000dg-VI for 56110@debbugs.gnu.org; Sat, 25 Jun 2022 08:18:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1656159474; bh=mbFE46ljd07dcLpiKAs5YSqF+rhm3GP19qGhmnVCxTw=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=OPq0e560OAigdkCiy/yaTzFOgrRlSt3ZJhaiknFrQUMUUiHyIxx1kiomZsB7alNyg WyU5N3cw82ucZlt0B+GC7j8DirPBNHP7fEzAHf/aB1v7ZpgDdhvvGVONGP0rNsNQkL 0g5J2jJriEhphX/R0ypoI9VVSMwTZepG3v2X/nWU= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([88.66.201.45]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N3ouw-1neR3y1TUm-0108j9; Sat, 25 Jun 2022 14:17:54 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 23 Jun 2022 17:45:55 -0400") X-Provags-ID: V03:K1:2AjbnqWYuQ3kaVS1Y7XU49MGSZ8NVK05SlADtgy1d7jJPvv8Elb P8HU9NtwR+kOPx+PDoLbvsYpsmjzmHhezKWqr8AAri6tNPEfgBrUY2hr5vrO5IA9hMQiGdt QU65rQzUD/PRG7eMPs75AdaXytoloMtfKmZFuq6HUY+DGQHFMNXZP704AB8NsZiQHwhhepi hHL/dtgWK+Vsdpb6+REEg== X-UI-Out-Filterresults: notjunk:1;V03:K0:YGDRpC5dsBk=:LDDkAgkrCWE7K9kAuqsmR+ aueiAs9lTn+kqzquAa+uzUVXpRXff3owR3fnnwbT15iWic/BPmSOS7fKI4LXczx1uafPHfgjw sEXNF3ZoWlQ5WLmAXTne6+WqHZDY5obf7/gIeo6mqG12hGrOJ2JQX8SXY8lZtwPWmuX0j3hYf 4KCPlQ7kMsX1ljfuP+49wa1+pwf6E5SpOm3sQM80hQld7FThlf72mnuCGs04NXBzR5expFTFI 5GW5imetJbRcGkpFcGtjwNTK8V+hIIzVW2H7RhdbBL+RVBRyNg9TaLi7H+qOMKfU/8k1NsYfE 6tlV5n7dQYAVKkz3oU2/aqx5MVoxcEad8V/zTed4h0ooBor+XQxvmndkPrfgjL6s/DBXhMbUm tAIdlNkNzb4THnBEZLmfgMIyesW4RBpNgqK0TFvQ7HxJ0zsF7vYNLXgqU/FEjnqAfCd9vpHWy 8un0hQAztqMBra1c4EMdeyexHUSEfnIyp3QDki0aPlcnH+8AXeOja2xgR0u2WC2l55JiNK92f PEmHusFqQKtC90FwZFI9sNR/7bcfhmapofmT6C6dRFys+bNn+6MCqqM8XX5tavBhQ4LuQkvTx 8uDJutfcr993R03fbSKK5GhzvK5QgcP8MNKYeQzJKJ0g68TZoxgrLv0oV1SSFcldcZkNcNBDt 7+bDgSaH2OtO/6zjW85g1xzWfZCEAZX1t1BWslpNB06V7Gzz8Ep3Ovb9h2/FTho8s6SUPSfyz tL+1uQP+J4XQCaKMMQbM8N4Fo27M1IdZpEPffFIFrp4DhJ0gh53u8YjD26B9EK5FNbbVMegE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:235256 Archived-At: Stefan Monnier writes: > So you prefer taking the risk that such a thing happens at some point in > the future, or that someone copies this code without knowing what were > your assumptions? > > Personally, I prefer using `add/remove-function` and stop worrying about > those risks. After all, that's part of the reason why I developed them. I must admit I don't understand. First: Don't buffer local variables come with the same problem? Second: When somebody changes a binding using `add/remove-function` with a scope limited to the scope of my `let', we have no problem. So let's assume a global scope is wanted. Then that somebody still has to figure out what exactly to add-function to, and if the currently seen value is not the global one, or what the scope of the currently seen binding is. Bindings can be local or buffer local. Then one has to figure out if the binding (variable), or the value is to be modified. You yourself got it wrong in this case. So using `add/remove-function` is still absolutely nontrivial if I used `add-function' instead of `let'. Finally, what about variables that can be bound to functions but also other types like strings? You can't use `add-function' on them, right? TIA, Michael.