From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#4854: 23.1.50; before-string overlay and show-paren-mode Date: Fri, 01 Jul 2016 14:42:30 -0400 Message-ID: <87k2h5gpyh.fsf@users.sourceforge.net> References: <87fx8x0yng.fsf@escher.local.home> <877hu5zy5r.fsf@escher.local.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1467398609 20331 80.91.229.3 (1 Jul 2016 18:43:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Jul 2016 18:43:29 +0000 (UTC) Cc: 4854@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 01 20:43:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bJ3PG-0005r3-Bz for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jul 2016 20:43:14 +0200 Original-Received: from localhost ([::1]:35189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJ3PF-0001Or-GV for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jul 2016 14:43:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJ3P9-0001NX-3T for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2016 14:43:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJ3P4-0006cw-5c for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2016 14:43:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJ3P4-0006cp-2G for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2016 14:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bJ3P3-000615-Nh for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2016 14:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Jul 2016 18:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 4854 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 4854-submit@debbugs.gnu.org id=B4854.146739855323093 (code B ref 4854); Fri, 01 Jul 2016 18:43:01 +0000 Original-Received: (at 4854) by debbugs.gnu.org; 1 Jul 2016 18:42:33 +0000 Original-Received: from localhost ([127.0.0.1]:34132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJ3Oa-00060O-Ob for submit@debbugs.gnu.org; Fri, 01 Jul 2016 14:42:32 -0400 Original-Received: from mail-it0-f43.google.com ([209.85.214.43]:37497) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJ3OY-000601-Ss; Fri, 01 Jul 2016 14:42:31 -0400 Original-Received: by mail-it0-f43.google.com with SMTP id f6so23342869ith.0; Fri, 01 Jul 2016 11:42:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=6OV14kWpyTO6nMx7nU1v8L8LglZBODbOfajRTg1qLYE=; b=EKbRHz0DdtTZxLM6vVgjyqXb8iKat1uSxBhYPv1BLF/veAwLx4LnzA34g7RVOCx3sE 6Em0ci01Iq16UFtvGonVOgyWxHVQblKJwyqPfsyelfTI6lMp1YlWNRQsVWUNPbroePDM BvKXwOjCyghRHGHbLRlIsqTb5f5m5xqqVaf2NcoVgu+u1afoseDINphDyusKp+CZ4xyy /VxbEB5uD+h3t//am09PK7MiDUHuXZlAMyyLNSftwRnbHihahvj6Xdqxss5ICXfSoNu0 Sw9SdIOF/F514kZbViB0bo+lnfw2Kk3wfADK9+4dnkqE9I3f+iX2pAh2+StZxLkoHLor RR3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=6OV14kWpyTO6nMx7nU1v8L8LglZBODbOfajRTg1qLYE=; b=ZBA7cbO3bgwtVeCknWsBMWQ3aWVtALYZq1Do+KbDUdIOpqLdmkeg66kTMTSwYBSdE/ m6tZGkiCZH/jegaMfMYs0/gP9e8vDlfz847XuSvUj7/O+h6kLxg5H8lXv8L6EkoZplCO lmyQmW7NKcnpOm1PQfP/8QLBO/F2kooqREsTsFpDRhBYDrV8RLNjv3GsSzcOrkOj67q1 ufGVccPdF8VmYchh3miYKQHVPJA+4X+hxUl9yVAOeFg6TcDX4hfkGA0M/Z6ySBwHlMDX jCtR5eNboO3GIiWaRMvGPsTuAC/YRTOafH6UNXnLm4nh8cpO0LAA6hvc2zUjVy1MU+gC GPeg== X-Gm-Message-State: ALyK8tK6GqZYIkPSUNCi2b9cCEO1ZdmpjYuWqplW2sWTZ0tvTlGYMo9exOsyw+RA6eXEZg== X-Received: by 10.36.227.68 with SMTP id d65mr912708ith.75.1467398545265; Fri, 01 Jul 2016 11:42:25 -0700 (PDT) Original-Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44]) by smtp.googlemail.com with ESMTPSA id k101sm2025552ioi.9.2016.07.01.11.42.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jul 2016 11:42:24 -0700 (PDT) In-Reply-To: <877hu5zy5r.fsf@escher.local.home> (Stephen Berman's message of "Thu, 05 Nov 2009 00:08:00 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120264 Archived-At: severity 4854 minor tags 4854 notabug quit A simpler test is 1. emacs -Q 2. eval (defun show-overlays () (interactive) (message "ovlist %S" (mapcar (lambda (o) (cons o (overlay-properties o))) (overlays-in (1- (point)) (1+ (point)))))) (global-set-key "\C-cs" 'show-overlays) 3. M-x show-paren-mode 4. with point on a parenthesis C-c s gives ovlist ((# face show-paren-match prio= rity 1000)) M-x show-overlays gives ovlist nil Stephen Berman writes: > These two things seem very strange: (i) enabling show-paren-mode and > getting the show-paren overlay somehow nullifies the unless test; (ii) > this effect only happens when the command is invoked via a key > sequence. It's because show-paren-mode uses a single (pair of) overlay(s) for all buffers and moves it to right place during idle time. When you invoke a command with M-x the overlay pair gets moved to the minibuffer. With a direct keybinding the overlay pair stays in the current buffer. This can be demonstrated by adding this advice (additional to the code evaluated above): (defun debug-show-paren-mode (&rest _args) (message "show-paren-function in buffer %S" (current-buffer))) (advice-add 'show-paren-function :before #'debug-show-paren-mode) When using C-c s: show-paren-function in buffer # [4 times] ovlist ((# face show-paren-match prio= rity 1000)) When using M-x show-overlays: show-paren-function in buffer # [5 times] ovlist nil You can run the command =E2=80=98show-overlays=E2=80=99 with C-c s So I think this is not a bug, it's just how show-paren-mode works.