From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 08 14:15:27 2012 Received: (at submit) by debbugs.gnu.org; 8 Aug 2012 18:15:27 +0000 Received: from localhost ([127.0.0.1]:42770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzAn0-0005Bq-RS for submit@debbugs.gnu.org; Wed, 08 Aug 2012 14:15:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34566) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzAmy-0005Bj-Mf for submit@debbugs.gnu.org; Wed, 08 Aug 2012 14:15:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzAf8-0001Rg-Ck for submit@debbugs.gnu.org; Wed, 08 Aug 2012 14:07:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:48083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzAf8-0001Rb-96 for submit@debbugs.gnu.org; Wed, 08 Aug 2012 14:07:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzAf7-0004rg-BH for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 14:07:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzAf6-0001Q9-6o for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 14:07:17 -0400 Received: from mail-pb0-f41.google.com ([209.85.160.41]:57319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzAf6-0001Ow-12 for bug-gnu-emacs@gnu.org; Wed, 08 Aug 2012 14:07:16 -0400 Received: by pbbjt11 with SMTP id jt11so2023133pbb.0 for ; Wed, 08 Aug 2012 11:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=1YDO0AqrBxBF99FYdwUJfwhm8ecedyrhyTJKQQ3Vsfo=; b=oDi+K4TRThCiTxcQ0DsTW7h578WArnMpLvgxEIP6iyog8DsnTVzyBFlOdWt/k2jTZj dY5P4z7AlI4+Fr+esTOp2RkAhoz8iMheBJGpZaWoJhEc456Uz4/mkOamKofEYSkROcfL SBBn857Z0RFAyJbkNgWgz5F5u9ThSqZczLCso1xt4+dki/l4aHLXECIMuHqi8enhHFW+ N+xGrq3+LVB/rpyOvs4U16WtjkZYERK/oqfAfxKCUKykpulWQWQ8/Vv+W/ilxXO6SA+0 JorZzYKb+MAVGp2Vz2YKawBB+68yTSJgEHc9kUXMNU+8b0dCI7P7ej3QjQkmskyDQQl4 swAA== Received: by 10.68.189.74 with SMTP id gg10mr791134pbc.65.1344449234938; Wed, 08 Aug 2012 11:07:14 -0700 (PDT) Received: from debian-6.05 ([101.63.212.27]) by mx.google.com with ESMTPS id nr8sm10394983pbc.43.2012.08.08.11.07.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Aug 2012 11:07:14 -0700 (PDT) From: Jambunathan K To: bug-gnu-emacs@gnu.org Subject: 24.1.50; vc-dir: Need a way to hide unregistered files Date: Wed, 08 Aug 2012 23:37:13 +0530 Message-ID: <87pq71i7fy.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) I have a tendency to accumulate unregistered files in my vc-dir work area before I do away with all of them with "git clean -d -f". It will be convenient if the existing `vc-dir-hide-up-to-date' (and the "x" binding) is extended so that files in arbitrary state - including unregistered - could be hidden. I have posted my patch to emacs-devel. See following thread: http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00277.html With my patch, I can accomplish what I want with (custom-set-variables '(vc-dir-hide-these-states (quote ("unregistered" "up-to-date")))) Feel free to close this patch once the above patch is suitably dealt with. In GNU Emacs 24.1.50.22 (i686-pc-linux-gnu, GTK+ Version 2.20.1) of 2012-08-08 on debian-6.05 Bzr revision: 109513 kjambunathan@gmail.com-20120808150232-cvekujrpotm9qlwa Windowing system distributor `The X.Org Foundation', version 11.0.10707000 Important settings: value of $LANG: en_IN locale-coding-system: iso-latin-1-unix default enable-multibyte-characters: t From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 08 14:32:30 2012 Received: (at control) by debbugs.gnu.org; 8 Aug 2012 18:32:30 +0000 Received: from localhost ([127.0.0.1]:42793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzB3V-0005aa-Nn for submit@debbugs.gnu.org; Wed, 08 Aug 2012 14:32:30 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:39053) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzB3U-0005aT-Nj for control@debbugs.gnu.org; Wed, 08 Aug 2012 14:32:29 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SzAvf-0008Jf-51 for control@debbugs.gnu.org; Wed, 08 Aug 2012 14:24:23 -0400 Date: Wed, 08 Aug 2012 14:24:23 -0400 Message-Id: Subject: control message for bug 12159 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) forcemerge 6148 12159 From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 08 14:36:00 2012 Received: (at 12159) by debbugs.gnu.org; 8 Aug 2012 18:36:00 +0000 Received: from localhost ([127.0.0.1]:42798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzB6t-0005fT-Ip for submit@debbugs.gnu.org; Wed, 08 Aug 2012 14:36:00 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:39126) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzB6s-0005fN-5N for 12159@debbugs.gnu.org; Wed, 08 Aug 2012 14:35:58 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SzAz1-00005h-1P; Wed, 08 Aug 2012 14:27:51 -0400 From: Glenn Morris To: Jambunathan K Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files References: <87pq71i7fy.fsf@gmail.com> X-Spook: Rubin USDOJ DES brigand Becker afsatcom Aldergrove Medco X-Ran: n\_Jqtr,;7!["yYj/8`/t)kfcFpS4qE6&D09VlVJQ~r6!sdzYQqm-k/}($Q"Aw"p3D.Nm} X-Hue: white X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 08 Aug 2012 14:27:50 -0400 In-Reply-To: <87pq71i7fy.fsf@gmail.com> (Jambunathan K.'s message of "Wed, 08 Aug 2012 23:37:13 +0530") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 12159 Cc: 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6148 From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 08 15:00:11 2012 Received: (at 12159) by debbugs.gnu.org; 8 Aug 2012 19:00:11 +0000 Received: from localhost ([127.0.0.1]:42831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzBUI-00075X-VQ for submit@debbugs.gnu.org; Wed, 08 Aug 2012 15:00:11 -0400 Received: from mail-gh0-f172.google.com ([209.85.160.172]:46082) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzBUH-00075P-8O for 12159@debbugs.gnu.org; Wed, 08 Aug 2012 15:00:10 -0400 Received: by ghbg16 with SMTP id g16so1173247ghb.3 for <12159@debbugs.gnu.org>; Wed, 08 Aug 2012 11:52:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=3Yv3FC07OWpp09zLggxmIDSYk1SJsJjoPDRd0Vj3TeU=; b=dAlTJvq7vd3c78snmw+CPnObntYVwKCcSvfPjJ/SPX+Zc3a2VzAt5lj7W/1puSrkDI CTAyzIzYiwBsuCRuUjvJ544GJfs1XvnfXrqBLrBHLchZWyznipd59LRIi6lh+Uv7AyKc 23yNKXdsalY5aNPZkJntw1AgRbSz5jqJw098QSDUXFMIoH7/LIaaRnqwe97hTamsihQ/ VVA1T+o0qOQKLvuDsB3khYQU7b1Bmq+DCXiRu+PYn3seSan7ZZPKL8Q63K9aM6kvYxks uvIjnctoA1CtvJvAlNrUii+BRmJQmqoTs5ziBt+EBloISJej86uHOvgSCmfKbOg23zV8 gz9Q== Received: by 10.66.88.202 with SMTP id bi10mr35931715pab.10.1344451922496; Wed, 08 Aug 2012 11:52:02 -0700 (PDT) Received: from debian-6.05 ([101.63.212.27]) by mx.google.com with ESMTPS id rz10sm13879734pbc.32.2012.08.08.11.51.59 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Aug 2012 11:52:01 -0700 (PDT) From: Jambunathan K To: Glenn Morris Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files References: <87pq71i7fy.fsf@gmail.com> Date: Thu, 09 Aug 2012 00:22:00 +0530 In-Reply-To: (Glenn Morris's message of "Wed, 08 Aug 2012 14:27:50 -0400") Message-ID: <87d3312p4f.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12159 Cc: 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Glenn Morris writes: > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6148 Quick comments: 1. My patch could make use of completing-read-multiple. Currently it uses completing-read. So one has to do multiple "C-u x"s. 2. Magnus' changes assumes that states are just elisp symbols. This may not be true. In case of locked states - designated as USER in `vc-state' - the state could actually be a string. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 08 22:02:35 2012 Received: (at 12159) by debbugs.gnu.org; 9 Aug 2012 02:02:35 +0000 Received: from localhost ([127.0.0.1]:43296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzI55-00007w-6G for submit@debbugs.gnu.org; Wed, 08 Aug 2012 22:02:35 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:32076) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SzI53-00007q-K5 for 12159@debbugs.gnu.org; Wed, 08 Aug 2012 22:02:33 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09Ld/LR/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="195323536" Received: from 75-119-242-209.dsl.teksavvy.com (HELO pastel.home) ([75.119.242.209]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 08 Aug 2012 21:54:25 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2AB90599B1; Wed, 8 Aug 2012 21:54:24 -0400 (EDT) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files Message-ID: References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> Date: Wed, 08 Aug 2012 21:54:24 -0400 In-Reply-To: <87d3312p4f.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 09 Aug 2012 00:22:00 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12159 Cc: Glenn Morris , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > 1. My patch could make use of completing-read-multiple. Currently it > uses completing-read. So one has to do multiple "C-u x"s. Maybe a better option is to just have "C-u x" hide all files in the same state as the file-at-point. So you still need several "C-u x"s but you don't need to enter the states, you can just point to them. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 11 13:49:57 2012 Received: (at 12159) by debbugs.gnu.org; 11 Aug 2012 17:49:57 +0000 Received: from localhost ([127.0.0.1]:49781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0Foz-0005Fw-7s for submit@debbugs.gnu.org; Sat, 11 Aug 2012 13:49:57 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:56683) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0Fox-0005Fn-2k for 12159@debbugs.gnu.org; Sat, 11 Aug 2012 13:49:55 -0400 Received: by pbbrr4 with SMTP id rr4so5768119pbb.3 for <12159@debbugs.gnu.org>; Sat, 11 Aug 2012 10:41:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=FEM3aQirHqwvHqMCCrdraQI/51EI/jC3Uv3zKKQvmJ8=; b=NV0gGKnpGLAi9t6TxDSGvQL8tsMD830s2hBQqS5jMOKX+FkawI8vBwm3YPt1JSWJO0 kh/i9k8+t4yL1BsHnoX8hbv9PcKfytQ8VGOwpOhVNNYdWHit+wnVd9ahfXoQ6bGlqKgk wTCzdYjCqZ4xETbNmhHoiWZ/cGaxyM7FlNv00EDYg3DdiTVNTWTHDRKBhUPuH+QzPfMh maJv3udn2b4/qbgMxhgJuHce7pnQYYimiAiUvWme1XiAjN7XqZGZvn3XiWDf+7le0m4e DvOZZcRUmtACkP2T4aMkvFXm17p+sjuFcBtKUqp1jpVwjCdDkOi437nUJXxsZEGF3Krv TOJw== Received: by 10.68.201.234 with SMTP id kd10mr22155928pbc.141.1344706892012; Sat, 11 Aug 2012 10:41:32 -0700 (PDT) Received: from debian-6.05 ([101.63.164.247]) by mx.google.com with ESMTPS id os2sm1751231pbc.16.2012.08.11.10.41.26 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 11 Aug 2012 10:41:31 -0700 (PDT) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> Date: Sat, 11 Aug 2012 23:11:34 +0530 In-Reply-To: (Stefan Monnier's message of "Wed, 08 Aug 2012 21:54:24 -0400") Message-ID: <871ujdpbqp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12159 Cc: Glenn Morris , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Stefan Monnier writes: >> 1. My patch could make use of completing-read-multiple. Currently it >> uses completing-read. So one has to do multiple "C-u x"s. > > Maybe a better option is to just have "C-u x" hide all files in the same > state as the file-at-point. So you still need several "C-u x"s but you > don't need to enter the states, you can just point to them. Currently "x" acts buffer-wide. Your suggestion is to hide the files that are in the same state as the file at point. If there are marked files, then potentially a super-set of marked files could get hidden. This "superset" behaviour will surprise the user - "Why does even un-marked files get hidden?" I am little bit hesitant to re-work the patch. > Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 11 18:49:02 2012 Received: (at 12159) by debbugs.gnu.org; 11 Aug 2012 22:49:02 +0000 Received: from localhost ([127.0.0.1]:50095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0KUQ-00064b-Cm for submit@debbugs.gnu.org; Sat, 11 Aug 2012 18:49:02 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:23429) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0KUO-00064C-6R for 12159@debbugs.gnu.org; Sat, 11 Aug 2012 18:49:00 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu0+4rw0x/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="195504807" Received: from 184-175-13-49.dsl.teksavvy.com (HELO pastel.home) ([184.175.13.49]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Aug 2012 18:40:36 -0400 Received: by pastel.home (Postfix, from userid 20848) id 14A3159305; Sat, 11 Aug 2012 18:40:35 -0400 (EDT) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files Message-ID: References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> Date: Sat, 11 Aug 2012 18:40:34 -0400 In-Reply-To: <871ujdpbqp.fsf@gmail.com> (Jambunathan K.'s message of "Sat, 11 Aug 2012 23:11:34 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12159 Cc: Glenn Morris , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > If there are marked files, then potentially a super-set of marked files > could get hidden. This "superset" behaviour will surprise the user - > "Why does even un-marked files get hidden?" I don't see why it should pay attention to the marks. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 11 21:59:31 2012 Received: (at 12159) by debbugs.gnu.org; 12 Aug 2012 01:59:32 +0000 Received: from localhost ([127.0.0.1]:50228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0NSl-0001p1-CV for submit@debbugs.gnu.org; Sat, 11 Aug 2012 21:59:31 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:64269) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0NSj-0001ot-6h for 12159@debbugs.gnu.org; Sat, 11 Aug 2012 21:59:30 -0400 Received: by pbbrr4 with SMTP id rr4so6426188pbb.3 for <12159@debbugs.gnu.org>; Sat, 11 Aug 2012 18:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=w7ZtNIArBBjUgRxD/7OYRxQZvdgWsbT1lVLCk4tGkjM=; b=VbRAv+CpXuv6xYMpaCtyXKIpeLryhcoQUYpbftF6A0MEG+SVeL2ku7bCkgRdfnNmO/ +snKLVhUXYd3bjYmRbVncfJpmLBZQoWuEYPSsGb5w9Oq28BD7JIEm9xFj5e+8zVBgsB1 JmU9rUkyT0OYj7xjwdXyIxcMSnktCjR1m7dTOOyaGF87OlKQ3hqtx9bc5hIZy/X4lsTD snfEBbmgZ53HOLyLvp2tJ74ml/m8z/wlXA0J0AXuj73NoctlDHWblq2tUFnGXvgqFuvK ggOKGYI02chSx+2kMPrQY6iQxqgRwmFhrk0h0ORvxZI6YG0Px3U/ZV16RtWh7955GDaW XxJw== Received: by 10.66.73.132 with SMTP id l4mr8810017pav.30.1344736264231; Sat, 11 Aug 2012 18:51:04 -0700 (PDT) Received: from debian-6.05 ([115.242.245.217]) by mx.google.com with ESMTPS id qn13sm2366246pbb.71.2012.08.11.18.51.00 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 11 Aug 2012 18:51:02 -0700 (PDT) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> Date: Sun, 12 Aug 2012 07:20:49 +0530 In-Reply-To: (Stefan Monnier's message of "Sat, 11 Aug 2012 18:40:34 -0400") Message-ID: <87boigj2ti.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 12159 Cc: Glenn Morris , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.8 (-) --=-=-= Content-Type: text/plain Stefan Monnier writes: >> If there are marked files, then potentially a super-set of marked files >> could get hidden. This "superset" behaviour will surprise the user - >> "Why does even un-marked files get hidden?" > > I don't see why it should pay attention to the marks. I am attaching the modified patch. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=vc-dir-hide-some-states.patch Content-Description: vc-dir-hide-some-states.patch === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-08-11 04:46:38 +0000 +++ lisp/ChangeLog 2012-08-12 01:44:26 +0000 @@ -1,3 +1,11 @@ +2012-08-12 Jambunathan K + + * vc/vc-dir.el (vc-dir-hide-these-states): New custom variable. + (vc-dir-hide-some-states): New command. + (vc-dir-hide-up-to-date): Use `vc-dir-hide-some-states'. + (vc-dir-mode-map): Map "x" to `vc-dir-hide-some-states' instead of + `vc-dir-hide-up-to-date'. + 2012-08-11 Glenn Morris * emacs-lisp/copyright.el (copyright-update-directory): Logic fix. === modified file 'lisp/vc/vc-dir.el' --- lisp/vc/vc-dir.el 2012-07-11 23:13:41 +0000 +++ lisp/vc/vc-dir.el 2012-08-12 01:47:36 +0000 @@ -51,6 +51,25 @@ :type 'hook :group 'vc) +(defcustom vc-dir-hide-these-states '("up-to-date") + "States hidden by `vc-dir-hide-some-states'." + :type '(choice + (const :tag "None") + (set :tag "Choices" + (string :tag "VC State" "added") + (string :tag "VC State" "conflict") + (string :tag "VC State" "edited") + (string :tag "VC State" "ignored") + (string :tag "VC State" "missing") + (string :tag "VC State" "needs-merge") + (string :tag "VC State" "needs-update") + (string :tag "VC State" "removed") + (string :tag "VC State" "unlocked-changes") + (string :tag "VC State" "unregistered") + (string :tag "VC State" "up-to-date"))) + :group 'vc + :version "24.2") + ;; Used to store information for the files displayed in the directory buffer. ;; Each item displayed corresponds to one of these defstructs. (cl-defstruct (vc-dir-fileinfo @@ -271,7 +290,7 @@ (define-key map [down-mouse-3] 'vc-dir-menu) (define-key map [mouse-2] 'vc-dir-toggle-mark) (define-key map [follow-link] 'mouse-face) - (define-key map "x" 'vc-dir-hide-up-to-date) + (define-key map "x" 'vc-dir-hide-some-states) (define-key map [?\C-k] 'vc-dir-kill-line) (define-key map "S" 'vc-dir-search) ;; FIXME: Maybe use A like dired? (define-key map "Q" 'vc-dir-query-replace-regexp) @@ -1106,20 +1125,45 @@ (interactive "fShow file: ") (vc-dir-update (list (list (file-relative-name file) (vc-state file))) (current-buffer))) -(defun vc-dir-hide-up-to-date () - "Hide up-to-date items from display." - (interactive) - (let ((crt (ewoc-nth vc-ewoc -1)) - (first (ewoc-nth vc-ewoc 0))) - ;; Go over from the last item to the first and remove the - ;; up-to-date files and directories with no child files. - (while (not (eq crt first)) - (let* ((data (ewoc-data crt)) - (dir (vc-dir-fileinfo->directory data)) - (next (ewoc-next vc-ewoc crt)) - (prev (ewoc-prev vc-ewoc crt)) - ;; ewoc-delete does not work without this... - (inhibit-read-only t)) +(defun vc-dir-hide-some-states (&optional states) + "Hide items that are in STATES from display. +STATES is a list of vc states (see`vc-state') formatted as a +string. + +If STATES is nil, use `vc-dir-hide-these-states' as the default +value. + +In interactive mode, if prefix argument is non-nil or if +`vc-dir-hide-these-states' is nil, hide items that share the same +state as file at point." + (interactive + ;; Interactive use. + (list + (or (and (not current-prefix-arg) vc-dir-hide-these-states) + ;; No prefix arg or `vc-dir-hide-these-states' is nil. State + ;; to hide is the one at point. + (let ((node (ewoc-locate vc-ewoc))) + (unless node (error "No file available")) + (let* ((data (ewoc-data node)) + (state (vc-dir-fileinfo->state data))) + (unless state (error "No state at point")) + (list (format "%s" state))))))) + ;; Non-interactive use. + (unless (called-interactively-p 'any) + (setq states (or states vc-dir-hide-these-states))) + ;; Hide specified states. + (when states + (let ((crt (ewoc-nth vc-ewoc -1)) + (first (ewoc-nth vc-ewoc 0))) + ;; Go over from the last item to the first and remove the + ;; up-to-date files and directories with no child files. + (while (not (eq crt first)) + (let* ((data (ewoc-data crt)) + (dir (vc-dir-fileinfo->directory data)) + (next (ewoc-next vc-ewoc crt)) + (prev (ewoc-prev vc-ewoc crt)) + ;; ewoc-delete does not work without this... + (inhibit-read-only t)) (when (or ;; Remove directories with no child files. (and dir @@ -1128,10 +1172,15 @@ (not next) ;; Next item is a directory. (vc-dir-fileinfo->directory (ewoc-data next)))) - ;; Remove files in the up-to-date state. - (eq (vc-dir-fileinfo->state data) 'up-to-date)) + ;; Remove files that are to be hidden. + (member (format "%s" (vc-dir-fileinfo->state data)) states)) (ewoc-delete vc-ewoc crt)) - (setq crt prev))))) + (setq crt prev)))))) + +(defun vc-dir-hide-up-to-date () + "Hide up-to-date items from display." + (interactive) + (vc-dir-hide-some-states '("up-to-date"))) (defun vc-dir-kill-line () "Remove the current line from display." --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 03:45:39 2012 Received: (at 12159) by debbugs.gnu.org; 12 Aug 2012 07:45:40 +0000 Received: from localhost ([127.0.0.1]:50539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0Srj-0001Jn-Lg for submit@debbugs.gnu.org; Sun, 12 Aug 2012 03:45:39 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:57136) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0Srh-0001Je-Bg for 12159@debbugs.gnu.org; Sun, 12 Aug 2012 03:45:38 -0400 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3WvsN70G5Mz4KK2C; Sun, 12 Aug 2012 09:37:10 +0200 (CEST) X-Auth-Info: CRB7/3azYqzlznzwwBiC0VJFQbXRuRqhR5+xFBc6/0Q= Received: from igel.home (ppp-93-104-139-122.dynamic.mnet-online.de [93.104.139.122]) by mail.mnet-online.de (Postfix) with ESMTPA id 3WvsN66K5RzbcC4; Sun, 12 Aug 2012 09:37:10 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 4BAC5CA2A4; Sun, 12 Aug 2012 09:37:09 +0200 (CEST) From: Andreas Schwab To: Jambunathan K Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> X-Yow: PARDON me, am I speaking ENGLISH? Date: Sun, 12 Aug 2012 09:37:09 +0200 In-Reply-To: <87boigj2ti.fsf@gmail.com> (Jambunathan K.'s message of "Sun, 12 Aug 2012 07:20:49 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12159 Cc: Stefan Monnier , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Jambunathan K writes: > +(defcustom vc-dir-hide-these-states '("up-to-date") > + "States hidden by `vc-dir-hide-some-states'." > + :type '(choice > + (const :tag "None") > + (set :tag "Choices" > + (string :tag "VC State" "added") Why a string? Using the symbol would be more natural. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 06:06:49 2012 Received: (at 12159) by debbugs.gnu.org; 12 Aug 2012 10:06:50 +0000 Received: from localhost ([127.0.0.1]:50614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0V4L-0005JX-2B for submit@debbugs.gnu.org; Sun, 12 Aug 2012 06:06:49 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:35411) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0V4I-0005JN-Pb for 12159@debbugs.gnu.org; Sun, 12 Aug 2012 06:06:47 -0400 Received: by pbbrr4 with SMTP id rr4so7081773pbb.3 for <12159@debbugs.gnu.org>; Sun, 12 Aug 2012 02:58:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=kuY/WjGvgv3+WlEcobtiT8kBBufRZgiaD6d+vsPybxs=; b=aHQUJ5MklrP71rwS4QtbMlEQgDZTn6D5gyUz+7DCLrxeaa9eF2+gS1f5elWFtNynfy UEqtKw0eNtRj90nY52YLqrS7zpPcGIV2WXQ8khe36BB+jCZw9TWXVnKLS08be7YmWwZE 24vMu/OsMPSNHUq/Qfnp04PH3xaC+D9PpuJ0o4C2lDJDujyPtCFnC+cCw0PzIaWHFYT8 zhCQUolOy4wXVxJzxUD0HUIJLcZV9TmgUgc6YLIQEcU3o86n58M/rwOtBpx3xQxm3Zve OSnFbLt6eJqURkfFv9E8sfDZ5WD3E6GCwj9zeEEoR4FJIiGv61TmtLhx6S5+iXcQkDPJ xPwg== Received: by 10.66.74.3 with SMTP id p3mr11213039pav.49.1344765499091; Sun, 12 Aug 2012 02:58:19 -0700 (PDT) Received: from debian-6.05 ([115.184.4.123]) by mx.google.com with ESMTPS id gf7sm3057714pbc.65.2012.08.12.02.58.15 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Aug 2012 02:58:18 -0700 (PDT) From: Jambunathan K To: Andreas Schwab Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> Date: Sun, 12 Aug 2012 15:28:23 +0530 In-Reply-To: (Andreas Schwab's message of "Sun, 12 Aug 2012 09:37:09 +0200") Message-ID: <87pq6we8jk.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12159 Cc: Stefan Monnier , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Andreas Schwab writes: > Jambunathan K writes: > >> +(defcustom vc-dir-hide-these-states '("up-to-date") >> + "States hidden by `vc-dir-hide-some-states'." >> + :type '(choice >> + (const :tag "None") >> + (set :tag "Choices" >> + (string :tag "VC State" "added") > > Why a string? Using the symbol would be more natural. There is a note up in the thread, which reads: ,---- | 2. Magnus' changes assumes that states are just elisp symbols. This | may not be true. In case of locked states - designated as USER in | `vc-state' - the state could actually be a string. `---- I have gone by what I could make out from the dav backend. Btw, does it make a big difference? > Andreas. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 06:11:28 2012 Received: (at 12159) by debbugs.gnu.org; 12 Aug 2012 10:11:28 +0000 Received: from localhost ([127.0.0.1]:50619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0V8p-0005Px-8C for submit@debbugs.gnu.org; Sun, 12 Aug 2012 06:11:28 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:43310) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0V8n-0005Pp-7v for 12159@debbugs.gnu.org; Sun, 12 Aug 2012 06:11:26 -0400 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3WvwcK61ZBz3hhTR; Sun, 12 Aug 2012 12:02:56 +0200 (CEST) X-Auth-Info: vUIRWg/1ZxJ6Mb8DDDZYlKYOLLzmBvl//JypkHG4X+8= Received: from igel.home (ppp-93-104-139-122.dynamic.mnet-online.de [93.104.139.122]) by mail.mnet-online.de (Postfix) with ESMTPA id 3WvwcJ4tsRzbcpp; Sun, 12 Aug 2012 12:02:56 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 55682CA2A4; Sun, 12 Aug 2012 12:02:56 +0200 (CEST) From: Andreas Schwab To: Jambunathan K Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> <87pq6we8jk.fsf@gmail.com> X-Yow: Now KEN is having a MENTAL CRISIS because his "R.V." PAYMENTS are OVER-DUE!! Date: Sun, 12 Aug 2012 12:02:56 +0200 In-Reply-To: <87pq6we8jk.fsf@gmail.com> (Jambunathan K.'s message of "Sun, 12 Aug 2012 15:28:23 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12159 Cc: Stefan Monnier , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Jambunathan K writes: > Andreas Schwab writes: > >> Jambunathan K writes: >> >>> +(defcustom vc-dir-hide-these-states '("up-to-date") >>> + "States hidden by `vc-dir-hide-some-states'." >>> + :type '(choice >>> + (const :tag "None") >>> + (set :tag "Choices" >>> + (string :tag "VC State" "added") >> >> Why a string? Using the symbol would be more natural. > > There is a note up in the thread, which reads: > > ,---- > | 2. Magnus' changes assumes that states are just elisp symbols. This > | may not be true. In case of locked states - designated as USER in > | `vc-state' - the state could actually be a string. > `---- There is nothing wrong with using a string where the state is a string. But if the user name happens to match the name of one of the state symbols it becomes ambigous. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 07:12:35 2012 Received: (at 12159) by debbugs.gnu.org; 12 Aug 2012 11:12:35 +0000 Received: from localhost ([127.0.0.1]:50673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0W5x-0006u1-FQ for submit@debbugs.gnu.org; Sun, 12 Aug 2012 07:12:34 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:55814) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0W5t-0006tr-CP for 12159@debbugs.gnu.org; Sun, 12 Aug 2012 07:12:31 -0400 Received: by pbbrr4 with SMTP id rr4so7170773pbb.3 for <12159@debbugs.gnu.org>; Sun, 12 Aug 2012 04:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=wIzm1RUOf7q0QEFCObo0mGCcJV2SQnz6VcKgFphLyi0=; b=oAkU/z/p55WZm4IsZ7M+QAuGwvFY+5OpzuoG0CTow5Ga/O4lyEZTn0kxLwdCJQ6RmO foBIevN1CQ7Rse9igItX55Ch9WuZuwCjVS2R+Im/EnK/MjQhksDQLZ5eOdKX8KdShmaP Xh7E/UpIxMJkL6YWIHd0FZdYbNaR0qzMdG+OtEOtz/HHA4AvJsBYreWQTKh2y3hNq3i1 84nRwmg8pBzSceAhdv0cHv4o8q7oukJNmCzB1r8jv9COMTvF113ryZpFsKGn4tyULDKw oHllHW/LFMVK3081ZHhE0b//cu0qjCTiOzQaNCtTT/Fyqw8ohSMKJ8ukZlpRWaxQLTD8 KxQg== Received: by 10.66.88.233 with SMTP id bj9mr11015656pab.72.1344769441359; Sun, 12 Aug 2012 04:04:01 -0700 (PDT) Received: from debian-6.05 ([115.184.4.123]) by mx.google.com with ESMTPS id os1sm3150179pbc.31.2012.08.12.04.03.57 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Aug 2012 04:04:00 -0700 (PDT) From: Jambunathan K To: Andreas Schwab Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> <87pq6we8jk.fsf@gmail.com> Date: Sun, 12 Aug 2012 16:34:06 +0530 In-Reply-To: (Andreas Schwab's message of "Sun, 12 Aug 2012 12:02:56 +0200") Message-ID: <87r4rc5q3d.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12159 Cc: Stefan Monnier , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain Andreas Schwab writes: > Jambunathan K writes: > >> Andreas Schwab writes: >> >>> Jambunathan K writes: >>> >>>> +(defcustom vc-dir-hide-these-states '("up-to-date") >>>> + "States hidden by `vc-dir-hide-some-states'." >>>> + :type '(choice >>>> + (const :tag "None") >>>> + (set :tag "Choices" >>>> + (string :tag "VC State" "added") >>> >>> Why a string? Using the symbol would be more natural. >> >> There is a note up in the thread, which reads: >> >> ,---- >> | 2. Magnus' changes assumes that states are just elisp symbols. This >> | may not be true. In case of locked states - designated as USER in >> | `vc-state' - the state could actually be a string. >> `---- > > There is nothing wrong with using a string where the state is a string. > But if the user name happens to match the name of one of the state > symbols it becomes ambigous. Sure, I will name my next kid `conflict' or even better `missing'. In the latter case, I will have hard time reporting to police if he ever goes missing. Here comes the modified patch. I think I am hitting a bug with defcustom and I will open a separte report for it. When I do, M-x customize-variable RET vc-hide-these-states RET, I see two "up-to-date"s and "added" goes missing. I will let you folks handle the defcustom issue. ,---- | Operate on all settings in this buffer: | Revert... Apply Apply and Save | | Hide Vc Dir Hide These States: Value Menu Choices: | [X] VC State: up-to-date | [ ] VC State: conflict | [ ] VC State: edited | [ ] VC State: ignored | [ ] VC State: missing | [ ] VC State: needs-merge | [ ] VC State: needs-update | [ ] VC State: removed | [ ] VC State: unlocked-changes | [ ] VC State: unregistered | [ ] VC State: up-to-date | State : STANDARD. | States hidden by `vc-dir-hide-some-states'. | Groups: Vc `---- --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug#12159-vc-dir-hide-some-states.patch Content-Description: bug#12159.patch === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-08-11 04:46:38 +0000 +++ lisp/ChangeLog 2012-08-12 01:44:26 +0000 @@ -1,3 +1,11 @@ +2012-08-12 Jambunathan K + + * vc/vc-dir.el (vc-dir-hide-these-states): New custom variable. + (vc-dir-hide-some-states): New command. + (vc-dir-hide-up-to-date): Use `vc-dir-hide-some-states'. + (vc-dir-mode-map): Map "x" to `vc-dir-hide-some-states' instead of + `vc-dir-hide-up-to-date'. + 2012-08-11 Glenn Morris * emacs-lisp/copyright.el (copyright-update-directory): Logic fix. === modified file 'lisp/vc/vc-dir.el' --- lisp/vc/vc-dir.el 2012-07-11 23:13:41 +0000 +++ lisp/vc/vc-dir.el 2012-08-12 10:47:23 +0000 @@ -51,6 +51,25 @@ :type 'hook :group 'vc) +(defcustom vc-dir-hide-these-states '(up-to-date) + "States hidden by `vc-dir-hide-some-states'." + :type '(choice + (const :tag "None") + (set :tag "Choices" + (symbol :tag "VC State" added) + (symbol :tag "VC State" conflict) + (symbol :tag "VC State" edited) + (symbol :tag "VC State" ignored) + (symbol :tag "VC State" missing) + (symbol :tag "VC State" needs-merge) + (symbol :tag "VC State" needs-update) + (symbol :tag "VC State" removed) + (symbol :tag "VC State" unlocked-changes) + (symbol :tag "VC State" unregistered) + (symbol :tag "VC State" up-to-date))) + :group 'vc + :version "24.2") + ;; Used to store information for the files displayed in the directory buffer. ;; Each item displayed corresponds to one of these defstructs. (cl-defstruct (vc-dir-fileinfo @@ -271,7 +290,7 @@ (define-key map [down-mouse-3] 'vc-dir-menu) (define-key map [mouse-2] 'vc-dir-toggle-mark) (define-key map [follow-link] 'mouse-face) - (define-key map "x" 'vc-dir-hide-up-to-date) + (define-key map "x" 'vc-dir-hide-some-states) (define-key map [?\C-k] 'vc-dir-kill-line) (define-key map "S" 'vc-dir-search) ;; FIXME: Maybe use A like dired? (define-key map "Q" 'vc-dir-query-replace-regexp) @@ -1106,20 +1125,43 @@ (interactive "fShow file: ") (vc-dir-update (list (list (file-relative-name file) (vc-state file))) (current-buffer))) -(defun vc-dir-hide-up-to-date () - "Hide up-to-date items from display." - (interactive) - (let ((crt (ewoc-nth vc-ewoc -1)) - (first (ewoc-nth vc-ewoc 0))) - ;; Go over from the last item to the first and remove the - ;; up-to-date files and directories with no child files. - (while (not (eq crt first)) - (let* ((data (ewoc-data crt)) - (dir (vc-dir-fileinfo->directory data)) - (next (ewoc-next vc-ewoc crt)) - (prev (ewoc-prev vc-ewoc crt)) - ;; ewoc-delete does not work without this... - (inhibit-read-only t)) +(defun vc-dir-hide-some-states (&optional states) + "Hide items that are in STATES from display. +STATES is a list of vc states (see`vc-state'). + +If STATES is nil, use `vc-dir-hide-these-states' as default. + +In interactive mode, if prefix argument is non-nil or if +`vc-dir-hide-these-states' is nil, hide items that share the same +state as file at point." + (interactive + ;; Interactive use. + (list + (or (and (not current-prefix-arg) vc-dir-hide-these-states) + ;; Command is prefixed or `vc-dir-hide-these-states' is nil. + ;; State to hide, is the one at point. + (let ((node (ewoc-locate vc-ewoc))) + (unless node (error "No file available")) + (let* ((data (ewoc-data node)) + (state (vc-dir-fileinfo->state data))) + (unless state (error "No state at point")) + (list state)))))) + ;; Non-interactive use. + (unless (called-interactively-p 'any) + (setq states (or states vc-dir-hide-these-states))) + ;; Hide specified states. + (when states + (let ((crt (ewoc-nth vc-ewoc -1)) + (first (ewoc-nth vc-ewoc 0))) + ;; Go over from the last item to the first and remove the + ;; up-to-date files and directories with no child files. + (while (not (eq crt first)) + (let* ((data (ewoc-data crt)) + (dir (vc-dir-fileinfo->directory data)) + (next (ewoc-next vc-ewoc crt)) + (prev (ewoc-prev vc-ewoc crt)) + ;; ewoc-delete does not work without this... + (inhibit-read-only t)) (when (or ;; Remove directories with no child files. (and dir @@ -1129,9 +1171,14 @@ ;; Next item is a directory. (vc-dir-fileinfo->directory (ewoc-data next)))) ;; Remove files in the up-to-date state. - (eq (vc-dir-fileinfo->state data) 'up-to-date)) + (member (vc-dir-fileinfo->state data) states)) (ewoc-delete vc-ewoc crt)) - (setq crt prev))))) + (setq crt prev)))))) + +(defun vc-dir-hide-up-to-date () + "Hide up-to-date items from display." + (interactive) + (vc-dir-hide-some-states '(up-to-date))) (defun vc-dir-kill-line () "Remove the current line from display." --=-=-= Content-Type: text/plain > Andreas. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 10:15:37 2012 Received: (at 12159) by debbugs.gnu.org; 12 Aug 2012 14:15:37 +0000 Received: from localhost ([127.0.0.1]:51417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0Yx6-0003WQ-PP for submit@debbugs.gnu.org; Sun, 12 Aug 2012 10:15:37 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:54913) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0Yx4-0003WI-NO for 12159@debbugs.gnu.org; Sun, 12 Aug 2012 10:15:35 -0400 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3Ww22224W7z4KK3y; Sun, 12 Aug 2012 16:07:06 +0200 (CEST) X-Auth-Info: QkEhKM6Nq+u5ns1Lc/Q6YF+pO9UbD8wuLe95u4j0XWk= Received: from igel.home (ppp-93-104-139-122.dynamic.mnet-online.de [93.104.139.122]) by mail.mnet-online.de (Postfix) with ESMTPA id 3Ww22215HWzbd47; Sun, 12 Aug 2012 16:07:06 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id C8D49CA2A4; Sun, 12 Aug 2012 16:07:05 +0200 (CEST) From: Andreas Schwab To: Jambunathan K Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> <87pq6we8jk.fsf@gmail.com> <87r4rc5q3d.fsf@gmail.com> X-Yow: Are we THERE yet?? Date: Sun, 12 Aug 2012 16:07:05 +0200 In-Reply-To: <87r4rc5q3d.fsf@gmail.com> (Jambunathan K.'s message of "Sun, 12 Aug 2012 16:34:06 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12159 Cc: Stefan Monnier , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Jambunathan K writes: > Sure, I will name my next kid `conflict' or even better `missing'. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 10:21:36 2012 Received: (at 12159) by debbugs.gnu.org; 12 Aug 2012 14:21:36 +0000 Received: from localhost ([127.0.0.1]:51426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0Z2t-0003eW-KC for submit@debbugs.gnu.org; Sun, 12 Aug 2012 10:21:35 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:37854) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0Z2r-0003eP-W5 for 12159@debbugs.gnu.org; Sun, 12 Aug 2012 10:21:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu0+4rw0x/2dsb2JhbABEsEiDSYEIghYBBVYjEAs0EhQYDSSIIboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="195524946" Received: from 184-175-13-49.dsl.teksavvy.com (HELO pastel.home) ([184.175.13.49]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 12 Aug 2012 10:13:05 -0400 Received: by pastel.home (Postfix, from userid 20848) id 6709159305; Sun, 12 Aug 2012 10:13:05 -0400 (EDT) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files Message-ID: References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> Date: Sun, 12 Aug 2012 10:13:05 -0400 In-Reply-To: <87boigj2ti.fsf@gmail.com> (Jambunathan K.'s message of "Sun, 12 Aug 2012 07:20:49 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12159 Cc: Glenn Morris , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > + * vc/vc-dir.el (vc-dir-hide-these-states): New custom variable. Don't bother. Just always default to up-to-date. > +(defun vc-dir-hide-some-states (&optional states) Make it `state' and not a list. > + (interactive > + ;; Interactive use. Redundant comment. > + ;; Non-interactive use. > + (unless (called-interactively-p 'any) > + (setq states (or states vc-dir-hide-these-states))) The test is wrong (it prevents non-interactive use where you specify the state explicitly). The above should simply be (unless state (setq state 'up-to-date)). > +(defun vc-dir-hide-up-to-date () > + "Hide up-to-date items from display." > + (interactive) > + (vc-dir-hide-some-states '("up-to-date"))) Why bother? Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 10:31:03 2012 Received: (at 12159) by debbugs.gnu.org; 12 Aug 2012 14:31:03 +0000 Received: from localhost ([127.0.0.1]:51431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0ZC2-0003s8-VP for submit@debbugs.gnu.org; Sun, 12 Aug 2012 10:31:03 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:60423) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0ZC0-0003rh-RH for 12159@debbugs.gnu.org; Sun, 12 Aug 2012 10:31:01 -0400 Received: by pbbrr4 with SMTP id rr4so7443158pbb.3 for <12159@debbugs.gnu.org>; Sun, 12 Aug 2012 07:22:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=LBRvE/2YocBwaha3BOFNqXpOzMtS4Pu7vFKEhO7MJOI=; b=uYHX/nMDgT55uNcmD9zroyfW/wyfUtrVpjn7cgh4Wq+moOmghAthTH1PFySRxmS8B/ kfnEVZeF7HLjVmExFA6dYfpckxwdEoZecmtQ/iOq6Nmj6SdyHwCNhl5QTupbNh58yI6W afgy72ZJCSm0Abqqvr9W7LEKqJol7eqO7xzcXDer09tPOLqYA+/NEvwfIoXIZWIo/Ju7 nJEogqdg7LTLU9h+8uh/OUyrI7/Y8OlNwjgQChTfqYsQsm6MgmWjdNaZhbOW/dWGgdww 41HpJViNpabzpqv31sMBpXoiQdLfcGF73CsUgXfnvmcPRjexiGY3R+whm3eGxhhah1iU gHDw== Received: by 10.66.76.135 with SMTP id k7mr19711357paw.2.1344781352821; Sun, 12 Aug 2012 07:22:32 -0700 (PDT) Received: from debian-6.05 ([101.62.71.5]) by mx.google.com with ESMTPS id io1sm3389908pbc.67.2012.08.12.07.22.29 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Aug 2012 07:22:32 -0700 (PDT) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> Date: Sun, 12 Aug 2012 19:52:31 +0530 In-Reply-To: (Stefan Monnier's message of "Sun, 12 Aug 2012 10:13:05 -0400") Message-ID: <87ipcoxk9k.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12159 Cc: Glenn Morris , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) I am not working on this patch any more. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 15:19:26 2012 Received: (at 12159) by debbugs.gnu.org; 12 Aug 2012 19:19:26 +0000 Received: from localhost ([127.0.0.1]:51663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0dh7-0001wf-Va for submit@debbugs.gnu.org; Sun, 12 Aug 2012 15:19:26 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:59646) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0dh5-0001wW-KC for 12159@debbugs.gnu.org; Sun, 12 Aug 2012 15:19:24 -0400 Received: by pbbrr4 with SMTP id rr4so7838576pbb.3 for <12159@debbugs.gnu.org>; Sun, 12 Aug 2012 12:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=g/+IQl4mPgeivRPm3j8bIITpHQUzVAQhxZV36HmrvIQ=; b=SXtqxI6taFHFF/c1lg9qoUIiIYbhgtVD5YgDqCmuo+f3qD2Em2UWTgBPa4bhfejoL8 Jql39TqCIWtD3hSO3lNu6KirS6C9PqBtpksmjwaB4sT9wNlmx04Zs85tm6W34IYhhZxH DaVe3BU0V9N47XIC5JSUW9RUeRbKIj1cSPU/7XCeA+lM2F3G0klEVHZda/y1GKs38nmQ xf+a9BpeZie21sFznRpsx04f1HQEXaJ2coUvxC9bNvGp1JKs1PrNkmY1Nqat0ILM2H7N Ufvl6EdC9qPp2xoNJzpoDc3Hy8TdyU36Iy3lVaV4fdMya4UE7EfZnukoJnzOYdPyvGAw +XDQ== Received: by 10.68.203.200 with SMTP id ks8mr15748833pbc.142.1344798654710; Sun, 12 Aug 2012 12:10:54 -0700 (PDT) Received: from debian-6.05 ([101.62.48.22]) by mx.google.com with ESMTPS id qn3sm3779009pbc.6.2012.08.12.12.10.51 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Aug 2012 12:10:53 -0700 (PDT) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> Date: Mon, 13 Aug 2012 00:41:00 +0530 In-Reply-To: (Stefan Monnier's message of "Sun, 12 Aug 2012 10:13:05 -0400") Message-ID: <87zk60hqnv.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12159 Cc: Glenn Morris , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) I wish reviewers provide feedback which is comprehensive right from the word go. Let me explain ... When I submitted my patch it was complete i.e., I did not present it hunk-by-hunk. I re-worked the patch based on feedback and I have demonstrated some seriousness in making the patch acceptable. Unfortunately, the review process here seems to have gone by "hunk by hunk" mode. A small note here, a small note there. For something as simple as this patch, why should we have 100 exchanges? I can't care less if you call my patch a crap or hold an opinion that I should never enter a programmer's territory. It is not what I am talking about. Reviewers have infinite time to review the patch. Let them collect their notes and give a comprehensive list of what they think is acceptable to them. I hope I am not placing an un-reasonable demand. We are talking of an implicit social contract that reviewers and patch submitters should adhere to. Unfortunately, it is only the patch submitters end of the contract that gets much emphasis. Jambunathan K. >> + * vc/vc-dir.el (vc-dir-hide-these-states): New custom variable. > > Don't bother. Just always default to up-to-date. > >> +(defun vc-dir-hide-some-states (&optional states) > > Make it `state' and not a list. > >> + (interactive >> + ;; Interactive use. > > Redundant comment. > >> + ;; Non-interactive use. >> + (unless (called-interactively-p 'any) >> + (setq states (or states vc-dir-hide-these-states))) > > The test is wrong (it prevents non-interactive use where you specify > the state explicitly). > The above should simply be (unless state (setq state 'up-to-date)). > >> +(defun vc-dir-hide-up-to-date () >> + "Hide up-to-date items from display." >> + (interactive) >> + (vc-dir-hide-some-states '("up-to-date"))) > > Why bother? > > > Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 15:29:01 2012 Received: (at 12159) by debbugs.gnu.org; 12 Aug 2012 19:29:01 +0000 Received: from localhost ([127.0.0.1]:51672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0dqP-00029M-8w for submit@debbugs.gnu.org; Sun, 12 Aug 2012 15:29:01 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:36874) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0dqN-00029E-0Z for 12159@debbugs.gnu.org; Sun, 12 Aug 2012 15:29:00 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M8N00000PLBHD00@a-mtaout22.012.net.il> for 12159@debbugs.gnu.org; Sun, 12 Aug 2012 22:20:29 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M8N000AOPQ4EY30@a-mtaout22.012.net.il>; Sun, 12 Aug 2012 22:20:29 +0300 (IDT) Date: Sun, 12 Aug 2012 22:20:29 +0300 From: Eli Zaretskii Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files In-reply-to: <87zk60hqnv.fsf@gmail.com> X-012-Sender: halo1@inter.net.il To: Jambunathan K Message-id: <83d32v7w8y.fsf@gnu.org> References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> <87zk60hqnv.fsf@gmail.com> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 12159 Cc: monnier@iro.umontreal.ca, 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Jambunathan K > Date: Mon, 13 Aug 2012 00:41:00 +0530 > Cc: 12159@debbugs.gnu.org > > I wish reviewers provide feedback which is comprehensive right from the > word go. Let me explain ... > > When I submitted my patch it was complete i.e., I did not present it > hunk-by-hunk. I re-worked the patch based on feedback and I have > demonstrated some seriousness in making the patch acceptable. > > Unfortunately, the review process here seems to have gone by "hunk by > hunk" mode. A small note here, a small note there. For something as > simple as this patch, why should we have 100 exchanges? > > I can't care less if you call my patch a crap or hold an opinion that I > should never enter a programmer's territory. It is not what I am > talking about. > > Reviewers have infinite time to review the patch. Let them collect > their notes and give a comprehensive list of what they think is > acceptable to them. > > I hope I am not placing an un-reasonable demand. > > We are talking of an implicit social contract that reviewers and patch > submitters should adhere to. Unfortunately, it is only the patch > submitters end of the contract that gets much emphasis. I'm sorry you feel this way. However, after reading the entire discussion, I see nothing but a reasonable process. Let me explain. Your original submission first got a general comment from Stefan suggesting a different approach. When you reworked the patch according to Stefan's suggestions, you got one comment from Andreas (with whom you exchanged a couple of messages regarding his comment), and several specific comments from Stefan. It is entirely reasonable that two different people comment on different portions of the patch. Sorry, but I see no "hunk by hunk" here. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 15:49:22 2012 Received: (at 12159) by debbugs.gnu.org; 12 Aug 2012 19:49:22 +0000 Received: from localhost ([127.0.0.1]:51689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0eA6-0002c4-18 for submit@debbugs.gnu.org; Sun, 12 Aug 2012 15:49:22 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:44650) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0eA3-0002bw-4f for 12159@debbugs.gnu.org; Sun, 12 Aug 2012 15:49:20 -0400 Received: by pbbrr4 with SMTP id rr4so7880924pbb.3 for <12159@debbugs.gnu.org>; Sun, 12 Aug 2012 12:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=ady5jHETWccl2gHLzKAD6SXjWb1mm7Q452Fh7VhP5Qs=; b=HAkbwdDjtbGDvywBjLv8DT2xJI4sVvva6v9543uxiw9eyHKYQ61fqNr3b4M/uYEunT KDUWfEYmUwLQ5cR7U9pp7fNJ468RDFPdWcEhwwG+5jnkgkE7B/VeJWum09JlOjYbEPrF vaeaAHSfEX/exCHKpqUKrlXMgLhIUxNtLUDbYseTWwZlU8nMaD4ruMfjDjil/1p/Rod+ ZsLpW5pHF6xgKJ7zIyUHt2BSTp+SBeQre0Y/bam3IC8n+sqAAISE7LvRnXVTTxSxPgAT f+r8UonW1zCHFrqgvjeWzxoY5CAu2KlrjWFCzcsfIk9m1eYq4t09FEpYZHSYkoHHk9P7 uyMA== Received: by 10.68.231.168 with SMTP id th8mr14567448pbc.14.1344800450076; Sun, 12 Aug 2012 12:40:50 -0700 (PDT) Received: from debian-6.05 ([101.62.48.22]) by mx.google.com with ESMTPS id wf7sm3809314pbc.34.2012.08.12.12.40.46 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Aug 2012 12:40:49 -0700 (PDT) From: Jambunathan K To: Eli Zaretskii Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> <87zk60hqnv.fsf@gmail.com> <83d32v7w8y.fsf@gnu.org> Date: Mon, 13 Aug 2012 01:10:56 +0530 In-Reply-To: <83d32v7w8y.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 12 Aug 2012 22:20:29 +0300") Message-ID: <87r4rbj3uf.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12159 Cc: monnier@iro.umontreal.ca, 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Eli Zaretskii writes: >> From: Jambunathan K >> Date: Mon, 13 Aug 2012 00:41:00 +0530 >> Cc: 12159@debbugs.gnu.org >> >> I wish reviewers provide feedback which is comprehensive right from the >> word go. Let me explain ... >> >> When I submitted my patch it was complete i.e., I did not present it >> hunk-by-hunk. I re-worked the patch based on feedback and I have >> demonstrated some seriousness in making the patch acceptable. >> >> Unfortunately, the review process here seems to have gone by "hunk by >> hunk" mode. A small note here, a small note there. For something as >> simple as this patch, why should we have 100 exchanges? >> >> I can't care less if you call my patch a crap or hold an opinion that I >> should never enter a programmer's territory. It is not what I am >> talking about. >> >> Reviewers have infinite time to review the patch. Let them collect >> their notes and give a comprehensive list of what they think is >> acceptable to them. >> >> I hope I am not placing an un-reasonable demand. >> >> We are talking of an implicit social contract that reviewers and patch >> submitters should adhere to. Unfortunately, it is only the patch >> submitters end of the contract that gets much emphasis. > > I'm sorry you feel this way. However, after reading the entire > discussion, I see nothing but a reasonable process. Let me explain. I really feel frustrated. More efforts have gone in the patch than what the patch actually shows. I switched from Windows XP to Debian. I have downloaded 3 ISOs. I had to get my 3G-Modem working. I have to learn Bazaar and put up with the "stream of consciousness" style that the two articles in Emacswiki adopts. (I remember my troubles making even limited progress with Ulysess, Portrait of artist as an young man or the Sound and Fury.) ,---- | http://www.emacswiki.org/emacs/BzrForEmacsDevs | http://www.emacswiki.org/emacs/BzrForEmacsCasualDevs `---- More importantly, the persistent merge conflicts with the Changelog that I created. (I have grown wiser now.) > Your original submission first got a general comment from Stefan > suggesting a different approach. Considering that I have submitted a patch, "general comment" could have been avoided in first place. > When you reworked the patch according to Stefan's suggestions, you got > one comment from Andreas (with whom you exchanged a couple of messages > regarding his comment), and several specific comments from Stefan. It > is entirely reasonable that two different people comment on different > portions of the patch. > Sorry, but I see no "hunk by hunk" here. Ah! programmers. I am trying to communicate how I feel. Don't apply logic in human affairs. Let me offer a branch of olive: Have I heard what all I have to hear on this patch. If yes, I will make one more attempt at re-submitting it. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 12 18:44:27 2012 Received: (at 12159) by debbugs.gnu.org; 12 Aug 2012 22:44:27 +0000 Received: from localhost ([127.0.0.1]:52035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0gtX-0007Tp-03 for submit@debbugs.gnu.org; Sun, 12 Aug 2012 18:44:27 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:16812) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0gtU-0007Ti-RW for 12159@debbugs.gnu.org; Sun, 12 Aug 2012 18:44:25 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09FxKJq/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUDQsNJBOIAAMGBbAqDYlSihqGKgOgEoMhgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="195540348" Received: from 69-196-162-106.dsl.teksavvy.com (HELO pastel.home) ([69.196.162.106]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 12 Aug 2012 18:35:55 -0400 Received: by pastel.home (Postfix, from userid 20848) id F040759305; Sun, 12 Aug 2012 18:35:54 -0400 (EDT) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files Message-ID: References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> <87zk60hqnv.fsf@gmail.com> Date: Sun, 12 Aug 2012 18:35:54 -0400 In-Reply-To: <87zk60hqnv.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 13 Aug 2012 00:41:00 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12159 Cc: Glenn Morris , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) I'm really sorry you feel so frustrated. All the process (from my point of view) is trying to get the patch to be as simple and clean as it can be. First by changing the actual behavior, then by getting the details of the code right (hence my last hunk-by-hunk comments). This last message should have admittedly started with encouraging words rather than dryly jumping into the nitpicking without even warning that these are nitpicks. Hopefully the end result should be a patch of barely 10 lines including context, so while you may find it frustrating to go through this ordeal for such a tiny change, I see it as a great success to bring down the original request to such a simple change. > Reviewers have infinite time to review the patch. I don't know of any reviewer with infinite time, but if you find one, please send him up here, we'd love to have one of those. Stefan >>>>> "Jambunathan" == Jambunathan K writes: > I wish reviewers provide feedback which is comprehensive right from the > word go. Let me explain ... > When I submitted my patch it was complete i.e., I did not present it > hunk-by-hunk. I re-worked the patch based on feedback and I have > demonstrated some seriousness in making the patch acceptable. > Unfortunately, the review process here seems to have gone by "hunk by > hunk" mode. A small note here, a small note there. For something as > simple as this patch, why should we have 100 exchanges? > I can't care less if you call my patch a crap or hold an opinion that I > should never enter a programmer's territory. It is not what I am > talking about. > Reviewers have infinite time to review the patch. Let them collect > their notes and give a comprehensive list of what they think is > acceptable to them. > I hope I am not placing an un-reasonable demand. > We are talking of an implicit social contract that reviewers and patch > submitters should adhere to. Unfortunately, it is only the patch > submitters end of the contract that gets much emphasis. > Jambunathan K. >>> + * vc/vc-dir.el (vc-dir-hide-these-states): New custom variable. >> >> Don't bother. Just always default to up-to-date. >> >>> +(defun vc-dir-hide-some-states (&optional states) >> >> Make it `state' and not a list. >> >>> + (interactive >>> + ;; Interactive use. >> >> Redundant comment. >> >>> + ;; Non-interactive use. >>> + (unless (called-interactively-p 'any) >>> + (setq states (or states vc-dir-hide-these-states))) >> >> The test is wrong (it prevents non-interactive use where you specify >> the state explicitly). >> The above should simply be (unless state (setq state 'up-to-date)). >> >>> +(defun vc-dir-hide-up-to-date () >>> + "Hide up-to-date items from display." >>> + (interactive) >>> + (vc-dir-hide-some-states '("up-to-date"))) >> >> Why bother? >> >> >> Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 13 10:29:12 2012 Received: (at 12159) by debbugs.gnu.org; 13 Aug 2012 14:29:12 +0000 Received: from localhost ([127.0.0.1]:53592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0vdo-0006Ml-4S for submit@debbugs.gnu.org; Mon, 13 Aug 2012 10:29:12 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:38208) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0vdl-0006Md-Pm for 12159@debbugs.gnu.org; Mon, 13 Aug 2012 10:29:10 -0400 Received: by wgbdq10 with SMTP id dq10so2982238wgb.15 for <12159@debbugs.gnu.org>; Mon, 13 Aug 2012 07:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:organization:references :user-agent:date:message-id:mime-version:content-type; bh=guUNTJDZzGJ9yybv6Tdc4oXOmcQcRiA/Cr8lv5w76EY=; b=zT/Thcr8vKOAY/6DP9i4i6bouU+ML0bzUEekLAy9iDHcJUYU8u167tKRmj3RgQhwSx 3bBD/iAR3mXGXB5nO8yDOo/CjLmY+/gowpEJ9L+QNFTq0Ii66R9cbB8gSvJ5uGfD9m55 sp643V/TSo5rRpBeVJSFfXtmmCTfEw1l9C4TV9GNqjFOO3C8G1rmT0H529lq2cUZDVmC 750259ZT5NT+pMLFeZ3Fdt6Ny/75HfEMUv/yfntGcm3sXfgsdfOyTyX//Q3J10RUirSl b5livJvaum1Lwi/Hk9nlM+Yjo3ne9OIYrRn8clfSd9L5vRfvs8AZVa1IbGchs6isJ5cX Xfow== Received: by 10.180.86.133 with SMTP id p5mr18888854wiz.17.1344867636490; Mon, 13 Aug 2012 07:20:36 -0700 (PDT) Received: from myhost.localdomain (mar75-2-81-56-68-112.fbx.proxad.net. [81.56.68.112]) by mx.google.com with ESMTPS id h9sm16687573wiz.1.2012.08.13.07.20.35 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 13 Aug 2012 07:20:35 -0700 (PDT) Received: by myhost.localdomain (Postfix, from userid 1000) id 95F9E8832; Mon, 13 Aug 2012 16:21:01 +0200 (CEST) From: Bastien To: Jambunathan K Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files In-Reply-To: <87r4rbj3uf.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 13 Aug 2012 01:10:56 +0530") Organization: GNU References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> <87zk60hqnv.fsf@gmail.com> <83d32v7w8y.fsf@gnu.org> <87r4rbj3uf.fsf@gmail.com> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) Date: Mon, 13 Aug 2012 16:21:00 +0200 Message-ID: <87ipcmyisz.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12159 Cc: Eli Zaretskii , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Jambunathan K writes: > (I remember my troubles making even limited progress with > Ulysess, Portrait of artist as an young man or the Sound and Fury.) Parsing these great novels is like fixing dependancies in a messy library: you constantly need to zoom in and out, switch from the local evaluation of the meaning to the global interpretation context, try to synchronize your flow of consciousness to the narrative pace, while enjoying the whole experience. Perhaps the emacswiki style is just training for more sweaty days :) -- Bastien From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 13 13:54:56 2012 Received: (at 12159) by debbugs.gnu.org; 13 Aug 2012 17:54:56 +0000 Received: from localhost ([127.0.0.1]:53871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0yqt-0003Ua-DC for submit@debbugs.gnu.org; Mon, 13 Aug 2012 13:54:56 -0400 Received: from mail-gg0-f172.google.com ([209.85.161.172]:43958) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0yqr-0003UT-GP for 12159@debbugs.gnu.org; Mon, 13 Aug 2012 13:54:54 -0400 Received: by ggnh4 with SMTP id h4so3751673ggn.3 for <12159@debbugs.gnu.org>; Mon, 13 Aug 2012 10:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=+9iTU/0s4UX3rDyPnX6PJXOBoWrJAqkgO1kWU2gp1iA=; b=D6R2GT9ycI+kKSQmgPelkEaiIDqWz/PYEZTyKquba4gimNcuNxmz1ciluMmymyqP8c REjvD7qBS3GGjtJo4EQLMBAu3djlqtFfW2RxX6WwfR7wAoBmovI1ymMWYWyQgw9NN4zG v7TkCKbasw2y1/eySDk/iuAIBq/4vxsv/oDlwM37dg7I1PpayNx6KoPU2IzuozLRDwfX IjGnTyos7bP8nytkjB0v0BcH8EHHNWjiSofpT4De9rjDC5TjI16JkNqmgHVXWxRI67rx ruel7sc73UJSCzyP18jrYZPz7BQ2Y9GbjmKEujlhbEZ6TT7gM3YLqS/+AyRSEKUtS0x8 SJAg== Received: by 10.68.228.193 with SMTP id sk1mr33993569pbc.97.1344879978329; Mon, 13 Aug 2012 10:46:18 -0700 (PDT) Received: from debian-6.05 ([101.62.50.154]) by mx.google.com with ESMTPS id kt2sm57084pbc.73.2012.08.13.10.46.11 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 13 Aug 2012 10:46:17 -0700 (PDT) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> Date: Mon, 13 Aug 2012 23:16:23 +0530 In-Reply-To: (Stefan Monnier's message of "Sun, 12 Aug 2012 10:13:05 -0400") Message-ID: <87pq6ur8gg.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12159 Cc: Glenn Morris , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain FWIW, I am attaching two patches. If you want any changes please do it yourself. patch-1 :: There is only one command 'x' - which hides state at point. patch-2 :: `x' hides up-to-date and `C-u x' hides state at point. Personally, I will go with patch 1. It is simpler. No prefix key is used. Btw, reviewer who takes infinite time to review could either be a perfectionist or a procrastinator :-). --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug#12159-approach-1.patch Content-Description: approach-1.patch === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-08-12 22:52:33 +0000 +++ lisp/ChangeLog 2012-08-13 17:26:55 +0000 @@ -1,3 +1,12 @@ +2012-08-13 Jambunathan K + + * vc/vc-dir.el (vc-dir-hide-up-to-date): Remove it. + (vc-dir-hide-state): New command. + (vc-dir-mode-map): Map key "x" to `vc-dir-hide-state' instead of + `vc-dir-hide-up-to-date'. + (vc-dir-menu-map): Use `vc-dir-hide-state' instead of + `vc-dir-hide-up-to-date' + 2012-08-12 Stefan Monnier * subr.el (internal--before-with-seleted-window) === modified file 'lisp/vc/vc-dir.el' --- lisp/vc/vc-dir.el 2012-07-11 23:13:41 +0000 +++ lisp/vc/vc-dir.el 2012-08-13 17:32:12 +0000 @@ -123,9 +123,9 @@ '(menu-item "Refresh" revert-buffer :enable (not (vc-dir-busy)) :help "Refresh the contents of the directory buffer")) - (define-key map [remup] - '(menu-item "Hide Up-to-date" vc-dir-hide-up-to-date - :help "Hide up-to-date items from display")) + (define-key map [hide] + '(menu-item "Hide current state" vc-dir-hide-state + :help "Hide items share current state")) ;; Movement. (define-key map [sepmv] '("--")) (define-key map [next-line] @@ -271,7 +271,7 @@ (define-key map [down-mouse-3] 'vc-dir-menu) (define-key map [mouse-2] 'vc-dir-toggle-mark) (define-key map [follow-link] 'mouse-face) - (define-key map "x" 'vc-dir-hide-up-to-date) + (define-key map "x" 'vc-dir-hide-state) (define-key map [?\C-k] 'vc-dir-kill-line) (define-key map "S" 'vc-dir-search) ;; FIXME: Maybe use A like dired? (define-key map "Q" 'vc-dir-query-replace-regexp) @@ -1106,20 +1106,30 @@ (interactive "fShow file: ") (vc-dir-update (list (list (file-relative-name file) (vc-state file))) (current-buffer))) -(defun vc-dir-hide-up-to-date () - "Hide up-to-date items from display." - (interactive) - (let ((crt (ewoc-nth vc-ewoc -1)) - (first (ewoc-nth vc-ewoc 0))) - ;; Go over from the last item to the first and remove the - ;; up-to-date files and directories with no child files. - (while (not (eq crt first)) - (let* ((data (ewoc-data crt)) - (dir (vc-dir-fileinfo->directory data)) - (next (ewoc-next vc-ewoc crt)) - (prev (ewoc-prev vc-ewoc crt)) - ;; ewoc-delete does not work without this... - (inhibit-read-only t)) +(defun vc-dir-hide-state (state) + "Hide items that are in STATE from display. +See `vc-state' for valid values of STATE. + +Interactively, set STATE to state of item at point." + (interactive (list + ;; Infer STATE from point. Complain otherwise. + (let ((node (ewoc-locate vc-ewoc))) + (unless node (error "No file available")) + (or (vc-dir-fileinfo->state (ewoc-data node)) + (error "No state at point"))))) + (when state + (message "Hiding items in state \"%s\"" state) + (let ((crt (ewoc-nth vc-ewoc -1)) + (first (ewoc-nth vc-ewoc 0))) + ;; Go over from the last item to the first and remove the + ;; up-to-date files and directories with no child files. + (while (not (eq crt first)) + (let* ((data (ewoc-data crt)) + (dir (vc-dir-fileinfo->directory data)) + (next (ewoc-next vc-ewoc crt)) + (prev (ewoc-prev vc-ewoc crt)) + ;; ewoc-delete does not work without this... + (inhibit-read-only t)) (when (or ;; Remove directories with no child files. (and dir @@ -1128,10 +1138,11 @@ (not next) ;; Next item is a directory. (vc-dir-fileinfo->directory (ewoc-data next)))) - ;; Remove files in the up-to-date state. - (eq (vc-dir-fileinfo->state data) 'up-to-date)) + ;; Remove files in specified STATE. STATE can be a + ;; symbol or a user-name. + (equal (vc-dir-fileinfo->state data) state)) (ewoc-delete vc-ewoc crt)) - (setq crt prev))))) + (setq crt prev)))))) (defun vc-dir-kill-line () "Remove the current line from display." --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug#12159-approach-2.patch Content-Description: approach-2.patch === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-08-12 22:52:33 +0000 +++ lisp/ChangeLog 2012-08-13 17:16:15 +0000 @@ -1,3 +1,8 @@ +2012-08-13 Jambunathan K + + * vc/vc-dir.el (vc-dir-hide-state): New command + (vc-dir-hide-up-to-date): Route it to `vc-dir-hide-state'. + 2012-08-12 Stefan Monnier * subr.el (internal--before-with-seleted-window) === modified file 'lisp/vc/vc-dir.el' --- lisp/vc/vc-dir.el 2012-07-11 23:13:41 +0000 +++ lisp/vc/vc-dir.el 2012-08-13 17:12:16 +0000 @@ -1106,9 +1106,22 @@ (interactive "fShow file: ") (vc-dir-update (list (list (file-relative-name file) (vc-state file))) (current-buffer))) -(defun vc-dir-hide-up-to-date () - "Hide up-to-date items from display." - (interactive) +(defun vc-dir-hide-state (&optional state) + "Hide items that are in STATE from display. +See `vc-state' for valid values of STATE. + +If STATE is nil, default it to up-to-date. + +Interactively, if `current-prefix-arg' is non-nil, set STATE to +state of item at point. Otherwise, set STATE to up-to-date." + (interactive (list + (and current-prefix-arg + ;; Command is prefixed. Infer STATE from point. + (let ((node (ewoc-locate vc-ewoc))) + (and node (vc-dir-fileinfo->state (ewoc-data node))))))) + ;; If STATE is un-specified, use up-to-date. + (setq state (or state 'up-to-date)) + (message "Hiding items in state \"%s\"" state) (let ((crt (ewoc-nth vc-ewoc -1)) (first (ewoc-nth vc-ewoc 0))) ;; Go over from the last item to the first and remove the @@ -1120,18 +1133,21 @@ (prev (ewoc-prev vc-ewoc crt)) ;; ewoc-delete does not work without this... (inhibit-read-only t)) - (when (or - ;; Remove directories with no child files. - (and dir - (or - ;; Nothing follows this directory. - (not next) - ;; Next item is a directory. - (vc-dir-fileinfo->directory (ewoc-data next)))) - ;; Remove files in the up-to-date state. - (eq (vc-dir-fileinfo->state data) 'up-to-date)) - (ewoc-delete vc-ewoc crt)) - (setq crt prev))))) + (when (or + ;; Remove directories with no child files. + (and dir + (or + ;; Nothing follows this directory. + (not next) + ;; Next item is a directory. + (vc-dir-fileinfo->directory (ewoc-data next)))) + ;; Remove files in specified STATE. STATE can be a + ;; symbol or a user-name. + (equal (vc-dir-fileinfo->state data) state)) + (ewoc-delete vc-ewoc crt)) + (setq crt prev))))) + +(defalias 'vc-dir-hide-up-to-date 'vc-dir-hide-state) (defun vc-dir-kill-line () "Remove the current line from display." --=-=-= Content-Type: text/plain >> + * vc/vc-dir.el (vc-dir-hide-these-states): New custom variable. > > Don't bother. Just always default to up-to-date. > >> +(defun vc-dir-hide-some-states (&optional states) > > Make it `state' and not a list. > >> + (interactive >> + ;; Interactive use. > > Redundant comment. > >> + ;; Non-interactive use. >> + (unless (called-interactively-p 'any) >> + (setq states (or states vc-dir-hide-these-states))) > > The test is wrong (it prevents non-interactive use where you specify > the state explicitly). > The above should simply be (unless state (setq state 'up-to-date)). > >> +(defun vc-dir-hide-up-to-date () >> + "Hide up-to-date items from display." >> + (interactive) >> + (vc-dir-hide-some-states '("up-to-date"))) > > Why bother? > > > Stefan --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 13 17:43:19 2012 Received: (at 12159) by debbugs.gnu.org; 13 Aug 2012 21:43:19 +0000 Received: from localhost ([127.0.0.1]:54336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T12Pv-0001Ep-8B for submit@debbugs.gnu.org; Mon, 13 Aug 2012 17:43:19 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:46328) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T12Pt-0001Ei-Ac for 12159@debbugs.gnu.org; Mon, 13 Aug 2012 17:43:17 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q7DLYXo5005071; Mon, 13 Aug 2012 17:34:38 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 22104AE427; Mon, 13 Aug 2012 17:34:30 -0400 (EDT) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files Message-ID: References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> <87pq6ur8gg.fsf@gmail.com> Date: Mon, 13 Aug 2012 17:34:30 -0400 In-Reply-To: <87pq6ur8gg.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 13 Aug 2012 23:16:23 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4309=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4309> : streams <798806> : uri <1191533> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 12159 Cc: Glenn Morris , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) > patch-1 :: There is only one command 'x' - which hides state at point. > patch-2 :: `x' hides up-to-date and `C-u x' hides state at point. Thanks. > Personally, I will go with patch 1. It is simpler. No prefix key is > used. I can agree that patch 1 is simpler and might be preferable, but given the pre-existence of `x', I'd rather preserve its behavior. Furthermore, I do use `x' fairly often and usually without paying much attention to where I am. So, I installed patch 2. > Btw, reviewer who takes infinite time to review could either be a > perfectionist or a procrastinator :-). Indeed, from the submitter's point of view, they're indistinguishable. Usually, if I'm the reviewer and the review isn't coming back quickly ... well let's just say it's not because I'm a perfectionist. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 13 18:17:12 2012 Received: (at 12159) by debbugs.gnu.org; 13 Aug 2012 22:17:13 +0000 Received: from localhost ([127.0.0.1]:54373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T12wh-00020A-MX for submit@debbugs.gnu.org; Mon, 13 Aug 2012 18:17:12 -0400 Received: from mail-we0-f172.google.com ([74.125.82.172]:36788) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T12wg-000200-3u for 12159@debbugs.gnu.org; Mon, 13 Aug 2012 18:17:11 -0400 Received: by weyu54 with SMTP id u54so2918569wey.3 for <12159@debbugs.gnu.org>; Mon, 13 Aug 2012 15:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:organization:references :user-agent:date:message-id:mime-version:content-type; bh=AFy/IL9NCMv6ccqloiTHUD8XnJqizaf+mLI70lf3Ios=; b=vJyua757cGxirDox8rWUwH417pSrsSa5x7OX8jFPNJk7TKsv2CpwBXgq9cgDacfkkB U+viBXHv6/VI7gsty4fdlzPHZbvGoRGSlWer/d0JfzazmO/aoxSIwuY4THgqydTp/EMy hyRrFRxH9kGySkyj/VxbuF61xzh7LMkmMU3vnGxwikTk9iRtFfcYUgeNKhqbJVAzSJ/5 Ygl45T6zfbNqixi55De4sImLHsAhGaKoNBxL+lk+MpkxupSNFb8yYRUwK8Yb4mqkzZrP vcWYVMT3628GazVHeifYgFv7gNR6hEehcS6397+muISXZp8PPR1FVPJKC8o/bhn1F9Kr us6Q== Received: by 10.216.226.36 with SMTP id a36mr6521207weq.58.1344895714440; Mon, 13 Aug 2012 15:08:34 -0700 (PDT) Received: from myhost.localdomain (mar75-2-81-56-68-112.fbx.proxad.net. [81.56.68.112]) by mx.google.com with ESMTPS id cl8sm18831746wib.10.2012.08.13.15.08.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 13 Aug 2012 15:08:33 -0700 (PDT) Received: by myhost.localdomain (Postfix, from userid 1000) id 513868832; Tue, 14 Aug 2012 00:09:01 +0200 (CEST) From: Bastien To: Stefan Monnier Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files In-Reply-To: (Stefan Monnier's message of "Mon, 13 Aug 2012 17:34:30 -0400") Organization: GNU References: <87pq71i7fy.fsf@gmail.com> <87d3312p4f.fsf@gmail.com> <871ujdpbqp.fsf@gmail.com> <87boigj2ti.fsf@gmail.com> <87pq6ur8gg.fsf@gmail.com> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) Date: Tue, 14 Aug 2012 00:09:01 +0200 Message-ID: <87boiexx4y.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12159 Cc: Jambunathan K , 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Stefan Monnier writes: > ... well let's just say it's not because I'm a perfectionist. Hopefully enough, even perfect procrastinators can get some stuff done: http://structuredprocrastination.com -- Bastien From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 14 00:36:58 2012 Received: (at 12159) by debbugs.gnu.org; 14 Aug 2012 04:36:58 +0000 Received: from localhost ([127.0.0.1]:54665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T18sE-0002CU-42 for submit@debbugs.gnu.org; Tue, 14 Aug 2012 00:36:58 -0400 Received: from mail-gh0-f172.google.com ([209.85.160.172]:45391) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T18sC-0002CN-6R for 12159@debbugs.gnu.org; Tue, 14 Aug 2012 00:36:56 -0400 Received: by ghbg16 with SMTP id g16so4274804ghb.3 for <12159@debbugs.gnu.org>; Mon, 13 Aug 2012 21:28:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=emyl7lvQGpuG9Im3LHJi0+vcbjzkUOiLbRZpc9FnJ/4=; b=yPaNcNP9AphRgaObKqSnOO/XBy7qEk+fQPCguHDltTN8Ns9drphaqTpcmHK/oxbuQR s4AZw1N6bLO+VMvRrQmptoT7dlx86o7eIen6J3HtcHjHKlT16JkN/sXY7l+1HcxMo7p0 X4TDxz3XXhcPRQNJmbuXVt5ExLVOJ9wKpMafBYnwUS3gBL4BVFBz4py7DhLR3Ydm9JcW CvZiAsuAnBRwKkHZdXPLsC14OmEbSeo8IbqbT/4viEQCoMxgP/OwRJDGEI8XPYkqk42r sXxk92h6MYcls4zYpjPdQmT7IVTdZwRamEcBhL0nRBoHpVtXsx33G2OrTRYV58BWMytG nWpQ== Received: by 10.66.78.99 with SMTP id a3mr27494873pax.22.1344918499507; Mon, 13 Aug 2012 21:28:19 -0700 (PDT) Received: from debian-6.05 ([101.62.112.242]) by mx.google.com with ESMTPS id kc7sm448238pbb.5.2012.08.13.21.28.16 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 13 Aug 2012 21:28:18 -0700 (PDT) From: Jambunathan K To: Glenn Morris Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files References: <87pq71i7fy.fsf@gmail.com> Date: Tue, 14 Aug 2012 09:58:30 +0530 In-Reply-To: (Glenn Morris's message of "Wed, 08 Aug 2012 14:27:50 -0400") Message-ID: <87mx1ym70x.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12159 Cc: 12159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Glenn Morris writes: > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6148 Please mark both these bugs as fixed in bzr builds. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 14 02:50:00 2012 Received: (at control) by debbugs.gnu.org; 14 Aug 2012 06:50:00 +0000 Received: from localhost ([127.0.0.1]:54863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1Awx-00086V-BU for submit@debbugs.gnu.org; Tue, 14 Aug 2012 02:50:00 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:36822) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1Aws-00086M-Nc for control@debbugs.gnu.org; Tue, 14 Aug 2012 02:49:55 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1T1AoY-0006dO-3N for control@debbugs.gnu.org; Tue, 14 Aug 2012 02:41:18 -0400 Date: Tue, 14 Aug 2012 02:41:18 -0400 Message-Id: Subject: control message for bug 6148 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) close 6148 24.3 From unknown Tue Jun 17 01:47:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 11 Sep 2012 11:24:03 +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