GNU bug report logs - #51365
29.0.50; org-mode: modification-time error with git controled file

Previous Next

Package: org-mode;

Reported by: TAKAHASHI Yoshio <yfb02119 <at> nifty.com>

Date: Sun, 24 Oct 2021 02:20:02 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 28.1

Done: Kyle Meyer <kyle <at> kyleam.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51365 in the body.
You can then email your comments to 51365 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#51365; Package emacs. (Sun, 24 Oct 2021 02:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to TAKAHASHI Yoshio <yfb02119 <at> nifty.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 24 Oct 2021 02:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: TAKAHASHI Yoshio <yfb02119 <at> nifty.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; org-mode: modification-time error with git controled file
Date: Sun, 24 Oct 2021 11:18:07 +0900
Hi,

With git controled file,
{{{modification-time(%Y-%02m-%02dT%02H:%02M:%02S+09:00, 1)}}}
causes "Wrong type argument: stringp, " error.

`org-macro--vc-modified-time' in org-macro.el should pass list of FILE
to `vc-call', because `vc-git-print-log' expects list of file as its 1st
argument.


diff --git a/lisp/org/org-macro.el b/lisp/org/org-macro.el
index b8d3373418..9e70844963 100644
--- a/lisp/org/org-macro.el
+++ b/lisp/org/org-macro.el
@@ -368,7 +368,7 @@ org-macro--vc-modified-time
 	    date)
 	(unwind-protect
 	    (progn
-	      (vc-call print-log file buf nil nil 1)
+	      (vc-call print-log (list file) buf nil nil 1)
 	      (with-current-buffer buf
 		(vc-exec-after
 		 (lambda ()








In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)
 of 2021-10-23 built on LAPTOP-89LTAUNV
Repository revision: fbf57cbd44f3cf18fd22be4ea0b448bfdf22de25
Repository branch: master
Windowing system distributor 'HC-Consult', version 11.0.12009000
System Description: Ubuntu 20.04.3 LTS

Configured using:
 'configure 'CC=ccache gcc' 'CFLAGS=-O2 -march=native -mtune=native
 -pipe -s' 'LDFLAGS=-pipe -s' --enable-link-time-optimization
 --with-modules --with-cairo --without-compress-install --without-pop
 --prefix=/opt/emacs'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LC_MESSAGES: C
  value of $LC_TIME: C
  value of $LANG: ja_JP.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  gnus-undo-mode: t
  shell-dirtrack-mode: t
  auto-insert-mode: t
  recentf-mode: t
  marginalia-mode: t
  company-prescient-mode: t
  company-posframe-mode: t
  company-quickhelp-mode: t
  company-quickhelp-local-mode: t
  global-company-mode: t
  company-mode: t
  override-global-mode: t
  savehist-mode: t
  vertico-mode: t
  prescient-persist-mode: t
  delete-selection-mode: t
  cua-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-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
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/tkh/.emacs.d/elpa/transient-20211013.2148/transient hides /opt/emacs/share/emacs/29.0.50/lisp/transient

Features:
(shadow emacsbug mm-archive smiley gnus-async gnus-bcklg gnus-salt
gnus-dup gnus-ml disp-table qp pop3 utf-7 gnutls rfc2104 network-stream
nsm mailalias smtpmail sendmail sort gnus-cite mail-extr footnote
gnus-topic nndraft nnmh nnagent nnml nnnil gnus-agent gnus-srvr
gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache whitespace
magit-patch magit-subtree magit-gitignore magit-ediff ediff ediff-merg
ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util
magit-extras smartparens-lua lua-mode magit-bookmark 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 which-func imenu magit-diff
smerge-mode diff git-commit magit-core magit-autorevert autorevert
filenotify magit-margin magit-transient magit-process with-editor
magit-mode transient magit-git magit-section magit-utils crm
bug-reference vc-annotate vc-filewise edebug shortdoc log-view log-edit
pcvs-util add-log vc-dir ewoc ibuf-ext ibuffer ibuffer-loaddefs vc-mtn
vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs deadgrep spinner
mule-util vc misearch multi-isearch help-fns radix-tree cl-print debug
backtrace cus-start cus-load time-stamp org-variable-pitch face-remap
org-indent image-file image-converter ffap ol-eww eww xdg mm-url
ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt
speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view mml-smime smime
dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud
nnimap nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int
gnus-range gnus-win gnus nnheader ol-docview doc-view jka-compr
image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi dired-aux
vertico-directory cursor-sensor smartparens-config smartparens-org
smartparens-text smartparens goto-addr hl-line elfeed-show elfeed-search
vc-git diff-mode vc-dispatcher message rmc rfc822 mml mml-sec gnus-util
rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils
gmm-utils mailheader shr puny svg dom elfeed-csv elfeed elfeed-curl
elfeed-log elfeed-db elfeed-lib thingatpt url-queue xml-query xml
recentf-ext pdf-loader pdf-tools-autoloads org-journal org-crypt epa
derived epg rfc6068 epg-config cal-iso org-make-toc org-id org-clock
ob-shell shell ob-ditaa skeletor compile let-alist f
ox-sidenote-right-html ox-sidenote-right-latex ox-pandoc ht ox-org
ox-extra ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util
rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex
ox-icalendar org-agenda org-refile ox-html table ox-ascii ox-publish ox
org-element avl-tree org-inlinetask migemo japanese-holidays holidays
hol-loaddefs generic-x noflet dash cl-indent ls-lisp autoinsert affe
server consult-vertico consult recentf tree-widget wid-edit bookmark
text-property-search pp marginalia use-package-ensure company-prescient
company-posframe use-package-diminish company-quickhelp pos-tip
company-oddmuse company-keywords company-etags etags fileloop generator
xref project company-gtags company-dabbrev-code company-dabbrev
company-files company-clang company-capf company-cmake company-semantic
company-template company-bbdb company edmacro kmacro
use-package-bind-key bind-key savehist orderless vertico pcase prescient
delsel cua-base modus-vivendi-theme modus-operandi-theme modus-themes
use-package-core wdired dired dired-loaddefs mozc-cursor-color
mozc-cand-posframe s posframe mozc-im mozc cl-extra help-mode org ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src
ob-comint org-pcomplete pcomplete comint ansi-color ring org-list
org-faces org-entities noutline outline easy-mmode org-version
ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex iso8601
time-date ol rx org-keys oc org-compat advice org-macs org-loaddefs
format-spec find-func cal-menu calendar cal-loaddefs kinsoku info
package browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars seq gv subr-x byte-opt bytecomp
byte-compile cconv cl-loaddefs cl-lib japan-util iso-transl tooltip
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/x-win x-win term/common-win x-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 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 emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 882104 88540)
 (symbols 48 45055 44)
 (strings 32 174875 23928)
 (string-bytes 1 6218550)
 (vectors 16 127440)
 (vector-slots 8 1966522 97186)
 (floats 8 1011 1235)
 (intervals 56 119926 2243)
 (buffers 992 62))




Information forwarded to emacs-orgmode <at> gnu.org:
bug#51365; Package org-mode. (Sat, 11 Dec 2021 16:22:02 GMT) Full text and rfc822 format available.

Message #8 received at 51365 <at> debbugs.gnu.org (full text, mbox):

From: Kyle Meyer <kyle <at> kyleam.com>
To: TAKAHASHI Yoshio <yfb02119 <at> nifty.com>
Cc: 51365 <at> debbugs.gnu.org
Subject: Re: bug#51365: 29.0.50; org-mode: modification-time error with git
 controled file
Date: Sat, 11 Dec 2021 11:20:58 -0500
close 51365 28.1
quit

TAKAHASHI Yoshio writes:

> Hi,
>
> With git controled file,
> {{{modification-time(%Y-%02m-%02dT%02H:%02M:%02S+09:00, 1)}}}
> causes "Wrong type argument: stringp, " error.
>
> `org-macro--vc-modified-time' in org-macro.el should pass list of FILE
> to `vc-call', because `vc-git-print-log' expects list of file as its 1st
> argument.

Thanks for the report and fix.  This failure is new with Emacs 28,
specifically 3572613550f (Fix vc-git-state for filenames with wildcards,
2021-08-15).  Before that, passing a string instead of a list worked
okay because vc-git-print-log just passed its FILES argument untouched
to vc-git-command's FILE-OR-LIST.

> diff --git a/lisp/org/org-macro.el b/lisp/org/org-macro.el
> index b8d3373418..9e70844963 100644
> --- a/lisp/org/org-macro.el
> +++ b/lisp/org/org-macro.el
> @@ -368,7 +368,7 @@ org-macro--vc-modified-time
>  	    date)
>  	(unwind-protect
>  	    (progn
> -	      (vc-call print-log file buf nil nil 1)
> +	      (vc-call print-log (list file) buf nil nil 1)
>  	      (with-current-buffer buf
>  		(vc-exec-after
>  		 (lambda ()

Looks good to me.  I confirmed the bug and fix only with vc-git,
although the change looks appropriate for the other backends too:

  $ git grep -E '\(defun vc-.+-print-log'
  lisp/vc/vc-bzr.el:(defun vc-bzr-print-log (files buffer &optional shortlog start-revision limit)
  lisp/vc/vc-cvs.el:(defun vc-cvs-print-log (files buffer &optional _shortlog _start-revision limit)
  lisp/vc/vc-dav.el:(defun vc-dav-print-log (_url)
  lisp/vc/vc-git.el:(defun vc-git-print-log (files buffer &optional shortlog start-revision limit)
  lisp/vc/vc-hg.el:(defun vc-hg-print-log (files buffer &optional shortlog start-revision limit)
  lisp/vc/vc-mtn.el:(defun vc-mtn-print-log (files buffer &optional _shortlog start-revision limit)
  lisp/vc/vc-rcs.el:(defun vc-rcs-print-log-cleanup ()
  lisp/vc/vc-rcs.el:(defun vc-rcs-print-log (files buffer &optional _shortlog
  lisp/vc/vc-sccs.el:(defun vc-sccs-print-log (files buffer &optional _shortlog _start-revision-ignored limit)
  lisp/vc/vc-src.el:(defun vc-src-print-log (files buffer &optional shortlog _start-revision limit)
  lisp/vc/vc-svn.el:(defun vc-svn-print-log (files buffer &optional _shortlog start-revision limit)

So, I've added a commit message to above patch and applied it in your
name on Org's bugfix branch (888689f2b).





bug marked as fixed in version 28.1, send any further explanations to 51365 <at> debbugs.gnu.org and TAKAHASHI Yoshio <yfb02119 <at> nifty.com> Request was from Kyle Meyer <kyle <at> kyleam.com> to control <at> debbugs.gnu.org. (Sat, 11 Dec 2021 16:22:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 09 Jan 2022 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.