M-x toggle-debug-on-error
should get you a stack trace which will explain what's going on.
Emacs
A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!
Get Emacs
Rules
- Posts should be emacs related
- Be kind please
- Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.
Emacs Resources
Emacs Tutorials
- Beginner’s Guide to Emacs
- Absolute Beginner's Guide to Emacs
- How to Learn Emacs: A Hand-drawn One-pager for Beginners
Useful Emacs configuration files and distributions
Quick pain-saver tip
Sorry, I forgot to attach it. I am afraid, I do not understand what is wrong.
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
goto-char(nil)
(save-excursion (goto-char p) (let* ((id (and t (org-entry-get p "ID")))) (if id (progn (or (progn (and (memq ... cl-struct-org-roam-node-tags) t)) (signal 'wrong-type-argument (list 'org-roam-node org-roam-capture--node))) (let* ((v org-roam-capture--node)) (aset v 6 id))) (org-entry-put p "ID" (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... org-roam-capture--node))) (aref org-roam-capture--node 6))))) (prog1 (org-id-get) (run-hooks 'org-roam-capture-new-node-hook)))
(let (p new-file-p) (let* ((val (org-roam-capture--get-target))) (if (consp val) (let* ((x356 (car-safe val))) (cond ((eq x356 'file) (let* (...) (if ... ...))) ((eq x356 'file+olp) (let* (...) (if ... ...))) ((eq x356 'file+head) (let* (...) (if ... ...))) ((eq x356 'file+head+olp) (let* (...) (if ... ...))) ((eq x356 'file+datetree) (let* (...) (if ... ...))) ((eq x356 'node) (let* (...) (if ... ...))))))) (save-excursion (goto-char p) (let* ((id (and t (org-entry-get p "ID")))) (if id (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... org-roam-capture--node))) (let* ((v org-roam-capture--node)) (aset v 6 id))) (org-entry-put p "ID" (progn (or (progn ...) (signal ... ...)) (aref org-roam-capture--node 6))))) (prog1 (org-id-get) (run-hooks 'org-roam-capture-new-node-hook))))
org-roam-capture--setup-target-location()
(cond ((run-hook-with-args-until-success 'org-roam-capture-preface-hook)) (t (org-roam-capture--setup-target-location)))
(let ((id (cond ((run-hook-with-args-until-success 'org-roam-capture-preface-hook)) (t (org-roam-capture--setup-target-location))))) (org-roam-capture--adjust-point-for-capture-type) (let ((template (org-capture-get :template))) (if (stringp template) (progn (org-capture-put :template (org-roam-capture--fill-template template))))) (org-roam-capture--put :id id) (org-roam-capture--put :finalize (or (org-capture-get :finalize) (org-roam-capture--get :finalize))))
org-roam-capture--prepare-buffer()
funcall(org-roam-capture--prepare-buffer)
(let ((fun x253)) (funcall fun) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p))))
(if (null x254) (let ((fun x253)) (funcall fun) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))
(let* ((x253 (car-safe x252)) (x254 (cdr-safe x252))) (if (null x254) (let ((fun x253)) (funcall fun) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))
(if (consp x252) (let* ((x253 (car-safe x252)) (x254 (cdr-safe x252))) (if (null x254) (let ((fun x253)) (funcall fun) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))
(let* ((x252 (cdr-safe val))) (if (consp x252) (let* ((x253 (car-safe x252)) (x254 (cdr-safe x252))) (if (null x254) (let ((fun x253)) (funcall fun) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p ...) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))
(cond ((eq x223 'here) (let* ((x224 (cdr-safe val))) (if (null x224) (funcall pcase-0) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x223 'file) (let* ((x225 (cdr-safe val))) (if (consp x225) (let* ((x226 (car-safe x225)) (x227 (cdr-safe x225))) (if (null x227) (let (...) (set-buffer ...) (org-capture-put-target-region-and-position) (widen) (setq target-entry-p nil)) (let (...) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x223 'id) (let* ((x228 (cdr-safe val))) (if (consp x228) (let* ((x229 (car-safe x228)) (x230 (cdr-safe x228))) (if (null x230) (let (...) (let* ... ...)) (let (...) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x223 'file+headline) (let* ((x231 (cdr-safe val))) (if (consp x231) (let* ((x232 (car-safe x231)) (x233 (cdr-safe x231))) (if (consp x233) (let* (... ...) (if ... ... ...)) (let (...) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x223 'file+olp) (let* ((x236 (cdr-safe val))) (if (consp x236) (let* ((x237 (car-safe x236)) (x238 (cdr-safe x236))) (let ((path x237) (outline-path x238)) (let (...) (set-buffer ...) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x223 'file+regexp) (let* ((x239 (cdr-safe val))) (if (consp x239) (let* ((x240 (car-safe x239)) (x241 (cdr-safe x239))) (if (consp x241) (let* (... ...) (if ... ... ...)) (let (...) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x223 'file+olp+datetree) (let* ((x244 (cdr-safe val))) (if (consp x244) (let* ((x245 (car-safe x244)) (x246 (cdr-safe x244))) (let ((path x245) (outline-path x246)) (let (...) (set-buffer ...) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil) (require ...) (org-capture-put-target-region-and-position) (widen) (funcall ... ... ...)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x223 'file+function) (let* ((x247 (cdr-safe val))) (if (consp x247) (let* ((x248 (car-safe x247)) (x249 (cdr-safe x247))) (if (consp x249) (let* (... ...) (if ... ... ...)) (let (...) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x223 'function) (let* ((x252 (cdr-safe val))) (if (consp x252) (let* ((x253 (car-safe x252)) (x254 (cdr-safe x252))) (if (null x254) (let (...) (funcall fun) (org-capture-put :exact-position ...) (setq target-entry-p ...)) (let (...) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x223 'clock) (let* ((x255 (cdr-safe val))) (if (null x255) (let nil (if (and (markerp org-clock-hd-marker) (marker-buffer org-clock-hd-marker)) (progn (set-buffer ...) (org-capture-put-target-region-and-position) (widen) (goto-char org-clock-hd-marker)) (user-error "No running clock that could be used as capture tar..."))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) (t (let ((target val)) (error "Invalid capture target specification: %S" target))))
(let* ((x223 (car-safe val))) (cond ((eq x223 'here) (let* ((x224 (cdr-safe val))) (if (null x224) (funcall pcase-0) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x223 'file) (let* ((x225 (cdr-safe val))) (if (consp x225) (let* ((x226 ...) (x227 ...)) (if (null x227) (let ... ... ... ... ...) (let ... ...))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x223 'id) (let* ((x228 (cdr-safe val))) (if (consp x228) (let* ((x229 ...) (x230 ...)) (if (null x230) (let ... ...) (let ... ...))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x223 'file+headline) (let* ((x231 (cdr-safe val))) (if (consp x231) (let* ((x232 ...) (x233 ...)) (if (consp x233) (let* ... ...) (let ... ...))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x223 'file+olp) (let* ((x236 (cdr-safe val))) (if (consp x236) (let* ((x237 ...) (x238 ...)) (let (... ...) (let ... ... ... ... ... ...))) (let ((target val)) (error "Invalid capture
Could you fix the formatting?
The only code block formatting method which works for all users of reddit is to switch the reddit editor to markdown mode* and indent the code by 4 spaces (you can use M-4 C-x C-i
on a region followed by M-x untabify
to achieve this in Emacs); and you need to use empty lines to separate the indented lines from the other text. Otherwise for lots of readers your message looks like this: https://old.reddit.com/r/emacs/comments/17etbx8/saveexcursion_wrong_type_argument/k685ohy/
Be sure to remove any different syntax intended for formatting (such as triple backticks) at the same time.
(*) Switching to the markdown editor may or may not still be necessary. At one time it prevented problems.
I will, thx
I have difficulties with the formatting, are you still able to read and write in Reddit via Emacs?
What package do you use? md4rd?
I read reddit in Firefox and I make use of https://addons.mozilla.org/en-US/firefox/addon/edit-with-emacs1/ , but you can also just copy/paste between the markdown editor and emacs.