* Is <s TAB supposed to expand into upper case #+BEGIN_SRC?
@ 2014-06-07 19:55 Grant Rettke
2014-06-07 20:37 ` Thorsten Jolitz
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Grant Rettke @ 2014-06-07 19:55 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
Hi,
When I type
<s TAB
it is expanded into
#+BEGIN_SRC
#+END_SRC
Is supposed to expand into upper case letters?
For some reason, my system won't tangle blocks that are all upper
case, instead only all lower case is tangled.
Kind regards,
Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is <s TAB supposed to expand into upper case #+BEGIN_SRC?
2014-06-07 19:55 Is <s TAB supposed to expand into upper case #+BEGIN_SRC? Grant Rettke
@ 2014-06-07 20:37 ` Thorsten Jolitz
2014-06-07 20:39 ` Thorsten Jolitz
2014-06-09 4:15 ` Nick Dokos
2 siblings, 0 replies; 9+ messages in thread
From: Thorsten Jolitz @ 2014-06-07 20:37 UTC (permalink / raw)
To: emacs-orgmode
Grant Rettke <gcr@wisdomandwonder.com> writes:
> Hi,
>
> When I type
>
> <s TAB
>
> it is expanded into
>
> #+BEGIN_SRC
>
> #+END_SRC
>
> Is supposed to expand into upper case letters?
you can customize org-structure-template-alist, e.g.:
,----------------------------------------------------------------------------------
| org-structure-template-alist is a variable defined in `org.el'.
| Its value is shown below.
|
| Documentation:
| Structure completion elements.
| This is a list of abbreviation keys and values. The value gets inserted
| if you type `<' followed by the key and then press the completion key,
| usually `M-TAB'. %file will be replaced by a file name after prompting
| for the file using completion. The cursor will be placed at the position
| of the `?` in the template.
| There are two templates for each key, the first uses the original Org syntax,
| the second uses Emacs Muse-like syntax tags. These Muse-like tags become
| the default when the /org-mtags.el/ module has been loaded. See also the
| variable `org-mtags-prefer-muse-templates'.
|
| You can customize this variable.
|
| Value: (("s" "#+begin_src ?\n\n#+end_src" "<src lang=\"?\">\n\n</src>")
| ("e" "#+begin_example\n?\n#+end_example" "<example>\n?\n</example>")
| ("q" "#+begin_quote\n?\n#+end_quote" "<quote>\n?\n</quote>")
| ("v" "#+begin_verse\n?\n#+end_verse" "<verse>\n?\n/verse>")
| ("c" "#+begin_center\n?\n#+end_center" "<center>\n?\n/center>")
| ("l" "#+begin_latex\n?\n#+end_latex" "<literal style=\"latex\">\n?\n</literal>")
| ("L" "#+latex:" "<literal style=\"latex\">?</literal>")
| ("h" "#+begin_html\n?\n#+end_html" "<literal style=\"html\">\n?\n</literal>")
| ("H" "#+html:" "<literal style=\"html\">?</literal>")
| ("a" "#+begin_ascii\n?\n#+end_ascii")
| ("A" "#+ascii:")
| ("i" "#+index:?" "#+index: ?")
| ("I" "#+include%file ?" "<include file=%file markup=\"?\">"))
|
| Original value was
| (("s" "#+BEGIN_SRC ?\n\n#+END_SRC" "<src lang=\"?\">\n\n</src>")
| ("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE" "<example>\n?\n</example>")
| ("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE" "<quote>\n?\n</quote>")
| ("v" "#+BEGIN_VERSE\n?\n#+END_VERSE" "<verse>\n?\n</verse>")
| ("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM" "<verbatim>\n?\n</verbatim>")
| ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER" "<center>\n?\n</center>")
| ("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX" "<literal style=\"latex\">\n?\n</literal>")
| ("L" "#+LaTeX: " "<literal style=\"latex\">?</literal>")
| ("h" "#+BEGIN_HTML\n?\n#+END_HTML" "<literal style=\"html\">\n?\n</literal>")
| ("H" "#+HTML: " "<literal style=\"html\">?</literal>")
| ("a" "#+BEGIN_ASCII\n?\n#+END_ASCII" "")
| ("A" "#+ASCII: " "")
| ("i" "#+INDEX: ?" "#+INDEX: ?")
| ("I" "#+INCLUDE: %file ?" "<include file=%file markup=\"?\">"))
|
| [back]
`----------------------------------------------------------------------------------
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is <s TAB supposed to expand into upper case #+BEGIN_SRC?
2014-06-07 19:55 Is <s TAB supposed to expand into upper case #+BEGIN_SRC? Grant Rettke
2014-06-07 20:37 ` Thorsten Jolitz
@ 2014-06-07 20:39 ` Thorsten Jolitz
2014-06-07 21:44 ` Grant Rettke
2014-06-09 4:15 ` Nick Dokos
2 siblings, 1 reply; 9+ messages in thread
From: Thorsten Jolitz @ 2014-06-07 20:39 UTC (permalink / raw)
To: emacs-orgmode
Grant Rettke <gcr@wisdomandwonder.com> writes:
> #+BEGIN_SRC
>
> #+END_SRC
>
> Is supposed to expand into upper case letters?
or put this in your init.el:
#+BEGIN_SRC emacs-lisp
(setq org-structure-template-alist
(quote (("s" "#+begin_src ?\n\n#+end_src"
"<src lang=\"?\">\n\n</src>")
("e" "#+begin_example\n?\n#+end_example"
"<example>\n?\n</example>")
("q" "#+begin_quote\n?\n#+end_quote"
"<quote>\n?\n</quote>")
("v" "#+begin_verse\n?\n#+end_verse"
"<verse>\n?\n/verse>")
("c" "#+begin_center\n?\n#+end_center"
"<center>\n?\n/center>")
("l" "#+begin_latex\n?\n#+end_latex"
"<literal style=\"latex\">\n?\n</literal>")
("L" "#+latex:"
"<literal style=\"latex\">?</literal>")
("h" "#+begin_html\n?\n#+end_html"
"<literal style=\"html\">\n?\n</literal>")
("H" "#+html:"
"<literal style=\"html\">?</literal>")
("a" "#+begin_ascii\n?\n#+end_ascii")
("A" "#+ascii:")
("i" "#+index:?" "#+index: ?")
("I" "#+include%file ?"
"<include file=%file markup=\"?\">"))))
#+END_SRC
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is <s TAB supposed to expand into upper case #+BEGIN_SRC?
2014-06-07 20:39 ` Thorsten Jolitz
@ 2014-06-07 21:44 ` Grant Rettke
2014-06-08 20:04 ` Grant Rettke
0 siblings, 1 reply; 9+ messages in thread
From: Grant Rettke @ 2014-06-07 21:44 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode@gnu.org
Thank you Thorsten.
Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson
On Sat, Jun 7, 2014 at 3:39 PM, Thorsten Jolitz <tjolitz@gmail.com> wrote:
> Grant Rettke <gcr@wisdomandwonder.com> writes:
>
>
>> #+BEGIN_SRC
>>
>> #+END_SRC
>>
>> Is supposed to expand into upper case letters?
>
> or put this in your init.el:
>
> #+BEGIN_SRC emacs-lisp
> (setq org-structure-template-alist
> (quote (("s" "#+begin_src ?\n\n#+end_src"
> "<src lang=\"?\">\n\n</src>")
> ("e" "#+begin_example\n?\n#+end_example"
> "<example>\n?\n</example>")
> ("q" "#+begin_quote\n?\n#+end_quote"
> "<quote>\n?\n</quote>")
> ("v" "#+begin_verse\n?\n#+end_verse"
> "<verse>\n?\n/verse>")
> ("c" "#+begin_center\n?\n#+end_center"
> "<center>\n?\n/center>")
> ("l" "#+begin_latex\n?\n#+end_latex"
> "<literal style=\"latex\">\n?\n</literal>")
> ("L" "#+latex:"
> "<literal style=\"latex\">?</literal>")
> ("h" "#+begin_html\n?\n#+end_html"
> "<literal style=\"html\">\n?\n</literal>")
> ("H" "#+html:"
> "<literal style=\"html\">?</literal>")
> ("a" "#+begin_ascii\n?\n#+end_ascii")
> ("A" "#+ascii:")
> ("i" "#+index:?" "#+index: ?")
> ("I" "#+include%file ?"
> "<include file=%file markup=\"?\">"))))
> #+END_SRC
>
>
> --
> cheers,
> Thorsten
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is <s TAB supposed to expand into upper case #+BEGIN_SRC?
2014-06-07 21:44 ` Grant Rettke
@ 2014-06-08 20:04 ` Grant Rettke
2014-06-08 21:29 ` Thorsten Jolitz
0 siblings, 1 reply; 9+ messages in thread
From: Grant Rettke @ 2014-06-08 20:04 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode@gnu.org
Just added this to my init file to do that work:
(mapc (lambda (asc)
(let ((org-sce-dc (downcase (nth 1 asc))))
(setf (nth 1 asc) org-sce-dc)))
org-structure-template-alist)
Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson
On Sat, Jun 7, 2014 at 4:44 PM, Grant Rettke <gcr@wisdomandwonder.com> wrote:
> Thank you Thorsten.
> Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
> gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
> “Wisdom begins in wonder.” --Socrates
> ((λ (x) (x x)) (λ (x) (x x)))
> “Life has become immeasurably better since I have been forced to stop
> taking it seriously.” --Thompson
>
>
> On Sat, Jun 7, 2014 at 3:39 PM, Thorsten Jolitz <tjolitz@gmail.com> wrote:
>> Grant Rettke <gcr@wisdomandwonder.com> writes:
>>
>>
>>> #+BEGIN_SRC
>>>
>>> #+END_SRC
>>>
>>> Is supposed to expand into upper case letters?
>>
>> or put this in your init.el:
>>
>> #+BEGIN_SRC emacs-lisp
>> (setq org-structure-template-alist
>> (quote (("s" "#+begin_src ?\n\n#+end_src"
>> "<src lang=\"?\">\n\n</src>")
>> ("e" "#+begin_example\n?\n#+end_example"
>> "<example>\n?\n</example>")
>> ("q" "#+begin_quote\n?\n#+end_quote"
>> "<quote>\n?\n</quote>")
>> ("v" "#+begin_verse\n?\n#+end_verse"
>> "<verse>\n?\n/verse>")
>> ("c" "#+begin_center\n?\n#+end_center"
>> "<center>\n?\n/center>")
>> ("l" "#+begin_latex\n?\n#+end_latex"
>> "<literal style=\"latex\">\n?\n</literal>")
>> ("L" "#+latex:"
>> "<literal style=\"latex\">?</literal>")
>> ("h" "#+begin_html\n?\n#+end_html"
>> "<literal style=\"html\">\n?\n</literal>")
>> ("H" "#+html:"
>> "<literal style=\"html\">?</literal>")
>> ("a" "#+begin_ascii\n?\n#+end_ascii")
>> ("A" "#+ascii:")
>> ("i" "#+index:?" "#+index: ?")
>> ("I" "#+include%file ?"
>> "<include file=%file markup=\"?\">"))))
>> #+END_SRC
>>
>>
>> --
>> cheers,
>> Thorsten
>>
>>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is <s TAB supposed to expand into upper case #+BEGIN_SRC?
2014-06-08 20:04 ` Grant Rettke
@ 2014-06-08 21:29 ` Thorsten Jolitz
2014-06-09 0:05 ` Grant Rettke
0 siblings, 1 reply; 9+ messages in thread
From: Thorsten Jolitz @ 2014-06-08 21:29 UTC (permalink / raw)
To: emacs-orgmode
Grant Rettke <gcr@wisdomandwonder.com> writes:
> Just added this to my init file to do that work:
>
> (mapc (lambda (asc)
> (let ((org-sce-dc (downcase (nth 1 asc))))
> (setf (nth 1 asc) org-sce-dc)))
> org-structure-template-alist)
Thats of course much cooler than the pedestrian version. Only downside
might be if you search your init file for #+begin_src or so one day
because your forgot about org-structure-template-alist you won't find it
;)
> Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
> gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
> “Wisdom begins in wonder.” --Socrates
> ((λ (x) (x x)) (λ (x) (x x)))
> “Life has become immeasurably better since I have been forced to stop
> taking it seriously.” --Thompson
>
>
> On Sat, Jun 7, 2014 at 4:44 PM, Grant Rettke <gcr@wisdomandwonder.com> wrote:
>> Thank you Thorsten.
>> Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
>> gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
>> “Wisdom begins in wonder.” --Socrates
>> ((λ (x) (x x)) (λ (x) (x x)))
>> “Life has become immeasurably better since I have been forced to stop
>> taking it seriously.” --Thompson
>>
>>
>> On Sat, Jun 7, 2014 at 3:39 PM, Thorsten Jolitz <tjolitz@gmail.com>
>> wrote:
>>> Grant Rettke <gcr@wisdomandwonder.com> writes:
>>>
>>>
>>>> #+BEGIN_SRC
>>>>
>>>> #+END_SRC
>>>>
>>>> Is supposed to expand into upper case letters?
>>>
>>> or put this in your init.el:
>>>
>>> #+BEGIN_SRC emacs-lisp
>>> (setq org-structure-template-alist
>>> (quote (("s" "#+begin_src ?\n\n#+end_src"
>>> "<src lang=\"?\">\n\n</src>")
>>> ("e" "#+begin_example\n?\n#+end_example"
>>> "<example>\n?\n</example>")
>>> ("q" "#+begin_quote\n?\n#+end_quote"
>>> "<quote>\n?\n</quote>")
>>> ("v" "#+begin_verse\n?\n#+end_verse"
>>> "<verse>\n?\n/verse>")
>>> ("c" "#+begin_center\n?\n#+end_center"
>>> "<center>\n?\n/center>")
>>> ("l" "#+begin_latex\n?\n#+end_latex"
>>> "<literal style=\"latex\">\n?\n</literal>")
>>> ("L" "#+latex:"
>>> "<literal style=\"latex\">?</literal>")
>>> ("h" "#+begin_html\n?\n#+end_html"
>>> "<literal style=\"html\">\n?\n</literal>")
>>> ("H" "#+html:"
>>> "<literal style=\"html\">?</literal>")
>>> ("a" "#+begin_ascii\n?\n#+end_ascii")
>>> ("A" "#+ascii:")
>>> ("i" "#+index:?" "#+index: ?")
>>> ("I" "#+include%file ?"
>>> "<include file=%file markup=\"?\">"))))
>>> #+END_SRC
>>>
>>>
>>> --
>>> cheers,
>>> Thorsten
>>>
>>>
>
>
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is <s TAB supposed to expand into upper case #+BEGIN_SRC?
2014-06-08 21:29 ` Thorsten Jolitz
@ 2014-06-09 0:05 ` Grant Rettke
0 siblings, 0 replies; 9+ messages in thread
From: Grant Rettke @ 2014-06-09 0:05 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode@gnu.org
On Sun, Jun 8, 2014 at 4:29 PM, Thorsten Jolitz <tjolitz@gmail.com> wrote:
> Thats of course much cooler than the pedestrian version. Only downside
> might be if you search your init file for #+begin_src or so one day
> because your forgot about org-structure-template-alist you won't find it
> ;)
Cool had nothing to do with it; I'm lazy and kind of dumb is all! :)
Joking aside, I like this snippet because it will always work for any
mapping changes, and, it doesn't stomp on anything, just restart Emacs
without the snippet and you are back to original values.
Perhaps that would be the right way to do it... make a copy and do
*not* stomp on the values like I did...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is <s TAB supposed to expand into upper case #+BEGIN_SRC?
2014-06-07 19:55 Is <s TAB supposed to expand into upper case #+BEGIN_SRC? Grant Rettke
2014-06-07 20:37 ` Thorsten Jolitz
2014-06-07 20:39 ` Thorsten Jolitz
@ 2014-06-09 4:15 ` Nick Dokos
2014-06-09 21:25 ` Grant Rettke
2 siblings, 1 reply; 9+ messages in thread
From: Nick Dokos @ 2014-06-09 4:15 UTC (permalink / raw)
To: emacs-orgmode
Grant Rettke <gcr@wisdomandwonder.com> writes:
> Hi,
>
> When I type
>
> <s TAB
>
> it is expanded into
>
> #+BEGIN_SRC
>
> #+END_SRC
>
> Is supposed to expand into upper case letters?
>
> For some reason, my system won't tangle blocks that are all upper
> case, instead only all lower case is tangled.
>
All the discussion has been about changing the expansion to lower case,
but that misses the point: why does tangling not work? AFAIK, things
are supposed to work whether or not source blocks are demarcated with
upper-, lower-, or mixed-case. So if it's not working for you, it's
either a bug or it's some problem in your setup. Can you please post
a minimal example so we can try it out and determine whether it is a
bug?
Thanks,
--
Nick
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is <s TAB supposed to expand into upper case #+BEGIN_SRC?
2014-06-09 4:15 ` Nick Dokos
@ 2014-06-09 21:25 ` Grant Rettke
0 siblings, 0 replies; 9+ messages in thread
From: Grant Rettke @ 2014-06-09 21:25 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode@gnu.org
Understood. Thanks Nick.
Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson
On Sun, Jun 8, 2014 at 11:15 PM, Nick Dokos <ndokos@gmail.com> wrote:
> Grant Rettke <gcr@wisdomandwonder.com> writes:
>
>> Hi,
>>
>> When I type
>>
>> <s TAB
>>
>> it is expanded into
>>
>> #+BEGIN_SRC
>>
>> #+END_SRC
>>
>> Is supposed to expand into upper case letters?
>>
>> For some reason, my system won't tangle blocks that are all upper
>> case, instead only all lower case is tangled.
>>
>
> All the discussion has been about changing the expansion to lower case,
> but that misses the point: why does tangling not work? AFAIK, things
> are supposed to work whether or not source blocks are demarcated with
> upper-, lower-, or mixed-case. So if it's not working for you, it's
> either a bug or it's some problem in your setup. Can you please post
> a minimal example so we can try it out and determine whether it is a
> bug?
>
>
> Thanks,
> --
> Nick
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-06-09 21:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-07 19:55 Is <s TAB supposed to expand into upper case #+BEGIN_SRC? Grant Rettke
2014-06-07 20:37 ` Thorsten Jolitz
2014-06-07 20:39 ` Thorsten Jolitz
2014-06-07 21:44 ` Grant Rettke
2014-06-08 20:04 ` Grant Rettke
2014-06-08 21:29 ` Thorsten Jolitz
2014-06-09 0:05 ` Grant Rettke
2014-06-09 4:15 ` Nick Dokos
2014-06-09 21:25 ` Grant Rettke
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).