From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#59420: 29.0.50; vc-prepare-patch fails when invoked in a directory Date: Sun, 20 Nov 2022 21:41:54 +0000 Message-ID: <87r0xxl2vx.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20185"; mail-complaints-to="usenet@ciao.gmane.io" To: 59420@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 20 22:43:15 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ows5q-00054B-CR for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Nov 2022 22:43:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ows5g-0005EF-Ij; Sun, 20 Nov 2022 16:43:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ows5e-0005E4-SS for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 16:43:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ows5e-0005h3-KI for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 16:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ows5e-0002qu-0u for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 16:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Nov 2022 21:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59420 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166898052910897 (code B ref -1); Sun, 20 Nov 2022 21:43:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Nov 2022 21:42:09 +0000 Original-Received: from localhost ([127.0.0.1]:44789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ows4n-0002ph-5y for submit@debbugs.gnu.org; Sun, 20 Nov 2022 16:42:09 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:48798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ows4h-0002pV-MP for submit@debbugs.gnu.org; Sun, 20 Nov 2022 16:42:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ows4g-0005A7-Nk for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 16:42:03 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ows4d-0005c2-SJ for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 16:42:02 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 6BE6B24002A for ; Sun, 20 Nov 2022 22:41:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668980515; bh=kMjArozY4d3CMdlxG9J3lbpPB05PGRPqpmnwtDspUoM=; h=From:To:Subject:Date:From; b=D/syFHFojZzou1/xXXwyGl5/5DUpQamD9lenSC4ozicBxWG4t77rx4/JohOfAYxLA wWvOxLuQ77ZUPaesX4UFnHVaLCT9Qgds6QzhhZG6VKa5HrzZF261ITN0QGvI7Sat/k rDOw98Rw984jHa+T3J5TRmt9IRP/8LoqPJ0qOr0zmNAEUICfO0OzchZhFpVhEDDkDX KfGUxBtFA8GimbboMz6kMJ0YyyhWgGH7TWOWSzo04hBIjT8YBPGi8Z+PrhabCnR2DU huOL/SX7x80pIn+BZ+Rnrbq0WrZ7ZZ8KhjiUr+cpTv0cRCXzq8WkQn3E5ms2pNU5Rl l8VNLdkqFykIw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NFkW707qJz9rxK for ; Sun, 20 Nov 2022 22:41:54 +0100 (CET) Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248479 Archived-At: As discovered in bug#59087, `vc-prepare-patch' (via `package-vc-prepare-patch') fails if invoked in a directory, instead of version controlled file. The issue is that the function currently runs --8<---------------cut here---------------start------------->8--- (save-current-buffer (vc-ensure-vc-buffer) (let ((patches (mapcar (lambda (rev) (vc-call-backend (vc-responsible-backend default-directory) 'prepare-patch rev)) revisions))) --8<---------------cut here---------------end--------------->8--- which fails because (vc-ensure-vc-buffer) is not enough to select the right buffer, and instead fails. Is there a more robust solution that would try to do /the right thing/? In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0) of 2022-11-19 built on quetzal Repository revision: db3ff76dc7d3184e51cb7ed17c78ef76babb9032 Repository branch: master System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure --with-pgtk --with-imagemagick' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XIM GTK3 ZLIB Important settings: value of $EMACSLOADPATH: value of $LC_MONETARY: en_US.UTF-8 value of $LC_NUMERIC: en_US.UTF-8 value of $LC_TIME: en_US.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: TeX-PDF-mode: t rcirc-color-mode: t rcirc-track-minor-mode: t global-git-commit-mode: t magit-auto-revert-mode: t server-mode: t repeat-mode: t display-battery-mode: t display-time-mode: t diff-hl-flydiff-mode: t winner-mode: t windmove-mode: t corfu-history-mode: t electric-pair-mode: t shell-dirtrack-mode: t recentf-mode: t save-place-mode: t savehist-mode: t pixel-scroll-precision-mode: t pixel-scroll-mode: t xterm-mouse-mode: t which-function-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tab-bar-mode: t file-name-shadow-mode: t context-menu-mode: t global-font-lock-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/philip/.config/emacs/site-lisp/sbbs-pld/sbbs hides /home/philip/.config/emacs/site-lisp/sbbs/sbbs /home/philip/.config/emacs/elpa/transient-0.3.7/transient hides /home/philip/Source/emacs/lisp/transient Features: (shadow emacsbug reposition macros mhtml-mode css-mode js cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode facemenu rect quail org-element avl-tree generator ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect ol-docview ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic ol org-keys oc org-compat advice org-macs org-loaddefs cal-menu calendar cal-loaddefs latex latex-flymake tex-ispell tex-style tex texmathp bibtex shortdoc flow-fill avy qp align dictionary dictionary-connection goto-addr view find-dired grep nroff-mode doc-view jka-compr image-mode exif ffap sh-script smie executable markdown-mode pulse color help-fns xref modus-vivendi-theme rcirc-color rcirc mailalias smtpmail ecomplete sort smiley gnus-cite mail-extr textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check gnus-bcklg nndoc gnus-dup debbugs-gnu debbugs-compat debbugs soap-client rng-xsd rng-dt rng-util xsd-regexp gnus-async gnus-ml disp-table mm-archive url-cache url-http url-auth url-gw display-line-numbers package-vc magit-extras mule-util face-remap magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff git-commit log-edit add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process with-editor server magit-mode transient edmacro kmacro magit-git magit-section magit-utils crm dash smerge-mode copyright ibuffer ibuffer-loaddefs whitespace bug-reference vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc-backup vc-git char-fold misearch multi-isearch dired-aux gnus-dired buffer-env compat compat-macs nndraft nnmh utf-7 nnfolder epa-file network-stream nsm gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig nntp gnus-cache gnus-sum shr pixel-fill kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range message yank-media puny dired-x dired dired-loaddefs rfc822 mml mml-sec epa mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win noutline outline checkdoc flymake-proc flymake warnings yasnippet-snippets yasnippet flyspell ispell init repeat project battery dbus xml shell-command+ thingatpt time sendmail rfc2047 rfc2045 ietf-drums gnus nnheader gnus-util mail-utils range mm-util mail-prsvr diff-hl-flydiff diff diff-hl log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode easy-mmode hippie-exp winner windmove corfu-history corfu finder-inf elec-pair tramp-sh tramp tramp-cache time-stamp tramp-loaddefs trampver tramp-integration cus-edit pp icons files-x tramp-compat shell pcomplete parse-time iso8601 time-date ls-lisp format-spec recentf tree-widget wid-edit saveplace savehist pixel-scroll cua-base xt-mouse modus-operandi-theme modus-themes which-func imenu edebug debug backtrace find-func cus-load setup site-lisp auto-site compile text-property-search comint ansi-osc ansi-color ring loaddefs-gen lisp-mnt radix-tree debbugs-autoloads diff-hl-autoloads haskell-mode-autoloads buffer-env-autoloads avy-autoloads yasnippet-snippets-autoloads magit-autoloads inspector-autoloads corfu-terminal-autoloads auctex-autoloads tex-site macrostep-autoloads git-commit-autoloads with-editor-autoloads transient-autoloads magit-section-autoloads popon-autoloads compat-autoloads vundo-autoloads corfu-autoloads rcirc-color-autoloads yasnippet-autoloads markdown-mode-autoloads go-mode-autoloads info dash-autoloads package let-alist derived rx pcase cl-extra help-mode browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json map byte-opt gv bytecomp byte-compile url-vars inline epg rfc6068 epg-config subr-x cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win pgtk-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo gtk pgtk lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 1193273 253117) (symbols 48 49217 126) (strings 32 239361 73181) (string-bytes 1 6907035) (vectors 16 126051) (vector-slots 8 2397456 109746) (floats 8 2967 1464) (intervals 56 26432 1666) (buffers 984 52))