From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id aGkxFppXGGTwTAAASxT56A (envelope-from ) for ; Mon, 20 Mar 2023 13:54:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id CKoUFppXGGRnygAA9RJhRA (envelope-from ) for ; Mon, 20 Mar 2023 13:54:50 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 96A8FB17E for ; Mon, 20 Mar 2023 13:54:49 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=oXsUXL1H; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679316889; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=7N6WmPHeTVttMLcc8dYF/j+6NfFb8warzaJBW4h+oYc=; b=Ew32LvsRra1FipzIw9sDkAthZERHjKaRh2xgWIK5IHv+0wTMxO8YJC0Ifw2eOuEq2tWv78 1A6FF9aKJo8xjkkS7AdkMtOCnoqAssX/rUtz1FIo8M9i0zqVpCUjJd9kPq7WisPg8yI62y nc1M6vDbEDWmvcO9hy4fQGdF4a2hW1wIKWPkvYF8TZhLAkHsLWkuXw/x7fUL88VWxNDMei HOQh4dZF7AsekEaypr79IfqugGgoxkw2wKJVBG6fo2/4NYhNbwL9NIWa6oo2T3bR9sYiJ+ 53uhnMzZTmKUJ05DPGAlfee9H+gJpc19xwk7HkjEEBWtUAhvelMRD3C9Q09XsQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=oXsUXL1H; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679316889; a=rsa-sha256; cv=none; b=EimoTsBVl4FpjnUQNf3lvDqYQlsdOkzmaVlj47AAOkIdjkBkyyNsdyipClNgCXr2yTqUoj 7CDsUQRS8F/N/ReRU0vh/sWRIx0i6liJIVNztSQNGHLruYjCiTQmB/yHBNFP731v4h/ANq 9GMMbfciQW2EBvtHSOjKsawvenQLhJchS1iDHOx4lXm9MaW6HVOYP3J/Hko9oKvQPyaIms +jDJhrFK9Bv0zwiGEVZRj+nSGXNvskkwseNOTm3UU7KAfU4poxAxN3/smYgoN6BdQkLH/V aucBcNb7CIzxA80KUdsuAXRo6CetkK9ZFN3+/2fsthItiKwIf30hvoJ+nSzqHQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peF1J-0007Cm-NV; Mon, 20 Mar 2023 08:53:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peF1I-0007Cd-VH for emacs-orgmode@gnu.org; Mon, 20 Mar 2023 08:53:49 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peF1E-0002CS-PL for emacs-orgmode@gnu.org; Mon, 20 Mar 2023 08:53:48 -0400 Received: by mail-pf1-x433.google.com with SMTP id y2so2385803pfw.9 for ; Mon, 20 Mar 2023 05:53:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679316823; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=7N6WmPHeTVttMLcc8dYF/j+6NfFb8warzaJBW4h+oYc=; b=oXsUXL1Hbbt3r69CkzseSR2xD0xUJ+fSxFZkS6p3+iL7OE6Vc4sTTIbUjIJ/NKXghm MwhOT/3vB4fclW5tPzVSYdpZZ5l+XAmOAQOErT7Rdyz0E6cmrXUAys8hWDOvteCzxPuS Mk49HYFcvPpgcg6BvSN2SpbfDVRa4d2patIL4k4Dn67aRnS+uljrz6PRJwUzBIaYZjhe iqbxi4o/Zn6eFbZf9Zz8YWSR1NY7QJ1991jbfOgIu1pIwBXGMAyGiIW05dcHtIhWwPWQ hjXmizAJTh4DISLC3LjdS5UNE1tdGgOyj9hrzZg3jBkERIhO7t9zL5QvhSnChFLm3UQ/ yHng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679316823; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7N6WmPHeTVttMLcc8dYF/j+6NfFb8warzaJBW4h+oYc=; b=ws0GmGdSsLxLsQ4fZ4OUMmPFk3Ty/wfzR296I0kNFtEwL6xmJDxVAr8WNmxjq4/moM McLjh3wPOp5kMDRa8WaKa2OP/EPIouJ2yK+Rd9TYLwHkrq4Xkwlw+kU/p7VzROoIKO6J LnJ02GXUtWXNqrek138/mxZVrJgounVJtRasbOfk0H60oIP8hpy/79hlfPPaEhLNnJBK 4nwBPIYuQ560mqz5cjzi9qjvI7NMGsgGTjDqxLgDs+azq24rTod+FjfP8Z2Q56+W82+S SfvCKwzFJmuqmo2LJ9uLS430InKlL+1pQ6Wnf7qW1Lc5Ld1CEWB4ZO1fCoa/Z+qpWrbz DMqA== X-Gm-Message-State: AO0yUKW+wLvp/Xjsf3v5w/8qR7piYwXJCDg/+o3icHTgqKKD7Ahqwk56 vgFot3xohVnQJ9v3Z7QSe+jf6un0Qxuj5goCy7jkLjXDwywX X-Google-Smtp-Source: AK7set+2KVPZD+ipQ2rnREeQ1Cg6Ljv42tsSGbMhkc6vv0RMTbZ+vJGkvXP0f4SroUJQpNRt5C7KKrQkfvaRmQQleUU= X-Received: by 2002:a05:6a00:1a92:b0:622:c6ad:b373 with SMTP id e18-20020a056a001a9200b00622c6adb373mr7853219pfv.3.1679316822228; Mon, 20 Mar 2023 05:53:42 -0700 (PDT) MIME-Version: 1.0 From: stardiviner Date: Mon, 20 Mar 2023 20:53:16 +0800 Message-ID: Subject: [BUG] org-capture got file userlock error when I capture on second time. To: Org-mode Content-Type: multipart/alternative; boundary="000000000000a782b305f7546ad7" Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=numbchild@gmail.com; helo=mail-pf1-x433.google.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, NUMERIC_HTTP_ADDR=1.242, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, WEIRD_PORT=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: 96A8FB17E X-Spam-Score: -8.29 X-Migadu-Spam-Score: -8.29 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: g9Bl19WOW/yF --000000000000a782b305f7546ad7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable When I org-capture from elfeed-entry buffer (I defined custom functions to extract elfeed entry buffer content) in the second time and later, the bellowing error raised up. The first-time capture is fine. Here is the error backtrace: #+begin_example Debugger entered--Lisp error: (wrong-type-argument stringp nil) expand-file-name(nil) userlock--check-content-unchanged("~/Org/Tasks/Tasks.org") userlock--ask-user-about-supersession-threat("~/Org/Tasks/Tasks.org") delete-region(269 270) (let ((pos (point))) (org-back-over-empty-lines) (delete-region (point) pos) (if (> n 0) (progn (newline n)))) org-capture-empty-lines-before() (let ((origin (point-marker))) (if (bolp) nil (insert "\n")) (org-capture-empty-lines-before) (let ((beg (point))) (save-restriction (if insert-here? (progn (narrow-to-region beg beg))) (org-paste-subtree level template 'for-yank)) (org-capture-position-for-last-stored beg) (org-capture-empty-lines-after) (if (org-at-heading-p) nil (outline-next-heading)) (org-capture-mark-kill-region origin (point)) (org-capture-narrow beg (if (eobp) (point) (1- (point)))) (org-capture--position-cursor beg (point)))) (let ((template (org-capture-get :template)) (reversed? (org-capture-get :prepend)) (exact-position (org-capture-get :exact-position)) (insert-here? (org-capture-get :insert-here)) (level 1)) (org-capture-verify-tree template) (if exact-position (progn (goto-char exact-position))) (cond (insert-here? (setq level (org-get-valid-level (if (or (org-at-heading-p) (condition-case nil ... ...)) (org-outline-level) 1)))) ((org-capture-get :target-entry-p) (setq level (org-get-valid-level (if (org-at-heading-p) (org-outline-level) 1) 1)) (if reversed? (outline-next-heading) (org-end-of-subtree t t))) (reversed? (goto-char (point-min)) (if (org-at-heading-p) nil (outline-next-heading))) (t (goto-char (point-max)) (let (buffers dead-properties) (if (and (not (buffer-base-buffer)) (not (memq ... org-fold-core--indirect-buffers))) (setq buffers (list (current-buffer))) (let ((tail ...)) (while tail (let ... ... ...)))) (let ((tail buffers)) (while tail (let (...) (save-current-buffer ... ... ...) (setq tail ...))))))) (let ((origin (point-marker))) (if (bolp) nil (insert "\n")) (org-capture-empty-lines-before) (let ((beg (point))) (save-restriction (if insert-here? (progn (narrow-to-region beg beg))) (org-paste-subtree level template 'for-yank)) (org-capture-position-for-last-stored beg) (org-capture-empty-lines-after) (if (org-at-heading-p) nil (outline-next-heading)) (org-capture-mark-kill-region origin (point)) (org-capture-narrow beg (if (eobp) (point) (1- (point)))) (org-capture--position-cursor beg (point))))) org-capture-place-entry() (let nil (org-capture-place-entry)) (cond ((memq val '(entry nil)) (let nil (org-capture-place-entry))) ((eq val 'table-line) (let nil (org-capture-place-table-line))) ((eq val 'plain) (let nil (org-capture-place-plain-text))) ((eq val 'item) (let nil (org-capture-place-item))) ((eq val 'checkitem) (let nil (org-capture-place-item)))) (let* ((val (org-capture-get :type))) (cond ((memq val '(entry nil)) (let nil (org-capture-place-entry))) ((eq val 'table-line) (let nil (org-capture-place-table-line))) ((eq val 'plain) (let nil (org-capture-place-plain-text))) ((eq val 'item) (let nil (org-capture-place-item))) ((eq val 'checkitem) (let nil (org-capture-place-item))))) org-capture-place-template(nil) (condition-case error (org-capture-place-template (eq (car (org-capture-get :target)) 'function)) ((error quit) (if (and (buffer-base-buffer (current-buffer)) (string-prefix-p "CAPTURE-" (buffer-name))) (progn (kill-buffer (current-buffer)))) (set-window-configuration (org-capture-get :return-to-wconf)) (error "Capture template `%s': %s" (org-capture-get :key) (error-message-string error)))) (cond ((equal entry "C") (customize-variable 'org-capture-templates)) ((equal entry "q") (user-error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf) (and (featurep 'dired) (car (rassq orig-buf dired-buffers)))) :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-nondirectory (buffer-file-name orig-buf))) :annotation annotation :initial initial :return-to-wconf (current-window-configuration) :default-time (or org-overriding-default-time (org-current-time))) (org-capture-set-target-location (and (equal goto 0) 'here)) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" (error-message-string error)))) (setq org-capture-clock-keep (org-capture-get :clock-keep)) (condition-case error (org-capture-place-template (eq (car (org-capture-get :target)) 'function)) ((error quit) (if (and (buffer-base-buffer (current-buffer)) (string-prefix-p "CAPTURE-" (buffer-name))) (progn (kill-buffer (current-buffer)))) (set-window-configuration (org-capture-get :return-to-wconf)) (error "Capture template `%s': %s" (org-capture-get :key) (error-message-string error)))) (if (and (derived-mode-p 'org-mode) (org-capture-get :clock-in)) (progn (condition-case nil (progn (if (org-clock-is-active) (progn ...)) (org-clock-in) (set (make-local-variable ...) (copy-marker org-clock-marker))) (error "Could not start the clock in this capture buffer")))) (if (org-capture-get :immediate-finish) (progn (org-capture-finalize))))) (let* ((orig-buf (current-buffer)) (annotation (if (and (boundp 'org-capture-link-is-already-stored) org-capture-link-is-already-stored) (plist-get org-store-link-plist :annotation) (condition-case nil (progn (org-store-link nil)) (error nil)))) (entry (or org-capture-entry (org-capture-select-template keys))) initial) (setq initial (or org-capture-initial (and (org-region-active-p) (buffer-substring (point) (mark))))) (if (stringp initial) (progn (remove-text-properties 0 (length initial) '(read-only t) initial))) (if (stringp annotation) (progn (remove-text-properties 0 (length annotation) '(read-only t) annotation))) (cond ((equal entry "C") (customize-variable 'org-capture-templates)) ((equal entry "q") (user-error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf) (and (featurep 'dired) (car (rassq orig-buf dired-buffers)))) :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-nondirectory (buffer-file-name orig-buf))) :annotation annotation :initial initial :return-to-wconf (current-window-configuration) :default-time (or org-overriding-default-time (org-current-time))) (org-capture-set-target-location (and (equal goto 0) 'here)) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" (error-message-string error)))) (setq org-capture-clock-keep (org-capture-get :clock-keep)) (condition-case error (org-capture-place-template (eq (car (org-capture-get :target)) 'function)) ((error quit) (if (and (buffer-base-buffer ...) (string-prefix-p "CAPTURE-" ...)) (progn (kill-buffer ...))) (set-window-configuration (org-capture-get :return-to-wconf)) (error "Capture template `%s': %s" (org-capture-get :key) (error-message-string error)))) (if (and (derived-mode-p 'org-mode) (org-capture-get :clock-in)) (progn (condition-case nil (progn (if ... ...) (org-clock-in) (set ... ...)) (error "Could not start the clock in this capture buffer")))) (if (org-capture-get :immediate-finish) (progn (org-capture-finalize)))))) (cond ((equal goto '(4)) (org-capture-goto-target keys)) ((equal goto '(16)) (org-capture-goto-last-stored)) (t (let* ((orig-buf (current-buffer)) (annotation (if (and (boundp ...) org-capture-link-is-already-stored) (plist-get org-store-link-plist :annotation) (condition-case nil (progn ...) (error nil)))) (entry (or org-capture-entry (org-capture-select-template keys))) initial) (setq initial (or org-capture-initial (and (org-region-active-p) (buffer-substring (point) (mark))))) (if (stringp initial) (progn (remove-text-properties 0 (length initial) '(read-only t) initial))) (if (stringp annotation) (progn (remove-text-properties 0 (length annotation) '(read-only t) annotation))) (cond ((equal entry "C") (customize-variable 'org-capture-templates)) ((equal entry "q") (user-error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf) (and ... ...)) :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-nondirectory ...)) :annotation annotation :initial initial :return-to-wconf (current-window-configuration) :default-time (or org-overriding-default-time (org-current-time))) (org-capture-set-target-location (and (equal goto 0) 'here)) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if ... ...) (error "Capture abort: %s" ...))) (setq org-capture-clock-keep (org-capture-get :clock-keep)) (condition-case error (org-capture-place-template (eq ... ...)) ((error quit) (if ... ...) (set-window-configuration ...) (error "Capture template `%s': %s" ... ...))) (if (and (derived-mode-p ...) (org-capture-get :clock-in)) (progn (condition-case nil ... ...))) (if (org-capture-get :immediate-finish) (progn (org-capture-finalize)))))))) org-capture(nil) funcall-interactively(org-capture nil) call-interactively(org-capture nil nil) command-execute(org-capture) #+end_example And here is my emacs minimal config try to reproduce this error but can't and don't know how to reproduce it. #+begin_src emacs-lisp (require 'org-capture) (setq org-capture-templates `(("t" ,(format "%s\tstart a clock task" (all-the-icons-faicon "hourglass-start" :face 'all-the-icons-red :v-adjust 0.05)) entry (file "~/Org/Tasks/Tasks.org") "* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n" :clock-in t :clock-resume t :clock-keep t :empty-lines 1) )) (use-package all-the-icons :ensure t) (use-package elfeed :ensure t ;; For debugging ;; :preface (setq elfeed-log-level 'debug) :commands (elfeed elfeed-update) :custom ((elfeed-db-directory (expand-file-name ".elfeed" user-emacs-directory)) ;; specify proxy for elfeed backend cURL. (elfeed-curl-extra-arguments '("--proxy" "socks5h:// 127.0.0.1:7890")) ;; elfeed startup initial tags (elfeed-initial-tags '(unread)) (elfeed-feeds '(;; Programming ;; ("http://blog.stackoverflow.com/feed/" programming stackoverflow) ;; ("http://programmers.blogoverflow.com/feed/" programming stackoverflow) ;; Emacs ;; ("https://www.reddit.com/r/emacs/.rss" emacs reddit) ; Reddit r/Emacs ;; ("https://planet.emacslife.com/atom.xml" emacs planet) ; Planet Emacslife ;; ("https://www.reddit.com/r/orgmode/.rss" org-mode reddit) ; Reddit r/Org-mode ;; ("https://emacs-china.org/posts.rss" emacs china) ; Emacs China =E6=9C=80=E6=96=B0=E5=B8=96=E5=AD=90 ;; ("https://emacs-china.org/latest.rss" emacs china) ; Emacs China =E6=9C=80=E6=96=B0=E8=AF=9D=E9=A2=98 ("https://sachachua.com/blog/feed/atom/" blog emacs) ; Sacha Chua Blog ("http://feeds.feedburner.com/TheKitchinResearchGroup" blog emacs) ; The Kitchin Research Group ("https://200ok.ch/atom.xml" blog emacs) ; 200ok.ch )) ) :init (advice-add 'elfeed :after #'elfeed-update) ; auto update after entering elfeed. ;; (run-at-time nil (* 4 60 60) #'elfeed-update) ; auto update elfeed every 4 hours. ;; FIXME: `elfeed' use `switch-to-buffer'. (add-to-list 'display-buffer-alist '("^\\*elfeed-search\\*" . (display-buffer-below-selected))) :config ;; (define-key elfeed-search-mode-map (kbd "#") 'elfeed-search-set-filter= ) (defalias 'elfeed-search-toggle-all-star ; [m], [*] (elfeed-expose #'elfeed-search-toggle-all 'star) "Toggle the `star' tag to all selected entries.") (define-key elfeed-search-mode-map (kbd "m") 'elfeed-search-toggle-all-star) ;; Auto close elfeed buffers when quit Emacs. (defun elfeed-quit () "Close elfeed buffers." (interactive) (elfeed-db-save) (dolist (buffer '("*elfeed-log*" "*elfeed-search*" "*elfeed-entry*")) (when (buffer-live-p (get-buffer buffer)) (with-current-buffer buffer (kill-buffer))))) (define-key elfeed-search-mode-map (kbd "q") 'elfeed-quit) (add-hook 'kill-emacs-hook #'elfeed-quit) ;; support Org Mode Capture template (defun my/org-capture-elfeed-title () (with-current-buffer "*elfeed-entry*" (elfeed-entry-title elfeed-show-entry))) (defun my/org-capture-elfeed-date () (with-current-buffer "*elfeed-entry*" (format-time-string "[%Y-%m-%d %a %H:%M]" (seconds-to-time (elfeed-entry-date elfeed-show-entry))))) (defun my/org-capture-elfeed-source () (with-current-buffer "*elfeed-entry*" (let ((feed (elfeed-entry-feed elfeed-show-entry))) (elfeed-feed-title feed)))) (defun my/org-capture-elfeed-content () (with-current-buffer "*elfeed-entry*" (let* ((content (elfeed-deref (elfeed-entry-content elfeed-show-entry))) (type (elfeed-entry-content-type elfeed-show-entry)) (feed (elfeed-entry-feed elfeed-show-entry)) (base-url (and feed (elfeed-compute-base (elfeed-feed-url feed))))) (if content (if (eq type 'html) (progn (unless (fboundp 'org-web-tools--html-to-org-with-pandoc) (require 'org-web-tools)) (let ((org-web-tools-pandoc-sleep-time 5)) (org-web-tools--html-to-org-with-pandoc content))) (insert content)))))) (with-eval-after-load 'org-capture (add-to-list 'org-capture-templates `("r" ,(format "%s\tcapture elfeed RSS feed content to Org buffer" (all-the-icons-faicon "rss" :face 'all-the-icons-blue-alt)) entry (file "") "* %(my/org-capture-elfeed-title) :PROPERTIES: :SOURCE: %(my/org-capture-elfeed-source) :DATE(original): %(my/org-capture-elfeed-date) :DATE: %u :END: %(my/org-capture-elfeed-content)" :empty-lines 1 :jump-to-captured t) :append)) ;; auto re-format elfeed entry org-capture buffer. (defun my/elfeed-format-org-capture-buffer () "A helper command to Delete org-capture elfeed-entry ending backslash \\." (interactive) (goto-char (point-min)) (replace-string "\\" "") (replace-string " " "") ;; using regex replace using \( \)\{2,\} which means 2 or more consecutive spaces and replace that with 1 space. (replace-regexp "\\( \\)\\{2,\\}" " ") (org-mark-subtree) ; or `org-mark-element', `mark-whole-buffer' (call-interactively 'org-fill-paragraph) ; or `fill-paragraph' ) (add-hook 'org-capture-mode-hook #'my/elfeed-format-org-capture-buffer) ;; Download link media with youtube-dl. (defun youtube-dl-cmd-wrapper (url) "Downloads the URL with youtube-dl in an async shell" (let ((default-directory "~/Downloads")) (async-shell-command (format "youtube-dl %s" url)))) (defun elfeed-youtube-dl (&optional use-generic-p) "Use youtube-dl to download the link media." (interactive "P") (let ((entries (elfeed-search-selected))) (cl-loop for entry in entries do (elfeed-untag entry 'unread) when (elfeed-entry-link entry) do (youtube-dl-cmd-wrapper it)) (mapc #'elfeed-search-update-entry entries) (unless (use-region-p) (forward-line)))) (define-key elfeed-search-mode-map (kbd "d") 'elfeed-youtube-dl) ) #+end_src I might need to take some time to bisect my Emacs config with bug-hunter to check whether some options caused this error. I will add more details later= . If you have any clue about this error, thanks for the hint. [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint =3D 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ --000000000000a782b305f7546ad7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When I org-capture from elfeed-entry buffer (I defined cus= tom functions to extract elfeed entry buffer content) in the second time an= d later, the bellowing error raised up. The first-time capture is fine.
Here is the error backtrace:
#+begin_example
Debugger e= ntered--Lisp error: (wrong-type-argument stringp nil)
=C2=A0 expand-file= -name(nil)
=C2=A0 userlock--check-content-unchanged("~/Org/Tasks/Ta= sks.org")
=C2=A0 userlock--ask-user-about-supersession-threat("= ;~/Org/Tasks/Tasks.org")
=C2=A0 delete-region(269 270)
=C2=A0 (l= et ((pos (point))) (org-back-over-empty-lines) (delete-region (point) pos) = (if (> n 0) (progn (newline n))))
=C2=A0 org-capture-empty-lines-befo= re()
=C2=A0 (let ((origin (point-marker))) (if (bolp) nil (insert "= \n")) (org-capture-empty-lines-before) (let ((beg (point))) (save-rest= riction (if insert-here? (progn (narrow-to-region beg beg))) (org-paste-sub= tree level template 'for-yank)) (org-capture-position-for-last-stored b= eg) (org-capture-empty-lines-after) (if (org-at-heading-p) nil (outline-nex= t-heading)) (org-capture-mark-kill-region origin (point)) (org-capture-narr= ow beg (if (eobp) (point) (1- (point)))) (org-capture--position-cursor beg = (point))))
=C2=A0 (let ((template (org-capture-get :template)) (reversed= ? (org-capture-get :prepend)) (exact-position (org-capture-get :exact-posit= ion)) (insert-here? (org-capture-get :insert-here)) (level 1)) (org-capture= -verify-tree template) (if exact-position (progn (goto-char exact-position)= )) (cond (insert-here? (setq level (org-get-valid-level (if (or (org-at-hea= ding-p) (condition-case nil ... ...)) (org-outline-level) 1)))) ((org-captu= re-get :target-entry-p) (setq level (org-get-valid-level (if (org-at-headin= g-p) (org-outline-level) 1) 1)) (if reversed? (outline-next-heading) (org-e= nd-of-subtree t t))) (reversed? (goto-char (point-min)) (if (org-at-heading= -p) nil (outline-next-heading))) (t (goto-char (point-max)) (let (buffers d= ead-properties) (if (and (not (buffer-base-buffer)) (not (memq ... org-fold= -core--indirect-buffers))) (setq buffers (list (current-buffer))) (let ((ta= il ...)) (while tail (let ... ... ...)))) (let ((tail buffers)) (while tail= (let (...) (save-current-buffer ... ... ...) (setq tail ...))))))) (let ((= origin (point-marker))) (if (bolp) nil (insert "\n")) (org-captur= e-empty-lines-before) (let ((beg (point))) (save-restriction (if insert-her= e? (progn (narrow-to-region beg beg))) (org-paste-subtree level template &#= 39;for-yank)) (org-capture-position-for-last-stored beg) (org-capture-empty= -lines-after) (if (org-at-heading-p) nil (outline-next-heading)) (org-captu= re-mark-kill-region origin (point)) (org-capture-narrow beg (if (eobp) (poi= nt) (1- (point)))) (org-capture--position-cursor beg (point)))))
=C2=A0 = org-capture-place-entry()
=C2=A0 (let nil (org-capture-place-entry))
= =C2=A0 (cond ((memq val '(entry nil)) (let nil (org-capture-place-entry= ))) ((eq val 'table-line) (let nil (org-capture-place-table-line))) ((e= q val 'plain) (let nil (org-capture-place-plain-text))) ((eq val 'i= tem) (let nil (org-capture-place-item))) ((eq val 'checkitem) (let nil = (org-capture-place-item))))
=C2=A0 (let* ((val (org-capture-get :type)))= (cond ((memq val '(entry nil)) (let nil (org-capture-place-entry))) ((= eq val 'table-line) (let nil (org-capture-place-table-line))) ((eq val = 'plain) (let nil (org-capture-place-plain-text))) ((eq val 'item) (= let nil (org-capture-place-item))) ((eq val 'checkitem) (let nil (org-c= apture-place-item)))))
=C2=A0 org-capture-place-template(nil)
=C2=A0 = (condition-case error (org-capture-place-template (eq (car (org-capture-get= :target)) 'function)) ((error quit) (if (and (buffer-base-buffer (curr= ent-buffer)) (string-prefix-p "CAPTURE-" (buffer-name))) (progn (= kill-buffer (current-buffer)))) (set-window-configuration (org-capture-get = :return-to-wconf)) (error "Capture template `%s': %s" (org-ca= pture-get :key) (error-message-string error))))
=C2=A0 (cond ((equal ent= ry "C") (customize-variable 'org-capture-templates)) ((equal = entry "q") (user-error "Abort")) (t (org-capture-set-pl= ist entry) (org-capture-get-template) (org-capture-put :original-buffer ori= g-buf :original-file (or (buffer-file-name orig-buf) (and (featurep 'di= red) (car (rassq orig-buf dired-buffers)))) :original-file-nondirectory (an= d (buffer-file-name orig-buf) (file-name-nondirectory (buffer-file-name ori= g-buf))) :annotation annotation :initial initial :return-to-wconf (current-= window-configuration) :default-time (or org-overriding-default-time (org-cu= rrent-time))) (org-capture-set-target-location (and (equal goto 0) 'her= e)) (condition-case error (org-capture-put :template (org-capture-fill-temp= late)) ((error quit) (if (get-buffer "*Capture*") (kill-buffer &q= uot;*Capture*")) (error "Capture abort: %s" (error-message-s= tring error)))) (setq org-capture-clock-keep (org-capture-get :clock-keep))= (condition-case error (org-capture-place-template (eq (car (org-capture-ge= t :target)) 'function)) ((error quit) (if (and (buffer-base-buffer (cur= rent-buffer)) (string-prefix-p "CAPTURE-" (buffer-name))) (progn = (kill-buffer (current-buffer)))) (set-window-configuration (org-capture-get= :return-to-wconf)) (error "Capture template `%s': %s" (org-c= apture-get :key) (error-message-string error)))) (if (and (derived-mode-p &= #39;org-mode) (org-capture-get :clock-in)) (progn (condition-case nil (prog= n (if (org-clock-is-active) (progn ...)) (org-clock-in) (set (make-local-va= riable ...) (copy-marker org-clock-marker))) (error "Could not start t= he clock in this capture buffer")))) (if (org-capture-get :immediate-f= inish) (progn (org-capture-finalize)))))
=C2=A0 (let* ((orig-buf (curren= t-buffer)) (annotation (if (and (boundp 'org-capture-link-is-already-st= ored) org-capture-link-is-already-stored) (plist-get org-store-link-plist := annotation) (condition-case nil (progn (org-store-link nil)) (error nil))))= (entry (or org-capture-entry (org-capture-select-template keys))) initial)= (setq initial (or org-capture-initial (and (org-region-active-p) (buffer-s= ubstring (point) (mark))))) (if (stringp initial) (progn (remove-text-prope= rties 0 (length initial) '(read-only t) initial))) (if (stringp annotat= ion) (progn (remove-text-properties 0 (length annotation) '(read-only t= ) annotation))) (cond ((equal entry "C") (customize-variable '= ;org-capture-templates)) ((equal entry "q") (user-error "Abo= rt")) (t (org-capture-set-plist entry) (org-capture-get-template) (org= -capture-put :original-buffer orig-buf :original-file (or (buffer-file-name= orig-buf) (and (featurep 'dired) (car (rassq orig-buf dired-buffers)))= ) :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-n= ondirectory (buffer-file-name orig-buf))) :annotation annotation :initial i= nitial :return-to-wconf (current-window-configuration) :default-time (or or= g-overriding-default-time (org-current-time))) (org-capture-set-target-loca= tion (and (equal goto 0) 'here)) (condition-case error (org-capture-put= :template (org-capture-fill-template)) ((error quit) (if (get-buffer "= ;*Capture*") (kill-buffer "*Capture*")) (error "Capture= abort: %s" (error-message-string error)))) (setq org-capture-clock-ke= ep (org-capture-get :clock-keep)) (condition-case error (org-capture-place-= template (eq (car (org-capture-get :target)) 'function)) ((error quit) = (if (and (buffer-base-buffer ...) (string-prefix-p "CAPTURE-" ...= )) (progn (kill-buffer ...))) (set-window-configuration (org-capture-get :r= eturn-to-wconf)) (error "Capture template `%s': %s" (org-capt= ure-get :key) (error-message-string error)))) (if (and (derived-mode-p '= ;org-mode) (org-capture-get :clock-in)) (progn (condition-case nil (progn (= if ... ...) (org-clock-in) (set ... ...)) (error "Could not start the = clock in this capture buffer")))) (if (org-capture-get :immediate-fini= sh) (progn (org-capture-finalize))))))
=C2=A0 (cond ((equal goto '(4= )) (org-capture-goto-target keys)) ((equal goto '(16)) (org-capture-got= o-last-stored)) (t (let* ((orig-buf (current-buffer)) (annotation (if (and = (boundp ...) org-capture-link-is-already-stored) (plist-get org-store-link-= plist :annotation) (condition-case nil (progn ...) (error nil)))) (entry (o= r org-capture-entry (org-capture-select-template keys))) initial) (setq ini= tial (or org-capture-initial (and (org-region-active-p) (buffer-substring (= point) (mark))))) (if (stringp initial) (progn (remove-text-properties 0 (l= ength initial) '(read-only t) initial))) (if (stringp annotation) (prog= n (remove-text-properties 0 (length annotation) '(read-only t) annotati= on))) (cond ((equal entry "C") (customize-variable 'org-captu= re-templates)) ((equal entry "q") (user-error "Abort"))= (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-p= ut :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf)= (and ... ...)) :original-file-nondirectory (and (buffer-file-name orig-buf= ) (file-name-nondirectory ...)) :annotation annotation :initial initial :re= turn-to-wconf (current-window-configuration) :default-time (or org-overridi= ng-default-time (org-current-time))) (org-capture-set-target-location (and = (equal goto 0) 'here)) (condition-case error (org-capture-put :template= (org-capture-fill-template)) ((error quit) (if ... ...) (error "Captu= re abort: %s" ...))) (setq org-capture-clock-keep (org-capture-get :cl= ock-keep)) (condition-case error (org-capture-place-template (eq ... ...)) = ((error quit) (if ... ...) (set-window-configuration ...) (error "Capt= ure template `%s': %s" ... ...))) (if (and (derived-mode-p ...) (o= rg-capture-get :clock-in)) (progn (condition-case nil ... ...))) (if (org-c= apture-get :immediate-finish) (progn (org-capture-finalize))))))))
=C2= =A0 org-capture(nil)
=C2=A0 funcall-interactively(org-capture nil)
= =C2=A0 call-interactively(org-capture nil nil)
=C2=A0 command-execute(or= g-capture)
#+end_example

And here is my emacs minimal= config try to reproduce this error but can't and don't know how to= reproduce it.

#+begin_src emacs-lisp
(require 'org= -capture)
(setq org-capture-templates
=C2=A0 =C2=A0 =C2=A0 `(("t= " ,(format "%s\tstart a clock task" (all-the-icons-faicon &q= uot;hourglass-start" :face 'all-the-icons-red :v-adjust 0.05))
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0entry (file "~/Org/Tasks/Tasks.org&q= uot;)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"* TODO [#A] %?\nSCHEDULED:= %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n&quo= t;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:clock-in t :clock-resume t :clock-= keep t :empty-lines 1)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ))

(use-packag= e all-the-icons
=C2=A0 :ensure t)

(use-package elfeed
=C2=A0 := ensure t
=C2=A0 ;; For debugging
=C2=A0 ;; :preface (setq elfeed-log-= level 'debug)
=C2=A0 :commands (elfeed elfeed-update)
=C2=A0 :cus= tom ((elfeed-db-directory (expand-file-name ".elfeed" user-emacs-= directory))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; specify proxy fo= r elfeed backend cURL.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(elfeed-= curl-extra-arguments '("--proxy" "socks5h://127.0.0.1:7890"))
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0;; elfeed startup initial tags
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(elfeed-initial-tags '(unread))

=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(elfeed-feeds
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 '(;; Programming
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 ;; ("htt= p://blog.stackoverflow.com/feed/" programming stackoverflow)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; ("http://programmers.blogoverflow.com/f= eed/" programming stackoverflow)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 ;; Emacs
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 ;; ("https://ww= w.reddit.com/r/emacs/.rss" emacs reddit) ; Reddit r/Emacs
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; ("https://planet.emacslife.com/atom.xml&qu= ot; emacs planet) ; Planet Emacslife
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 ;; ("h= ttps://www.reddit.com/r/orgmode/.rss" org-mode reddit) ; Reddit r/= Org-mode
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; ("https://emacs-china.org/posts.rss= " emacs china) =C2=A0; Emacs China =E6=9C=80=E6=96=B0=E5=B8=96=E5= =AD=90
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; ("https://emacs-china.org/latest.rss= " emacs china) ; Emacs China =E6=9C=80=E6=96=B0=E8=AF=9D=E9=A2=98<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ("https://sachachua.com/blog/feed/atom/= " blog emacs) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0; Sacha = Chua Blog
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ("http://feeds.feed= burner.com/TheKitchinResearchGroup" blog emacs) ; The Kitchin Rese= arch Group
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ("https://200ok.ch/atom.xml" blog e= macs) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 ; 200ok.ch
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ))
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0)
=C2=A0 :init (advice-add 'elfeed :after #'elfeed= -update) ; auto update after entering elfeed.
=C2=A0 ;; (run-at-time nil= (* 4 60 60) #'elfeed-update) ; auto update elfeed every 4 hours.
= =C2=A0 ;; FIXME: `elfeed' use `switch-to-buffer'.
=C2=A0 (add-to= -list 'display-buffer-alist '("^\\*elfeed-search\\*" . (d= isplay-buffer-below-selected)))
=C2=A0 :config
=C2=A0 ;; (define-key = elfeed-search-mode-map (kbd "#") 'elfeed-search-set-filter)
=C2=A0 (defalias 'elfeed-search-toggle-all-star ; [m], [*]
=C2= =A0 =C2=A0 (elfeed-expose #'elfeed-search-toggle-all 'star)
=C2= =A0 =C2=A0 "Toggle the `star' tag to all selected entries.")<= br>=C2=A0 (define-key elfeed-search-mode-map (kbd "m") 'elfee= d-search-toggle-all-star)

=C2=A0 ;; Auto close elfeed buffers when q= uit Emacs.
=C2=A0 (defun elfeed-quit ()
=C2=A0 =C2=A0 "Close elf= eed buffers."
=C2=A0 =C2=A0 (interactive)
=C2=A0 =C2=A0 (elfeed-= db-save)
=C2=A0 =C2=A0 (dolist (buffer '("*elfeed-log*" &q= uot;*elfeed-search*" "*elfeed-entry*"))
=C2=A0 =C2=A0 =C2= =A0 (when (buffer-live-p (get-buffer buffer))
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 (with-current-buffer buffer
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (kill= -buffer)))))
=C2=A0 (define-key elfeed-search-mode-map (kbd "q"= ;) 'elfeed-quit)
=C2=A0 (add-hook 'kill-emacs-hook #'elfeed-= quit)

=C2=A0 ;; support Org Mode Capture template
=C2=A0 (defun m= y/org-capture-elfeed-title ()
=C2=A0 =C2=A0 (with-current-buffer "*= elfeed-entry*"
=C2=A0 =C2=A0 =C2=A0 (elfeed-entry-title elfeed-show= -entry)))
=C2=A0 (defun my/org-capture-elfeed-date ()
=C2=A0 =C2=A0 (= with-current-buffer "*elfeed-entry*"
=C2=A0 =C2=A0 =C2=A0 (for= mat-time-string
=C2=A0 =C2=A0 =C2=A0 =C2=A0"[%Y-%m-%d %a %H:%M]&quo= t;
=C2=A0 =C2=A0 =C2=A0 =C2=A0(seconds-to-time (elfeed-entry-date elfeed= -show-entry)))))
=C2=A0 (defun my/org-capture-elfeed-source ()
=C2=A0= =C2=A0 (with-current-buffer "*elfeed-entry*"
=C2=A0 =C2=A0 = =C2=A0 (let ((feed (elfeed-entry-feed elfeed-show-entry)))
=C2=A0 =C2=A0= =C2=A0 =C2=A0 (elfeed-feed-title feed))))
=C2=A0 (defun my/org-capture-= elfeed-content ()
=C2=A0 =C2=A0 (with-current-buffer "*elfeed-entry= *"
=C2=A0 =C2=A0 =C2=A0 (let* ((content (elfeed-deref (elfeed-entry= -content elfeed-show-entry)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(type (elfeed-entry-content-type elfeed-show-entry))
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(feed (elfeed-entry-feed elfeed-show-ent= ry))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(base-url (and feed= (elfeed-compute-base (elfeed-feed-url feed)))))
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 (if content
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (if (eq typ= e 'html)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (pr= ogn
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (unle= ss (fboundp 'org-web-tools--html-to-org-with-pandoc)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (require 'org-w= eb-tools))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (let ((org-web-tools-pandoc-sleep-time 5))
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (org-web-tools--html-to-org-w= ith-pandoc content)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (= insert content))))))

=C2=A0 (with-eval-after-load 'org-capture=C2=A0 =C2=A0 (add-to-list 'org-capture-templates
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0`("r" ,(format &q= uot;%s\tcapture elfeed RSS feed content to Org buffer" (all-the-icons-= faicon "rss" :face 'all-the-icons-blue-alt))
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0entry (file "&= quot;)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0"* %(my/org-capture-elfeed-title)
:PROPERTIES:
:SOURCE: %(= my/org-capture-elfeed-source)
:DATE(original): %(my/org-capture-elfeed-d= ate)
:DATE: %u
:END:

%(my/org-capture-elfeed-content)"=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:empt= y-lines 1
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0:jump-to-captured t)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0:append))

=C2=A0 ;; auto re-format elfeed entry = org-capture buffer.
=C2=A0 (defun my/elfeed-format-org-capture-buffer ()=
=C2=A0 =C2=A0 "A helper command to Delete org-capture elfeed-entry= ending backslash \\."
=C2=A0 =C2=A0 (interactive)
=C2=A0 =C2=A0= (goto-char (point-min))
=C2=A0 =C2=A0 (replace-string "\\" &q= uot;")
=C2=A0 =C2=A0 (replace-string "=E3=80=80=E3=80=80"= "")
=C2=A0 =C2=A0 ;; using regex replace using \( \)\{2,\} = =C2=A0which means 2 or more consecutive spaces and replace that with 1 spac= e.
=C2=A0 =C2=A0 (replace-regexp "\\( \\)\\{2,\\}" " &quo= t;)
=C2=A0 =C2=A0 (org-mark-subtree) ; or `org-mark-element', `mark-= whole-buffer'
=C2=A0 =C2=A0 (call-interactively 'org-fill-paragr= aph) ; or `fill-paragraph'
=C2=A0 =C2=A0 )
=C2=A0
=C2=A0 (add= -hook 'org-capture-mode-hook #'my/elfeed-format-org-capture-buffer)=

=C2=A0 ;; Download link media with youtube-dl.
=C2=A0 (defun you= tube-dl-cmd-wrapper (url)
=C2=A0 =C2=A0 "Downloads the URL with you= tube-dl in an async shell"
=C2=A0 =C2=A0 (let ((default-directory &= quot;~/Downloads"))
=C2=A0 =C2=A0 =C2=A0 (async-shell-command (form= at "youtube-dl %s" url))))

=C2=A0 (defun elfeed-youtube-dl= (&optional use-generic-p)
=C2=A0 =C2=A0 "Use youtube-dl to dow= nload the link media."
=C2=A0 =C2=A0 (interactive "P")=C2=A0 =C2=A0 (let ((entries (elfeed-search-selected)))
=C2=A0 =C2=A0 = =C2=A0 (cl-loop for entry in entries
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0do (elfeed-untag entry 'unread)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0when (elfeed-entry-link entry)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0do (youtube-dl-cmd-w= rapper it))
=C2=A0 =C2=A0 =C2=A0 (mapc #'elfeed-search-update-entry = entries)
=C2=A0 =C2=A0 =C2=A0 (unless (use-region-p) (forward-line))))
=C2=A0 (define-key elfeed-search-mode-map (kbd "d") 'el= feed-youtube-dl)
=C2=A0 )
#+end_src

I might ne= ed to take some time to bisect my Emacs config with bug-hunter to check whe= ther some options caused this error. I will add more details later.
If you have any clue about this error, thanks for the hint.
[stardiviner]=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <Hack this world!= >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 GPG key ID: 47C32433
IRC(freeenode): = stardiviner =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Twitter:=C2=A0 @numbchi= ld
Key fingerprint =3D 9BAA 92BC CDDD B9EF 3B36=C2=A0 CB99 B8C4 B8E5 47C= 3 2433
Blog: http://stardiviner.github.io/
--000000000000a782b305f7546ad7--