From unknown Thu Sep 11 15:11:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#28645 <28645@debbugs.gnu.org> To: bug#28645 <28645@debbugs.gnu.org> Subject: Status: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer Reply-To: bug#28645 <28645@debbugs.gnu.org> Date: Thu, 11 Sep 2025 22:11:12 +0000 retitle 28645 26.0.50; semantic-ia-fast-jump jumps to a random place in buf= fer reassign 28645 emacs submitter 28645 Constantine severity 28645 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 29 09:24:22 2017 Received: (at submit) by debbugs.gnu.org; 29 Sep 2017 13:24:22 +0000 Received: from localhost ([127.0.0.1]:37774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxvHC-0003PD-JH for submit@debbugs.gnu.org; Fri, 29 Sep 2017 09:24:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxvHB-0003Oz-DE for submit@debbugs.gnu.org; Fri, 29 Sep 2017 09:24:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxvH3-0005CW-2m for submit@debbugs.gnu.org; Fri, 29 Sep 2017 09:24:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47552) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxvH2-0005CS-W1 for submit@debbugs.gnu.org; Fri, 29 Sep 2017 09:24:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxvGx-0004RG-4z for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2017 09:24:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxvGs-00059z-Ew for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2017 09:24:07 -0400 Received: from forward105o.mail.yandex.net ([37.140.190.183]:39677) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxvGs-00059R-3t for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2017 09:24:02 -0400 Received: from mxback5g.mail.yandex.net (mxback5g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:166]) by forward105o.mail.yandex.net (Yandex) with ESMTP id 3F821444314C for ; Fri, 29 Sep 2017 16:23:55 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback5g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id iOPDMhFodq-NtnqZO83; Fri, 29 Sep 2017 16:23:55 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1506691435; bh=e/dmc87thKBqMSoNZprgwzcpG4QdHzGWGcNVQKJNYtU=; h=To:From:Subject:Message-ID:Date; b=YMNc9pBzR6lOrKjHme/ZPBpY8ocPmdr6nWdP1orhdVTi84wpZ+URCttZH2LKrq22h S3oIgiZyj7raOAZ6Bv7xKa9EQwPUosKWbZtdQMp5f7/BAw4Qvtudag/fNETaJRmc2G xDGOVI0Ip441cCSPKYrns8C/p1aG6sK31uCP7r6c= Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 8k659lghOs-NsQifM0B; Fri, 29 Sep 2017 16:23:54 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1506691434; bh=e/dmc87thKBqMSoNZprgwzcpG4QdHzGWGcNVQKJNYtU=; h=To:From:Subject:Message-ID:Date; b=YdgMo3lnFcnsUHkLkCP10QWoxpKHkvvvFlOF86FLTk052mb56tILAfkaGFvbyGphq IZFtFMbhf2OTXwtySr+Eu8C0mTJ8rLXAkjZ67fyjSs9BTsmBjoah9mrjnv+Y0Kqa/x UDuLaqK9oFttMCfA4aMOrz96liAX9nsaGQXdyk3I= Authentication-Results: smtp1j.mail.yandex.net; dkim=pass header.i=@yandex.ru To: bug-gnu-emacs@gnu.org From: Constantine Subject: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer Message-ID: Date: Fri, 29 Sep 2017 16:23:54 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) When declaration is in another buffer, semantic-ia-fast-jump often jumps to this buffer, but to incorrect line. However if the declaration is in the same buffer where the command was used, it always =E2=80=94 as far as I've seen =E2=80=94 jumps to the correct line. Steps to reproduce: 1. Create the following 2 files with the following content: $ grep -n "" myfunc.h test.cpp myfunc.h:1:void myfunc1() { myfunc.h:2:} myfunc.h:3:void myfunc2() { myfunc.h:4:} test.cpp:1:#include "myfunc.h" test.cpp:2: test.cpp:3:int main() { test.cpp:4: myfunc1(); test.cpp:5: myfunc2(); test.cpp:6:} 2. Run emacs -Q test.cpp 3. Enable `M-x semantic-mode` 4. Put cursor into "myfunc2", and type `M-x semantic-ia-fast-jump` (you'll see it jumped to the correct declaration at myfunc.h file) 5. Use `C-x b RET` to switch back to test.cpp 6. Put cursor into "myfunc1", and type `M-x semantic-ia-fast-jump` Result: it jumped to "myfunc2" declaration, not to "myfunc1" as it ought = to. I also want to note that though ATM I am using emacs-git, I've seen the problem for don't remember how long, just didn't report. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 29 10:42:25 2017 Received: (at 28645) by debbugs.gnu.org; 29 Sep 2017 14:42:25 +0000 Received: from localhost ([127.0.0.1]:39373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxwUj-0005sj-Mn for submit@debbugs.gnu.org; Fri, 29 Sep 2017 10:42:25 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxwUi-0005sS-Mk for 28645@debbugs.gnu.org; Fri, 29 Sep 2017 10:42:24 -0400 Received: by mail-wm0-f65.google.com with SMTP id m127so4141wmm.0 for <28645@debbugs.gnu.org>; Fri, 29 Sep 2017 07:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:cc:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hf6msV5T/5XdOWgNw5dmK8Q4tHipcWqQI4IazpZnfHU=; b=PfxqMNiVRkXsczAqWAeZN3Ug+a9gxGpmNLsp3gfYUQDP9LoiXsWFyb4WjV+h81yyx2 wtJLXFezpoTcbzY+EBTjqQUj8fJ2rBcPwbkAhVnp96A4LfUaus/TcZYn8NM2J0k0Wf/I oBXsodBa/DOPpomcwyllHeMIh2c5NDoE5iA3nwbPsslNZW36NpQhGzCHNGEjlG+KVlrO xT7plHvHpwBtDVI0saGlS0Cye2sXnQdYbGZPmmIE9D53/SvSZA6beIzmP9RvAIfxq/vV XlscueCDXrmoL+lm02ndoR5Q13JlGIoSk1hf9GErrosdi3hj6c8sCjD/OB6wI1OuC58t MALw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:cc:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hf6msV5T/5XdOWgNw5dmK8Q4tHipcWqQI4IazpZnfHU=; b=YaQkXLE6+n7vX95aNGY/7WXVcWgabqJ6uEWtFjzsFfZ213bliD2K5Jp4jLPU/evrq5 8bk8SfzSUpVC8yJxOMmnlKC+vp5YLPyeOtuAF2QebsOTyeua+H/M6f+0hLMQMJpoa7Hw LpnxEkGK7096hVMVGthRbL7A35Md2PirQxSh9e0OyX/avJKrMHSZ3t7uxBoLJICKXt5/ A8Pee5P51R9AOP6cSVpu8C9kn41waFbjhARuiwqykhHEqKap3E5dm2CbsDaLN+QFMfOc 8jetPziHwPUBFW+tsytvdrIQ31t2AJS5D4gbgWktVYlTntVfeWfU7OFNrQWPi36tKL0I BMPA== X-Gm-Message-State: AHPjjUjfrxQnCjNRyZyqiJIN/5n2EiZ3KxoFEH84fsVkcIycTKj/zeUV 2HoCU1SQ7qkenCAWuzUoZIY= X-Google-Smtp-Source: AOwi7QDLoWdP5nEUgfDpgbrnDbeEU4b9Zph/CPaIw3sfXtito3RAeU/NGdqF9k1P/TC1bWstyL6EXA== X-Received: by 10.80.146.115 with SMTP id j48mr9701745eda.132.1506696138916; Fri, 29 Sep 2017 07:42:18 -0700 (PDT) Received: from [172.16.12.247] (netacc-gpn-104-155-153.pool.telenor.hu. [91.104.155.153]) by smtp.googlemail.com with ESMTPSA id t5sm4116548edh.32.2017.09.29.07.42.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Sep 2017 07:42:17 -0700 (PDT) Subject: Re: bug#28645: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer To: Constantine , 28645@debbugs.gnu.org References: From: Dmitry Gutov Message-ID: Date: Fri, 29 Sep 2017 16:42:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 28645 Cc: martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) On 9/29/17 3:23 PM, Constantine wrote: '> Result: it jumped to "myfunc2" declaration, not to "myfunc1" as it ought > to. > > I also want to note that though ATM I am using emacs-git, I've seen the > problem for don't remember how long, just didn't report. Thanks for the report. You appear to have fallen victim of our windowing improvements. I'm not sure this is the correct fix (Martin?), but here's a patch that seems to correct the behavior. diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el index d4201fcf51..0692d03aca 100644 --- a/lisp/cedet/semantic/ia.el +++ b/lisp/cedet/semantic/ia.el @@ -322,7 +322,8 @@ semantic-ia--fast-jump-helper (semantic-go-to-tag dest) ;; 3) go-to-tag doesn't switch the buffer in the current window, ;; so it is like find-file-noselect. Bring it forward. - (switch-to-buffer (current-buffer)) + (let (switch-to-buffer-preserve-window-point) + (switch-to-buffer (current-buffer))) ;; 4) Fancy pulsing. (pulse-momentary-highlight-one-line (point)) ) From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 29 10:57:21 2017 Received: (at 28645) by debbugs.gnu.org; 29 Sep 2017 14:57:21 +0000 Received: from localhost ([127.0.0.1]:39383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxwjB-0006G7-8C for submit@debbugs.gnu.org; Fri, 29 Sep 2017 10:57:21 -0400 Received: from forward100j.mail.yandex.net ([5.45.198.240]:44506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxwj8-0006Fq-Ht for 28645@debbugs.gnu.org; Fri, 29 Sep 2017 10:57:19 -0400 Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward100j.mail.yandex.net (Yandex) with ESMTP id 5C51C5D85928 for <28645@debbugs.gnu.org>; Fri, 29 Sep 2017 17:57:12 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id lvEZxgDp0Z-vCR4DEnc; Fri, 29 Sep 2017 17:57:12 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1506697032; bh=UmhS/aNE1GMuhYcJ44ywOfDC/lri1KRS+56Ah4hw7g0=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=HhQ+5a4S54nfPKUySqxtxcD6CJ8yFvC5thY3c+9QBoO3RB/h3Hn07x1bTnYeqVCAV htVRwwLIb+GnBo0CGJal2V/vK0eFJISlJnFDchTQsGfxiQ0E/fhurHQzW9zi2b3nzI AZ3U0HrTh+kC8tO4AgS71oxk4IX0nEIb/b52pGQ8= Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id qypCasZ6zg-vBAGfmvg; Fri, 29 Sep 2017 17:57:11 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1506697031; bh=UmhS/aNE1GMuhYcJ44ywOfDC/lri1KRS+56Ah4hw7g0=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=oXSZdvfmTS+pmgQnWfp4hzJ2FTmrkrnt/pks2CQY7BfIrZIxtK2ecl0tYPXb4WUBq Y8f8BQ8GdvXzmqbSvpq7l5LX3STsJzqHn5mm9meCSX3L6QeXFe/epwJPFMS7x0RSMh dlkDiyPtuObxnHKtf7XTuSbfcoqQpaBbzxHPQwu4= Authentication-Results: smtp1p.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: bug#28645: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer To: Dmitry Gutov , 28645@debbugs.gnu.org References: From: Constantine Message-ID: <9220e4cf-132b-1ee0-4395-006ee1e79f64@yandex.ru> Date: Fri, 29 Sep 2017 17:57:11 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: ru-RU Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28645 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 29.09.2017 17:42, Dmitry Gutov wrote: > On 9/29/17 3:23 PM, Constantine wrote: > '> Result: it jumped to "myfunc2" declaration, not to "myfunc1" as it ought >> to. >> >> I also want to note that though ATM I am using emacs-git, I've seen the >> problem for don't remember how long, just didn't report. > > Thanks for the report. You appear to have fallen victim of our windowing > improvements. I'm not sure this is the correct fix (Martin?), but here's > a patch that seems to correct the behavior. > > diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el > index d4201fcf51..0692d03aca 100644 > --- a/lisp/cedet/semantic/ia.el > +++ b/lisp/cedet/semantic/ia.el > @@ -322,7 +322,8 @@ semantic-ia--fast-jump-helper >    (semantic-go-to-tag dest) >    ;; 3) go-to-tag doesn't switch the buffer in the current window, >    ;;    so it is like find-file-noselect.  Bring it forward. > -  (switch-to-buffer (current-buffer)) > +  (let (switch-to-buffer-preserve-window-point) > +    (switch-to-buffer (current-buffer))) >    ;; 4) Fancy pulsing. >    (pulse-momentary-highlight-one-line (point)) >    ) Yay, thank you, works for me! Tested-by: Constantine Kharlamov From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 29 14:18:16 2017 Received: (at 28645) by debbugs.gnu.org; 29 Sep 2017 18:18:16 +0000 Received: from localhost ([127.0.0.1]:39583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxzrc-00072E-ET for submit@debbugs.gnu.org; Fri, 29 Sep 2017 14:18:16 -0400 Received: from mout.gmx.net ([212.227.15.15]:64763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxzra-000720-GA for 28645@debbugs.gnu.org; Fri, 29 Sep 2017 14:18:15 -0400 Received: from [192.168.1.100] ([46.125.249.81]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Ltqb7-1dF8aA3nkL-0119h4; Fri, 29 Sep 2017 20:18:08 +0200 Message-ID: <59CE8E5D.2040107@gmx.at> Date: Fri, 29 Sep 2017 20:18:05 +0200 From: martin rudalics MIME-Version: 1.0 To: Dmitry Gutov , Constantine , 28645@debbugs.gnu.org Subject: Re: bug#28645: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ogQhiLQmCceuDb3V1hsVpfQcNmAwIPopqG3XiVKH3h8fw05QmHA +X4ib7rDiu3Ydfw9bInhRt0vb+mCFIIHEIRmV3C6RjhGpYY1+BBqAN+6fPGSfTlzzOc4cSw M0HslkwrVw6Foigd8+kIfJC7ssPpXXfRadp2VWARkZ+9hC6x0TTIN+wUlTuwjYU0+/WSJRS O3D3EwTTgWOBZIBN0D+WQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:baHmbHZFzb8=:bxzx4TvSXoWDMMF5BnI5LH 0Gkd+gYZDbiuwt4hWWVqTbCq1ocGOBSBc6boQHFDJBgSpTxKZ3rHtN/BkDD0r5ez3fs7vxUk7 b4LEbnCw1k+f4BS0g3zRrtCOLYO4uITyJ6EjWSzEv3kOo/JBwLfJyTZKDrcpjKFXeUmSn0tMO ebkRpwqXoaBZ6fn1F20zLx8qaZsQ0k/dKT1DZKrRgggzCqERJlUpSf9QeNvb3kIvk+iuowGzO 1Q1Ic8vtOvrR1XJrkU2CglhGxIGlpl9Z1dDqe4IDYFbRpRLeBNoGhhJugk63bA+t/jkAh9oS4 V9K59nCDOrO9hNtehDmJD7WP+Xw99EMPwEbFDhyu/Sn9XP42r0g/3wxypL4kgC4+GgaMACBge cDd1dLLKA2MycMsWF6THMoyYamwVUXla5Cvq/+wqc73fFWPFSkUwEVrv+MG+z7C2vmA8bBzDn nfBiaqeYTcdOO96sljfhVB1SoCDH+pWYVOax+1gI5t0iRyiRKr23LKZbiGCoLNZeJHZ7pgIRB /7f5Mr2YP+z8nV0p8NW0WYwXzoq4rv60mvvJZXBpxqcJeEJzMddwWMz6rOoYQ6s/I9IaHv2pf 8WsrCXiGHcYBCemqazDiRZQk+Lie4RynjjInprFPOZVzhduvm9Zw4f/4ZI2DfILToHMdNp6Ci PCoPtIBKd6lgj2FlxR/947MS/FGlGJ01rYNnp4H4XmIZbyCkH+2VnpfFi1Ohg9a7+puVzUz3X 6o16IhD4IJQtO+BWXoLnSBaKA9qc8RHpKUI4QiWNfEGWfgL709zfV0x+yx3pB4zv+NXeFXtdf WJ+C24p9DcHxLJ5jz9/CBide8AQeLLZ1tVDm+CM4upAKOeipJ3NpYG0rxowyQji9F/CviB3 X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 28645 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) > + (let (switch-to-buffer-preserve-window-point) > + (switch-to-buffer (current-buffer))) I think (pop-to-buffer-same-window (current-buffer)) should be used instead. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 30 10:19:48 2017 Received: (at 28645-done) by debbugs.gnu.org; 30 Sep 2017 14:19:48 +0000 Received: from localhost ([127.0.0.1]:41270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyIcM-0004n3-S9 for submit@debbugs.gnu.org; Sat, 30 Sep 2017 10:19:48 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:48388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyIcL-0004mr-OK for 28645-done@debbugs.gnu.org; Sat, 30 Sep 2017 10:19:46 -0400 Received: by mail-wm0-f50.google.com with SMTP id i82so1555040wmd.3 for <28645-done@debbugs.gnu.org>; Sat, 30 Sep 2017 07:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=U4VAL7TGBPSKS2sHlqsi8CD0ID5IPF/SSQdhKRPkMAg=; b=EFyN0SRSJ/NMgudsd0S4LlmxbO6Yrl8Ur1vc5JOPy/wmJdMZKm12npY73KAkJg7Bgv bzd04gHbfL+KTaiPOebZNvWd76MqgmZZ6ebeZmm/nyA5++UxTH7WeX59HqE/g9MmMBl/ g6mIkpAROQqBgjCDMHLgPNKRTkBukLWFrpIoqIuae7riLYhXV4/bmIQ1Dy6uSqvixkq4 1scQovzRsrEX1r0S+8kgcUfcJB4qgFm8LjEFKi2mpZldngR3RugRrJMslszbIllbVrrz PQ0yPo8YILLMDgfgLswJUzt4KAYdR167SnUWr6pKjaBQCKO3PRGy+KcxHCY1pjcWwiwx Yi+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=U4VAL7TGBPSKS2sHlqsi8CD0ID5IPF/SSQdhKRPkMAg=; b=fC9AGBrI6K81jCrSmmTz2g489289FX4i/0wMJENyBKV25WGD3H6bgo1E4hy4E21FHD HWQMVcNZmnFj+ZD4PlUU1zVSzrO8F7Yykrvl/+rZU+dZeVrKcDz9QO+iK1OyZD3sEJyr JVWhl+FAC4ANrwxScY725vswkhEkDr+wERMNoeaSvyr1r6FmTE8oBbG2f3ucSGlMQLEl jAiDa9ElD8gD4vOMFyDLHch1BzBkFqsFdwEPagBBuXsHpmU8tbq1N50w5xJs68INUgHx OmLEhKZ6BSCv1krkhPx1dmtYtfnTTzz5RVZfuSCZEgUgmbq+1KxeyaBkdyFeALxJSce+ KD2Q== X-Gm-Message-State: AHPjjUg92UhUkIGSxW0hQV5AlPCdkJyh12fmiXX8djjzqkEm998ywIc7 pjtTcb8oISKpajzgnlqXJ7UbvYzh X-Google-Smtp-Source: AOwi7QDB0HnY3VVdqfGBsGXRjxBSDS8miTXLrPlJzaWY26OJl7VMq4M9hjRqvYOBLGHK91XueC+CJA== X-Received: by 10.80.221.71 with SMTP id u7mr13738684edk.86.1506781179760; Sat, 30 Sep 2017 07:19:39 -0700 (PDT) Received: from [172.16.12.247] ([91.83.237.188]) by smtp.googlemail.com with ESMTPSA id 23sm4871319edx.8.2017.09.30.07.19.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Sep 2017 07:19:39 -0700 (PDT) Subject: Re: bug#28645: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer To: martin rudalics , Constantine , 28645-done@debbugs.gnu.org References: <59CE8E5D.2040107@gmx.at> From: Dmitry Gutov Message-ID: <49403a5a-e589-f534-053c-7bde79f0de8d@yandex.ru> Date: Sat, 30 Sep 2017 16:19:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 MIME-Version: 1.0 In-Reply-To: <59CE8E5D.2040107@gmx.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 28645-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) On 9/29/17 8:18 PM, martin rudalics wrote: > > +  (let (switch-to-buffer-preserve-window-point) > > +    (switch-to-buffer (current-buffer))) > > I think (pop-to-buffer-same-window (current-buffer)) should be used > instead. Done. Thanks all! From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 05:41:11 2017 Received: (at 28645) by debbugs.gnu.org; 3 Oct 2017 09:41:11 +0000 Received: from localhost ([127.0.0.1]:45197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzJhO-0001KY-MB for submit@debbugs.gnu.org; Tue, 03 Oct 2017 05:41:10 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:44778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzJhN-0001KK-HM for 28645@debbugs.gnu.org; Tue, 03 Oct 2017 05:41:09 -0400 Received: by mail-wm0-f45.google.com with SMTP id 196so5377334wma.1 for <28645@debbugs.gnu.org>; Tue, 03 Oct 2017 02:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:in-reply-to:message-id:user-agent :mime-version; bh=h9Zz27tNsgNp3FZsqh+S0m7pgWVkK2pUwqznEehVR4M=; b=imCbYZLdT+x8U0zDvmpv7ntDp9nQ5tT2eJQSH4RsjCh+iS28dSZIFRvDKGN6Gr8tGs R0ebWfD3tNGJ3WKXaSDX0kPRmVwBBLJrcTlouaQ9s1bqMPwMgubd+HkVKEhenB/iNkCz jJOXc7mpF85NSn/yzMB1SYeAEF9MkDi/ftzQKHBYX/eJUukBQy5nzJfZQp+tfUrFjmGI 7MOaD+guyN/WC6PtvrhwJIluBsQBCQA8hZ/va1cQ/s94DkA3on2hgoKM81ovCTM/UCWm 6QOmpvbG5g2V5XJnBERbL7vlHllHGdD4HgR3EY2aW+06yhZcefTc56jP5GHxRTfqJuax 2sJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:in-reply-to:message-id :user-agent:mime-version; bh=h9Zz27tNsgNp3FZsqh+S0m7pgWVkK2pUwqznEehVR4M=; b=kSByv+0KbiA6P1Zr4L7pzs+2UL77QE9AS6rddXmuq+2Vp+ZLmrZLNfKBBgnaRycXZt UsgupSowgt3+CyLMuAUiBgwg9xu0jBcfaAzW10c7IxMTLAXqJXmK5QP1uqOBaMgTMQMT A5KQ81B0jYnRTmaei6jA2wFcll2CGK6grDSeb6KGWfP+jxDvdYRIvfDouvx8u5DTLaxk oOKarinK0qqECTB0WYZBMrd6uz4S92kmoYWwcqpKVcnguD1R1xtedbu3w+CK5kDOndA/ xk20xjlWINovtnUzZ3qUOFxXTKYxURoh623swRLM1CIiKzC2H//S2pU/b5YNIjZ8+TT/ M2UQ== X-Gm-Message-State: AMCzsaUz9c11DTS5MlK3hZ6mxsc0FkymQvPbjb/PRtgnkjc7Vs5GQaKM liD0RfmmL1Ey2gS+eZgs1Gc= X-Google-Smtp-Source: AOwi7QCz7pJT22fPzdWWrGumaRDdYxC2biC6VcgNMkEgc0tt7c0Biq+ASapHgTLxsZTcPQlwJ1Zneg== X-Received: by 10.28.170.9 with SMTP id t9mr3681702wme.148.1507023663770; Tue, 03 Oct 2017 02:41:03 -0700 (PDT) Received: from bastian-desktop.gmail.com (b2b-130-180-23-226.unitymedia.biz. [130.180.23.226]) by smtp.gmail.com with ESMTPSA id 5sm7569925wrb.9.2017.10.03.02.41.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Oct 2017 02:41:02 -0700 (PDT) From: Bastian Beischer To: bug#28645 <28645@debbugs.gnu.org> Subject: Re: Status: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer Date: Tue, 03 Oct 2017 11:40:58 +0200 In-Reply-To: bug's message of "Tue\, 03 Oct 2017 09\:27\:00 +0000" Message-ID: <873770y3f9.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28645 Cc: rudalics@gmx.at, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hey, Thanks for the fix in semantic-ia-fast-jump Dmitry and Martin. However, I think there are more places which need to be fixed in CEDET. A quick search for switch-to-buffer shows these in lisp/cedet: $ grep -n -e 'switch-to-buffer' lisp/cedet ./semantic/decorate/include.el:470: (switch-to-buffer (get-file-buffer file))) ./semantic/imenu.el:180: (switch-to-buffer ob)) ./semantic/debug.el:156: (switch-to-buffer (oref iface data-buffer)) ./semantic/debug.el:160: (switch-to-buffer (oref iface parser-buffer)) ./semantic/debug.el:166: (switch-to-buffer (oref iface source-buffer)) ./semantic/debug.el:453: (switch-to-buffer buf)) ./semantic/debug.el:467: (switch-to-buffer buf)) ./semantic/bovine/c.el:980: (switch-to-buffer (get-buffer-create "*MODE HACK TEST*")) ./semantic/bovine/c.el:992: (switch-to-buffer-other-window ./semantic/complete.el:1533: (switch-to-buffer-other-window buf t) ./semantic/complete.el:2123: (switch-to-buffer (current-buffer)) ./semantic/symref/list.el:182: (switch-to-buffer-other-window buff) ./semantic/symref/list.el:314: (switch-to-buffer-other-window buff) ./semantic/symref/list.el:328: (switch-to-buffer-other-window buff) ./semantic/symref/list.el:344: (switch-to-buffer-other-window buff) ./semantic/symref/list.el:420: (switch-to-buffer-other-window (semantic-tag-buffer tag)) ./semantic/symref/list.el:440: (switch-to-buffer (current-buffer)) ./semantic/sb.el:320: (switch-to-buffer (current-buffer)) ./semantic/analyze/refs.el:351: (switch-to-buffer (current-buffer)) ./semantic/mru-bookmark.el:116: (switch-to-buffer (current-buffer)) ./semantic/texi.el:630:;; (switch-to-buffer docbuff)) ./semantic/texi.el:675: (switch-to-buffer (semantic-tag-buffer (car tags))) ./semantic/senator.el:533: (switch-to-buffer (current-buffer)) ./semantic/senator.el:537: (switch-to-buffer result) ./semantic/senator.el:741: (switch-to-buffer (semantic-tag-buffer v)) ./semantic.el:1081: `global-semantic-mru-bookmark-mode' - Provide `switch-to-buffer'-like ./srecode/getset.el:263: (switch-to-buffer (current-buffer)) ./ede/custom.el:103: (switch-to-buffer (get-buffer-create "*EDE sort targets*")) ./ede/shell.el:44: (switch-to-buffer-other-window buff t)) I was able to reproduce the bug in "semantic-complete-jump" and "semantic-analyze-proto-impl-toggle", for example. I would also be grateful for a little bit of background information. At which point did it become necessary to use 'pop-to-buffer' instead of 'switch-to-buffer'? Apparently 'semantic-ia-fast-jump' et al worked fine in older emacs versions. When is it ok to use 'switch-to-buffer'? There are numerous occurences of it throughout emacs... Thanks Bastian From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 05:03:37 2017 Received: (at 28645) by debbugs.gnu.org; 4 Oct 2017 09:03:37 +0000 Received: from localhost ([127.0.0.1]:47481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzfab-0004Ss-Hf for submit@debbugs.gnu.org; Wed, 04 Oct 2017 05:03:37 -0400 Received: from mout.gmx.net ([212.227.17.20]:57313) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzfaX-0004Sb-RQ for 28645@debbugs.gnu.org; Wed, 04 Oct 2017 05:03:36 -0400 Received: from [192.168.1.100] ([46.125.250.31]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MBnPX-1e8A2r4A0V-00AniP; Wed, 04 Oct 2017 11:03:27 +0200 Message-ID: <59D4A3D5.2030005@gmx.at> Date: Wed, 04 Oct 2017 11:03:17 +0200 From: martin rudalics MIME-Version: 1.0 To: Bastian Beischer , bug#28645 <28645@debbugs.gnu.org> Subject: Re: Status: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer References: <873770y3f9.fsf@gmail.com> In-Reply-To: <873770y3f9.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:hb4w/tbIBraEuy7crfVERUtYQvNqsRefK8WmSXV2ZCniN/5VS/Y ZTedqpaWlM42PJTLZbhN2Og4VDHAn3R8IVbth2e81i1k00PLNwpfAs2ke/mkqY8O7bMOcV7 id1/SQvaCk7w7kV0YLWM7RPolkHhy/dtceTGkZw2EKErWONHTyDb3QiPDF42n62mIP66Rlp BrZ/68ScF+q1pNN+ziv4Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:1IRucKdcrtI=:6gVp+X9IjTR0Ho2nUb/Gf9 mb7wtKmczb5SK79kavkrZY8BY+dfuph3bWUHtrQrJddgutZfFFODzAO6p7K4V+NH1NF9m/rNB WlISCLAT4URBWllDW8x8L2NQP9GZonU444+4ZEeCmElycz9J2Qp3H5nXa+V9jlVJMD36AisPl lV+pV0+lQ4Hkly8wj7y85qKhKXuHkyNqLWMoKSguX5JJ/1i7AERvJSzFZMJSO2p20zy8WksTN oYaAgjnWELgOCZB8P6SIp/A/yfNyufuvc1njtMw/svGKmit/Lr8yucvTCnkc4FGduvsbfx+vE JfRcakD6KEjDf6HQq5abnlqxPoWCJaGaH3M16k/Q2vpk67wgAK34oonDhnAp+VWpgSvRcgJTN q3wYQX0bXVBPnu/pVWfYBkjNl77zp1cfL5RfkUW2iQs3UWPFm9jxzl9gdS2D1sODXtxBnt+Lo 0i6rpzUCovO6T6x2QAnR+pP8Ptr2elVP29d4cLgHVYXp2dtJXA6UtXLw026iJ2MWhljf5PnUJ WQRWPVDthsj1YDneEyYd3208s9M3Ihfe5RiZfff8HfieXL6EUzr+KIAz9LSzZT0aYX6i2qbQc WnQgvIKkZ4M9lENIPwTtOkUg+Qyktvc6GpVCyYjr4IehElPsCEucwG6WlTwxHeawBBppypZpr sle8pvBQ7YooOaeeZf4n9h+plKR1ll3rYvu5T4+KnnU7T4fymhS1MHKBVaXqPF9l7Z2nTB8va F/paty1tl23xlZcvXTdFVSw0O94Zq4FcrgV7saAYK0OD3nr4/rXrMXzdrlOaF4MmJOW8ndBz+ KnQHf255aY79xwDkrs9/CNmegn/p8z2JrTGtZrpj1hgmM6v15HMj132x4pQARXNvhT2Troj X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 28645 Cc: dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > I would also be grateful for a little bit of background information. A= t > which point did it become necessary to use 'pop-to-buffer' instead of > 'switch-to-buffer'? Apparently 'semantic-ia-fast-jump' et al worked fi= ne > in older emacs versions. > > When is it ok to use 'switch-to-buffer'? There are numerous occurences= > of it throughout emacs... Consider the following scenario: (1) =E2=80=98switch-to-buffer-preserve-window-point=E2=80=99 is t (it is = so by default). (2) An application explicitly sets point in a buffer that is currently not displayed in the selected window to a value different from the value of =E2=80=98window-point=E2=80=99 of that window at the last t= ime this buffer was displayed there. (3) The application wants to switch to the buffer in the selected window with =E2=80=98window-point=E2=80=99 at the position of point assigne= d in (2). If the application used =E2=80=98switch-to-buffer=E2=80=99 in (3), then =E2= =80=98window-point=E2=80=99 will be reset to the old location of =E2=80=98window-point=E2=80=99 which= is obviously not what the application wants. So to get what it wants, an application either has to bind =E2=80=98switch-to-buffer-preserve-window-point=E2=80=99= to nil around the =E2=80=98switch-to-buffer=E2=80=99 call or use =E2=80=98pop-to= -buffer-same-window=E2=80=99 (=E2=80=98display-buffer-same-window=E2=80=99 if the window may remain un= selected) instead. IMHO applications should never call =E2=80=98switch-to-buffer=E2=80=99. = They should either call =E2=80=98pop-to-buffer=E2=80=99 - if the user is supposed to = now continue working in the window showing the buffer - and =E2=80=98display-buffer=E2= =80=99 in all other cases. Both allow the user to control how to display the buffer. Only if there is a clear preference that the buffer should be shown in the _selected_ window, the =E2=80=98-same-window=E2=80=99 functions shoul= d be called. And programmers should be aware that at the time they want to show a buffer in the selected window, that window might be the minibuffer window or a window dedicated to some other buffer. martin From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 07:11:24 2017 Received: (at 28645) by debbugs.gnu.org; 4 Oct 2017 11:11:24 +0000 Received: from localhost ([127.0.0.1]:47630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzhaE-0001DE-T8 for submit@debbugs.gnu.org; Wed, 04 Oct 2017 07:11:24 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:35549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzhaC-0001Cx-Bx for 28645@debbugs.gnu.org; Wed, 04 Oct 2017 07:11:21 -0400 Received: by mail-qt0-f195.google.com with SMTP id p15so409852qtp.2 for <28645@debbugs.gnu.org>; Wed, 04 Oct 2017 04:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=43pQoEwMP/sVgVfKPHQDVpOtmAfcNbc+lepzU/fhcEA=; b=PpywK0/W1oKpa1AbAxVxahFEGvDm5KAUg9UFHvlU+LlIpVnhaE7iGz1iRavL7fkPoK isJoOomdvng7082JSal/KVuIDQko/rqpcH/LtQX1XsiuB+V0FB6JbNtSGw6FDBg7V6jf JjSvUs8aDcjQu9tnb/9p2SiGZidf+12AjpWQW5Fd+EBbdOzbhUJIU3TCra51tKW37gCi yrg5u+XO8GtqWKfcfaa/rAhv2F97OUWn30vtryuYY/2N+1WCeUe9xC9CVyhPz1u0sw4K ReOJahb+uC0z2dLs21wZwYgUEqwJbwS7udUEeSuND5rF+8vXbkTU0TQnqhk+MIyyfl2G 0/7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=43pQoEwMP/sVgVfKPHQDVpOtmAfcNbc+lepzU/fhcEA=; b=oVlz03MnHqy+Znj/SNcvGAwoMwPb5IgON3VlJInkSE0G+PLJWr8iDOjOSqGN2s4Yyv z2W0DKgtYVP63WxcwEuqCzlS4aY/PfCBVR//e9lExUdkEYx7cptc6OlwZAfhA5xdmm+Q LJs/vyEahyZgJNjwfM8cxCJvYpekG0ov9Dd4BfPZNp0sTixImQM1loeFPi8bF8M1wp1R hhTBwV1zP31khwOp5daL2BVFDdTrAH3aO7xheU8rQ0tTms0f4qGOjXiQ9Nx0hHx7of3g VtWMst6znOc0VTxj611FQqx0LFb19MwRWAI61ImD2InZdrJfk5YKRI/Jj0wktWPovVl6 bxZA== X-Gm-Message-State: AMCzsaXlQNq0dL3JfkzT3q0wZimawuosRbmkAsM/+sBZeSXRfDi9qrg/ 1DylUkYWavN5QqyfAWGVPoUIz+fYY3veYQg9FVQ= X-Google-Smtp-Source: AOwi7QBeJvs0VENyF+9CzXoNBEh0kb3P3sZ6vfUE2kj6zRwOpDkaigMbVkvMeK8AIfxuH0xqcDnHBLj4LuqEMVRyB6c= X-Received: by 10.37.195.4 with SMTP id t4mr3642158ybf.279.1507115474445; Wed, 04 Oct 2017 04:11:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.99.7 with HTTP; Wed, 4 Oct 2017 04:11:13 -0700 (PDT) In-Reply-To: <59D4A3D5.2030005@gmx.at> References: <873770y3f9.fsf@gmail.com> <59D4A3D5.2030005@gmx.at> From: Bastian Beischer Date: Wed, 4 Oct 2017 13:11:13 +0200 Message-ID: Subject: Re: Status: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer To: martin rudalics Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28645 Cc: bug#28645 <28645@debbugs.gnu.org>, Brief Busters X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Hey Martin, On Wed, Oct 4, 2017 at 11:03 AM, martin rudalics wrote: >> I would also be grateful for a little bit of background information. At >> which point did it become necessary to use 'pop-to-buffer' instead of >> 'switch-to-buffer'? Apparently 'semantic-ia-fast-jump' et al worked fine >> in older emacs versions. >> >> When is it ok to use 'switch-to-buffer'? There are numerous occurences >> of it throughout emacs... > > Consider the following scenario: > > (1) =E2=80=98switch-to-buffer-preserve-window-point=E2=80=99 is t (it is = so by default). > > (2) An application explicitly sets point in a buffer that is currently > not displayed in the selected window to a value different from the > value of =E2=80=98window-point=E2=80=99 of that window at the last ti= me this buffer > was displayed there. > > (3) The application wants to switch to the buffer in the selected window > with =E2=80=98window-point=E2=80=99 at the position of point assigned= in (2). > > If the application used =E2=80=98switch-to-buffer=E2=80=99 in (3), then = =E2=80=98window-point=E2=80=99 > will be reset to the old location of =E2=80=98window-point=E2=80=99 which= is obviously > not what the application wants. So to get what it wants, an application > either has to bind =E2=80=98switch-to-buffer-preserve-window-point=E2=80= =99 to nil > around the =E2=80=98switch-to-buffer=E2=80=99 call or use =E2=80=98pop-to= -buffer-same-window=E2=80=99 > (=E2=80=98display-buffer-same-window=E2=80=99 if the window may remain un= selected) > instead. > > IMHO applications should never call =E2=80=98switch-to-buffer=E2=80=99. = They should > either call =E2=80=98pop-to-buffer=E2=80=99 - if the user is supposed to = now continue > working in the window showing the buffer - and =E2=80=98display-buffer=E2= =80=99 in all > other cases. Both allow the user to control how to display the buffer. > > Only if there is a clear preference that the buffer should be shown in > the _selected_ window, the =E2=80=98-same-window=E2=80=99 functions shoul= d be called. > And programmers should be aware that at the time they want to show a > buffer in the selected window, that window might be the minibuffer > window or a window dedicated to some other buffer. I understand. Then this must mean that the change in behavior in CEDET was triggered with this commit: commit ee297210cffb9e8d05912686a39fa158414ba050 Author: Mark Oteiza Date: Thu May 26 21:47:18 2016 -0400 Preserve buffer point in windows by default (Bug#4041). * doc/lispref/windows.texi: Mention new default. * etc/NEWS: Mention new default. * lisp/window.el (switch-to-buffer-preserve-window-point): Default to t. which is part of master and emacs-26 but was not part of any previous relea= ses. I also understand your other arguments. But the question is: While your recommendation makes sense, there clearly still is a lot of code which uses switch-to-buffer without binding switch-to-buffer-preserve-window-point to nil and it wasn't fixed when this variable's default was changed. This is true in lisp code shipped in emacs and it is probably also true for lots of third party code in the wild. Who is going to fix all this code? And if it turns out that the fixing all this code is too difficult / impossible, is it justified to fix bug #4041 at the cost of causing numerous other bugs (which arguably are due to misuse of switch-to-buffer, but they will have to be fixed either way)? > > martin > Cheers and thanks again for your answer. Bastian From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 05 04:10:18 2017 Received: (at 28645) by debbugs.gnu.org; 5 Oct 2017 08:10:18 +0000 Received: from localhost ([127.0.0.1]:49661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e01EY-0006Id-JU for submit@debbugs.gnu.org; Thu, 05 Oct 2017 04:10:18 -0400 Received: from mout.gmx.net ([212.227.17.20]:49599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e01EW-0006IQ-Gr for 28645@debbugs.gnu.org; Thu, 05 Oct 2017 04:10:17 -0400 Received: from [192.168.1.100] ([212.95.7.239]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M6B6s-1d7NNr2oXa-00y8sF; Thu, 05 Oct 2017 10:10:09 +0200 Message-ID: <59D5E8D6.7020907@gmx.at> Date: Thu, 05 Oct 2017 10:09:58 +0200 From: martin rudalics MIME-Version: 1.0 To: Bastian Beischer Subject: Re: Status: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer References: <873770y3f9.fsf@gmail.com> <59D4A3D5.2030005@gmx.at> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:lsSXD4lb4Ax2Q+zuNZ+5/O4RiwyU/YlGFWU6SmyXWqNnu4KDCl4 bKrRQGpA6foqwpDpgOaWMBv9rVIEPO+6dPUeX39N2UXcfjJM9BBg4DWEqFrz2kFnV0jnPzF UI7JxGb+ZgHyVuDdRiWzRnzkTkb7QHpZW/80bcmiTzFzdAQQUUgOhkzaoZP1RU29xiJh3wP 5/6DCheTaEGK12OJo/i5g== X-UI-Out-Filterresults: notjunk:1;V01:K0:uBJviee35ks=:OQcHltmdEqSGdyyr/7WnTc vRHCwa7RjudrlicRrFsCviapuq0BZSKrzFmdb/DtGZ4La68pRMbZWv9K8v+B3wRTDvHKq3uVK jnfUJvvtdPBHGBK4b9VlBnJhbVWWnh+LOaQxz6TDRYaG7mb1YGjQch3w3/VX1oAnfeHYhYMCu BLNYn2nmC39Mf5CSdgmQvL1qyQSh6gtt/9eLWHPkCi4gzLylBMev8QWvzdKg97oUxZpHmlcW3 lKo2TKRXISDJL7D42A+ikLE2G2aKVjT02TM7bhlx1hj0ZrkXQmhOQrpwZLjWZqwNYJvb3c4fq AM89g4CYDQMzF5LyPboxQxW914coNTKxFlCp6L7mfABRMFKRLrUN259FKNslUSmtgBY4sQOrU 7slyEvvpcDXLiZw18owiWdEqgoNGSOuI0lOijWNst0eNLzItvGhXU5ga33bgAHoCPvEUNb2Ta CCgaOXGJf2qgD1p0OtYVdCrIE2PpSqHNJrNgqGEqweItcMpSHa2FMJ7ttHN8M0w0UrzyasV9g wHSbcSh9L76dVsvQJUxkPEIPPePJDF/+rvxTX24Wk2h3Q9tDUHKpVb0EGmgqpLOBawxSjJkfa NpNdisU8GfeXRTTOxjs7BnvuKaYaLLaT7oBE6RFcRTwLhQy8XxJ2uJlrJ/lv/S4erhXLbCSSv vK8DGP0/2Mlk/wYnzxfm36H9G0PpZkF1XrxlZNFMAGZX31vX0yQ8Aq1pTXrU8Kpvs7IlDs6ak lWJLbpU+GdgRZhG6W+VUy/aqLxvQYWG3iciwnPDkan3aKr1iIwynj+Emjyw1fpuNJkvPuKSp9 HYeHJrLJVvGEWl+rbh4vlKwtTyLv7qV9iaCAK50ctz7Q9C5WMessaLw1obSa3VXQrIqVBiT X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 28645 Cc: bug#28645 <28645@debbugs.gnu.org>, Brief Busters X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) > I understand. Then this must mean that the change in behavior in CEDET= > was triggered with this commit: > > commit ee297210cffb9e8d05912686a39fa158414ba050 > Author: Mark Oteiza > Date: Thu May 26 21:47:18 2016 -0400 Right. > I also understand your other arguments. But the question is: While > your recommendation makes sense, there clearly still is a lot of code > which uses switch-to-buffer without binding > switch-to-buffer-preserve-window-point to nil and it wasn't fixed when= > this variable's default was changed. This is true in lisp code shipped= > in emacs and it is probably also true for lots of third party code in > the wild. Who is going to fix all this code? And if it turns out that > the fixing all this code is too difficult / impossible, is it > justified to fix bug #4041 at the cost of causing numerous other bugs > (which arguably are due to misuse of switch-to-buffer, but they will > have to be fixed either way)? This would have the banal consequence that all users who then set =E2=80=98switch-to-buffer-preserve-window-point=E2=80=99 to a non-nil val= ue would have to live with the wrong behavior forever: Nobody would care about fixing it because "the default" DTRT already. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 15 19:06:15 2017 Received: (at 28645) by debbugs.gnu.org; 15 Oct 2017 23:06:15 +0000 Received: from localhost ([127.0.0.1]:42073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3rz4-0006Od-VS for submit@debbugs.gnu.org; Sun, 15 Oct 2017 19:06:15 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:50351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3rz3-0006OQ-1K for 28645@debbugs.gnu.org; Sun, 15 Oct 2017 19:06:13 -0400 Received: by mail-wm0-f52.google.com with SMTP id u138so30668911wmu.5 for <28645@debbugs.gnu.org>; Sun, 15 Oct 2017 16:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=AXVPQ/AdJxMCHLQKixfYxjdcsdahwduMufNKzrT79Kg=; b=dVf7E16/6yqTksQwxcLb/de/SoQkdL4XknbHZJmwbczC+dBRfx4nrICrbyOsC6m/76 3us4yqjo9NQM/HYbvJbLprqAm6xPPspgUOPfKWPMxA0RP+1eICfkXmonldix65PMN46Z MRXRiCk/ynezGpfQBNIi0Q9ElqG4GZm31K/hwS0KDMgbqBU3khnZzmH5cUwS+rpnRudN GNc+8YlUPA2SQQ3pGrwHbvoNUiGc5ui4xJj3eRxJH+yhV2OoWfXAMPDagZQ9x4TAOfST 0C91IDWm03FHGN+AnUql2Oe98zmHwgO7GsudLGaetV7auoBtrj4hdBi4bljfEJROJlUH UD9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AXVPQ/AdJxMCHLQKixfYxjdcsdahwduMufNKzrT79Kg=; b=EHTpADZpg+z/uSkr/LHkqQpGpqdUgmU1TcRDPuFvpPCUf+eHD/cBxUnVG/9n4sEEWi WAng/YrIS3wWBRaPwjYZZzxVUdnDhafitW3TRNOBW2B/DCm1F7Es9M2fwSYQVVGmBpdo d9VABEdqd/Iqt6rkKahA8nBd//jtVewTghRCWLdbCbKnOjw9pMiCKjF1EI2b52R7BofX ZWv0Y2MhByZmaptfUknRZ6q0zfbioNWXiXRgf1L5iByjrFbtCVG0sn/+RFdrxnx+TEMT QxXV5t/g8APwM4Ia7vBDQsoqr/tAHyAULEPEyKEDz5Aextxt66FHRvpV2aGK+Nexj7Mz DXJA== X-Gm-Message-State: AMCzsaURXFZX3SWdX/XC8tqzAVBeOFBK0PXG7RyBtzVR/p3mRzJGCu4Z Udot0aWKG3gxqpWNry0jI06Wgl9T X-Google-Smtp-Source: ABhQp+TTSs4LZNlZO9rtEllN9Hw5P7k0J0agOp9s/fXjbUYmNH3BTNE5+0Hrn5lsoBbiVpgOJDaKuQ== X-Received: by 10.28.93.200 with SMTP id r191mr6613635wmb.19.1508108767093; Sun, 15 Oct 2017 16:06:07 -0700 (PDT) Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id x75sm6823642wme.3.2017.10.15.16.06.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Oct 2017 16:06:06 -0700 (PDT) Subject: Re: bug#28645: Status: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer To: Bastian Beischer , bug#28645 <28645@debbugs.gnu.org> References: <873770y3f9.fsf@gmail.com> From: Dmitry Gutov Message-ID: Date: Mon, 16 Oct 2017 02:06:04 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 MIME-Version: 1.0 In-Reply-To: <873770y3f9.fsf@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 28645 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Hey Bastian, On 10/3/17 12:40 PM, Bastian Beischer wrote: > $ grep -n -e 'switch-to-buffer' lisp/cedet > ./semantic/decorate/include.el:470: (switch-to-buffer (get-file-buffer file))) > ./semantic/imenu.el:180: (switch-to-buffer ob)) > ./semantic/debug.el:156: (switch-to-buffer (oref iface data-buffer)) > ./semantic/debug.el:160: (switch-to-buffer (oref iface parser-buffer)) > ./semantic/debug.el:166: (switch-to-buffer (oref iface source-buffer)) > ./semantic/debug.el:453: (switch-to-buffer buf)) > ./semantic/debug.el:467: (switch-to-buffer buf)) > ./semantic/bovine/c.el:980: (switch-to-buffer (get-buffer-create "*MODE HACK TEST*")) > ./semantic/bovine/c.el:992: (switch-to-buffer-other-window > ./semantic/complete.el:1533: (switch-to-buffer-other-window buf t) > ./semantic/complete.el:2123: (switch-to-buffer (current-buffer)) > ./semantic/symref/list.el:182: (switch-to-buffer-other-window buff) > ./semantic/symref/list.el:314: (switch-to-buffer-other-window buff) > ./semantic/symref/list.el:328: (switch-to-buffer-other-window buff) > ./semantic/symref/list.el:344: (switch-to-buffer-other-window buff) > ./semantic/symref/list.el:420: (switch-to-buffer-other-window (semantic-tag-buffer tag)) > ./semantic/symref/list.el:440: (switch-to-buffer (current-buffer)) > ./semantic/sb.el:320: (switch-to-buffer (current-buffer)) > ./semantic/analyze/refs.el:351: (switch-to-buffer (current-buffer)) > ./semantic/mru-bookmark.el:116: (switch-to-buffer (current-buffer)) > ./semantic/texi.el:630:;; (switch-to-buffer docbuff)) > ./semantic/texi.el:675: (switch-to-buffer (semantic-tag-buffer (car tags))) > ./semantic/senator.el:533: (switch-to-buffer (current-buffer)) > ./semantic/senator.el:537: (switch-to-buffer result) > ./semantic/senator.el:741: (switch-to-buffer (semantic-tag-buffer v)) > ./semantic.el:1081: `global-semantic-mru-bookmark-mode' - Provide `switch-to-buffer'-like > ./srecode/getset.el:263: (switch-to-buffer (current-buffer)) > ./ede/custom.el:103: (switch-to-buffer (get-buffer-create "*EDE sort targets*")) > ./ede/shell.el:44: (switch-to-buffer-other-window buff t)) > > I was able to reproduce the bug in "semantic-complete-jump" and > "semantic-analyze-proto-impl-toggle", for example. With Martin's explanation, I guess we should replace all of these uses with pop-to-buffer-same-window. Could you try out this kind of change and see if it fixes the problems you are still seeing, without introducing any obvious new ones? From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 16 06:21:14 2017 Received: (at 28645) by debbugs.gnu.org; 16 Oct 2017 10:21:14 +0000 Received: from localhost ([127.0.0.1]:42529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e42WI-0003N1-8m for submit@debbugs.gnu.org; Mon, 16 Oct 2017 06:21:14 -0400 Received: from mail-qt0-f177.google.com ([209.85.216.177]:51546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e42WG-0003Mn-Te for 28645@debbugs.gnu.org; Mon, 16 Oct 2017 06:21:13 -0400 Received: by mail-qt0-f177.google.com with SMTP id q4so30509398qtq.8 for <28645@debbugs.gnu.org>; Mon, 16 Oct 2017 03:21:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=OJfUCgDsoM9IbTOJx0eWghlTp7EGcpfcTlChAE6S4Mw=; b=VQQkiEOx1PMizAusaeBKzYFWwLPbEo2TF8FslGwi+GajieSqrWgAjp9FwvtC04nstt WCkXpAhR5XMvhxXP6X7rgV+5b6kirmAc3TJvcz7St3DL2JbxtNSNdnUtEsdEYGGRzdtj OhS/QlWKR5amCj1y2ymjNm+27lFDx+ar23Crl7RfpxZNTV+FANEOGT3apokhqjk+LVeT YXK8fwHopDdTnCS+/E4vpl6NaKki+C5vGaPbCM/OtaL6UGZXTaSqNqaM4wyqXPHsodZT cFyM3sNbxjZ3CqhdK/q8NXGZ0CdVitnGrVHMZr2E1O5qGpxMs8xvouFsEDyk5lkXSJ3Z cDFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=OJfUCgDsoM9IbTOJx0eWghlTp7EGcpfcTlChAE6S4Mw=; b=nN7MdP4HxOBIRXJpcX+PCoZUSA5MuwHcY7SlmpHGbjNVt5wIHylEQYHEL4c0Q4sG4d 8rDQURIa2gB+TFwpc1rVtupxrhJqlHfq9J3MiNhnzIvChV3qZh5yVaP9iqJ4/BDOTGS2 30OIIikKWb748L7/z4/9SV9kFAQG1KNAwDKoJAmava+tbtoR+2N+Kn9exRum7FHtiviW Y7LRWZpLMkLSYE/1mYusgrfOxObILyQ2I+2Ghm5wy/MZQSO/vLfBS2wqdQMNMWQ2RFqv ek5KIjkYupRp4rRZAArOOylHz4T74lqDyk0Vd1rSJR6FadlnAqcBcYExPw9oYmQuW+kF gO7A== X-Gm-Message-State: AMCzsaVVng/a0LGlL/oSOl8Wg6YJCnvNPRxWUey+p0HaJsy85/oaByHC fM6tPk4vYISA3fzR4Mo/HB2U0hZjt/fWWyUWcsc= X-Google-Smtp-Source: ABhQp+REYrd5kE2EjDeYTo7eOazhECZ54I3vJDSveFfGe9gmqdI0zdjDqZ3AIxRGbFlNmZA62gVqQfuAfd7I7ogMYvI= X-Received: by 10.37.223.6 with SMTP id w6mr44852ybg.145.1508149267365; Mon, 16 Oct 2017 03:21:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.99.11 with HTTP; Mon, 16 Oct 2017 03:21:06 -0700 (PDT) In-Reply-To: References: <873770y3f9.fsf@gmail.com> From: Bastian Beischer Date: Mon, 16 Oct 2017 12:21:06 +0200 Message-ID: Subject: Re: bug#28645: Status: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer To: Dmitry Gutov Content-Type: multipart/alternative; boundary="94eb2c09d95e5985b5055ba75d18" X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hey Dmitry, On Mon, Oct 16, 2017 at 1:06 AM, Dmitry Gutov wrote: > Hey Bastian, > > On 10/3/17 12:40 PM, Bastian Beischer wrote: > > $ grep -n -e 'switch-to-buffer' lisp/cedet >> ./semantic/decorate/include.el:470: (switch-to-buffer >> (get-file-buffer file))) >> ./semantic/imenu.el:180: (switch-to-buffer ob)) >> ./semantic/debug.el:156: (switch-to-buffer (oref iface data-buffer)) >> ./semantic/debug.el:160: (switch-to-buffer (oref iface parser-buffer)) >> ./semantic/debug.el:166: (switch-to-buffer (oref iface source-buffer)) >> ./semantic/debug.el:453: (switch-to-buffer buf)) >> ./semantic/debug.el:467: (switch-to-buffer buf)) >> ./semantic/bovine/c.el:980: (switch-to-buffer (get-buffer-create >> "*MODE HACK TEST*")) >> ./semantic/bovine/c.el:992: (switch-to-buffer-other-window >> ./semantic/complete.el:1533: (switch-to-buffer-other-window buf t) >> ./semantic/complete.el:2123: (switch-to-buffer (current-buffer)) >> ./semantic/symref/list.el:182: (switch-to-buffer-other-window buff) >> ./semantic/symref/list.el:314: (switch-to-buffer-other-window buff) >> ./semantic/symref/list.el:328: (switch-to-buffer-other-window buff) >> ./semantic/symref/list.el:344: (switch-to-buffer-other-window buff) >> ./semantic/symref/list.el:420: (switch-to-buffer-other-window >> (semantic-tag-buffer tag)) >> ./semantic/symref/list.el:440: (switch-to-buffer >> (current-buffer)) >> ./semantic/sb.el:320: (switch-to-buffer (current-buffer)) >> ./semantic/analyze/refs.el:351: (switch-to-buffer (current-buffer)) >> ./semantic/mru-bookmark.el:116: (switch-to-buffer (current-buffer)) >> ./semantic/texi.el:630:; ; (switch-to-buffer docbuff)) >> ./semantic/texi.el:675: (switch-to-buffer (semantic-tag-buffer (car >> tags))) >> ./semantic/senator.el:533: (switch-to-buffer (current-buffer)) >> ./semantic/senator.el:537: (switch-to-buffer result) >> ./semantic/senator.el:741: (switch-to-buffer >> (semantic-tag-buffer v)) >> ./semantic.el:1081: `global-semantic-mru-bookmark-mode' - Provide >> `switch-to-buffer'-like >> ./srecode/getset.el:263: (switch-to-buffer (current-buffer)) >> ./ede/custom.el:103: [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.216.177 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.216.177 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.216.177 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (bastian.beischer[at]gmail.com) 1.1 TRACKER_ID BODY: Incorporates a tracking ID number 0.0 HTML_MESSAGE BODY: HTML included in message 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 28645 Cc: bug#28645 <28645@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hey Dmitry, On Mon, Oct 16, 2017 at 1:06 AM, Dmitry Gutov wrote: > Hey Bastian, > > On 10/3/17 12:40 PM, Bastian Beischer wrote: > > $ grep -n -e 'switch-to-buffer' lisp/cedet >> ./semantic/decorate/include.el:470: (switch-to-buffer >> (get-file-buffer file))) >> ./semantic/imenu.el:180: (switch-to-buffer ob)) >> ./semantic/debug.el:156: (switch-to-buffer (oref iface data-buffer)) >> ./semantic/debug.el:160: (switch-to-buffer (oref iface parser-buffer)) >> ./semantic/debug.el:166: (switch-to-buffer (oref iface source-buffer)) >> ./semantic/debug.el:453: (switch-to-buffer buf)) >> ./semantic/debug.el:467: (switch-to-buffer buf)) >> ./semantic/bovine/c.el:980: (switch-to-buffer (get-buffer-create >> "*MODE HACK TEST*")) >> ./semantic/bovine/c.el:992: (switch-to-buffer-other-window >> ./semantic/complete.el:1533: (switch-to-buffer-other-window buf t) >> ./semantic/complete.el:2123: (switch-to-buffer (current-buffer)) >> ./semantic/symref/list.el:182: (switch-to-buffer-other-window buff) >> ./semantic/symref/list.el:314: (switch-to-buffer-other-window buff) >> ./semantic/symref/list.el:328: (switch-to-buffer-other-window buff) >> ./semantic/symref/list.el:344: (switch-to-buffer-other-window buff) >> ./semantic/symref/list.el:420: (switch-to-buffer-other-window >> (semantic-tag-buffer tag)) >> ./semantic/symref/list.el:440: (switch-to-buffer >> (current-buffer)) >> ./semantic/sb.el:320: (switch-to-buffer (current-buffer)) >> ./semantic/analyze/refs.el:351: (switch-to-buffer (current-buffer)) >> ./semantic/mru-bookmark.el:116: (switch-to-buffer (current-buffer)) >> ./semantic/texi.el:630:;; (switch-to-buffer docbuff)) >> ./semantic/texi.el:675: (switch-to-buffer (semantic-tag-buffer (car >> tags))) >> ./semantic/senator.el:533: (switch-to-buffer (current-buffer)) >> ./semantic/senator.el:537: (switch-to-buffer result) >> ./semantic/senator.el:741: (switch-to-buffer >> (semantic-tag-buffer v)) >> ./semantic.el:1081: `global-semantic-mru-bookmark-mode' - Provide >> `switch-to-buffer'-like >> ./srecode/getset.el:263: (switch-to-buffer (current-buffer)) >> ./ede/custom.el:103: [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.216.177 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.216.177 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.216.177 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (bastian.beischer[at]gmail.com) 1.1 TRACKER_ID BODY: Incorporates a tracking ID number 0.0 HTML_MESSAGE BODY: HTML included in message 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders --94eb2c09d95e5985b5055ba75d18 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey Dmitry, On Mon, Oct 16, 2017 at 1:06 AM, Dmitry Gutov wrote: > Hey Bastian, > > On 10/3/17 12:40 PM, Bastian Beischer wrote: > > $ grep -n -e 'switch-to-buffer' lisp/cedet >> ./semantic/decorate/include.el:470: (switch-to-buffer >> (get-file-buffer file))) >> ./semantic/imenu.el:180: (switch-to-buffer ob)) >> ./semantic/debug.el:156: (switch-to-buffer (oref iface data-buffer)= ) >> ./semantic/debug.el:160: (switch-to-buffer (oref iface parser-buffer)) >> ./semantic/debug.el:166: (switch-to-buffer (oref iface source-buffer)) >> ./semantic/debug.el:453: (switch-to-buffer buf)) >> ./semantic/debug.el:467: (switch-to-buffer buf)) >> ./semantic/bovine/c.el:980: (switch-to-buffer (get-buffer-create >> "*MODE HACK TEST*")) >> ./semantic/bovine/c.el:992: (switch-to-buffer-other-window >> ./semantic/complete.el:1533: (switch-to-buffer-other-window buf t) >> ./semantic/complete.el:2123: (switch-to-buffer (current-buffer)) >> ./semantic/symref/list.el:182: (switch-to-buffer-other-window buff) >> ./semantic/symref/list.el:314: (switch-to-buffer-other-window buff) >> ./semantic/symref/list.el:328: (switch-to-buffer-other-window buff) >> ./semantic/symref/list.el:344: (switch-to-buffer-other-window buff) >> ./semantic/symref/list.el:420: (switch-to-buffer-other-window >> (semantic-tag-buffer tag)) >> ./semantic/symref/list.el:440: (switch-to-buffer >> (current-buffer)) >> ./semantic/sb.el:320: (switch-to-buffer (current-buffer)) >> ./semantic/analyze/refs.el:351: (switch-to-buffer (current-buffer)) >> ./semantic/mru-bookmark.el:116: (switch-to-buffer (current-buffer)) >> ./semantic/texi.el:630:;; (switch-to-buffer docbuff)) >> ./semantic/texi.el:675: (switch-to-buffer (semantic-tag-buffer (car >> tags))) >> ./semantic/senator.el:533: (switch-to-buffer (current-buffer)) >> ./semantic/senator.el:537: (switch-to-buffer result) >> ./semantic/senator.el:741: (switch-to-buffe= r >> (semantic-tag-buffer v)) >> ./semantic.el:1081: `global-semantic-mru-bookmark-mode' - Provide >> `switch-to-buffer'-like >> ./srecode/getset.el:263: (switch-to-buffer (current-buffer)) >> ./ede/custom.el:103: (switch-to-buffer (get-buffer-create "*EDE sort >> targets*")) >> ./ede/shell.el:44: (switch-to-buffer-other-window buff t)) >> >> I was able to reproduce the bug in "semantic-complete-jump" and >> "semantic-analyze-proto-impl-toggle", for example. >> > > With Martin's explanation, I guess we should replace all of these uses > with pop-to-buffer-same-window. > > Could you try out this kind of change and see if it fixes the problems yo= u > are still seeing, without introducing any obvious new ones? > =E2=80=8BI replaced =E2=80=8Bswitch-to-buffer with pop-to-buffer-same-windo= w in those functions which I'm using regularly and it fixes the problem. The CEDET functions where I made the replacements and checked them are: semantic-analyze-proto-impl-toggle semantic-complete-jump semantic-decoration-include-visit semantic-ia--fast-jump-helper semantic-mrub-vist senator-jump senator-jump-regexp =E2=80=8Bsenator-go-to-up-reference =E2=80=8BI didn't make any other replacements because: a) For some of them I'm not sure if 'pop-to-buffer-same-window' or 'pop-to-buffer' =E2=80=8Bshould be used. b) I'm not using any of the other functions with matches so I wouldn't be able to test the change. Also, searching for 'switch-to-buffer' in non-CEDET related lisp files in the emacs sources reveals more places which need to be fixed, but I didn't go that far. However, probably somebody (tm) should check them all one-by-one :-( I also think that the advice not to use switch-to-buffer and instead use pop-to-buffer(-same-window) should get a prominent entry in NEWS so that third-parties can check their code and make the changes there, too. For example, SLIME has this open issue: https://github.com/slime/slime/issues/391 https://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00227.html and others are probably also affected. Cheers Bastian --94eb2c09d95e5985b5055ba75d18 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey Dmitry,

