Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ekg-denote-export: Scalar Title Values And nil Text fails export #146

Closed
jayrajput opened this issue Mar 30, 2024 · 3 comments
Closed

Ekg-denote-export: Scalar Title Values And nil Text fails export #146

jayrajput opened this issue Mar 30, 2024 · 3 comments

Comments

@jayrajput
Copy link
Contributor

Ekg-denote-export aborts with Lisp error if ekg notes contain any of these

  • Scalar Title value rather than list type.
  • Nil text value.

Following error for scalar title value is seen.

or: Wrong type argument: lists, "test"

For nil text

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-width(nil)
  truncate-string-to-width(nil 100 nil nil "...")
  (format "Note ID: %s, Modified: %s, Created: %s, Tags: %s, ..." (progn (or (progn (and (memq (type-of note) cl-struct-ekg-note-tags) t)) (signal 'wrong-type-argument (list 'ekg-note note))) (aref note 1)) (progn (or (progn (and (memq (type-of note) cl-struct-ekg-note-tags) t)) (signal 'wrong-type-argument (list 'ekg-note note))) (aref note 6)) (progn (or (progn (and (memq (type-of note) cl-struct-ekg-note-tags) t)) (signal 'wrong-type-argument (list 'ekg-note note))) (aref note 5)) (progn (or (progn (and (memq (type-of note) cl-struct-ekg-note-tags) t)) (signal 'wrong-type-argument (list 'ekg-note note))) (aref note 4)) (plist-get (progn (or (progn (and (memq (type-of note) cl-struct-ekg-note-tags) t)) (signal 'wrong-type-argument (list 'ekg-note note))) (aref note 7)) :titled/title) (truncate-string-to-width (progn (or (progn (and (memq (type-of note) cl-struct-ekg-note-tags) t)) (signal 'wrong-type-argument (list 'ekg-note note))) (aref note 2)) 100 nil nil "..."))
  ekg-denote--note-print(#s(ekg-note :id "2b182ba3-ea37-4a0c-af1e-c0ff3c41ee9b" :text nil :mode org-mode :tags nil :creation-time 1705375356 :modified-time 1705375356 :properties nil :inlines nil))
  (message "ekg-denote-export: exporting %s." (ekg-denote--note-print note))
  (while (consp --cl-var--) (setq note (car --cl-var--)) (message "ekg-denote-export: exporting %s." (ekg-denote--note-print note)) (let* ((denote (ekg-denote-create note)) (modified-at (ekg-denote--modified-time-from-file denote))) (if (and modified-at (time-less-p last-export-time modified-at)) (progn (ekg-denote--backup denote))) (ekg-denote--rename-if-path-changed denote) (ekg-denote--text-save denote)) (setq --cl-var-- (cdr --cl-var--)))
  (let* ((--cl-var-- notes) (note nil)) (while (consp --cl-var--) (setq note (car --cl-var--)) (message "ekg-denote-export: exporting %s." (ekg-denote--note-print note)) (let* ((denote (ekg-denote-create note)) (modified-at (ekg-denote--modified-time-from-file denote))) (if (and modified-at (time-less-p last-export-time modified-at)) (progn (ekg-denote--backup denote))) (ekg-denote--rename-if-path-changed denote) (ekg-denote--text-save denote)) (setq --cl-var-- (cdr --cl-var--))) nil)
  (let* ((last-export-time (ekg-denote-get-last-export)) (start-time (current-time)) (notes (ekg-denote--notes-modified-since last-export-time))) (and (ekg-denote-assert-notes-have-creation-time notes) (ekg-denote-assert-notes-have-unique-creation-time notes)) (message "ekg-denote-export: exporting notes modified since ..." last-export-time (format-time-string "%Y%m%dT%H%M%S" last-export-time)) (let* ((--cl-var-- notes) (note nil)) (while (consp --cl-var--) (setq note (car --cl-var--)) (message "ekg-denote-export: exporting %s." (ekg-denote--note-print note)) (let* ((denote (ekg-denote-create note)) (modified-at (ekg-denote--modified-time-from-file denote))) (if (and modified-at (time-less-p last-export-time modified-at)) (progn (ekg-denote--backup denote))) (ekg-denote--rename-if-path-changed denote) (ekg-denote--text-save denote)) (setq --cl-var-- (cdr --cl-var--))) nil) (ekg-denote-set-last-export start-time))
  ekg-denote-export()
  funcall-interactively(ekg-denote-export)
  call-interactively(ekg-denote-export record nil)
  command-execute(ekg-denote-export record)
  execute-extended-command(nil "ekg-denote-export" nil)
  funcall-interactively(execute-extended-command nil "ekg-denote-export" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)
jayrajput pushed a commit to jayrajput/ekg that referenced this issue Mar 30, 2024
jayrajput pushed a commit to jayrajput/ekg that referenced this issue Mar 30, 2024
ahyatt pushed a commit that referenced this issue Mar 30, 2024
Co-authored-by: Jay Rajput
@ahyatt
Copy link
Owner

ahyatt commented Mar 30, 2024

I think your pull request should fix this, correct?

@jayrajput
Copy link
Contributor Author

Yes . The PR fixes this one.

@ahyatt
Copy link
Owner

ahyatt commented Jul 21, 2024

I'm closing this issue because it is fixed in your PR, although denote export doesn't exist yet in the main branch.

@ahyatt ahyatt closed this as completed Jul 21, 2024
ahyatt added a commit that referenced this issue Jul 28, 2024
* ekg-denote export changes (#144)

Adds export from ekg to denote.

Authored-by: Jay Rajput

* fix #146 (#148)

Co-authored-by: Jay Rajput

* Note new denote export in docs

* Add denote as an extra dependency

* denote-export: linting and test failures (#155)

* documentation string updates for linting errors.

* documentation string updates for linting errors

* update function names to start with ekg-denote-test

* updates for denote changes

---------

Co-authored-by: Jay Rajput <jr@Jays-Mac-mini.local>

* Allow emoji tags (#156)

This should fix #149.

* Set version number to 0.6.1 (#157)

* Bump version to 0.7.0

* Rethink version number, let's call the new release 0.6.1

It isn't quite a new release, even though it has some minor functionality / UI
changes (how tag actions happen).

* Enable the CI for the develop branch (#158)

---------

Co-authored-by: Jay Rajput <jayrajput@gmail.com>
Co-authored-by: Jay Rajput <jr@Jays-Mac-mini.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants