From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Verifying tags in the wrong file Date: Wed, 9 Nov 2022 12:46:58 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f655b905ed083899" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5959"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 09 12:48:43 2022 Return-path: Envelope-to: ged-emacs-devel@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 1osjZS-0001QI-VP for ged-emacs-devel@m.gmane-mx.org; Wed, 09 Nov 2022 12:48:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osjYV-0003EQ-Rc; Wed, 09 Nov 2022 06:47:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osjYR-0003EA-6e for emacs-devel@gnu.org; Wed, 09 Nov 2022 06:47:40 -0500 Original-Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osjYP-0005Sw-4Z for emacs-devel@gnu.org; Wed, 09 Nov 2022 06:47:38 -0500 Original-Received: by mail-ej1-x634.google.com with SMTP id f5so45970016ejc.5 for ; Wed, 09 Nov 2022 03:47:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=xxAwwk0T8l4grhrTZQioKmrwSl86SoXnWZr4Cd9OJow=; b=JZw/nF6LGAw/VW/Uu8hJNzyuTZa+1qFAtZBOEftdHoUkf6lL8RLqY+jIN+QG8saBX2 n9sf6R3ntq3bJAtYi+T/NfTCaxuv/klOkUAsj/NL8LHNI4GwnYmkJhEEJOGU82Ok+ZZP x4N4Ev4tYyIYdHACXL35lQNIjkNN00oUT6HvcRX39TTJPGzTuSKZLVdIh3/yT4hFiKVw 2kb3VAaOUY9Gtz5dy6bO/zNdas31P5bMKBG0nmBIEfNB4TZBrfIx01TliVhRlQMQ9P5T PZ0TJKLmjVambj9Z2DShMfJD8g1A2TqgjCpmGW72yY51vvcHqKE0HY8oJtSSsWWoSJoL LEtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=xxAwwk0T8l4grhrTZQioKmrwSl86SoXnWZr4Cd9OJow=; b=OaPUvd33LNKE+MgzYv83qd9tfTXea51ouTIxnA//BUAcI4m5ZyJCN8zHuUNIXPRSaP 7M1ilR+ah30T/lRv5uXa3+abn/tI36H3ZWl1abVaNLuHC/60SG5iS1vga9Pi/dz1TpCM fC87AtZHxOu7kHGTcaE5xQlavR5TAT4Ltoo3s2AIV4Ur7C1kUE+Y+l4WoNRRSqJH80vU EUUpJ8przUf9gRx5u7jmmgjAb6Nfoo2m5LK1zYyV+IxVvdAquC71KdJniqn6xDdWO9Si odrV2w1W2ADXGYDkAnr+TMpl/oFpU9fbr7YFFLCi+CTN4X4w3YaslpggzdPfncARmSme 4SJw== X-Gm-Message-State: ACrzQf2bCbj6KHZjc5oS63jO45Nn4ZRDV4A6DcrslS5n2XbvAHskMhzx FZvQvRzMqQtzih0a7Ruc69fw9fE5j9m9V0uZ1nBBj+xNbVQ= X-Google-Smtp-Source: AMsMyM5FTOMoT+0E1yqSBbejVjvlZt30kt7hKggzWAwJqRYXwbMc2SU4/J3jSmkmMaFSLQMFehdYfTU6SPJucFFYyzs= X-Received: by 2002:a17:907:a02:b0:7ac:9a51:3403 with SMTP id bb2-20020a1709070a0200b007ac9a513403mr57714070ejc.220.1667994454740; Wed, 09 Nov 2022 03:47:34 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=lekktu@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299398 Archived-At: --000000000000f655b905ed083899 Content-Type: text/plain; charset="UTF-8" M-x load-library etags M-: (tags-verify-table "any-file-not-tags") It returns nil and leaves behind a buffer visiting the file, in Tags Table mode. Not nice, but more or less as expected. Not a bug. However, if you verify a (no tags) file already being visited in a buffer, it returns nil and *leaves* the buffer in Tags Table mode! Well, you'll say, "don't do that". Ok, except that you can do it by accident, for example if you're using bs-show and happen to type "t" in the wrong line. Which, arguably, could be fixed in bs (though I think it's a bug in etags.el, not bs.el), except that I don't think there's a tags-table-buffer-p or equivalent to check that the buffer contains a Tags Table. The way to test it seems to be `tags-verify-table'... --000000000000f655b905ed083899 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
M-x load-library <RET> etags <RET>
M-: (tags-verif= y-table "any-file-not-tags") <RET>

It returns nil an= d leaves behind a buffer visiting the file, in Tags Table mode. Not nice, b= ut more or less as expected. Not a bug.

However, if you verify a (no= tags) file already being visited in a buffer, it returns nil and *leaves* = the buffer in Tags Table mode!

Well, you'll say, "don't= do that". Ok, except that you can do it by accident, for example if y= ou're using bs-show and happen to type "t" in the wrong line.=

Which, arguably, could be fixed in bs (though I think it's a bu= g in etags.el, not bs.el), except that I don't think there's a tags= -table-buffer-p or equivalent to check that the buffer contains a Tags Tabl= e. The way to test it seems to be `tags-verify-table'...=C2=A0

=

--000000000000f655b905ed083899--