* problem evaluating src block on file opening
@ 2017-08-25 13:01 Eric S Fraga
2017-08-25 15:42 ` Berry, Charles
0 siblings, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2017-08-25 13:01 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1317 bytes --]
Hello,
Long story short: org-babel-goto-named-src-block does not seem to work,
at least since b862c24b9f or thereabouts?
If I evaluate this command interactively, it sends me to a #+begin_quote
line in my file!
Org up to date. I haven't tried a minimal example yet but will do so if
this doesn't ring any bells! I noticed the failure because I upgraded
org which I had not done in a while and my startup babel blocks no
longer work; these are blocks that are evaluated when I visit an org
file via the following code:
#+begin_src emacs-lisp
(defun esf/execute-startup-block ()
(interactive)
(org-babel-goto-named-src-block "startup")
(org-babel-execute-src-block))
#+end_src
The evaluation of org-babel-execute-src-block fails because the previous
line did not place point at a src block! The error returned by the last
line is very strange as well:
,----
| Debugger entered--Lisp error: (wrong-type-argument consp nil)
| org-babel-execute-src-block()
| esf/execute-startup-block()
| eval((esf/execute-startup-block))
| hack-one-local-variable(eval (esf/execute-startup-block))
| hack-local-variables-apply()
| hack-local-variables(no-mode)
| run-mode-hooks(org-mode-hook)
| org-mode()
`----
Thanks,
eric
--
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-796-gbae41a
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: problem evaluating src block on file opening
2017-08-25 13:01 problem evaluating src block on file opening Eric S Fraga
@ 2017-08-25 15:42 ` Berry, Charles
2017-08-25 20:01 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Berry, Charles @ 2017-08-25 15:42 UTC (permalink / raw)
To: Eric S Fraga; +Cc: org-mode mailing list
> On Aug 25, 2017, at 6:01 AM, Eric S Fraga <ucecesf@ucl.ac.uk> wrote:
>
> Hello,
>
> Long story short: org-babel-goto-named-src-block does not seem to work,
> at least since b862c24b9f or thereabouts?
>
Confirmed on my setup.
Here is an ECM. Always goes to the first block.
--8<---------------cut here---------------start------------->8---
#+BEGIN_SRC emacs-lisp
"gotcha"
#+END_SRC
#+NAME: startup
#+BEGIN_SRC emacs-lisp :results value
1
#+END_SRC
#+begin_src emacs-lisp
(defun esf/execute-startup-block ()
(interactive)
(org-babel-goto-named-src-block "startup")
(org-babel-execute-src-block))
#+end_src
--8<---------------cut here---------------end--------------->8---
Chuck
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: problem evaluating src block on file opening
2017-08-25 15:42 ` Berry, Charles
@ 2017-08-25 20:01 ` Nicolas Goaziou
2017-08-26 8:44 ` Eric S Fraga
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2017-08-25 20:01 UTC (permalink / raw)
To: Berry, Charles; +Cc: Eric S Fraga, org-mode mailing list
Hello,
"Berry, Charles" <ccberry@ucsd.edu> writes:
>> On Aug 25, 2017, at 6:01 AM, Eric S Fraga <ucecesf@ucl.ac.uk> wrote:
>>
>> Hello,
>>
>> Long story short: org-babel-goto-named-src-block does not seem to work,
>> at least since b862c24b9f or thereabouts?
>>
>
>
> Confirmed on my setup.
>
> Here is an ECM. Always goes to the first block.
>
>
>
>
> #+BEGIN_SRC emacs-lisp
> "gotcha"
> #+END_SRC
>
> #+NAME: startup
> #+BEGIN_SRC emacs-lisp :results value
> 1
> #+END_SRC
>
> #+begin_src emacs-lisp
> (defun esf/execute-startup-block ()
> (interactive)
> (org-babel-goto-named-src-block "startup")
> (org-babel-execute-src-block))
> #+end_src
Fixed. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: problem evaluating src block on file opening
2017-08-25 20:01 ` Nicolas Goaziou
@ 2017-08-26 8:44 ` Eric S Fraga
0 siblings, 0 replies; 4+ messages in thread
From: Eric S Fraga @ 2017-08-26 8:44 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: org-mode mailing list, Berry, Charles
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
On Friday, 25 Aug 2017 at 22:01, Nicolas Goaziou wrote:
> "Berry, Charles" <ccberry@ucsd.edu> writes:
>>> On Aug 25, 2017, at 6:01 AM, Eric S Fraga <ucecesf@ucl.ac.uk> wrote:
>>>
>>> Hello,
>>>
>>> Long story short: org-babel-goto-named-src-block does not seem to work,
>>> at least since b862c24b9f or thereabouts?
>>
>> Confirmed on my setup.
Charles, thanks for preparing the ECM and confirming.
[...]
> Fixed. Thank you.
Excellent Nicolas! Many thanks. Works perfectly now.
--
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-796-gbae41a
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-26 8:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-25 13:01 problem evaluating src block on file opening Eric S Fraga
2017-08-25 15:42 ` Berry, Charles
2017-08-25 20:01 ` Nicolas Goaziou
2017-08-26 8:44 ` Eric S Fraga
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.