From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Branham Newsgroups: gmane.emacs.bugs Subject: bug#33695: 27.0.50; which-function reports wrong imenu information Date: Wed, 12 Dec 2018 16:53:59 -0600 Message-ID: <87o99qcq60.fsf@gmail.com> References: <87tvjlmcoe.fsf@gmail.com> <5C0F76BC.6080001@gmx.at> <87mupcm8vd.fsf@gmail.com> <5C10C76D.2090702@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1544655194 20913 195.159.176.226 (12 Dec 2018 22:53:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Dec 2018 22:53:14 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: 33695@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 12 23:53:10 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gXDNM-0005IP-0g for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Dec 2018 23:53:08 +0100 Original-Received: from localhost ([::1]:49333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXDPS-0006cW-TX for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Dec 2018 17:55:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXDPN-0006c8-4S for bug-gnu-emacs@gnu.org; Wed, 12 Dec 2018 17:55:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXDPI-0003Bf-6d for bug-gnu-emacs@gnu.org; Wed, 12 Dec 2018 17:55:13 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41356) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gXDPC-00037r-IG for bug-gnu-emacs@gnu.org; Wed, 12 Dec 2018 17:55:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gXDPC-0007vH-ES for bug-gnu-emacs@gnu.org; Wed, 12 Dec 2018 17:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Dec 2018 22:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33695 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33695-submit@debbugs.gnu.org id=B33695.154465525030384 (code B ref 33695); Wed, 12 Dec 2018 22:55:02 +0000 Original-Received: (at 33695) by debbugs.gnu.org; 12 Dec 2018 22:54:10 +0000 Original-Received: from localhost ([127.0.0.1]:45614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gXDOM-0007tz-2Z for submit@debbugs.gnu.org; Wed, 12 Dec 2018 17:54:10 -0500 Original-Received: from mail-oi1-f177.google.com ([209.85.167.177]:38728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gXDOK-0007tj-Ac for 33695@debbugs.gnu.org; Wed, 12 Dec 2018 17:54:08 -0500 Original-Received: by mail-oi1-f177.google.com with SMTP id a77so83118oii.5 for <33695@debbugs.gnu.org>; Wed, 12 Dec 2018 14:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=xcqqSGqXNGVmfxQw/mjDXYfoGb89YKG3FrMIZkviXR0=; b=trS3m5aQVDH/eDVSkaN7VubKBUfvHy5HAEKspUb+BF1kPGCYm2ITTBPmDeP47eq1GX OUER4hQAEkSE0XxKE45TDc1hATZmY7knqBS/G2n/bCo8AjA627wVHEvRv+Utsgtsak2x aw5yzQO22PEAHwuTirYsJnkm48jYLugdTD+5pgPuDcpRu+Hd+PJ6DWEb9liF64Ti+qn3 uDTz5opt2v/Z9gmbuA4sFESYcg7GLGr4Woslr7p6Ni/5DTol+VYx08ZlMbixOqM0PCP4 JCWeI8xOcCfRJ9/WJ7tbdk+MhFosxljCKVCQRK5YrO6Kpy10KBn4dOInqOOfTJq2x8uz 67OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=xcqqSGqXNGVmfxQw/mjDXYfoGb89YKG3FrMIZkviXR0=; b=ULW4D63HgI4k0Vgw+hOg9/12au/1mufgm9JYZyQR8hv2AIhq676vGtM2XWSYK94dK7 BrsA3zOd8FWZHXeQkXORqeqKY2640tvMdfvQI63EIZpCq9nPqP4qwIbdJomICzku9fH7 9gxMYGeySqW63jgWk3wwZKHreOLd9HnnDD2M8LVFVTfxpoBW3dtKeIDplBL8tSj8vSCc EQXyoQny9K4bacr0pQ3/HF/LuPSTBY9aYpYTxKyC/OjSBHYkLX10b8cv6XiBmi8oxON8 3A+lume1IKXCtv9eJhF7RYEGDSHbh9uL80JBXdyMx/mJ6jxIQKIpKd0KgF9rE+A0L/Qx FZhQ== X-Gm-Message-State: AA+aEWbvbYOSWjTpsJINOM0HbKrBaIQZpxxIIi8VSmEXcekosEio79Ud xCi/EPM36LjF56AmdFXWXu8aiZop X-Google-Smtp-Source: AFSGD/X03kLsvtjsAC0qEIhu2Q5D84JNqJJblOkMzh3X6fAu6K5qy28sEq5HVa7iJQcuzNaS7T92aQ== X-Received: by 2002:aca:5406:: with SMTP id i6mr1589290oib.344.1544655242289; Wed, 12 Dec 2018 14:54:02 -0800 (PST) Original-Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id t21sm39840otq.67.2018.12.12.14.54.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Dec 2018 14:54:01 -0800 (PST) In-reply-to: <5C10C76D.2090702@gmx.at> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153390 Archived-At: On Wed 12 Dec 2018 at 02:31, martin rudalics wrote: >> Thanks for the reply. This seems to work well, though I haven't tried it >> in an enormous buffer. > > Maybe we should make it optional so people on slower machines have the > choice. I have no opinion because I don't use 'which-func-mode' hence > people who do should chime in. > > For me the idea of calculating all function position in a buffer and > afterwards have 'which-func-mode' scan them to find out which function > point is in, strikes me as enormous over-kill. In particular with > 'syntax-ppss' around which usually should, without any additional > cost, provide the position where the current functions starts via the > 9th element of its return value. But don't let these rantings > distract you. That won't help with non-lispy languages like R or python though, I don't think. Perhaps we should reverse the order of what which-function checks? It currently looks at: 1. which-func-functions 2. imenu--index-alist 3. add-log-current-defun but we could switch those last two. add-log-current-defun should be faster than reconstructing imenu--index-alist. Alex