On Mon, Oct 16, 2017 at 1:06 AM, Dmitry Gutov <dgutov@y= andex.ru> wrote:
Hey Bastian,

On 10/3/17 12:40 PM, Bastian Beischer wrote:

$ grep -n -e 'switch-to-buffer' lisp/cedet
./semantic/decorate/include.el:470:=C2=A0 =C2=A0 =C2=A0(switch-to-buff= er (get-file-buffer file)))
./semantic/imenu.el:180:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 (switch-to-buffer ob))
./semantic/debug.el:156:=C2=A0 =C2=A0 =C2=A0 (switch-to-buffer (oref iface = data-buffer))
./semantic/debug.el:160:=C2=A0 (switch-to-buffer (oref iface parser-buffer)= )
./semantic/debug.el:166:=C2=A0 (switch-to-buffer (oref iface source-buffer)= )
./semantic/debug.el:453:=C2=A0 =C2=A0 =C2=A0 (switch-to-buffer buf))
./semantic/debug.el:467:=C2=A0 =C2=A0 =C2=A0 (switch-to-buffer buf))
./semantic/bovine/c.el:980:=C2=A0 =C2=A0 =C2=A0(switch-to-buffer (get-buffe= r-create "*MODE HACK TEST*"))
./semantic/bovine/c.el:992:=C2=A0 =C2=A0 (switch-to-buffer-other-window
./semantic/complete.el:1533:=C2=A0 =C2=A0 (switch-to-buffer-other-window bu= f t)
./semantic/complete.el:2123:=C2=A0 =C2=A0 =C2=A0 (switch-to-buffer (current= -buffer))
./semantic/symref/list.el:182:=C2=A0 =C2=A0 (switch-to-buffer-other-wi= ndow buff)
./semantic/symref/list.el:314:=C2=A0 =C2=A0 (switch-to-buffer-other-wi= ndow buff)
./semantic/symref/list.el:328:=C2=A0 =C2=A0 (switch-to-buffer-other-wi= ndow buff)
./semantic/symref/list.el:344:=C2=A0 =C2=A0 (switch-to-buffer-other-wi= ndow buff)
./semantic/symref/list.el:420:=C2=A0 =C2=A0 (switch-to-buffer-other-wi= ndow (semantic-tag-buffer tag))
./semantic/symref/list.el:440:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 (switch-to-buffer (current-buffer))
./semantic/sb.el:320:=C2=A0 =C2=A0 (switch-to-buffer (current-buffer))
./semantic/analyze/refs.el:351:=C2=A0 =C2=A0 (switch-to-buffer (curren= t-buffer))
./semantic/mru-bookmark.el:116:=C2=A0 =C2=A0 (switch-to-buffer (curren= t-buffer))
./semantic/texi.el:630:;;=C2=A0 =C2=A0 =C2=A0 =C2=A0(switch-to-buffer docbu= ff))
./semantic/texi.el:675:=C2=A0 =C2=A0(switch-to-buffer (semantic-tag-buffer = (car tags)))
./semantic/senator.el:533:=C2=A0 =C2=A0 =C2=A0 (switch-to-buffer (current-b= uffer))
./semantic/senator.el:537:=C2=A0 =C2=A0 =C2=A0 (switch-to-buffer result) ./semantic/senator.el:741:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (switch-to-buffer (= semantic-tag-buffer v))
./semantic.el:1081: `global-semantic-mru-bookmark-mode'=C2=A0 =C2= =A0- Provide `switch-to-buffer'-like
./srecode/getset.el:263:=C2=A0 =C2=A0 (switch-to-buffer (current-buffer)) ./ede/custom.el:103:=C2=A0 =C2=A0 (switch-to-buffer (get-buffer-create &quo= t;*EDE sort targets*"))
./ede/shell.el:44:=C2=A0 =C2=A0 =C2=A0 (switch-to-buffer-other-window buff = t))

I was able to reproduce the bug in "semantic-complete-jump" and "semantic-analyze-proto-impl-toggle", for example.

With Martin's explanation, I guess we should replace all of these uses = with pop-to-buffer-same-window.

Could you try out this kind of change and see if it fixes the problems you = are still seeing, without introducing any obvious new ones?

=E2=80=8BI replaced =E2=80=8Bswitch-to-buffer with pop-t= o-buffer-same-window in those functions which I'm using regularly and i= t fixes the problem. The CEDET functions where I made the replacements and = checked them are:

semantic-analyze-proto-impl-toggle=
semantic-complete-jump
semantic-decoration-include-visit
semantic-ia--fast-jump-helper
semantic-m= rub-vist
senator-jump
<= div class=3D"gmail_default">senator-jump-regexp
=E2=80=8Bsenator-go-to-up-= reference

= =E2=80=8BI didn't make any other replacements because:

a) For some of them I'm not sure if 'pop-to-buffer-same-windo= w' or 'pop-to-buffer' =E2=80=8Bshould be used.
b) I= 9;m not using any of the other functions with matches so I wouldn't be = able to test the change.

