From unknown Fri Jun 20 05:33:02 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#32225 <32225@debbugs.gnu.org> To: bug#32225 <32225@debbugs.gnu.org> Subject: Status: 27.0.50; [PATCH] avoid calling vc backend if vc-display-status is nil Reply-To: bug#32225 <32225@debbugs.gnu.org> Date: Fri, 20 Jun 2025 12:33:02 +0000 retitle 32225 27.0.50; [PATCH] avoid calling vc backend if vc-display-statu= s is nil reassign 32225 emacs submitter 32225 Andy Moreton severity 32225 normal tag 32225 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 20 12:45:29 2018 Received: (at submit) by debbugs.gnu.org; 20 Jul 2018 16:45:29 +0000 Received: from localhost ([127.0.0.1]:49894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgYX2-00076q-GS for submit@debbugs.gnu.org; Fri, 20 Jul 2018 12:45:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgYX0-00076d-9m for submit@debbugs.gnu.org; Fri, 20 Jul 2018 12:45:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgYWt-0004Li-HU for submit@debbugs.gnu.org; Fri, 20 Jul 2018 12:45:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:34981) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fgYWt-0004Le-D0 for submit@debbugs.gnu.org; Fri, 20 Jul 2018 12:45:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgYWr-0007HA-KA for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2018 12:45:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgYWn-0004Js-Jn for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2018 12:45:17 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:46349) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fgYWn-0004JY-5k for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2018 12:45:13 -0400 Received: by mail-wr1-x430.google.com with SMTP id s11-v6so11863997wra.13 for ; Fri, 20 Jul 2018 09:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:subject:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=zloNowcMyCPCrw3lN7ZgqTp79nFsIwN2RajpM10iJ74=; b=jFSGdSXEkmu50eFmEuuaTOYnZc9JZPNOG9RMoPHi/uhBUiDdvj7yYsoTxaxx6SVwZZ bVj6MCCgkda3b0LlyyZDN9uqZpIiGQ+v9cMKy2ICGvOl8lskMl3W7I7pPUZKi11psa/p HDRmyFQQZA05evy2BJ3no0uhhmJBp758WmZY7ea3VePjZsro0lf/FT8mMCZgCyKs+GFg N1w5bznDMh+PiQ+OVh2YHelnOEtnXEvHmhHwKUAZfRGEVI9DChCiBVfMnGq6W8mtZPMH d5QhIAZlV1O9wjC6ZzLsgvNXe5Gwaa9kiXsNzvYcwgtmZjeS+NBojsvMxit7SyKezO1f WxLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:from:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=zloNowcMyCPCrw3lN7ZgqTp79nFsIwN2RajpM10iJ74=; b=AwUWRdI+gFi06DgmsZ522Zf8iGXfTntl25XuvuwtotdJMWv8ThiYzgEd601cooFMCs 4jfcgp6G+uSLNdphrXPgUUHSXDKdYFhWu3zpJBIjuRvSubaYvNcXBJsElAl/Y3oMsRuE uyuRWKf8ANw8u7UZAp3yPeXmZHCdiZUGRAxh7K9Qa9mp27cRCpHP2gLg/rkkReu+Oc01 HAiPolht6tTnxTOGiD7UlIIriaRGLO73izGP7ymc6Igl7W71+VGSTVa/jmrF9rVuqhsr rZKgxh1vpORoImcS6blQsv2LBM5cn4ChRPLzbrEuC2/9jKYPpSFY6GezSlZZeORz/TQJ xWKg== X-Gm-Message-State: AOUpUlEJmTUdjOQ6m9r7EowlE2CrfzWLhJJsPuKjNaApKaa2JjoSWurk f1C5XFcj158Vjcas4zwf3c2xq8aV X-Google-Smtp-Source: AAOMgpeHi4WHYvLAzheKhVhhV9rde/oBRc36DhYRme8WxGo+u5npvytOViKxy7T7Wnzm+ABzZxByjA== X-Received: by 2002:adf:fac1:: with SMTP id a1-v6mr1943566wrs.74.1532105111482; Fri, 20 Jul 2018 09:45:11 -0700 (PDT) Received: from [10.17.20.25] (uk.solarflare.com. [193.34.186.16]) by smtp.gmail.com with ESMTPSA id b123-v6sm3022208wma.24.2018.07.20.09.45.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 09:45:10 -0700 (PDT) To: bug-gnu-emacs@gnu.org Subject: 27.0.50; [PATCH] avoid calling vc backend if vc-display-status is nil From: Andy Moreton Message-ID: <21558fba-cc37-1f5b-cb2e-bb0b35555b03@gmail.com> Date: Fri, 20 Jul 2018 17:45:09 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit 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.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) If the user sets `vc-display-status' to nil then the VC backend is still called to get a revision number, even though it will not be displayed. The following patch avoids this unneeded work. Do not call VC backend to update mode line if vc-display-status is nil 2018-07-20 Andy Moreton * lisp/vc/vc-hooks.el (vc-mode-line): Avoid calling VC backend if vc-display-status is nil. diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 55c0132bf2..f1b622b54a 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -692,24 +692,26 @@ vc-mode-line If BACKEND is passed use it as the VC backend when computing the result." (interactive (list buffer-file-name)) (setq backend (or backend (vc-backend file))) - (if (not backend) - (setq vc-mode nil) + (cond + ((not backend) + (setq vc-mode nil)) + ((null vc-display-status) + (setq vc-mode (concat " " (symbol-name backend)))) + (t (let* ((ml-string (vc-call-backend backend 'mode-line-string file)) (ml-echo (get-text-property 0 'help-echo ml-string))) (setq vc-mode (concat " " - (if (null vc-display-status) - (symbol-name backend) - (propertize - ml-string - 'mouse-face 'mode-line-highlight - 'help-echo - (concat (or ml-echo - (format "File under the %s version control system" - backend)) - "\nmouse-1: Version Control menu") - 'local-map vc-mode-line-map))))) + (propertize + ml-string + 'mouse-face 'mode-line-highlight + 'help-echo + (concat (or ml-echo + (format "File under the %s version control system" + backend)) + "\nmouse-1: Version Control menu") + 'local-map vc-mode-line-map)))) ;; If the user is root, and the file is not owner-writable, ;; then pretend that we can't write it ;; even though we can (because root can write anything). @@ -718,7 +720,7 @@ vc-mode-line (not buffer-read-only) (zerop (user-real-uid)) (zerop (logand (file-modes buffer-file-name) 128)) - (setq buffer-read-only t))) + (setq buffer-read-only t)))) (force-mode-line-update) backend) In GNU Emacs 27.0.50 (build 21, x86_64-w64-mingw32) of 2018-07-20 built on AJM-DESKTOP2 Repository revision: 249606fb539bd1a7dc95129277c1684826fc068f Windowing system distributor 'Microsoft Corp.', version 10.0.16299 Recent messages: Finding changes in c:/emacs/git/emacs/master/lisp/vc/vc-hooks.el... Running in foreground: git --no-pager diff-index --exit-code -p HEAD -- vc-hooks.el Done (status=1): git --no-pager diff-index --exit-code -p HEAD -- vc-hooks.el Finding changes in c:/emacs/git/emacs/master/lisp/vc/vc-hooks.el...done Mark activated Mark set Saved text from "diff --git a/lisp/vc/vc-hooks.el b/lisp/" Mark set Saving file c:/home/ajm/sandbox/emacs/vc-mode-line.patch... Wrote c:/home/ajm/sandbox/emacs/vc-mode-line.patch Configured using: 'configure --prefix=/c/emacs/emacs-master --without-dbus --with-gif --with-gnutls --without-imagemagick --with-jpeg --with-json --with-lcms2 --with-modules --with-png --without-pop --with-rsvg --with-tiff --with-xml2 --with-xpm --enable-checking 'CFLAGS= -Og -g3 -gdwarf-4 -fdiagnostics-color=never' PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON LCMS2 Important settings: value of $LANG: ENG locale-coding-system: cp1252 Major mode: Diff Minor modes in effect: whitespace-mode: t bug-reference-prog-mode: t shell-dirtrack-mode: t which-function-mode: t fci-mode: t desktop-save-mode: t show-paren-mode: t auto-image-file-mode: t minibuffer-electric-default-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow emacsbug sendmail whitespace vc-dir ewoc vc-filewise log-view pcvs-util vc-annotate vc arc-mode archive-mode vc-git eieio-opt speedbar sb-image ezimage dframe cl-print cc-langs help-fns radix-tree sh-script smie executable find-dired grep url-http url-gw url-auth url-queue url-cache url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf shr text-property-search svg xml dom thingatpt qp flow-fill mm-archive browse-url misearch multi-isearch add-log sort mail-extr gnus-async gnus-bcklg gnus-ml gnus-topic nndraft nnmh network-stream nnml nnnil gnus-cite gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap nntp gnus-cache ibuf-ext ibuf-macs ibuffer ibuffer-loaddefs time face-remap dired-aux url-util elec-pair org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range message rfc822 mml mml-sec epa mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr org-docview doc-view jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m org-element avl-tree generator org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline outline org-version ob-plantuml ob-dot ob-ditaa ob-shell ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs dired dired-loaddefs macrostep-c cmacexp macrostep pp cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs vc-dispatcher vc-hg bug-reference xcscope diff-mode python tramp-sh tramp trampver tramp-compat tramp-loaddefs ucs-normalize parse-time format-spec cap-words superword subword etags xref project compile htmlize cl info-look man shell pcomplete which-func imenu fill-column-indicator rx edmacro kmacro desktop frameset cygwin-mount ange-ftp comint ansi-color ring hl-line paren image-file minibuf-eldef cus-edit cus-start cus-load wid-edit warnings delight advice use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core nsm rmc gnutls puny time-date mule-util info finder-inf package let-alist derived pcase cl-extra help-mode easymenu url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq byte-opt gv bytecomp byte-compile cconv epg epg-config subr-x cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 1030451 701809) (symbols 56 51267 49) (miscs 48 8386 7418) (strings 32 133014 56086) (string-bytes 1 4364350) (vectors 16 80615) (vector-slots 8 2109657 426454) (floats 8 406 1933) (intervals 56 77681 13720) (buffers 992 105)) From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 27 03:07:19 2018 Received: (at 32225) by debbugs.gnu.org; 27 Jul 2018 07:07:19 +0000 Received: from localhost ([127.0.0.1]:59484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiwqM-0000ej-QO for submit@debbugs.gnu.org; Fri, 27 Jul 2018 03:07:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38851) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiwqL-0000eU-8u for 32225@debbugs.gnu.org; Fri, 27 Jul 2018 03:07:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiwqC-0005l1-8m for 32225@debbugs.gnu.org; Fri, 27 Jul 2018 03:07:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiwqC-0005kh-47; Fri, 27 Jul 2018 03:07:08 -0400 Received: from [176.228.60.248] (port=2951 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fiwqB-00024g-HB; Fri, 27 Jul 2018 03:07:07 -0400 Date: Fri, 27 Jul 2018 10:07:08 +0300 Message-Id: <83wothrwbn.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton In-reply-to: <21558fba-cc37-1f5b-cb2e-bb0b35555b03@gmail.com> (message from Andy Moreton on Fri, 20 Jul 2018 17:45:09 +0100) Subject: Re: bug#32225: 27.0.50; [PATCH] avoid calling vc backend if vc-display-status is nil References: <21558fba-cc37-1f5b-cb2e-bb0b35555b03@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32225 Cc: 32225@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Andy Moreton > Date: Fri, 20 Jul 2018 17:45:09 +0100 > > If the user sets `vc-display-status' to nil then the VC backend is still > called to get a revision number, even though it will not be displayed. > > The following patch avoids this unneeded work. > > > Do not call VC backend to update mode line if vc-display-status is nil > > 2018-07-20 Andy Moreton > > * lisp/vc/vc-hooks.el (vc-mode-line): Avoid calling VC backend if > vc-display-status is nil. LGTM, please push to the master branch. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 28 06:04:33 2018 Received: (at 32225) by debbugs.gnu.org; 28 Jul 2018 10:04:33 +0000 Received: from localhost ([127.0.0.1]:60743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fjM5R-0001TN-9Y for submit@debbugs.gnu.org; Sat, 28 Jul 2018 06:04:33 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:35503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fjM5P-0001TA-8u for 32225@debbugs.gnu.org; Sat, 28 Jul 2018 06:04:31 -0400 Received: by mail-lf1-f65.google.com with SMTP id f18-v6so5128120lfc.2 for <32225@debbugs.gnu.org>; Sat, 28 Jul 2018 03:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TLol3f0/ogpNJg7hJSWx09MdsRfxK6VeEH0s2zLy/64=; b=uOayqcn4DV4z5FMIR/LcR1ciCtch1G56aDiRlsu2k1XDCAfvn6OBorUrvj0iEOzVkO x+zcSxHZ6kCEmjlyvsOHvdDVY+90KEAZN/S/7ceXuxB+usctxcwxERCF8YzkOWu9ODWq DfLUf5s7EVaAL1+6PL8nJSK4Osu2GFTyLLI/UPpvvmH5jeZuGwJ2+eRL9ds1Gb6eHZ3/ O8gRAPHa2TV+ZwLg53ywdaeHvd3T70ACsKmmJlOTCxp/DQXFYV8AK/KZ0ilPipPwWuCG 3AP01PNH4eN8gCivwMr7u6DrYgJPlv9MUBtlLQZ0Kl2hWPIvDHKvtq8lU/qov2SbVPoQ 95dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TLol3f0/ogpNJg7hJSWx09MdsRfxK6VeEH0s2zLy/64=; b=TUvEeO23fU3SnfcOahmEGttDCAfhDQQ122hqohBG0oNqfPX0J8HGRbn/BullbXoiSW t3UYbIzD/LfhQgknj74ZoazLGUjkgf+97Hct/Go7wmyjUI6gG3JeyFC/RfORUhBWGaFP 8P/zCOtjxfaOXxqrfp/66LTKreXPzWgwDyhQiCSZiJ4qN+zBtY3LJv62lwuZk7BbUN1D k3eRUWwAiCSD8NwTE8rswhdm6szkUDG3PwIboZBNp897iafHNXgcAcqLsvTWIcxHYUZT NZuMQqCqtpOrLKJQt1YRHw2lHo3L27+0M100RxP9TMPtXfQi7h55R0MDTRZVcunhB5P9 Z2Kw== X-Gm-Message-State: AOUpUlF9vKFw02S9qyXsKD/3du5Hb8hOKBfjDchDqmRY9k80C5Dzdq39 UyPAV8B+JSw5+tTe2X9lMi0Mdf0Z X-Google-Smtp-Source: AAOMgpeZkFzYeHSChM8++Z5qPSuLjcXjbCIRY1TqOBnJO7B9mT1Kavm6sq9ln+c02Hd/IEaxQ7+DtA== X-Received: by 2002:a19:4d0a:: with SMTP id a10-v6mr5752395lfb.5.1532772264990; Sat, 28 Jul 2018 03:04:24 -0700 (PDT) Received: from [192.168.1.174] ([178.252.127.223]) by smtp.googlemail.com with ESMTPSA id 66-v6sm850167lfq.73.2018.07.28.03.04.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Jul 2018 03:04:24 -0700 (PDT) Subject: Re: bug#32225: 27.0.50; [PATCH] avoid calling vc backend if vc-display-status is nil To: Eli Zaretskii , Andy Moreton References: <21558fba-cc37-1f5b-cb2e-bb0b35555b03@gmail.com> <83wothrwbn.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Sat, 28 Jul 2018 13:04:23 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <83wothrwbn.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 7/27/18 10:07 AM, Eli Zaretskii wrote: >> From: Andy Moreton >> Date: Fri, 20 Jul 2018 17:45:09 +0100 >> >> If the user sets `vc-display-status' to nil then the VC backend is still >> called to get a revision number, even though it will not be displayed. >> >> The following patch avoids this unneeded work. >> >> >> Do not call VC backend to update mode line if vc-display-status is nil >> >> 2018-07-20 Andy Moreton >> >> * lisp/vc/vc-hooks.el (vc-mode-line): Avoid calling VC backend if >> vc-display-status is nil. > > LGTM, please push to the master branch. [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.223 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.167.65 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.65 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: 32225 Cc: 32225@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) On 7/27/18 10:07 AM, Eli Zaretskii wrote: >> From: Andy Moreton >> Date: Fri, 20 Jul 2018 17:45:09 +0100 >> >> If the user sets `vc-display-status' to nil then the VC backend is still >> called to get a revision number, even though it will not be displayed. >> >> The following patch avoids this unneeded work. >> >> >> Do not call VC backend to update mode line if vc-display-status is nil >> >> 2018-07-20 Andy Moreton >> >> * lisp/vc/vc-hooks.el (vc-mode-line): Avoid calling VC backend if >> vc-display-status is nil. > > LGTM, please push to the master branch. +1 From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 11 06:06:08 2018 Received: (at 32225-done) by debbugs.gnu.org; 11 Aug 2018 10:06:08 +0000 Received: from localhost ([127.0.0.1]:47804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1foQmd-0007EQ-Pe for submit@debbugs.gnu.org; Sat, 11 Aug 2018 06:06:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43495) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1foQmc-0007Dw-0S for 32225-done@debbugs.gnu.org; Sat, 11 Aug 2018 06:06:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1foQmS-00029g-VA for 32225-done@debbugs.gnu.org; Sat, 11 Aug 2018 06:06:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foQmS-00029W-Re; Sat, 11 Aug 2018 06:05:56 -0400 Received: from [176.228.60.248] (port=1360 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1foQmS-0003vW-9s; Sat, 11 Aug 2018 06:05:56 -0400 Date: Sat, 11 Aug 2018 13:05:58 +0300 Message-Id: <83600hmd4p.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton In-reply-to: <21558fba-cc37-1f5b-cb2e-bb0b35555b03@gmail.com> (message from Andy Moreton on Fri, 20 Jul 2018 17:45:09 +0100) Subject: Re: bug#32225: 27.0.50; [PATCH] avoid calling vc backend if vc-display-status is nil References: <21558fba-cc37-1f5b-cb2e-bb0b35555b03@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32225-done Cc: 32225-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Andy Moreton > Date: Fri, 20 Jul 2018 17:45:09 +0100 > > If the user sets `vc-display-status' to nil then the VC backend is still > called to get a revision number, even though it will not be displayed. > > The following patch avoids this unneeded work. Thanks, pushed to the master branch. From unknown Fri Jun 20 05:33:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 08 Sep 2018 11:24:04 +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