Make C-c ' edit even more things around point.
This commit is contained in:
parent
f9fa54fcf4
commit
cd16b87216
|
@ -10,39 +10,6 @@
|
||||||
#+LINK_UP: index.html
|
#+LINK_UP: index.html
|
||||||
#+LINK_HOME: http://orgmode.org
|
#+LINK_HOME: http://orgmode.org
|
||||||
|
|
||||||
* Version 6.05
|
|
||||||
|
|
||||||
** Details
|
|
||||||
*** Source code example editing expanded.
|
|
||||||
|
|
||||||
The editing of source code in the proper major mode has been
|
|
||||||
expanded. It works now inside all kinds of constructs, for
|
|
||||||
example
|
|
||||||
|
|
||||||
#+begin_src org
|
|
||||||
,#+HTML: this code can be edited in html-mode
|
|
||||||
|
|
||||||
,#+BEGIN_HTML
|
|
||||||
,Same here
|
|
||||||
,#+BEGIN_HTML
|
|
||||||
|
|
||||||
,#+LaTeX: this code can be edited in latex-mode
|
|
||||||
|
|
||||||
,#+BEGIN_LaTeX
|
|
||||||
,Same here
|
|
||||||
,#+BEGIN_LaTeX
|
|
||||||
|
|
||||||
,#+BEGIN_SRC fortran
|
|
||||||
,Here we can edit in fortran-mode
|
|
||||||
,#+END_SRC
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
In addition to that, the syntax that is used by Emacs Muse (<src>
|
|
||||||
or <example> tags, even <literal> and <lisp>) works as well - in
|
|
||||||
fact, I think you can call `org-edit-src-code' directly from
|
|
||||||
Muse. Hey, if you guys bind it to "C-c '" in Muse mode as well,
|
|
||||||
this could be a nice convergence.
|
|
||||||
|
|
||||||
* Version 6.04
|
* Version 6.04
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:VISIBILITY: content
|
:VISIBILITY: content
|
||||||
|
@ -111,6 +78,27 @@ editing by pressing "C-c '" again. This is important, because
|
||||||
lines that have syntactic meaning in Org will be quoted by
|
lines that have syntactic meaning in Org will be quoted by
|
||||||
calling this command.
|
calling this command.
|
||||||
|
|
||||||
|
"C-c '" also edits include files, the setupfile in a =#+setufile=
|
||||||
|
line, and all those little foreign snippets like:
|
||||||
|
|
||||||
|
#+begin_src org
|
||||||
|
,#+HTML: this code can be edited in html-mode
|
||||||
|
|
||||||
|
,#+BEGIN_HTML
|
||||||
|
,Same here
|
||||||
|
,#+BEGIN_HTML
|
||||||
|
|
||||||
|
,#+LaTeX: this code can be edited in latex-mode
|
||||||
|
|
||||||
|
,#+BEGIN_LaTeX
|
||||||
|
,Same here
|
||||||
|
,#+BEGIN_LaTeX
|
||||||
|
|
||||||
|
,#+BEGIN_SRC fortran
|
||||||
|
,Here we can edit in fortran-mode
|
||||||
|
,#+END_SRC
|
||||||
|
#+end_src
|
||||||
|
|
||||||
*** iCalendar now defines proper UIDs for entries
|
*** iCalendar now defines proper UIDs for entries
|
||||||
|
|
||||||
This is necessary for synchronization services. The UIDs are
|
This is necessary for synchronization services. The UIDs are
|
||||||
|
|
|
@ -56,6 +56,8 @@
|
||||||
;; the variable `org-eval-interpreters' to add more interpreters like
|
;; the variable `org-eval-interpreters' to add more interpreters like
|
||||||
;; `perl', `python', or the `shell'.
|
;; `perl', `python', or the `shell'.
|
||||||
;;
|
;;
|
||||||
|
;; You can edit the code snippets with "C-c '" (org-edit-src-code).
|
||||||
|
;;
|
||||||
;; Please note that this mechanism is potentially dangerous, because it
|
;; Please note that this mechanism is potentially dangerous, because it
|
||||||
;; executes code that you don't even see. This gives you great power,
|
;; executes code that you don't even see. This gives you great power,
|
||||||
;; but also enough rope to hang yourself. And, it gives your friends
|
;; but also enough rope to hang yourself. And, it gives your friends
|
||||||
|
|
|
@ -6860,6 +6860,12 @@ language for formatting the contents. The markup is optional, if it is not
|
||||||
given, the text will be assumed to be in Org mode format and will be
|
given, the text will be assumed to be in Org mode format and will be
|
||||||
processed normally.
|
processed normally.
|
||||||
|
|
||||||
|
@table @kbd
|
||||||
|
@kindex C-c '
|
||||||
|
@item C-c '
|
||||||
|
Visit the include file at point.
|
||||||
|
@end table
|
||||||
|
|
||||||
@node Tables exported, Footnotes, Include files, Markup rules
|
@node Tables exported, Footnotes, Include files, Markup rules
|
||||||
@subheading Tables
|
@subheading Tables
|
||||||
@cindex tables, markup rules
|
@cindex tables, markup rules
|
||||||
|
@ -8014,7 +8020,8 @@ entirely ignored. Only when the buffer is parsed for option-setting lines
|
||||||
(i.e. when starting Org mode for a file, when pressing @kbd{C-c C-c} in a
|
(i.e. when starting Org mode for a file, when pressing @kbd{C-c C-c} in a
|
||||||
settings line, or when exporting), then the contents of this file are parsed
|
settings line, or when exporting), then the contents of this file are parsed
|
||||||
as if they had been included in the buffer. In particlar, the file can be
|
as if they had been included in the buffer. In particlar, the file can be
|
||||||
any other Org mode file with internal setup.
|
any other Org mode file with internal setup. You can visit the file the
|
||||||
|
cursor is in the line with @kbd{C-c '}.
|
||||||
@item #+STARTUP:
|
@item #+STARTUP:
|
||||||
This line sets options to be used at startup of Org mode, when an
|
This line sets options to be used at startup of Org mode, when an
|
||||||
Org file is being visited. The first set of options deals with the
|
Org file is being visited. The first set of options deals with the
|
||||||
|
|
|
@ -454,7 +454,7 @@ formula, \kbd{:=} a field formula.
|
||||||
\key{jump back to last followed link(s)}{C-c \&}
|
\key{jump back to last followed link(s)}{C-c \&}
|
||||||
\key{Find next link}{C-c C-x C-n}
|
\key{Find next link}{C-c C-x C-n}
|
||||||
\key{Find previous link}{C-c C-x C-p}
|
\key{Find previous link}{C-c C-x C-p}
|
||||||
|
\key{Edit code snippet of file at point}{C-c '}
|
||||||
{\bf Internal Links}
|
{\bf Internal Links}
|
||||||
|
|
||||||
\key{\kbd{<<My Target>>}}{\rm target}
|
\key{\kbd{<<My Target>>}}{\rm target}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2008-05-27 Carsten Dominik <dominik@science.uva.nl>
|
||||||
|
|
||||||
|
* org-exp.el (org-export-html-style): Changed the size of in the
|
||||||
|
<pre> element to 90%.
|
||||||
|
|
||||||
2008-05-26 Carsten Dominik <dominik@science.uva.nl>
|
2008-05-26 Carsten Dominik <dominik@science.uva.nl>
|
||||||
|
|
||||||
* org.el (org-find-src-example-start): Function removed.
|
* org.el (org-find-src-example-start): Function removed.
|
||||||
|
|
|
@ -464,6 +464,7 @@ Org-mode file."
|
||||||
background-color: #F3F5F7;
|
background-color: #F3F5F7;
|
||||||
padding: 5pt;
|
padding: 5pt;
|
||||||
font-family: courier, monospace;
|
font-family: courier, monospace;
|
||||||
|
font-size: 90%;
|
||||||
}
|
}
|
||||||
table { border-collapse: collapse; }
|
table { border-collapse: collapse; }
|
||||||
td, th {
|
td, th {
|
||||||
|
@ -1359,7 +1360,7 @@ on this string to produce the exported version."
|
||||||
(while (re-search-forward "^#\\+BEGIN_EXAMPLE[ \t]*\n" nil t)
|
(while (re-search-forward "^#\\+BEGIN_EXAMPLE[ \t]*\n" nil t)
|
||||||
(goto-char (match-end 0))
|
(goto-char (match-end 0))
|
||||||
(while (not (looking-at "#\\+END_EXAMPLE"))
|
(while (not (looking-at "#\\+END_EXAMPLE"))
|
||||||
(insert ": ")
|
(insert ": ")
|
||||||
(beginning-of-line 2)))
|
(beginning-of-line 2)))
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward "^[ \t]*:.*\\(\n[ \t]*:.*\\)*" nil t)
|
(while (re-search-forward "^[ \t]*:.*\\(\n[ \t]*:.*\\)*" nil t)
|
||||||
|
@ -1755,6 +1756,9 @@ backends, it converts the segment into an EXAMPLE segment."
|
||||||
(concat "#+BEGIN_HTML\n" htmltext "\n#+END_HTML\n"))))
|
(concat "#+BEGIN_HTML\n" htmltext "\n#+END_HTML\n"))))
|
||||||
(t
|
(t
|
||||||
;; This is not HTML, so just make it an example.
|
;; This is not HTML, so just make it an example.
|
||||||
|
(when (equal lang "org")
|
||||||
|
(while (string-match "^," code)
|
||||||
|
(setq code (replace-match "" t t code))))
|
||||||
(concat "#+BEGIN_EXAMPLE\n" code
|
(concat "#+BEGIN_EXAMPLE\n" code
|
||||||
(if (string-match "\n\\'" code) "" "\n")
|
(if (string-match "\n\\'" code) "" "\n")
|
||||||
"#+END_EXAMPLE\n")))))
|
"#+END_EXAMPLE\n")))))
|
||||||
|
|
19
lisp/org.el
19
lisp/org.el
|
@ -12710,14 +12710,19 @@ See the individual commands for more information."
|
||||||
(defun org-edit-special ()
|
(defun org-edit-special ()
|
||||||
"Call a special editor for the stuff at point.
|
"Call a special editor for the stuff at point.
|
||||||
When at a table, call the formula editor with `org-table-edit-formulas'.
|
When at a table, call the formula editor with `org-table-edit-formulas'.
|
||||||
When at the first line of an src example, call `org-edit-src-code'."
|
When at the first line of an src example, call `org-edit-src-code'.
|
||||||
|
When in an #+include line, visit the include file. Otherwise call
|
||||||
|
`ffap' to visit the file at point."
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (org-at-table-p)
|
(cond
|
||||||
(call-interactively 'org-table-edit-formulas)
|
((org-at-table-p)
|
||||||
(or (org-edit-src-code)
|
(call-interactively 'org-table-edit-formulas))
|
||||||
(error "%s"
|
((save-excursion
|
||||||
(substitute-command-keys
|
(beginning-of-line 1)
|
||||||
"\\[org-edit-special] can do nothing useful here.")))))
|
(looking-at "\\(?:#\\+\\(?:setupfile\\|include\\):?[ \t]+\"?\\|[ \t]*<include\\>.*?file=\"\\)\\([^\"\n>]+\\)"))
|
||||||
|
(find-file (org-trim (match-string 1))))
|
||||||
|
((org-edit-src-code))
|
||||||
|
(t (call-interactively 'ffap))))
|
||||||
|
|
||||||
(defun org-ctrl-c-ctrl-c (&optional arg)
|
(defun org-ctrl-c-ctrl-c (&optional arg)
|
||||||
"Set tags in headline, or update according to changed information at point.
|
"Set tags in headline, or update according to changed information at point.
|
||||||
|
|
Loading…
Reference in New Issue