From unknown Tue Jun 17 01:42:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15754: 24.3.50; [PATCH] vc-ignore makes no sense Resent-From: Andreas Politz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Oct 2013 12:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15754 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 15754@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.138313679532301 (code B ref -1); Wed, 30 Oct 2013 12:40:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Oct 2013 12:39:55 +0000 Received: from localhost ([127.0.0.1]:52383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbV3x-0008Oq-8c for submit@debbugs.gnu.org; Wed, 30 Oct 2013 08:39:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54794) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbV3s-0008OZ-Ui for submit@debbugs.gnu.org; Wed, 30 Oct 2013 08:39:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbV3g-0001UE-HU for submit@debbugs.gnu.org; Wed, 30 Oct 2013 08:39:43 -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 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51625) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbV3g-0001UA-2m for submit@debbugs.gnu.org; Wed, 30 Oct 2013 08:39:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbV3Z-0004ob-MB for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 08:39:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbV3S-0001Sf-PA for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 08:39:29 -0400 Received: from gateway-a.fh-trier.de ([143.93.54.181]:48955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbV3S-0001Ob-91 for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 08:39:22 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier] Received: from luca (dslb-178-004-252-179.pools.arcor-ip.net [178.4.252.179]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id 2EEC41788523 for ; Wed, 30 Oct 2013 13:38:47 +0100 (CET) Received: from politza by luca with local (Exim 4.72) (envelope-from ) id 1VbV2s-0006FN-FZ for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 13:38:46 +0100 From: Andreas Politz Date: Wed, 30 Oct 2013 13:38:46 +0100 Message-ID: <87a9hrrl0p.fsf@hochschule-trier.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --=-=-= Content-Type: text/plain There are two problems with this function. 1. It uses vc-backend on the default-directory, which in turn uses vc-registered. But the return value of this function for directories seems to be back end dependent. E.g. in git it returns always nil for directories, in bzr it seems to return t only if directory does not end with a slash. I am not sure which of these things needs to be fixed. I suppose this function should do what it says and return t for registered files (including directories). But vc-ignore should also work in the root directory, which technically is not registered. So I replaced it with vc-responsible-backend. 2. The interactive spec, when reading the documentation, makes no sense to me. I assume this is just an oversight. 3. The function should not have different abilities depending on whether it was called interactively or not. -ap --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=vc-ignore.diff === modified file 'lisp/vc/vc.el' *** lisp/vc/vc.el 2013-10-25 02:33:42 +0000 --- lisp/vc/vc.el 2013-10-28 17:04:10 +0000 *************** *** 1350,1373 **** (let ((vc-handled-backends (list backend))) (call-interactively 'vc-register))) ! (defun vc-ignore (file &optional directory) ! "Ignore FILE under the VCS of DIRECTORY (default is `default-directory'). ! FILE is a file wildcard. ! When called interactively and with a prefix argument, remove FILE ! from ignored files. ! When called from Lisp code, if DIRECTORY is non-nil, the ! repository to use will be deduced by DIRECTORY." (interactive ! (list (read-file-name "The file to ignore: ") (completing-read ! "The file to remove: " (vc-call-backend ! (vc-backend default-directory) ! 'ignore-completion-table default-directory)))) (let* ((directory (or directory default-directory)) ! (backend (vc-backend default-directory)) ! (remove current-prefix-arg)) ! (vc-call-backend backend 'ignore file directory remove))) (defun vc-default-ignore (backend file &optional directory remove) "Ignore FILE under the VCS of DIRECTORY (default is `default-directory'). --- 1350,1382 ---- (let ((vc-handled-backends (list backend))) (call-interactively 'vc-register))) ! (defun vc-ignore (file &optional directory remove-p) ! "Ignore or remove FILE under the VCS of DIRECTORY. ! ! If REMOVE-P if nil, FILE is a file wild-card to be ignored. ! Otherwise, remove FILE from the list of ignored files. ! ! DIRECTORY defaults to `default-directory' and is used to ! determine the responsible VCS back-end. ! ! Interactively, FILE is ignored, unless a prefix argument is ! given, which queries for a FILE to remove from the list of ! ignored files." (interactive ! (list ! (if (not current-prefix-arg) ! (read-file-name "File to ignore: ") (completing-read ! "File to remove: " (vc-call-backend ! (or (vc-responsible-backend default-directory) ! (error "Unknown back end")) ! 'ignore-completion-table default-directory))) ! nil current-prefix-arg)) (let* ((directory (or directory default-directory)) ! (backend (or (vc-responsible-backend default-directory) ! (error "Unknown back end")))) ! (vc-call-backend backend 'ignore file directory remove-p))) (defun vc-default-ignore (backend file &optional directory remove) "Ignore FILE under the VCS of DIRECTORY (default is `default-directory'). --=-=-= Content-Type: text/plain In GNU Emacs 24.3.50.6 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1) of 2013-10-24 on luca Bzr revision: 114430 politza@fh-trier.de-20131023230436-qsusx12xjd899gie Windowing system distributor `The X.Org Foundation', version 11.0.10707000 System Description: Debian GNU/Linux 6.0.8 (squeeze) Configured using: `configure -C' Important settings: value of $LC_COLLATE: C value of $LC_MESSAGES: C value of $LANG: de_DE.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: diff-auto-refine-mode: t global-semanticdb-minor-mode: t global-semantic-decoration-mode: t global-semantic-idle-scheduler-mode: t desktop-save-mode: t mimo-mode: t pc-completion-mode: t ispell-track-input-method: t semantic-mode: t recentf-mode: t show-paren-mode: t window-numbering-mode: t shell-dirtrack-mode: t scroll-other-window-mode: t savehist-mode: t ekey-mode: t winner-mode: t eldoc-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-n C-n C-n C-n C-n C-n C-x o C-M-b C-M-SPC M-x f i x M-x M-x C-g C-x o C-l M-v C-l C-x o C-u C-x v = C-p C-e DEL 2 9 M-h t r u n M-p M-p M-h C-k b z M-p DEL DEL DEL h h t M-p DEL DEL C-r b z r C-r C-e C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-; b u C-; b r v c . p a t c h C-x C-w / t m p C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p M-f C-, g C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-x k C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-l C-n C-n C-n C-n C-n C-n C-n C-n C-x o C-n C-n C-n C-M-f C-M-f C-M-f C-M-f C-M-f C-M-f M-f M-f M-f M-f SPC b e M-f e d DEL DEL d M-q C-n C-r i s C-r C-r C-n M-f C-M-f C-e C-n C-n C-M-b C-M-b C-M-b C-M-b a n d SPC M-b C-b , M-q M-f i DEL SPC i t M-q C-/ M-h M-b DEL DEL SPC M-q C-n C-M-a C-n M-m C-M-SPC M-x i s p e l l a 1 1 C-n C-n C-n C-n C-n C-n C-p C-n C-e M-b DEL SPC DEL - C-n C-n C-n C-x C-s C-u C-x v = C-p C-p C-x o M-x r e p o r t - e m b u Recent messages: Wrote /tmp/vc.patch Mark set Mark saved where search started Undo! Mark set [2 times] Spell-checking region using aspell with en dictionary...done Saving file /home/politza/src/emacs/override-redirect/lisp/vc/vc.el... Wrote /home/politza/src/emacs/override-redirect/lisp/vc/vc.el Finding changes in /home/politza/src/emacs/override-redirect/lisp/vc/vc.el... View mode: type C-h for help, h for commands, q to quit. Load-path shadows: /home/politza/.emacs.d/plugins/pc hides /home/politza/.emacs.d/elpa/pc-1.0/pc /home/politza/.emacs.d/plugins/switch-focus hides /home/politza/.emacs.d/elpa/pc-1.0/switch-focus /home/politza/.emacs.d/elpa/yasnippet-20130907.1855/yasnippet hides /home/politza/.emacs.d/plugins/yasnippet-0.6.1c/yasnippet /home/politza/.emacs.d/plugins/tblc hides /home/politza/.emacs.d/plugins/tblc/tblc /home/politza/.emacs.d/plugins/haskell-mode/haskell-cabal hides /home/politza/.emacs.d/plugins/haskell/haskell-cabal /home/politza/.emacs.d/plugins/haskell-mode/haskell-decl-scan hides /home/politza/.emacs.d/plugins/haskell/haskell-decl-scan /home/politza/.emacs.d/plugins/haskell-mode/haskell-doc hides /home/politza/.emacs.d/plugins/haskell/haskell-doc /home/politza/.emacs.d/plugins/haskell-mode/ghc-core hides /home/politza/.emacs.d/plugins/haskell/ghc-core /home/politza/.emacs.d/plugins/haskell-mode/haskell-mode hides /home/politza/.emacs.d/plugins/haskell/haskell-mode /home/politza/.emacs.d/plugins/haskell-mode/haskell-c hides /home/politza/.emacs.d/plugins/haskell/haskell-c /home/politza/.emacs.d/plugins/haskell-mode/haskell-indentation hides /home/politza/.emacs.d/plugins/haskell/haskell-indentation /home/politza/.emacs.d/plugins/haskell-mode/haskell-site-file hides /home/politza/.emacs.d/plugins/haskell/haskell-site-file /home/politza/.emacs.d/plugins/haskell-mode/haskell-ghci hides /home/politza/.emacs.d/plugins/haskell/haskell-ghci /home/politza/.emacs.d/plugins/haskell-mode/inf-haskell hides /home/politza/.emacs.d/plugins/haskell/inf-haskell /home/politza/.emacs.d/plugins/haskell-mode/haskell-indent hides /home/politza/.emacs.d/plugins/haskell/haskell-indent /home/politza/.emacs.d/plugins/haskell-mode/haskell-hugs hides /home/politza/.emacs.d/plugins/haskell/haskell-hugs /home/politza/.emacs.d/plugins/haskell-mode/haskell-font-lock hides /home/politza/.emacs.d/plugins/haskell/haskell-font-lock /home/politza/.emacs.d/plugins/haskell-mode/haskell-simple-indent hides /home/politza/.emacs.d/plugins/haskell/haskell-simple-indent /home/politza/.emacs.d/plugins/jedi/scratch hides /home/politza/.emacs.d/plugins/ewm/scratch /home/politza/.emacs.d/elpa/company-20130923.513/.dir-locals hides /home/politza/.emacs.d/plugins/el-get/.dir-locals /home/politza/.emacs.d/elpa/popup-20130708.2245/popup hides /home/politza/.emacs.d/plugins/auto-complete/popup /home/politza/.emacs.d/elpa/auto-complete-20130724.1750/auto-complete-config hides /home/politza/.emacs.d/plugins/auto-complete/auto-complete-config /home/politza/.emacs.d/elpa/auto-complete-20130724.1750/auto-complete hides /home/politza/.emacs.d/plugins/auto-complete/auto-complete /home/politza/.emacs.d/plugins/pc hides /home/politza/src/emacs/override-redirect/lisp/pc /home/politza/.emacs.d/elpa/popup-20130708.2245/popup hides /home/politza/src/emacs/override-redirect/lisp/popup /home/politza/.emacs.d/plugins/jedi/scratch hides /home/politza/src/emacs/override-redirect/lisp/scratch /home/politza/.emacs.d/plugins/saveplace hides /home/politza/src/emacs/override-redirect/lisp/saveplace /home/politza/.emacs.d/plugins/imenu hides /home/politza/src/emacs/override-redirect/lisp/imenu /home/politza/.emacs.d/plugins/term hides /home/politza/src/emacs/override-redirect/lisp/term /home/politza/.emacs.d/elpa/company-20130923.513/.dir-locals hides /home/politza/src/emacs/override-redirect/lisp/gnus/.dir-locals /home/politza/.emacs.d/plugins/matlab/matlab hides /usr/share/emacs-snapshot/site-lisp/emacs-goodies-el/matlab /home/politza/.emacs.d/plugins/boxquote hides /usr/share/emacs-snapshot/site-lisp/emacs-goodies-el/boxquote /home/politza/.emacs.d/plugins/bm hides /usr/share/emacs-snapshot/site-lisp/emacs-goodies-el/bm /home/politza/.emacs.d/plugins/haskell-mode/haskell-decl-scan hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-decl-scan /home/politza/.emacs.d/plugins/haskell-mode/haskell-c hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-c /home/politza/.emacs.d/plugins/haskell-mode/haskell-ghci hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-ghci /home/politza/.emacs.d/plugins/haskell-mode/haskell-doc hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-doc /home/politza/.emacs.d/plugins/haskell-mode/haskell-indent hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-indent /home/politza/.emacs.d/plugins/haskell-mode/haskell-mode hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-mode /home/politza/.emacs.d/plugins/haskell-mode/haskell-hugs hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-hugs /home/politza/.emacs.d/plugins/haskell-mode/haskell-site-file hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-site-file /home/politza/.emacs.d/plugins/haskell-mode/haskell-cabal hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-cabal /home/politza/.emacs.d/plugins/haskell-mode/inf-haskell hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/inf-haskell /home/politza/.emacs.d/plugins/haskell-mode/haskell-font-lock hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-font-lock /home/politza/.emacs.d/plugins/haskell-mode/haskell-simple-indent hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-simple-indent /home/politza/.emacs.d/plugins/haskell-mode/haskell-indentation hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-indentation Features: (shadow sort gnus-cite bbdb-message mail-extr nnir nndraft nnmh bbdb-gnus gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime dig mailcap emacsbug sendmail pp whitespace diff-mode ispell misearch multi-isearch mule-util holidays hol-loaddefs reftex-dcr reftex-auc tex-buf font-latex vc-dir ewoc vc vc-dispatcher vc-svn diary-lib diary-loaddefs semantic/decorate/include semantic/tag-file cc-langs vc-bzr vc-git cl-font-lock dired-eshell semantic/db-file data-debug cedet-files doc-view-fixed-scroll emacs-customizations hypermedia-customizations eww-customizations nogroup-customizations wp-customizations view-customizations tex-customizations reftex-customizations reftex-miscellaneous-configurations-customizations reftex-label-support-customizations reftex-referencing-labels-customizations reftex-defining-label-environments-customizations AUCTeX-customizations preview-customizations preview-latex-customizations preview-appearance-customizations TeX-parse-customizations TeX-file-customizations TeX-command-customizations TeX-view-customizations LaTeX-customizations LaTeX-macro-customizations LaTeX-math-customizations LaTeX-indentation-customizations table-customizations table-hooks-customizations outlines-customizations programming-customizations tools-customizations vc-customizations log-edit-customizations semantic-customizations pulse-customizations semantic-imenu-customizations semantic/db-mode semantic/decorate/mode semantic/decorate pulse makefile-customizations etags-customizations ediff-customizations diff-customizations diff-mode-customizations languages-customizations elpy-customizations matlab-customizations sh-customizations python-customizations rx haskell-customizations c-customizations semantic/bovine/c hideif cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs semantic/db-find semantic/db-ref semantic/bovine/c-by semantic/lex-spp semantic/idle semantic/bovine/gcc semantic/dep semantic/bovine semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn semantic/db eieio-base semantic/ctxt semantic/format ezimage semantic/tag-ls semantic/find asm-customizations multimedia-customizations image-customizations help-customizations ekey-customizations info-lookup-customizations info-customizations customize-customizations custom-buffer-customizations apropos-customizations help-mode files-customizations uniquify-customizations uniquify sunrise-customizations recentf-customizations find-file-customizations backup-customizations faces-customizations highlight-symbol-customizations font-lock-customizations hi-lock-customizations facemenu-customizations external-customizations server-customizations processes-customizations shell-customizations proced-customizations gud-customizations tooltip-customizations grep-customizations compilation-customizations next-error-customizations comint-customizations SQL-customizations man-customizations environment-customizations xterm-customizations windows-customizations winner-customizations minibuffer-customizations savehist-customizations completion-spelling lib-string menu-customizations keyboard-customizations chistory-customizations initialization-customizations frames-customizations ediff-window-customizations desktop-customizations desktop frameset dired-customizations dired-x-customizations dired-x dired-details-customizations editing-customizations paragraphs-customizations matching-customizations paren-matching-customizations paren-showing-customizations isearch-customizations bookmark-customizations killing-customizations indent-customizations fill-customizations emulations-customizations editing-basics-customizations development-customizations lisp-customizations re-builder-customizations inferior-lisp-customizations ielm-customizations ert-customizations edebug-customizations bytecomp-customizations advice-customizations internal-customizations alloc-customizations extensions-customizations eldoc-customizations cust-print-customizations data-customizations save-place-customizations convenience-customizations mimo-customizations mimo diminish-customizations diminish iedit-customizations imenu-tree-customizations tags-tree-customizations company-customizations workgroups-customizations window-numbering-customizations pabbrev-customizations kmacro-customizations imenu-customizations ibuffer-customizations ibuf-macs hl-line-customizations hippie-expand-customizations file-cache-customizations ffap-customizations completion-customizations pc-completion-customizations jedi-customizations iswitchb-customizations auto-complete-customizations pc pcase switch-focus color hl-line browse-kill-ring-customizations auto-revert-customizations auto-insert-customizations Buffer-menu-customizations comm-customizations tramp-customizations browse-url-customizations applications-customizations mediawiki-customizations w3m-customizations package-customizations mail-customizations bbdb-customizations bbdb-sendmail-customizations bbdb-mua-customizations bbdb-mua bbdb-com crm bbdb smtpmail-customizations shr-customizations sendmail-customizations gnus-customizations nnmail-customizations nnmail-split-customizations mail-source-customizations gnus-summary-customizations gnus-thread-customizations gnus-summary-various-customizations gnus-summary-sort-customizations gnus-summary-marks-customizations gnus-summary-maneuvering-customizations gnus-summary-format-customizations parse-time-rfc2822 gnus-summary-exit-customizations gnus-sum gnus-group gnus-undo gnus-start gnus-spec gnus-win gnus-start-customizations gnus-server-customizations gnus-message-customizations message-customizations message-various-customizations message-sending-customizations message-buffers-customizations gnus-group-customizations gnus-group-visual-customizations gnus-nnimap-format nnimap nnmail gnus-int mail-source message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader parse-time tls utf7 netrc nnoo gnus gnus-ems nnheader mail-utils gnus-group-various-customizations gnus-group-select-customizations gnus-files-customizations gnus-newsrc-customizations gnus-exit-customizations gnus-article-customizations gnus-article-hiding-customizations ispell-customizations eshell-customizations eshell-module-customizations eshell-smart-customizations eshell-hist-customizations eshell-mode-customizations edebug doc-view-customizations pdf-tools-customizations pdf-sync-customizations pdf-annot-customizations pdf-isearch-customizations pdf-sync pdf-annot pdf-occur tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet pdf-history pdf-outline pdf-links pdf-isearch pdf-misc imenu pdf-info tq pdf-render pdf-tools pdf-util gnus-range warnings doc-view jka-compr image-mode calendar-customizations org-customizations org-structure-customizations org-plain-lists-customizations org-edit-structure-customizations org-startup-customizations org-link-customizations org-latex-customizations org-appearance-customizations holidays-customizations diary-customizations calculator-customizations calc-customizations server recentf tree-widget .autoload paren window-numbering w3m browse-url timezone w3m-hist w3m-e23 w3m-ccl ccl w3m-fsf w3m-favicon w3m-image w3m-proc w3m-util view tramp tramp-compat tramp-loaddefs trampver shell track-last-window scroll-other-window saveplace savehist reftex reftex-vars pabbrev org ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob org-compat org-macs ob-eval org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs lib-edit lib-window lib-isearch lib-buffer reveal iswitchb lib-basic lib-lispext latex easy-mmode tex-style tex dbus xml tex-site auto-loads info-look info ibuffer hippie-exp grep compile filecache edit-minibuffer eldoc-eval pcomplete esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util ekey assoc dired-details+ dired dired-details cool-prefix-bindings winner lib-kbd comint-history comint ansi-color ring browse-kill-ring advice anticus edmacro kmacro derived cl-macs gv ffap thingatpt url-parse auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core gnus-util mm-util mail-prsvr password-cache url-vars eldoc help-fns cus-edit easymenu cus-start cus-load wid-edit cl cl-loaddefs cl-lib bbdb-loaddefs cl-format-autoloads package time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) --=-=-=-- From unknown Tue Jun 17 01:42:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15754: 24.3.50; [PATCH] vc-ignore makes no sense Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Dec 2013 03:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15754 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Andreas Politz Cc: 15754@debbugs.gnu.org Received: via spool by 15754-submit@debbugs.gnu.org id=B15754.13863856771791 (code B ref 15754); Sat, 07 Dec 2013 03:08:02 +0000 Received: (at 15754) by debbugs.gnu.org; 7 Dec 2013 03:07:57 +0000 Received: from localhost ([127.0.0.1]:35249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vp8FH-0000So-L9 for submit@debbugs.gnu.org; Fri, 06 Dec 2013 22:07:57 -0500 Received: from mail-ea0-f169.google.com ([209.85.215.169]:60453) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vp8FF-0000Se-EP for 15754@debbugs.gnu.org; Fri, 06 Dec 2013 22:07:54 -0500 Received: by mail-ea0-f169.google.com with SMTP id l9so611620eaj.14 for <15754@debbugs.gnu.org>; Fri, 06 Dec 2013 19:07:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=20spyjMN/SX6fcXIbZPERKwqGjK0pa+pjSs947DHGIo=; b=tNOp6Rwv97LDSBH9UyXKWWTxww8pRKXQ3D0EADv98TezE5lKGuCIaeZkxwuFfVWzXK BKC+37wtTkBrx/JvrJDDhCQc17s0Ftcg1W7th1b8Lc7ysj8TdL1RZER+aGMZ4FAvLnW5 U5aY/SvbFy/wCuFvLIpsi6ro+T7WAtKauun6ZWp8Bg9YT0T2SwfdqzSEoOfeGM36KAaW 4Q3XWtiAjGtJv6tRSw9DBgUT3Q+ZuwDaShMwwfMeZYoZKcvlbrQRp2l57WKJdOPenXNZ azB6KsJJBL0dNRss8nc/KaCIOTA+89wAE3Twa2MjMzRrG5nxzfFFiN8YQNpsXgcBbmQQ 8e6Q== X-Received: by 10.14.108.134 with SMTP id q6mr4856399eeg.96.1386385672611; Fri, 06 Dec 2013 19:07:52 -0800 (PST) Received: from axl ([62.228.136.233]) by mx.google.com with ESMTPSA id g47sm1866907eeo.19.2013.12.06.19.07.49 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 06 Dec 2013 19:07:49 -0800 (PST) From: Dmitry Gutov References: <87a9hrrl0p.fsf@hochschule-trier.de> Date: Sat, 07 Dec 2013 05:07:46 +0200 In-Reply-To: <87a9hrrl0p.fsf@hochschule-trier.de> (Andreas Politz's message of "Wed, 30 Oct 2013 13:38:46 +0100") Message-ID: <87a9gdwe7x.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Andreas, Andreas Politz writes: > There are two problems with this function. Or maybe three. :) The changes in the code and the functions signature look good to me, but I think the docstring actually became less accurate in places. > ! (defun vc-ignore (file &optional directory remove-p) > ! "Ignore or remove FILE under the VCS of DIRECTORY. "Remove file under the VCS" means something completely different. > ! Interactively, FILE is ignored, unless a prefix argument is > ! given, which queries for a FILE to remove from the list of > ! ignored files." Maybe "...in which case the function queries..."? And I think the usual form would be, "When called interactively, ignore FILE, unless ..., in which case prompt ...". You can grep Emacs source code for "When called interactively". From unknown Tue Jun 17 01:42:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15754: 24.3.50; [PATCH] vc-ignore makes no sense References: <87a9hrrl0p.fsf@hochschule-trier.de> In-Reply-To: <87a9hrrl0p.fsf@hochschule-trier.de> Resent-From: Xue Fuqiao Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Dec 2013 02:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15754 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 15754@debbugs.gnu.org Cc: politza@hochschule-trier.de, dgutov@yandex.ru Received: via spool by 15754-submit@debbugs.gnu.org id=B15754.138793890932046 (code B ref 15754); Wed, 25 Dec 2013 02:36:01 +0000 Received: (at 15754) by debbugs.gnu.org; 25 Dec 2013 02:35:09 +0000 Received: from localhost ([127.0.0.1]:40075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VveJQ-0008Kn-PP for submit@debbugs.gnu.org; Tue, 24 Dec 2013 21:35:09 -0500 Received: from mail-ig0-f170.google.com ([209.85.213.170]:51467) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VveJO-0008Kc-2J for 15754@debbugs.gnu.org; Tue, 24 Dec 2013 21:35:07 -0500 Received: by mail-ig0-f170.google.com with SMTP id k19so24732860igc.1 for <15754@debbugs.gnu.org>; Tue, 24 Dec 2013 18:35:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=f3WDTuiYazLmPaX8UBvJdeZvH1lorJBzCycXVhsfHx0=; b=1B0jAIP7tHLoOYskhemgHh974nuKk7wREvVwIyRk7b1faU4UQTUzAhF75fsbQMK50B SvEWYE6x3UnJzzYfvBoiquwkLyTQBHCSxkJe/jqi+IjIJ08xppmeWxepG+uKlvvzIxUT UbldL29fBm/gbeGFJq7M3izjFDIvyYcHNczjtXz3cLemcKuiTVGmlKaypAQGdzHzFfE3 QOKktkL9ep3liJFbL4Sh9YtiiihKaje1UQNkexSP/piG4KwyXSmLxNQe9VToS/wAhCtR DoCs7KO/KkLN8H2uQqOsB2sMNgHQ2Tj4BvgrkH/CKajRGW/HUExI+x+mbMbJ7ne1scqY q/Ig== MIME-Version: 1.0 X-Received: by 10.50.77.83 with SMTP id q19mr27812883igw.21.1387938905078; Tue, 24 Dec 2013 18:35:05 -0800 (PST) Received: by 10.42.119.18 with HTTP; Tue, 24 Dec 2013 18:35:05 -0800 (PST) Date: Wed, 25 Dec 2013 10:35:05 +0800 Message-ID: From: Xue Fuqiao Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) I reorganized the doc string. Here's the new patch: === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2013-11-26 19:17:55 +0000 +++ lisp/vc/vc.el 2013-12-25 02:28:57 +0000 @@ -1343,23 +1343,33 @@ (let ((vc-handled-backends (list backend))) (call-interactively 'vc-register))) -(defun vc-ignore (file &optional directory) - "Ignore FILE under the VCS of DIRECTORY (default is `default-directory'). -FILE is a file wildcard. -When called interactively and with a prefix argument, remove FILE -from ignored files. -When called from Lisp code, if DIRECTORY is non-nil, the -repository to use will be deduced by DIRECTORY." +(defun vc-ignore (file &optional directory remove) + "Ignore FILE under the VCS of DIRECTORY. + +Normally, FILE is a wildcard specification that matches the files +to be ignored. When REMOVE is non-nil, remove FILE from the list +of ignored files. + +DIRECTORY defaults to `default-directory' and is used to +determine the responsible VC backend. + +When called interactively, ignore FILE, unless a prefix argument +is given, in which case prompt for a file FILE to remove from the +list of ignored files." (interactive - (list (read-file-name "The file to ignore: ") + (list + (if (not current-prefix-arg) + (read-file-name "File to ignore: ") (completing-read - "The file to remove: " + "File to remove: " (vc-call-backend - (vc-backend default-directory) - 'ignore-completion-table default-directory)))) + (or (vc-responsible-backend default-directory) + (error "Unknown backend")) + 'ignore-completion-table default-directory))) + nil current-prefix-arg)) (let* ((directory (or directory default-directory)) - (backend (vc-backend default-directory)) - (remove current-prefix-arg)) + (backend (or (vc-responsible-backend default-directory) + (error "Unknown backend")))) (vc-call-backend backend 'ignore file directory remove))) (defun vc-default-ignore (backend file &optional directory remove) -- http://www.gnu.org/software/emacs/ From unknown Tue Jun 17 01:42:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15754: 24.3.50; [PATCH] vc-ignore makes no sense Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Dec 2013 17:38:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15754 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Xue Fuqiao , 15754@debbugs.gnu.org Cc: politza@hochschule-trier.de Received: via spool by 15754-submit@debbugs.gnu.org id=B15754.138799304422773 (code B ref 15754); Wed, 25 Dec 2013 17:38:03 +0000 Received: (at 15754) by debbugs.gnu.org; 25 Dec 2013 17:37:24 +0000 Received: from localhost ([127.0.0.1]:41612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvsOZ-0005vE-Gu for submit@debbugs.gnu.org; Wed, 25 Dec 2013 12:37:23 -0500 Received: from mail-ea0-f169.google.com ([209.85.215.169]:57965) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvsOX-0005v5-8B for 15754@debbugs.gnu.org; Wed, 25 Dec 2013 12:37:21 -0500 Received: by mail-ea0-f169.google.com with SMTP id l9so2932002eaj.0 for <15754@debbugs.gnu.org>; Wed, 25 Dec 2013 09:37:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=05PMx0F77K67emSCDbxoUc11UVOmzGNybRl4askBFPU=; b=lAGPeIfpLykZfYMhmuJWEaXQWsMPnADMTH+VyOTRYE0ADa1sODqE1Gd2ps7ewcqE3g Salr1APmLzkW0oUANAoJ7YWnV3WKLyXEbVCNFmzS+KoKYIkt8HWHVOLU8Rtm82Ey9Ax6 udIQufkczNvVJ1JrzqxFykPm09pFjjQtwlXw/tQqkFtW6vTt7Xs20iyhWI+1sECZkbGj paCtBtCJIrO45OixcxLfSKMeSpBZHtxOTllakLCyVj4FHEjmhLsPgigmkQZ1iTtofzXb mbt/oRI974KZWFus7pkyUGzRABDHevsS+n+na/BOtI/0d29EDA+r2v6kU6CvmerA8RwW oDTQ== X-Received: by 10.15.43.10 with SMTP id w10mr34383590eev.13.1387993040372; Wed, 25 Dec 2013 09:37:20 -0800 (PST) Received: from [192.168.10.2] (93-151-17.netrun.cytanet.com.cy. [93.109.151.17]) by mx.google.com with ESMTPSA id a51sm65607087eeh.8.2013.12.25.09.37.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Dec 2013 09:37:19 -0800 (PST) Message-ID: <52BB17CB.5080402@yandex.ru> Date: Wed, 25 Dec 2013 19:37:15 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Looks good to me, except for this one bit, which can be better: On 25.12.2013 04:35, Xue Fuqiao wrote: > +When called interactively, ignore FILE, unless a prefix argument > +is given, in which case prompt for a file FILE to remove from the > +list of ignored files." The command will prompt for FILE either way, but will ignore or "unignore" it depending on the presence of the prefix argument. I'm not sure who to attribute the patch to, so please install it yourself. It's not really a bugfix, but doesn't look like a new feature to me, so it's probably okay from the feature freeze standpoint. From unknown Tue Jun 17 01:42:55 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Andreas Politz Subject: bug#15754: closed (Re: 24.3.50; [PATCH] vc-ignore makes no sense) Message-ID: References: <87a9hrrl0p.fsf@hochschule-trier.de> X-Gnu-PR-Message: they-closed 15754 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 15754@debbugs.gnu.org Date: Wed, 25 Dec 2013 23:10:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1388013003-10753-1" This is a multi-part message in MIME format... ------------=_1388013003-10753-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #15754: 24.3.50; [PATCH] vc-ignore makes no sense which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 15754@debbugs.gnu.org. --=20 15754: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15754 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1388013003-10753-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 15754-done) by debbugs.gnu.org; 25 Dec 2013 23:09:20 +0000 Received: from localhost ([127.0.0.1]:42116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvxZo-0002mB-FD for submit@debbugs.gnu.org; Wed, 25 Dec 2013 18:09:20 -0500 Received: from mail-ie0-f173.google.com ([209.85.223.173]:51390) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvxZm-0002ly-I0 for 15754-done@debbugs.gnu.org; Wed, 25 Dec 2013 18:09:19 -0500 Received: by mail-ie0-f173.google.com with SMTP id to1so8176504ieb.32 for <15754-done@debbugs.gnu.org>; Wed, 25 Dec 2013 15:09:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=RUMUtREpnS2AmgPY1VfKdBBpgj1ihb+L60TxlLq0tbs=; b=qYN+oLYb/XRm2vHo3RXVoh00pEDMuEdMjTbK/7BCPKy0Xlcwniv/43JEQRe3VBGvMj YDWUVQtRl9Qa39r8d2Oy+l1GK3/yaN82Z9FKPP1gpkcWxCh3ID0GZtNT6YNW6nHZMXLm 3ca7IVdPDe7JyXw4eKwN4EdLSIcANgisYTJIFt7VUsFH+sp8Oh9XN4h7am3WtXxtrF71 LPBkLj6Hm6pEmJn9eCHKpa673R04HJsWNyVoycS1XUC1EStgnfvUi37hgVScaBTByeWX BLYbmYRHnA6aJHWz2TCWqsk5afAIAgFdXEG5z3NAZB5iyxXPksm08y9ClhQmlW9yF7WV rQrg== MIME-Version: 1.0 X-Received: by 10.50.234.162 with SMTP id uf2mr32137441igc.48.1388012957886; Wed, 25 Dec 2013 15:09:17 -0800 (PST) Received: by 10.42.119.18 with HTTP; Wed, 25 Dec 2013 15:09:17 -0800 (PST) Date: Thu, 26 Dec 2013 07:09:17 +0800 Message-ID: Subject: Re: 24.3.50; [PATCH] vc-ignore makes no sense From: Xue Fuqiao To: 15754-done@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15754-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Done as trunk revision 115751. Thank you. -- http://www.gnu.org/software/emacs/ ------------=_1388013003-10753-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Oct 2013 12:39:55 +0000 Received: from localhost ([127.0.0.1]:52383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbV3x-0008Oq-8c for submit@debbugs.gnu.org; Wed, 30 Oct 2013 08:39:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54794) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbV3s-0008OZ-Ui for submit@debbugs.gnu.org; Wed, 30 Oct 2013 08:39:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbV3g-0001UE-HU for submit@debbugs.gnu.org; Wed, 30 Oct 2013 08:39:43 -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 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51625) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbV3g-0001UA-2m for submit@debbugs.gnu.org; Wed, 30 Oct 2013 08:39:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbV3Z-0004ob-MB for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 08:39:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbV3S-0001Sf-PA for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 08:39:29 -0400 Received: from gateway-a.fh-trier.de ([143.93.54.181]:48955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbV3S-0001Ob-91 for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 08:39:22 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier] Received: from luca (dslb-178-004-252-179.pools.arcor-ip.net [178.4.252.179]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id 2EEC41788523 for ; Wed, 30 Oct 2013 13:38:47 +0100 (CET) Received: from politza by luca with local (Exim 4.72) (envelope-from ) id 1VbV2s-0006FN-FZ for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 13:38:46 +0100 From: Andreas Politz To: bug-gnu-emacs@gnu.org Subject: 24.3.50; [PATCH] vc-ignore makes no sense Date: Wed, 30 Oct 2013 13:38:46 +0100 Message-ID: <87a9hrrl0p.fsf@hochschule-trier.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --=-=-= Content-Type: text/plain There are two problems with this function. 1. It uses vc-backend on the default-directory, which in turn uses vc-registered. But the return value of this function for directories seems to be back end dependent. E.g. in git it returns always nil for directories, in bzr it seems to return t only if directory does not end with a slash. I am not sure which of these things needs to be fixed. I suppose this function should do what it says and return t for registered files (including directories). But vc-ignore should also work in the root directory, which technically is not registered. So I replaced it with vc-responsible-backend. 2. The interactive spec, when reading the documentation, makes no sense to me. I assume this is just an oversight. 3. The function should not have different abilities depending on whether it was called interactively or not. -ap --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=vc-ignore.diff === modified file 'lisp/vc/vc.el' *** lisp/vc/vc.el 2013-10-25 02:33:42 +0000 --- lisp/vc/vc.el 2013-10-28 17:04:10 +0000 *************** *** 1350,1373 **** (let ((vc-handled-backends (list backend))) (call-interactively 'vc-register))) ! (defun vc-ignore (file &optional directory) ! "Ignore FILE under the VCS of DIRECTORY (default is `default-directory'). ! FILE is a file wildcard. ! When called interactively and with a prefix argument, remove FILE ! from ignored files. ! When called from Lisp code, if DIRECTORY is non-nil, the ! repository to use will be deduced by DIRECTORY." (interactive ! (list (read-file-name "The file to ignore: ") (completing-read ! "The file to remove: " (vc-call-backend ! (vc-backend default-directory) ! 'ignore-completion-table default-directory)))) (let* ((directory (or directory default-directory)) ! (backend (vc-backend default-directory)) ! (remove current-prefix-arg)) ! (vc-call-backend backend 'ignore file directory remove))) (defun vc-default-ignore (backend file &optional directory remove) "Ignore FILE under the VCS of DIRECTORY (default is `default-directory'). --- 1350,1382 ---- (let ((vc-handled-backends (list backend))) (call-interactively 'vc-register))) ! (defun vc-ignore (file &optional directory remove-p) ! "Ignore or remove FILE under the VCS of DIRECTORY. ! ! If REMOVE-P if nil, FILE is a file wild-card to be ignored. ! Otherwise, remove FILE from the list of ignored files. ! ! DIRECTORY defaults to `default-directory' and is used to ! determine the responsible VCS back-end. ! ! Interactively, FILE is ignored, unless a prefix argument is ! given, which queries for a FILE to remove from the list of ! ignored files." (interactive ! (list ! (if (not current-prefix-arg) ! (read-file-name "File to ignore: ") (completing-read ! "File to remove: " (vc-call-backend ! (or (vc-responsible-backend default-directory) ! (error "Unknown back end")) ! 'ignore-completion-table default-directory))) ! nil current-prefix-arg)) (let* ((directory (or directory default-directory)) ! (backend (or (vc-responsible-backend default-directory) ! (error "Unknown back end")))) ! (vc-call-backend backend 'ignore file directory remove-p))) (defun vc-default-ignore (backend file &optional directory remove) "Ignore FILE under the VCS of DIRECTORY (default is `default-directory'). --=-=-= Content-Type: text/plain In GNU Emacs 24.3.50.6 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1) of 2013-10-24 on luca Bzr revision: 114430 politza@fh-trier.de-20131023230436-qsusx12xjd899gie Windowing system distributor `The X.Org Foundation', version 11.0.10707000 System Description: Debian GNU/Linux 6.0.8 (squeeze) Configured using: `configure -C' Important settings: value of $LC_COLLATE: C value of $LC_MESSAGES: C value of $LANG: de_DE.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: diff-auto-refine-mode: t global-semanticdb-minor-mode: t global-semantic-decoration-mode: t global-semantic-idle-scheduler-mode: t desktop-save-mode: t mimo-mode: t pc-completion-mode: t ispell-track-input-method: t semantic-mode: t recentf-mode: t show-paren-mode: t window-numbering-mode: t shell-dirtrack-mode: t scroll-other-window-mode: t savehist-mode: t ekey-mode: t winner-mode: t eldoc-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-n C-n C-n C-n C-n C-n C-x o C-M-b C-M-SPC M-x f i x M-x M-x C-g C-x o C-l M-v C-l C-x o C-u C-x v = C-p C-e DEL 2 9 M-h t r u n M-p M-p M-h C-k b z M-p DEL DEL DEL h h t M-p DEL DEL C-r b z r C-r C-e C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-; b u C-; b r v c . p a t c h C-x C-w / t m p C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p M-f C-, g C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-x k C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-l C-n C-n C-n C-n C-n C-n C-n C-n C-x o C-n C-n C-n C-M-f C-M-f C-M-f C-M-f C-M-f C-M-f M-f M-f M-f M-f SPC b e M-f e d DEL DEL d M-q C-n C-r i s C-r C-r C-n M-f C-M-f C-e C-n C-n C-M-b C-M-b C-M-b C-M-b a n d SPC M-b C-b , M-q M-f i DEL SPC i t M-q C-/ M-h M-b DEL DEL SPC M-q C-n C-M-a C-n M-m C-M-SPC M-x i s p e l l a 1 1 C-n C-n C-n C-n C-n C-n C-p C-n C-e M-b DEL SPC DEL - C-n C-n C-n C-x C-s C-u C-x v = C-p C-p C-x o M-x r e p o r t - e m b u Recent messages: Wrote /tmp/vc.patch Mark set Mark saved where search started Undo! Mark set [2 times] Spell-checking region using aspell with en dictionary...done Saving file /home/politza/src/emacs/override-redirect/lisp/vc/vc.el... Wrote /home/politza/src/emacs/override-redirect/lisp/vc/vc.el Finding changes in /home/politza/src/emacs/override-redirect/lisp/vc/vc.el... View mode: type C-h for help, h for commands, q to quit. Load-path shadows: /home/politza/.emacs.d/plugins/pc hides /home/politza/.emacs.d/elpa/pc-1.0/pc /home/politza/.emacs.d/plugins/switch-focus hides /home/politza/.emacs.d/elpa/pc-1.0/switch-focus /home/politza/.emacs.d/elpa/yasnippet-20130907.1855/yasnippet hides /home/politza/.emacs.d/plugins/yasnippet-0.6.1c/yasnippet /home/politza/.emacs.d/plugins/tblc hides /home/politza/.emacs.d/plugins/tblc/tblc /home/politza/.emacs.d/plugins/haskell-mode/haskell-cabal hides /home/politza/.emacs.d/plugins/haskell/haskell-cabal /home/politza/.emacs.d/plugins/haskell-mode/haskell-decl-scan hides /home/politza/.emacs.d/plugins/haskell/haskell-decl-scan /home/politza/.emacs.d/plugins/haskell-mode/haskell-doc hides /home/politza/.emacs.d/plugins/haskell/haskell-doc /home/politza/.emacs.d/plugins/haskell-mode/ghc-core hides /home/politza/.emacs.d/plugins/haskell/ghc-core /home/politza/.emacs.d/plugins/haskell-mode/haskell-mode hides /home/politza/.emacs.d/plugins/haskell/haskell-mode /home/politza/.emacs.d/plugins/haskell-mode/haskell-c hides /home/politza/.emacs.d/plugins/haskell/haskell-c /home/politza/.emacs.d/plugins/haskell-mode/haskell-indentation hides /home/politza/.emacs.d/plugins/haskell/haskell-indentation /home/politza/.emacs.d/plugins/haskell-mode/haskell-site-file hides /home/politza/.emacs.d/plugins/haskell/haskell-site-file /home/politza/.emacs.d/plugins/haskell-mode/haskell-ghci hides /home/politza/.emacs.d/plugins/haskell/haskell-ghci /home/politza/.emacs.d/plugins/haskell-mode/inf-haskell hides /home/politza/.emacs.d/plugins/haskell/inf-haskell /home/politza/.emacs.d/plugins/haskell-mode/haskell-indent hides /home/politza/.emacs.d/plugins/haskell/haskell-indent /home/politza/.emacs.d/plugins/haskell-mode/haskell-hugs hides /home/politza/.emacs.d/plugins/haskell/haskell-hugs /home/politza/.emacs.d/plugins/haskell-mode/haskell-font-lock hides /home/politza/.emacs.d/plugins/haskell/haskell-font-lock /home/politza/.emacs.d/plugins/haskell-mode/haskell-simple-indent hides /home/politza/.emacs.d/plugins/haskell/haskell-simple-indent /home/politza/.emacs.d/plugins/jedi/scratch hides /home/politza/.emacs.d/plugins/ewm/scratch /home/politza/.emacs.d/elpa/company-20130923.513/.dir-locals hides /home/politza/.emacs.d/plugins/el-get/.dir-locals /home/politza/.emacs.d/elpa/popup-20130708.2245/popup hides /home/politza/.emacs.d/plugins/auto-complete/popup /home/politza/.emacs.d/elpa/auto-complete-20130724.1750/auto-complete-config hides /home/politza/.emacs.d/plugins/auto-complete/auto-complete-config /home/politza/.emacs.d/elpa/auto-complete-20130724.1750/auto-complete hides /home/politza/.emacs.d/plugins/auto-complete/auto-complete /home/politza/.emacs.d/plugins/pc hides /home/politza/src/emacs/override-redirect/lisp/pc /home/politza/.emacs.d/elpa/popup-20130708.2245/popup hides /home/politza/src/emacs/override-redirect/lisp/popup /home/politza/.emacs.d/plugins/jedi/scratch hides /home/politza/src/emacs/override-redirect/lisp/scratch /home/politza/.emacs.d/plugins/saveplace hides /home/politza/src/emacs/override-redirect/lisp/saveplace /home/politza/.emacs.d/plugins/imenu hides /home/politza/src/emacs/override-redirect/lisp/imenu /home/politza/.emacs.d/plugins/term hides /home/politza/src/emacs/override-redirect/lisp/term /home/politza/.emacs.d/elpa/company-20130923.513/.dir-locals hides /home/politza/src/emacs/override-redirect/lisp/gnus/.dir-locals /home/politza/.emacs.d/plugins/matlab/matlab hides /usr/share/emacs-snapshot/site-lisp/emacs-goodies-el/matlab /home/politza/.emacs.d/plugins/boxquote hides /usr/share/emacs-snapshot/site-lisp/emacs-goodies-el/boxquote /home/politza/.emacs.d/plugins/bm hides /usr/share/emacs-snapshot/site-lisp/emacs-goodies-el/bm /home/politza/.emacs.d/plugins/haskell-mode/haskell-decl-scan hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-decl-scan /home/politza/.emacs.d/plugins/haskell-mode/haskell-c hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-c /home/politza/.emacs.d/plugins/haskell-mode/haskell-ghci hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-ghci /home/politza/.emacs.d/plugins/haskell-mode/haskell-doc hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-doc /home/politza/.emacs.d/plugins/haskell-mode/haskell-indent hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-indent /home/politza/.emacs.d/plugins/haskell-mode/haskell-mode hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-mode /home/politza/.emacs.d/plugins/haskell-mode/haskell-hugs hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-hugs /home/politza/.emacs.d/plugins/haskell-mode/haskell-site-file hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-site-file /home/politza/.emacs.d/plugins/haskell-mode/haskell-cabal hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-cabal /home/politza/.emacs.d/plugins/haskell-mode/inf-haskell hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/inf-haskell /home/politza/.emacs.d/plugins/haskell-mode/haskell-font-lock hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-font-lock /home/politza/.emacs.d/plugins/haskell-mode/haskell-simple-indent hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-simple-indent /home/politza/.emacs.d/plugins/haskell-mode/haskell-indentation hides /usr/share/emacs-snapshot/site-lisp/haskell-mode/haskell-indentation Features: (shadow sort gnus-cite bbdb-message mail-extr nnir nndraft nnmh bbdb-gnus gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime dig mailcap emacsbug sendmail pp whitespace diff-mode ispell misearch multi-isearch mule-util holidays hol-loaddefs reftex-dcr reftex-auc tex-buf font-latex vc-dir ewoc vc vc-dispatcher vc-svn diary-lib diary-loaddefs semantic/decorate/include semantic/tag-file cc-langs vc-bzr vc-git cl-font-lock dired-eshell semantic/db-file data-debug cedet-files doc-view-fixed-scroll emacs-customizations hypermedia-customizations eww-customizations nogroup-customizations wp-customizations view-customizations tex-customizations reftex-customizations reftex-miscellaneous-configurations-customizations reftex-label-support-customizations reftex-referencing-labels-customizations reftex-defining-label-environments-customizations AUCTeX-customizations preview-customizations preview-latex-customizations preview-appearance-customizations TeX-parse-customizations TeX-file-customizations TeX-command-customizations TeX-view-customizations LaTeX-customizations LaTeX-macro-customizations LaTeX-math-customizations LaTeX-indentation-customizations table-customizations table-hooks-customizations outlines-customizations programming-customizations tools-customizations vc-customizations log-edit-customizations semantic-customizations pulse-customizations semantic-imenu-customizations semantic/db-mode semantic/decorate/mode semantic/decorate pulse makefile-customizations etags-customizations ediff-customizations diff-customizations diff-mode-customizations languages-customizations elpy-customizations matlab-customizations sh-customizations python-customizations rx haskell-customizations c-customizations semantic/bovine/c hideif cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs semantic/db-find semantic/db-ref semantic/bovine/c-by semantic/lex-spp semantic/idle semantic/bovine/gcc semantic/dep semantic/bovine semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn semantic/db eieio-base semantic/ctxt semantic/format ezimage semantic/tag-ls semantic/find asm-customizations multimedia-customizations image-customizations help-customizations ekey-customizations info-lookup-customizations info-customizations customize-customizations custom-buffer-customizations apropos-customizations help-mode files-customizations uniquify-customizations uniquify sunrise-customizations recentf-customizations find-file-customizations backup-customizations faces-customizations highlight-symbol-customizations font-lock-customizations hi-lock-customizations facemenu-customizations external-customizations server-customizations processes-customizations shell-customizations proced-customizations gud-customizations tooltip-customizations grep-customizations compilation-customizations next-error-customizations comint-customizations SQL-customizations man-customizations environment-customizations xterm-customizations windows-customizations winner-customizations minibuffer-customizations savehist-customizations completion-spelling lib-string menu-customizations keyboard-customizations chistory-customizations initialization-customizations frames-customizations ediff-window-customizations desktop-customizations desktop frameset dired-customizations dired-x-customizations dired-x dired-details-customizations editing-customizations paragraphs-customizations matching-customizations paren-matching-customizations paren-showing-customizations isearch-customizations bookmark-customizations killing-customizations indent-customizations fill-customizations emulations-customizations editing-basics-customizations development-customizations lisp-customizations re-builder-customizations inferior-lisp-customizations ielm-customizations ert-customizations edebug-customizations bytecomp-customizations advice-customizations internal-customizations alloc-customizations extensions-customizations eldoc-customizations cust-print-customizations data-customizations save-place-customizations convenience-customizations mimo-customizations mimo diminish-customizations diminish iedit-customizations imenu-tree-customizations tags-tree-customizations company-customizations workgroups-customizations window-numbering-customizations pabbrev-customizations kmacro-customizations imenu-customizations ibuffer-customizations ibuf-macs hl-line-customizations hippie-expand-customizations file-cache-customizations ffap-customizations completion-customizations pc-completion-customizations jedi-customizations iswitchb-customizations auto-complete-customizations pc pcase switch-focus color hl-line browse-kill-ring-customizations auto-revert-customizations auto-insert-customizations Buffer-menu-customizations comm-customizations tramp-customizations browse-url-customizations applications-customizations mediawiki-customizations w3m-customizations package-customizations mail-customizations bbdb-customizations bbdb-sendmail-customizations bbdb-mua-customizations bbdb-mua bbdb-com crm bbdb smtpmail-customizations shr-customizations sendmail-customizations gnus-customizations nnmail-customizations nnmail-split-customizations mail-source-customizations gnus-summary-customizations gnus-thread-customizations gnus-summary-various-customizations gnus-summary-sort-customizations gnus-summary-marks-customizations gnus-summary-maneuvering-customizations gnus-summary-format-customizations parse-time-rfc2822 gnus-summary-exit-customizations gnus-sum gnus-group gnus-undo gnus-start gnus-spec gnus-win gnus-start-customizations gnus-server-customizations gnus-message-customizations message-customizations message-various-customizations message-sending-customizations message-buffers-customizations gnus-group-customizations gnus-group-visual-customizations gnus-nnimap-format nnimap nnmail gnus-int mail-source message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader parse-time tls utf7 netrc nnoo gnus gnus-ems nnheader mail-utils gnus-group-various-customizations gnus-group-select-customizations gnus-files-customizations gnus-newsrc-customizations gnus-exit-customizations gnus-article-customizations gnus-article-hiding-customizations ispell-customizations eshell-customizations eshell-module-customizations eshell-smart-customizations eshell-hist-customizations eshell-mode-customizations edebug doc-view-customizations pdf-tools-customizations pdf-sync-customizations pdf-annot-customizations pdf-isearch-customizations pdf-sync pdf-annot pdf-occur tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet pdf-history pdf-outline pdf-links pdf-isearch pdf-misc imenu pdf-info tq pdf-render pdf-tools pdf-util gnus-range warnings doc-view jka-compr image-mode calendar-customizations org-customizations org-structure-customizations org-plain-lists-customizations org-edit-structure-customizations org-startup-customizations org-link-customizations org-latex-customizations org-appearance-customizations holidays-customizations diary-customizations calculator-customizations calc-customizations server recentf tree-widget .autoload paren window-numbering w3m browse-url timezone w3m-hist w3m-e23 w3m-ccl ccl w3m-fsf w3m-favicon w3m-image w3m-proc w3m-util view tramp tramp-compat tramp-loaddefs trampver shell track-last-window scroll-other-window saveplace savehist reftex reftex-vars pabbrev org ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob org-compat org-macs ob-eval org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs lib-edit lib-window lib-isearch lib-buffer reveal iswitchb lib-basic lib-lispext latex easy-mmode tex-style tex dbus xml tex-site auto-loads info-look info ibuffer hippie-exp grep compile filecache edit-minibuffer eldoc-eval pcomplete esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util ekey assoc dired-details+ dired dired-details cool-prefix-bindings winner lib-kbd comint-history comint ansi-color ring browse-kill-ring advice anticus edmacro kmacro derived cl-macs gv ffap thingatpt url-parse auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core gnus-util mm-util mail-prsvr password-cache url-vars eldoc help-fns cus-edit easymenu cus-start cus-load wid-edit cl cl-loaddefs cl-lib bbdb-loaddefs cl-format-autoloads package time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) --=-=-=-- ------------=_1388013003-10753-1--