i used to do <q TAB to get a quote block. an upgrade to maint brought the org-tempo thing, which i know was a long discussion whose resolution i completely forgot about. i'm ok with either old or new. i will fix keybindings. i just want it working again with or without a new keybinding, without a lot of changing things on my part. i tried what is intended to now be on c-c ,. this brought up a warning: Please update the entries of `org-structure-template-alist'. it tells me to update a bunch of entries includign this one: ("b" "#+begin_src sh :results verbatim output\n?#+end_src" "") but it is not clear what to do to update it. the extra header stuff is not documented anywhere i looked, including the warning, the docstring it referred to, the manual, and the org-tempo commentary. my goal is the least effort toward a solution. is tehre a solution without updating the alist? if not, what works for this entry? thanks!
[-- Attachment #1: Type: text/plain, Size: 497 bytes --] On Mon, Jun 29, 2020 at 01:15:04PM -0700, Samuel Wales wrote: > i used to do > > <q TAB > > to get a quote block. > > an upgrade to maint brought the org-tempo thing, which i know was a > long discussion whose resolution i completely forgot about. > > i'm ok with either old or new. i will fix keybindings. [...] It's a while ago, but AFAIR I just had to enable/add tempo to the (customizable) variable `org-modules'. Try M-x customize org-modules Cheers -- tomás [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --]
my understanding is that adding to org-modules and requiring are functionally equivalent, at least in my use case. for me, the problem is that expanding, whether via the familiar < q TAB or the new function, would bring up the warning which was not obviously fixable. -- The Kafka Pandemic What is misopathy? https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
On 6/29/20, Samuel Wales <samologist@gmail.com> wrote: > TAB or the new function, would bring up the warning which was not > obviously fixable. is not* -- The Kafka Pandemic What is misopathy? https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
Samuel Wales writes:
[...]
> i tried what is intended to now be on c-c ,. this brought up a warning:
>
> Please update the entries of `org-structure-template-alist'.
>
> it tells me to update a bunch of entries includign this one:
>
> ("b" "#+begin_src sh :results verbatim output\n?#+end_src" "")
>
> but it is not clear what to do to update it. the extra header stuff
> is not documented anywhere i looked, including the warning, the
> docstring it referred to, the manual, and the org-tempo commentary.
Here's the example given in that warning:
In Org 9.2 the format was changed from something like
("s" "#+BEGIN_SRC ?\\n#+END_SRC")
to something like
("s" . "src")
Please refer to the documentation of `org-structure-template-alist'.
So the entry you show
("b" "#+begin_src sh :results verbatim output\n?#+end_src" "")
would map to this (untested):
("b" . "src sh :results verbatim output")
On 6/29/20, Kyle Meyer <kyle@kyleam.com> wrote:
> would map to this (untested):
>
> ("b" . "src sh :results verbatim output")
thanks. i tried that too. it gave an error so i assumed it was
invalid syntax. should i report it as a bug?
Samuel Wales writes:
> On 6/29/20, Kyle Meyer <kyle@kyleam.com> wrote:
>> would map to this (untested):
>>
>> ("b" . "src sh :results verbatim output")
>
> thanks. i tried that too. it gave an error so i assumed it was
> invalid syntax. should i report it as a bug?
Yes, please provide a minimal configuration, the steps to trigger, and
the error you see. With maint (currently 3ed035ce3) checked out, I just
tried
(require 'org-tempo)
(add-to-list 'org-structure-template-alist
'("b" . "src sh :results verbatim output"))
with no other configuration. Both <b followed by tab and "C-c C-, b"
inserted the block without an error.
thank you. it does work, if you get rid of your entire alist first. that is, it doesn't just seem to look up the car and expand it, but rather seems to require the whole list to be what it wants. so you cannot fix one at a time. i tried to fix one at a time because i wasn't sure which mechanism i would use and what syntax each mechanism required. the < mechanism being the same syntax in org but a different syntax in the alist threw me off ever so slightly. seems to be backward compatible for the expansion, but not for the alist. i didn't think to null the alist until much later when i found out from you that the syntax i had tried was supposed to work after all. i also got a capture bug. the offending item was this one: (push '("n" "#+name: ?" "") org-structure-template-alist). therefore the old syntax. so no need to fix the bug i guess, but for curiosity here is the bt. the strange thing is the capture template doesn't expand anything so idk why it errors just because the expansion mechanism used the old syntax. this one might throw others off, dunno. Debugger entered--Lisp error: (error "Capture abort: Wrong type argument: stringp, (\"#+name: ?\" \"\")") signal(error ("Capture abort: Wrong type argument: stringp, (\"#+name: ?\" \"\")")) error("Capture abort: %s" "Wrong type argument: stringp, (\"#+name: ?\" \"\")") org-capture(nil "n") #[0 "\300\301\302\"\207" [org-capture nil "n"] 3 nil nil]() funcall-interactively(#[0 "\300\301\302\"\207" [org-capture nil "n"] 3 nil nil]) call-interactively(#[0 "\300\301\302\"\207" [org-capture nil "n"] 3 nil nil] nil nil) command-execute(#[0 "\300\301\302\"\207" [org-capture nil "n"] 3 nil nil]) so, user error, plus some anomaly. however, if any ignorami like me exist out there, it might be worth documenting int he warning screen that you should null the alist. On 6/29/20, Kyle Meyer <kyle@kyleam.com> wrote: > Samuel Wales writes: > >> On 6/29/20, Kyle Meyer <kyle@kyleam.com> wrote: >>> would map to this (untested): >>> >>> ("b" . "src sh :results verbatim output") >> >> thanks. i tried that too. it gave an error so i assumed it was >> invalid syntax. should i report it as a bug? > > Yes, please provide a minimal configuration, the steps to trigger, and > the error you see. With maint (currently 3ed035ce3) checked out, I just > tried > > (require 'org-tempo) > (add-to-list 'org-structure-template-alist > '("b" . "src sh :results verbatim output")) > > with no other configuration. Both <b followed by tab and "C-c C-, b" > inserted the block without an error. > -- The Kafka Pandemic What is misopathy? https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html