emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: TAKAHASHI Yoshio <yfb02119@nifty.com>
Cc: 51365@debbugs.gnu.org
Subject: bug#51365: 29.0.50; org-mode: modification-time error with git controled file
Date: Sat, 11 Dec 2021 11:20:58 -0500	[thread overview]
Message-ID: <87y24rdset.fsf@kyleam.com> (raw)
In-Reply-To: <878ryjb1y8.fsf@yfb02119.nifty.com>

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).





           reply	other threads:[~2021-12-11 16:22 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <878ryjb1y8.fsf@yfb02119.nifty.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y24rdset.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=51365@debbugs.gnu.org \
    --cc=yfb02119@nifty.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).