all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#51365: 29.0.50; org-mode: modification-time error with git controled file
@ 2021-10-24  2:18 TAKAHASHI Yoshio
  2021-12-11 16:20 ` Kyle Meyer
  0 siblings, 1 reply; 2+ messages in thread
From: TAKAHASHI Yoshio @ 2021-10-24  2:18 UTC (permalink / raw)
  To: 51365

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





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#51365: 29.0.50; org-mode: modification-time error with git controled file
  2021-10-24  2:18 bug#51365: 29.0.50; org-mode: modification-time error with git controled file TAKAHASHI Yoshio
@ 2021-12-11 16:20 ` Kyle Meyer
  0 siblings, 0 replies; 2+ messages in thread
From: Kyle Meyer @ 2021-12-11 16:20 UTC (permalink / raw)
  To: TAKAHASHI Yoshio; +Cc: 51365

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-11 16:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-24  2:18 bug#51365: 29.0.50; org-mode: modification-time error with git controled file TAKAHASHI Yoshio
2021-12-11 16:20 ` Kyle Meyer

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.