Also, searching for 'swit= ch-to-buffer' in non-CEDET related lisp files in the emacs sources reve= als more places which need to be fixed, but I didn't go that far. Howev= er, probably somebody (tm) should check them all one-by-one :-(
I also think that the advice not to use switch-to-buffer and inst= ead use pop-to-buffer(-same-window) should get a prominent entry in NEWS so= that third-parties can check their code and make the changes there, too. F= or example, SLIME has this open issue:


and others are p= robably also affected.

Cheers
Bastian
--94eb2c09d95e5985b5055ba75d18-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 17 04:58:53 2017 Received: (at 28645) by debbugs.gnu.org; 17 Oct 2017 08:58:53 +0000 Received: from localhost ([127.0.0.1]:44861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4Ni8-0001ar-Cr for submit@debbugs.gnu.org; Tue, 17 Oct 2017 04:58:53 -0400 Received: from mout.gmx.net ([212.227.15.18]:62495) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4Ni6-0001ad-Db for 28645@debbugs.gnu.org; Tue, 17 Oct 2017 04:58:50 -0400 Received: from [192.168.1.100] ([46.125.249.51]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MKHtm-1e3pDB3k9u-001iBa; Tue, 17 Oct 2017 10:58:43 +0200 Message-ID: <59E5C63B.5050404@gmx.at> Date: Tue, 17 Oct 2017 10:58:35 +0200 From: martin rudalics MIME-Version: 1.0 To: Bastian Beischer , Dmitry Gutov Subject: Re: bug#28645: Status: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer References: <873770y3f9.fsf@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:J1Tn4rxnBFxdnf9/AvaxJaIWJnqGvirolovTcJoU2WtEMfIVKFN 2zWlrBWGYF3zkVCebT7X+3z+fmblS0Jyt7Wa1V+CqVpDawNT7sOBOfpScF3MPQM3QdNzgIT bPUhPQESY/46Lk96c5lwXES7rIeib595/FJgoFnl2yFhXeL7yjxKQZmYHnM56lzF5qeDb4+ bFpzELa2/kPwnsO22BcXQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:rANzvF8rlh8=:aAZzMUGrXBnR7tSlGlfQEt gIDNSNwDdI2b/4DPUOHmHrpBzO7rH9RkY5HZ7FddiZACuZSeUPD7/xsC0o2o0vMCIMWo43tGX MgXlg3qDEWOoC8034Uo7m7rsBxuJObyZsm+N5nfG6LHBYg9wPx0NKSYhxYZZbyGMYPX2TiEbT GXdZDiYgELWxVOxjFT6FV1H2T//zc2WoP8N2Uae6rGN475Lug2MFP2LyouIAcAwbjfXsBzjk7 fjWvBHAwKu/CHXokJI0kyArCly8BIkwLUNRzDpqIDZbMRITx7ZL+HJUGfuaLe1/nZTewD2KPl 2cknI4BKj11w4UtVL4VlqeF40nv+sBnH0q5wuVkG0aWyM8pWAiSvBhu5upa18f6rlkAmU2jxZ Xb1C3gWXsCzUYJQJMtQLjglCOrR9856QjZyn3iUNNrk+LmUgXam9AJowAaOcg1nXMemcoKBNF du30ePgMme+vxgGPSJfyxc45KQVrUhaY5/IuuONANC+GBfynQ+ZLYeltDHXJBonfZ2wStdsmb /zw0A0FTftSZddcYDUtNWARwU4OCGHnWALhm0UbJIAZgIm9pg5P1JDVBgblJg0lfm6oO/h1oV dey9bNa1kCs4PpyuRPFl03PDuAptUCrd5tNmdvvr0i0ULe1KL4p2fN9wBVAHy8fg74Vc+N2BD BAlVrlU4k5kRFvtQiqeDd6dfhsUyb5pz12TxiqGIFFhoQ8pMc9sTaybHdXTkorX1fJ3DelTrA qo+tej1UWSmb1yL9OoPtkfCJL2eQHaaq2KTDHaeYRhsm+yMlFSHbz9YzkAaJdHIKWFK5bC3TF hGohb0qRMOL2olFnPnD4z1SdSvj2KcNjSBhFFFq3y/jm0svbiWOlQRzlr2gSN62QUPvWd73 X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > I also think that the advice not to use switch-to-buffer and instead use > pop-to-buffer(-same-window) should get a prominent entry in NEWS so that > third-parties can check their code and make the changes there, too. [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [46.125.249.51 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rudalics[at]gmx.at) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.15.18 listed in list.dnswl.org] X-Debbugs-Envelope-To: 28645 Cc: bug#28645 <28645@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > I also think that the advice not to use switch-to-buffer and instead use > pop-to-buffer(-same-window) should get a prominent entry in NEWS so that > third-parties can check their code and make the changes there, too. [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [46.125.249.51 listed in dnsbl.sorbs.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.15.18 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rudalics[at]gmx.at) > I also think that the advice not to use switch-to-buffer and instead use > pop-to-buffer(-same-window) should get a prominent entry in NEWS so that > third-parties can check their code and make the changes there, too. I added a sentence to that sense. If more is needed please tell me. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 17 06:44:41 2017 Received: (at 28645) by debbugs.gnu.org; 17 Oct 2017 10:44:41 +0000 Received: from localhost ([127.0.0.1]:44935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4PMW-0004G1-QN for submit@debbugs.gnu.org; Tue, 17 Oct 2017 06:44:40 -0400 Received: from mail-wr0-f176.google.com ([209.85.128.176]:50164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4PMU-0004Fj-S0 for 28645@debbugs.gnu.org; Tue, 17 Oct 2017 06:44:39 -0400 Received: by mail-wr0-f176.google.com with SMTP id g90so1148129wrd.6 for <28645@debbugs.gnu.org>; Tue, 17 Oct 2017 03:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0qFu+0bfrAs6sv+TpM099/BSeIQfGmueuUo+nnazULc=; b=ErtmSlagxtUCDj6au+mZO2CoPFl85WXePX0TfiHPtuF4ulqo9z5l8M8DvQa11S/ebG suQZfbvpsnDcmeK1lR5aA9z0zAMFBulptT6qjRCRAsxBoOnTWpRHw3K92biDAb9lzVf3 D0sFFvN+A/9qjimeWm+LS82h2b3aVmPOUKCycydKjoNi7fp7DQ6eintM/42aKQC51ThK sPlEMynLSCCAsFw1FWm4nV7zXQDWrgBlfKTS+hPVka/j+O7ifMf4t8OJVyNKDjUT3/BR McVJ/B9XRRhQtHljxcuQJ+imMSHVILjQX9KGMfLqWoHB9vJj4YxEBjT+70GSaK0n/6OQ gsCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0qFu+0bfrAs6sv+TpM099/BSeIQfGmueuUo+nnazULc=; b=k4Y8ioD3zyX0hevPOHjUASo49wDMjf3/7qZWRIgGmm1U0rJ3vj2HtJduv8zFlqkTZ1 J5lO12rLnftDNKHg0hwVAFXPubmDN7aTzPUY8OJoA97hcFMEGpSwgzYCmOKnmfJyEYbM RKn/INeGtK90tQ0FtWLHzpW7fr290FoCGlEQtQBkfgadhs2rUVlRVjYKQyFWvfwVCEfI z1m55wR6m0h1neJkH4iXB7ZrN0PWX/errNHpL7piVCdg/uBGV3XAHbYLJa3x7Hd9pw9p YOhATXK0dd5sZyYn5D0gj6acS0ygRG4VYUvQ9k1m+Q6MwCSIydycPd53gBcHwiM8UECH FEuA== X-Gm-Message-State: AMCzsaXmKNQ5i+9fvnpzJmHQ2hf3WAsjEObwzsbLqcytBWvfG1StbRuq f9cTMZmVH5B4sH+aRYDkTS6LXz32 X-Google-Smtp-Source: ABhQp+QsIopTA0Gg+1Mr5+X6HwlDlNiQqetkM4qIni8LA5u6i3DOkB7jAOmPyoaKx1L+QQ7ATcGPuw== X-Received: by 10.223.134.157 with SMTP id 29mr3058143wrx.72.1508237072803; Tue, 17 Oct 2017 03:44:32 -0700 (PDT) Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id f84sm5995606wme.44.2017.10.17.03.44.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Oct 2017 03:44:32 -0700 (PDT) Subject: Re: bug#28645: Status: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer To: Bastian Beischer References: <873770y3f9.fsf@gmail.com> From: Dmitry Gutov Message-ID: <937f31d2-2952-8e88-1dd4-81ee243cd1fd@yandex.ru> Date: Tue, 17 Oct 2017 13:44:30 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 28645 Cc: bug#28645 <28645@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) On 10/16/17 1:21 PM, Bastian Beischer wrote: > ​I replaced ​switch-to-buffer with pop-to-buffer-same-window in those > functions which I'm using regularly and it fixes the problem. The CEDET > functions where I made the replacements and checked them are: > > semantic-analyze-proto-impl-toggle > semantic-complete-jump > semantic-decoration-include-visit > semantic-ia--fast-jump-helper > semantic-mrub-vist > senator-jump > senator-jump-regexp > ​senator-go-to-up-reference > > ​I didn't make any other replacements because: > > a) For some of them I'm not sure if 'pop-to-buffer-same-window' or > 'pop-to-buffer' ​should be used. > b) I'm not using any of the other functions with matches so I wouldn't > be able to test the change. > > Also, searching for 'switch-to-buffer' in non-CEDET related lisp files > in the emacs sources reveals more places which need to be fixed, but I > didn't go that far. However, probably somebody (tm) should check them > all one-by-one :-( Could you send a patch with the replacements you did make? From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 17 08:30:49 2017 Received: (at 28645) by debbugs.gnu.org; 17 Oct 2017 12:30:49 +0000 Received: from localhost ([127.0.0.1]:45009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4R1F-0000HU-3c for submit@debbugs.gnu.org; Tue, 17 Oct 2017 08:30:49 -0400 Received: from mail-wr0-f181.google.com ([209.85.128.181]:50718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4R1C-0000HF-VB for 28645@debbugs.gnu.org; Tue, 17 Oct 2017 08:30:47 -0400 Received: by mail-wr0-f181.google.com with SMTP id q42so1487729wrb.7 for <28645@debbugs.gnu.org>; Tue, 17 Oct 2017 05:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=7UvCjhoaxdCfUtMH1A2AWeApPd3zgdrkHSMxh0Dtxgg=; b=pTecmMC1kotSbczkwIU05NLKDXTZokp15aXkC8n0ihHpSf3kWybey6+E/tn/DdQLqD KL80+R7UTZltjeTrir6ydzi2RRmB7gsl7Vl8/SXkU1PiPH3aHlYsiS23w9CUQuXSu1O2 VjBdok4Hfn0vfZrCRw2O57eW1Cp/VklJfdDI6wnnZRkzdjR03fkIntnntl3uEvyRw7fl KNmkbyYT901AfHHVRunOD1RCAGhWAADRCEeH9cv2qNSyiSS4cNkjKylw6EOMpgN6YjkG /GDZ1Ebi/zBwiSDRgUW2qBvlMbHfaMPoRWlRQxD6fcCP8DK6dQl7e4fLlyX6TXFXeMh/ UX3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=7UvCjhoaxdCfUtMH1A2AWeApPd3zgdrkHSMxh0Dtxgg=; b=PBCWQ/nWuzuBAgn5AOQTAr6KilQYvImh9NObnQEKa7UnBmXiGOx58affap/jBze6F/ Y9az7imd9exQkOZRo3Mlcfwwp2ETdzyWH3ydh75qbUKRFL6wL7h4EpZcyj/2RZvGPIf6 yOeKrzCue6lgeC5Ow5Q+MYT3WpJcM//4FG/73roW79buwQnyI1Bw6Az/ppqVAVx5i1tI 6KZ4IKyMyPs6xdBItuSHO/aBTz0GuAgsYLeBZbPAjoxNDhFmJIk7HHhEFCoQe0et2ave 7rK4TRUdfEy45ifpjFH2hyvAHZTbZJjE1o6rM69lBAVrFN3l3XqJniqdh4UNdcNkJbTP AbFA== X-Gm-Message-State: AMCzsaX22o+b2jEJsNF9U+6PtA6VXPKg4/D72L/bmcuE9SD7q/32Y++k ajQHWardAMiGgccuusgN77V1Tg== X-Google-Smtp-Source: ABhQp+Tzj+fP79f/gLJZ8Uv2KG/4bDZJ/kQBTlyGyjYm+AS/HmCagIT79k6TdHIhZd5Csn2w473SKg== X-Received: by 10.223.197.141 with SMTP id m13mr3679502wrg.203.1508243440593; Tue, 17 Oct 2017 05:30:40 -0700 (PDT) Received: from beischer-w520.gmail.com (priv-1b-5-156.physik.rwth-aachen.de. [134.61.5.156]) by smtp.gmail.com with ESMTPSA id u4sm6805098wre.1.2017.10.17.05.30.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Oct 2017 05:30:39 -0700 (PDT) From: Bastian Beischer To: Dmitry Gutov Subject: Re: bug#28645: Status: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer References: <873770y3f9.fsf@gmail.com> <937f31d2-2952-8e88-1dd4-81ee243cd1fd@yandex.ru> Date: Tue, 17 Oct 2017 14:30:35 +0200 In-Reply-To: <937f31d2-2952-8e88-1dd4-81ee243cd1fd@yandex.ru> (Dmitry Gutov's message of "Tue, 17 Oct 2017 13:44:30 +0300") Message-ID: <878tgalzx0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 28645 Cc: bug#28645 <28645@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) Dmitry Gutov writes: > On 10/16/17 1:21 PM, Bastian Beischer wrote: > >> =E2=80=8BI replaced =E2=80=8Bswitch-to-buffer with pop-to-buffer-same-wi= ndow in those functions >> which I'm using regularly and it fixes the problem. The CEDET functions = where >> I made the replacements and checked them are: >> >> semantic-analyze-proto-impl-toggle >> semantic-complete-jump >> semantic-decoration-include-visit >> semantic-ia--fast-jump-helper >> semantic-mrub-vist >> senator-jump >> senator-jump-regexp >> =E2=80=8Bsenator-go-to-up-reference >> It turns out that senator-jump and senator-jump-regexp don't exist in emacs but only in upstream CEDET. So no need to change these. >> =E2=80=8BI didn't make any other replacements because: >> >> a) For some of them I'm not sure if 'pop-to-buffer-same-window' or >> 'pop-to-buffer' =E2=80=8Bshould be used. >> b) I'm not using any of the other functions with matches so I wouldn't b= e able >> to test the change. >> >> Also, searching for 'switch-to-buffer' in non-CEDET related lisp files i= n the >> emacs sources reveals more places which need to be fixed, but I didn't g= o that >> far. However, probably somebody (tm) should check them all one-by-one :-( > > Could you send a patch with the replacements you did make? Sure: diff --git a/lisp/cedet/semantic/analyze/refs.el b/lisp/cedet/semantic/anal= yze/refs.el index 55fcd83043..a58479f505 100644 --- a/lisp/cedet/semantic/analyze/refs.el +++ b/lisp/cedet/semantic/analyze/refs.el @@ -348,7 +348,7 @@ Only works for tags in the global namespace." =20 (push-mark) (semantic-go-to-tag target) - (switch-to-buffer (current-buffer)) + (pop-to-buffer-same-windown (current-buffer)) (semantic-momentary-highlight-tag target)) ) =20 diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete= .el index ff8e61e54d..325ca1f441 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el @@ -2120,7 +2120,7 @@ completion works." (when (semantic-tag-p tag) (push-mark) (semantic-go-to-tag tag) - (switch-to-buffer (current-buffer)) + (pop-to-buffer-same-window (current-buffer)) (semantic-momentary-highlight-tag tag) (message "%S: %s " (semantic-tag-class tag) diff --git a/lisp/cedet/semantic/decorate/include.el b/lisp/cedet/semantic/= decorate/include.el index 6876e5f3a4..4a86b9e4ee 100644 --- a/lisp/cedet/semantic/decorate/include.el +++ b/lisp/cedet/semantic/decorate/include.el @@ -467,7 +467,7 @@ its contents. (error "Could not location include %s" (semantic-tag-name tag))) ((get-file-buffer file) - (switch-to-buffer (get-file-buffer file))) + (pop-to-buffer-same-window (get-file-buffer file))) ((stringp file) (find-file file)) )))) diff --git a/lisp/cedet/semantic/mru-bookmark.el b/lisp/cedet/semantic/mru-= bookmark.el index 5fa58e08ea..24863de01b 100644 --- a/lisp/cedet/semantic/mru-bookmark.el +++ b/lisp/cedet/semantic/mru-bookmark.el @@ -113,7 +113,7 @@ Uses `semantic-go-to-tag' and highlighting." (forward-char o)) (error nil)) ;; make it visible - (switch-to-buffer (current-buffer)) + (pop-to-buffer-same-window (current-buffer)) (semantic-momentary-highlight-tag tag) )) =20 diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el index e86658628b..d37345aa2d 100644 --- a/lisp/cedet/semantic/senator.el +++ b/lisp/cedet/semantic/senator.el @@ -530,11 +530,11 @@ Some tags such as includes have other reference featu= res." ;; A tag ((semantic-tag-p result) (semantic-go-to-tag result) - (switch-to-buffer (current-buffer)) + (pop-to-buffer-same-window (current-buffer)) (semantic-momentary-highlight-tag result)) ;; Buffers ((bufferp result) - (switch-to-buffer result) + (pop-to-buffer-same-window result) (pulse-momentary-highlight-one-line (point))) ;; Files ((and (stringp result) (file-exists-p result)) From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 19:46:32 2017 Received: (at 28645) by debbugs.gnu.org; 18 Oct 2017 23:46:32 +0000 Received: from localhost ([127.0.0.1]:48872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4y2h-0008E7-Qd for submit@debbugs.gnu.org; Wed, 18 Oct 2017 19:46:31 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:49470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4y2f-0008Du-Sb for 28645@debbugs.gnu.org; Wed, 18 Oct 2017 19:46:30 -0400 Received: by mail-wm0-f51.google.com with SMTP id b189so12645143wmd.4 for <28645@debbugs.gnu.org>; Wed, 18 Oct 2017 16:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=dFdPIxpWTo9gjWixKvFgFEGcBIvi/PSzcsaSvnoFkjw=; b=OX6eApb59QoNgjNOLMa062Eiuzp375CDuVREJdvh+kiURESAdhEvcv6kXMrG7Vr4n3 E3Fibv89S2mu51I6pmmWNTkHPk5wGKsHIgujs8vqep609KQQdXmKWa3KZZEt9Hr2IVVL vkRZU0Vrp1cFl3nmiXjMkv363sGSUGqYuzY+ISxaQDzoYJH3jYzycJ8iAaRe1XplBSKM y4WhfziQe8nAe9jDCJRP+ieI9UCtqfXmR2Dq0rlujQkj35Am+03FLfcxMMtzGfZLethT JSZHfNbQ/WnTEqwsryg5OrEfJjrXeiZQ98nDkijKZ11dhWNQcbDBjVBbdGKLN6P+Y0rA 2kgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dFdPIxpWTo9gjWixKvFgFEGcBIvi/PSzcsaSvnoFkjw=; b=aAKH3nwxMy1KewOvrYD+Rcezst3Hv7W/XPiTWElD0eqoEHUJW4qgWt+yFvV7vCu0XY cvaWv2Mhq5eFoahzGObkIEXXjV7iujC2blEViYYwzuGiGE3WpLj3SkQF23yF/3BVQtVc NIA196EIaEbKUTqhxOikh7+oV1YJ+mP+YAWlExg6O+uanyJExJ/qiUK19XKU/ZxlcyOM rG8TRU1eLXs/ROGB9aJZT+RYraGwUDRtdrYfHW1TDEaAUtLhP3LXIkao2hj7qKu0uX8Q glmYPCoASVH+f72zZ8e6hrkU2IkSjc6s1H3NC71hWyRbS8Pp/Dbbba87SbWEyU3UZ9vm IDeg== X-Gm-Message-State: AMCzsaV0xWZC5oDn284Dp/IfoNKXvm5YrF6pQRtrSqizdBpoxtK+jmhK HAS3FWk0C1yqIBNinQlKtzRo/mJA X-Google-Smtp-Source: ABhQp+RnmFcqfpz6bv229LzN/tQDDhApkrMyrI5CcdHHJW9Bd3S4VRZTWnV1qvBQYYK/hT4/xpNSGg== X-Received: by 10.28.23.3 with SMTP id 3mr64054wmx.62.1508370383678; Wed, 18 Oct 2017 16:46:23 -0700 (PDT) Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id o138sm165655wmg.36.2017.10.18.16.46.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Oct 2017 16:46:22 -0700 (PDT) Subject: Re: bug#28645: Status: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer To: Bastian Beischer References: <873770y3f9.fsf@gmail.com> <937f31d2-2952-8e88-1dd4-81ee243cd1fd@yandex.ru> <878tgalzx0.fsf@gmail.com> From: Dmitry Gutov Message-ID: <31f6e0db-1dc3-3897-4529-d60c424a1c03@yandex.ru> Date: Thu, 19 Oct 2017 02:46:20 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 MIME-Version: 1.0 In-Reply-To: <878tgalzx0.fsf@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 28645 Cc: bug#28645 <28645@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) On 10/17/17 3:30 PM, Bastian Beischer wrote: >> Could you send a patch with the replacements you did make? > > Sure: Thanks! I've pushed it to emacs-26 now. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 05:41:26 2017 Received: (at 28645) by debbugs.gnu.org; 19 Oct 2017 09:41:26 +0000 Received: from localhost ([127.0.0.1]:49100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e57KQ-0005dP-Ex for submit@debbugs.gnu.org; Thu, 19 Oct 2017 05:41:26 -0400 Received: from mail-yw0-f178.google.com ([209.85.161.178]:49031) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e57KP-0005dD-Dh for 28645@debbugs.gnu.org; Thu, 19 Oct 2017 05:41:25 -0400 Received: by mail-yw0-f178.google.com with SMTP id q1so2960879ywh.5 for <28645@debbugs.gnu.org>; Thu, 19 Oct 2017 02:41:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7gR8YpapULiWNUjWRjhqH5fiYYuZybz32/yQyJvJRhc=; b=FBOKjfp2RuZ/DF6mIs0kvXM7HtagpG/Go7+TGmGxJ513qCwK6A68G6K2oAn2DoJUGO T/UkvhF+OKY2keqJgt67/jsF5BroCBv1X7IbT0E81CIZj31WDmMeJ29BBaLWbNm57COa wvKMJF9COLG169lG3hsKLFhiMbMinnK6XDAewcdyXIwEFtrxBx6ZpFNcUNG7qqfFkLgQ BdSaR7xFWQk6rBDT3Z2iiM5UHg5XxEBOjWFgP52Ss5+5xRDFxwujIlwPRnsgPdqHmFbj Y4pyAkx1vz5auxWdvoLFawmI7bxBlrfHx+RLPPEHLjoyTJxRCXW9233QgL5YKruWU7Cg jRyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7gR8YpapULiWNUjWRjhqH5fiYYuZybz32/yQyJvJRhc=; b=G+/hRmnTuo1kiw4/xjxmuH/ZqdEtTu2ZIf6hCeGFF28a77BKGVhDj/eNkMC+SzPyOu m03im3rIU20h6xYwC+n7rbUxAuVXJ+JbURMZgtscdpGpnIamyB9kD3xo97BkvdUA4lGa CZpOTDHmuSp5JjNk6qrFIWzWi6cxGxyF+tzFCsAzaDF7TrjKGITlFVP2v1qWPJ7rPbQs 0gZDYQ1jNhDem/u4WlZNuTtq1yzWCd376iUbOeqcUDLDCuuq13tUmdLQFtusvRYwySr6 GiHSLB5xg+KS389De4ebr6XYBnaV7iQvyzHsVsPIf4p2Z/ho9wF6ywfQdSw2eBqquuWN i2uQ== X-Gm-Message-State: AMCzsaXppgYrfaif30lvpDll6t8e1BV/6M1olRp9r845Jvl+MGcJtgaN 05NJi7Y2lqSxF6q+XZAuF3AjIjcvgh5yt8f/CJc= X-Google-Smtp-Source: ABhQp+QWxoJX6z/whXRUDHl0YQw3UcyIUMGBG3XZySW4nPqvcv2z9kvFrOIuUVHOMvWGOnJ/n/4mtz/Bqe5HXAL3Jc8= X-Received: by 10.37.190.7 with SMTP id h7mr545023ybk.10.1508406079716; Thu, 19 Oct 2017 02:41:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.99.11 with HTTP; Thu, 19 Oct 2017 02:41:18 -0700 (PDT) In-Reply-To: <31f6e0db-1dc3-3897-4529-d60c424a1c03@yandex.ru> References: <873770y3f9.fsf@gmail.com> <937f31d2-2952-8e88-1dd4-81ee243cd1fd@yandex.ru> <878tgalzx0.fsf@gmail.com> <31f6e0db-1dc3-3897-4529-d60c424a1c03@yandex.ru> From: Bastian Beischer Date: Thu, 19 Oct 2017 11:41:18 +0200 Message-ID: Subject: Re: bug#28645: Status: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer To: Dmitry Gutov Content-Type: multipart/mixed; boundary="089e08231ad48f25ba055be328c6" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28645 Cc: bug#28645 <28645@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --089e08231ad48f25ba055be328c6 Content-Type: text/plain; charset="UTF-8" On Thu, Oct 19, 2017 at 1:46 AM, Dmitry Gutov wrote: > On 10/17/17 3:30 PM, Bastian Beischer wrote: >>> >>> Could you send a patch with the replacements you did make? >> >> >> Sure: > > > Thanks! I've pushed it to emacs-26 now. Hello Dmitry, thanks a lot. Would you mind installing the attached whitespace fixes as well as a follow up? Cheers Bastian --089e08231ad48f25ba055be328c6 Content-Type: text/x-patch; charset="US-ASCII"; name="whitespace.patch" Content-Disposition: attachment; filename="whitespace.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j8ya0tw40 ZGlmZiAtLWdpdCBhL2xpc3AvY2VkZXQvc2VtYW50aWMvZGVjb3JhdGUvaW5jbHVkZS5lbCBiL2xp c3AvY2VkZXQvc2VtYW50aWMvZGVjb3JhdGUvaW5jbHVkZS5lbAppbmRleCA5ZjE4MjVkNDIwLi45 NzViYTM0MzQ2IDEwMDY0NAotLS0gYS9saXNwL2NlZGV0L3NlbWFudGljL2RlY29yYXRlL2luY2x1 ZGUuZWwKKysrIGIvbGlzcC9jZWRldC9zZW1hbnRpYy9kZWNvcmF0ZS9pbmNsdWRlLmVsCkBAIC00 NjcsNyArNDY3LDcgQEAgaXRzIGNvbnRlbnRzLgogCShlcnJvciAiQ291bGQgbm90IGxvY2F0aW9u IGluY2x1ZGUgJXMiCiAJICAgICAgIChzZW1hbnRpYy10YWctbmFtZSB0YWcpKSkKICAgICAgICAo KGdldC1maWxlLWJ1ZmZlciBmaWxlKQotICAgICAgIChwb3AtdG8tYnVmZmVyLXNhbWUtd2luZG93 IChnZXQtZmlsZS1idWZmZXIgZmlsZSkpKQorICAgICAgICAocG9wLXRvLWJ1ZmZlci1zYW1lLXdp bmRvdyAoZ2V0LWZpbGUtYnVmZmVyIGZpbGUpKSkKICAgICAgICAoKHN0cmluZ3AgZmlsZSkKIAko ZmluZC1maWxlIGZpbGUpKQogICAgICAgICkpKSkKZGlmZiAtLWdpdCBhL2xpc3AvY2VkZXQvc2Vt YW50aWMvc2VuYXRvci5lbCBiL2xpc3AvY2VkZXQvc2VtYW50aWMvc2VuYXRvci5lbAppbmRleCA3 MGUwNDQ3NWFiLi5lYTc5NmRkMTlmIDEwMDY0NAotLS0gYS9saXNwL2NlZGV0L3NlbWFudGljL3Nl bmF0b3IuZWwKKysrIGIvbGlzcC9jZWRldC9zZW1hbnRpYy9zZW5hdG9yLmVsCkBAIC01MzAsMTEg KzUzMCwxMSBAQCBTb21lIHRhZ3Mgc3VjaCBhcyBpbmNsdWRlcyBoYXZlIG90aGVyIHJlZmVyZW5j ZSBmZWF0dXJlcy4iCiAgICAgICAgOzsgQSB0YWcKICAgICAgICAoKHNlbWFudGljLXRhZy1wIHJl c3VsdCkKIAkoc2VtYW50aWMtZ28tdG8tdGFnIHJlc3VsdCkKLSAgICAgICAocG9wLXRvLWJ1ZmZl ci1zYW1lLXdpbmRvdyAoY3VycmVudC1idWZmZXIpKQorICAgICAgICAocG9wLXRvLWJ1ZmZlci1z YW1lLXdpbmRvdyAoY3VycmVudC1idWZmZXIpKQogCShzZW1hbnRpYy1tb21lbnRhcnktaGlnaGxp Z2h0LXRhZyByZXN1bHQpKQogICAgICAgIDs7IEJ1ZmZlcnMKICAgICAgICAoKGJ1ZmZlcnAgcmVz dWx0KQotICAgICAgIChwb3AtdG8tYnVmZmVyLXNhbWUtd2luZG93IHJlc3VsdCkKKyAgICAgICAg KHBvcC10by1idWZmZXItc2FtZS13aW5kb3cgcmVzdWx0KQogCShwdWxzZS1tb21lbnRhcnktaGln aGxpZ2h0LW9uZS1saW5lIChwb2ludCkpKQogICAgICAgIDs7IEZpbGVzCiAgICAgICAgKChhbmQg KHN0cmluZ3AgcmVzdWx0KSAoZmlsZS1leGlzdHMtcCByZXN1bHQpKQo= --089e08231ad48f25ba055be328c6-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 06:03:46 2017 Received: (at 28645) by debbugs.gnu.org; 19 Oct 2017 10:03:46 +0000 Received: from localhost ([127.0.0.1]:49146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e57g1-0006Gi-O7 for submit@debbugs.gnu.org; Thu, 19 Oct 2017 06:03:46 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:54460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e57g0-0006GR-FI for 28645@debbugs.gnu.org; Thu, 19 Oct 2017 06:03:44 -0400 Received: by mail-wm0-f46.google.com with SMTP id i124so15234249wmf.3 for <28645@debbugs.gnu.org>; Thu, 19 Oct 2017 03:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HS+gSitjOpoB4Vwko5kNE8FEUSfxbD5Up7SuhA0Nk3Q=; b=bjoOIq3d1eJ52Ao+xowvbYBo1l9Hkf5RKY2Yl+cQThBDCKglB0xmu74lUoMjakfzXS RhTAaCPi9/GR3v0wHkcy2lFDHMFLe6fZGsp3R9cU6kxioFSdWgNLLgVrrmfZDhboUKH7 7dX4bQZgJrMvls1Av6XfFuSVMdQcauFk8j7PIH2dy8TFQMsuSH+Iy3IEuJVJAmM7XEf3 /IsYg57zdA/cEkZJt91pNI9xN4cw0otfk839QwUjwpNsALN5+/JxlVC9OgLa+XUzU8EC CS27/QP6F5KSPwvi8omZWG3ooB65gDEd9kXikSzzWuv1PWMKkBy6KWI6R2KT3+1jpU7+ ainw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HS+gSitjOpoB4Vwko5kNE8FEUSfxbD5Up7SuhA0Nk3Q=; b=XqYRJIqKW4W2Pc3vUXrwvsq6Yf0k2HI+yCdkM4FCkNm3QyR5JP9l17fazvt1CZy2+K Bjt/aXHsTzye4jYrbG4mT9bPNdedxH1aczfZQj9UotiSWKTGiwQv0+zFPETDclnP6wvW O18cD/KHTHvnJxacW6jFmJqoNhT1qmfepMZs9H2Qb73S+F2juN1/lRE2KafX3f2Fwb8X ZBHXH8CHRtA996PKWKoujD5b0a+CQ9vs+Kq8PiE0goQnaSzBS4CwaMJYcrpX/IfhxQHJ xxY+v4Mb6FxtSmH8dfmrW8QQbDBUEdLAreu7lF4FSw7d/zrOcuB3ILKTwwSyM4MxQA2W jD9w== X-Gm-Message-State: AMCzsaUvh0aruIxRNsJ89aLqmMToQb3WFTvXS85FzGNc35KgiimJwJcF 65j4rpjJHD4EvT410YF6iy3pO9Xc X-Google-Smtp-Source: ABhQp+SQVf+PHn5SGM/WK1jq6jHc+D9TcOlUV2HQiOeBdQgh7Qbu2jCACFrY5iLhkUneQ7zejKUFPA== X-Received: by 10.80.134.135 with SMTP id r7mr1804789eda.152.1508407418547; Thu, 19 Oct 2017 03:03:38 -0700 (PDT) Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id k51sm10583067ede.42.2017.10.19.03.03.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Oct 2017 03:03:37 -0700 (PDT) Subject: Re: bug#28645: Status: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer To: Bastian Beischer References: <873770y3f9.fsf@gmail.com> <937f31d2-2952-8e88-1dd4-81ee243cd1fd@yandex.ru> <878tgalzx0.fsf@gmail.com> <31f6e0db-1dc3-3897-4529-d60c424a1c03@yandex.ru> From: Dmitry Gutov Message-ID: Date: Thu, 19 Oct 2017 13:03:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 28645 Cc: bug#28645 <28645@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) On 10/19/17 12:41 PM, Bastian Beischer wrote: > thanks a lot. Would you mind installing the attached whitespace fixes > as well as a follow up? Also done, thanks! From unknown Thu Sep 11 15:11:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 16 Nov 2017 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator