From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#25000: 26.0.50; Ibuffer might compare marks case insensitively Date: Wed, 23 Nov 2016 21:11:21 +0900 Message-ID: <87eg22gzva.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1479903138 16222 195.159.176.226 (23 Nov 2016 12:12:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 23 Nov 2016 12:12:18 +0000 (UTC) To: 25000@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 23 13:12:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9WPK-00037s-T8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Nov 2016 13:12:11 +0100 Original-Received: from localhost ([::1]:33205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9WPO-0001ME-Hq for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Nov 2016 07:12:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9WPI-0001M9-6c for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2016 07:12:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9WPC-0006Zb-8I for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2016 07:12:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51774) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c9WPC-0006ZP-5J for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2016 07:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c9WPC-0007Jo-0Q for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2016 07:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Nov 2016 12:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25000 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.147990311228109 (code B ref -1); Wed, 23 Nov 2016 12:12:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Nov 2016 12:11:52 +0000 Original-Received: from localhost ([127.0.0.1]:38940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9WP1-0007JJ-Lg for submit@debbugs.gnu.org; Wed, 23 Nov 2016 07:11:51 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9WP0-0007J8-Mn for submit@debbugs.gnu.org; Wed, 23 Nov 2016 07:11:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9WOu-0006OJ-F8 for submit@debbugs.gnu.org; Wed, 23 Nov 2016 07:11:45 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:59211) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c9WOu-0006OB-Bg for submit@debbugs.gnu.org; Wed, 23 Nov 2016 07:11:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9WOs-0001Jf-VO for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2016 07:11:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9WOo-0006KU-0I for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2016 07:11:42 -0500 Original-Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:33286) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c9WOn-0006Jv-Q0 for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2016 07:11:37 -0500 Original-Received: by mail-pf0-x244.google.com with SMTP id 144so662437pfv.0 for ; Wed, 23 Nov 2016 04:11:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version; bh=hnRJUcXPVticgRLTm6mgJVig3HfVZ1a+1kLiQYMNylU=; b=s5g9c1u0Dy9uJAcfeYRqQYxhLjhwA3gSWz5EqILvLoYcdTmxDTGxPkjfWbg+dbWd1Z 63EJU8q3hd875rW+6dPaiADXUGMi0aZ/OcczmCL8YEr5Us54t9rFFoFXtO8216selbUA gZ5JrFAKDClzTnxdUwLJForA6EjkjjYFt8kfk99nOzKVLRyJr/NOOF+nTyJ9Ycd5eRDn BS56V7qJJhc1HovV813/k7aI3RSAejUNLknkyLlowfR1gE0XKOVFS+14CiADa5fY6HIb 3gmdb3qo6Di660pFaGKn47/x0qiMizUnUBnspPTEGb2+6GtFeLpJBvvNxUWb4mmfNJN3 KtYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=hnRJUcXPVticgRLTm6mgJVig3HfVZ1a+1kLiQYMNylU=; b=h65c0jJBaxHKCnlGHKn497xwCfGFzKsMdD6GxbhgDUW1+ZlpUAFnvWWuazkZK0xJaA E7VQyWLG0HDhw7a3+9RFUoO8ujy9Qx4SeVkGdhxtMyYSKJru7mfI/u11NxbrJl0V2W40 U++d4308HOtDM4LfiG/2yh23Qy/JAMDF2RbfvhQViVUKWQNow6Oy7lzjVTkRVNn9IPKN rwlUIRwE3qdZt54zr+VJlX91s3gH0PNvRGZWVlQLcpDOzq4IywbsxdUbw1FOrjuCuR/z 5ypU8MkZqnVTl0vncepIMSWSFLL7goBQ8pfNGHEt4KDQ9HAQHu1mS9ZYBXxSzAFEuh7q YbjQ== X-Gm-Message-State: AKaTC015vjz89aHeTIVc9krPa9L3/FNYs21sGzGR8Q27OVfOfZzU8sXFJ8ZpKa8VM35tZw== X-Received: by 10.84.129.131 with SMTP id b3mr5952066plb.54.1479903096425; Wed, 23 Nov 2016 04:11:36 -0800 (PST) Original-Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57]) by smtp.gmail.com with ESMTPSA id 189sm34605681pgh.5.2016.11.23.04.11.34 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Nov 2016 04:11:36 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:126010 Archived-At: In Ibuffer mark comparisons should be case _sensitive_. emacs -Q: ;; eval following form: (let ((case-fold-search t)) (ibuffer) (ibuffer-mark-by-name-regexp "scratch") (ibuffer-change-marks ibuffer-marked-char ?L) (ibuffer-mark-by-name-regexp "Messages") (ibuffer-change-marks ibuffer-marked-char ?l) (null (cdr (ibuffer-buffer-names-with-mark ?l)))) => nil ;; It doesn't distinguish between mark "L" and "l". ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From a6275e8e966c4f58e30f7aa3787557961385c6dc Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Wed, 23 Nov 2016 21:04:31 +0900 Subject: [PATCH] ibuffer: compare marks with EQ * lisp/ibuffer (ibuffer-update-title-and-summary, ibuffer-redisplay-current) (ibuffer-buffer-name-face, ibuffer-unmark-all) (ibuffer-count-deletion-lines, ibuffer-buffer-names-with-mark): Use 'eq' instead of 'char-equal' when comparing mark characters (Bug#25000). --- lisp/ibuffer.el | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 51d7cb9..4268be3 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1236,7 +1236,7 @@ ibuffer-buffer-names-with-mark (let ((ibuffer-buffer-names-with-mark-result nil)) (ibuffer-map-lines-nomodify (lambda (buf mk) - (when (char-equal mark mk) + (when (eq mark mk) (push (buffer-name buf) ibuffer-buffer-names-with-mark-result)))) ibuffer-buffer-names-with-mark-result)) @@ -1251,15 +1251,15 @@ ibuffer-count-marked-lines (if all (ibuffer-map-lines-nomodify (lambda (_buf mark) - (not (char-equal mark ?\s)))) + (not (eq mark ?\s)))) (ibuffer-map-lines-nomodify (lambda (_buf mark) - (char-equal mark ibuffer-marked-char))))) + (eq mark ibuffer-marked-char))))) (defsubst ibuffer-count-deletion-lines () (ibuffer-map-lines-nomodify (lambda (_buf mark) - (char-equal mark ibuffer-deletion-char)))) + (eq mark ibuffer-deletion-char)))) (defsubst ibuffer-map-deletion-lines (func) (ibuffer-map-on-mark ibuffer-deletion-char func)) @@ -1338,26 +1338,26 @@ ibuffer-unmark-all (if (= (ibuffer-count-marked-lines t) 0) (message "No buffers marked; use 'm' to mark a buffer") (cond - ((char-equal mark ibuffer-marked-char) + ((eq mark ibuffer-marked-char) (ibuffer-map-marked-lines (lambda (_buf _mark) (ibuffer-set-mark-1 ?\s) t))) - ((char-equal mark ibuffer-deletion-char) + ((eq mark ibuffer-deletion-char) (ibuffer-map-deletion-lines (lambda (_buf _mark) (ibuffer-set-mark-1 ?\s) t))) - ((not (char-equal mark ?\r)) + ((not (eq mark ?\r)) (ibuffer-map-lines (lambda (_buf cmark) - (when (char-equal cmark mark) + (when (eq cmark mark) (ibuffer-set-mark-1 ?\s)) t))) (t (ibuffer-map-lines (lambda (_buf mark) - (when (not (char-equal mark ?\s)) + (when (not (eq mark ?\s)) (ibuffer-set-mark-1 ?\s)) t))))) (ibuffer-redisplay t)) @@ -1908,9 +1908,9 @@ ibuffer-format-column (_ (concat str left right))))) (defun ibuffer-buffer-name-face (buf mark) - (cond ((char-equal mark ibuffer-marked-char) + (cond ((eq mark ibuffer-marked-char) ibuffer-marked-face) - ((char-equal mark ibuffer-deletion-char) + ((eq mark ibuffer-deletion-char) ibuffer-deletion-face) (t (let ((level -1) @@ -1954,7 +1954,7 @@ ibuffer-redisplay-current (defun ibuffer-map-on-mark (mark func) (ibuffer-map-lines (lambda (buf mk) - (if (char-equal mark mk) + (if (eq mark mk) (funcall func buf mark) nil)))) @@ -2181,8 +2181,8 @@ ibuffer-update-title-and-summary (buffer-substring (point) (line-end-position))))) (apply #'insert (mapcar (lambda (c) - (if (not (or (char-equal c ?\s) - (char-equal c ?\n))) + (if (not (or (eq c ?\s) + (eq c ?\n))) ?- ?\s)) str))) -- 2.10.2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 26.0.50.7 (x86_64-pc-linux-gnu, GTK+ Version 3.22.3) of 2016-11-23 built on calancha-pc Repository revision: c542fab20f53374dd0c71dce949ef370fc76fa48