federicotdn / verb

Organize and send HTTP requests from Emacs
https://melpa.org/#/verb
GNU General Public License v3.0
523 stars 21 forks source link

`verb--request-spec-post-process` evaluated twice with babel src block #38

Closed prashantvithani closed 3 years ago

prashantvithani commented 3 years ago

verb--request-spec-from-babel-src-block calls verb--request-spec-from-hierarchy which evaluates post process function.

(defun verb--request-spec-from-babel-src-block (pos body)
  ...
  (save-excursion
    (let* ((metadata (verb--heading-properties verb--metadata-prefix))
           (rs (verb-request-spec-from-string body metadata)))
      ...
      (when (verb--up-heading)
        ;; Continue reading requests from the headings
        ;; hierarchy. Pre-include the one we read from the source block
        ;; at the end of the list.
        (setq rs (verb--request-spec-from-hierarchy rs))) ; <- This calls `verb--request-spec-post-process`
      (verb--request-spec-post-process rs)))) ;<- This is evaluated twice.
prashantvithani commented 3 years ago

Let me know if I'm missing anything or if it was intended behaviour.