0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-23 04:10:43 +00:00
Commit graph

3099 commits

Author SHA1 Message Date
Carsten Dominik 42ea7d35b7 No longer define comments in the syntax table
* lisp/org.el (org-mode): Set `comment-start' instead of changing the
syntax of the `#' character.

Leo writes:

> Setting a comment starter without a corresponding comment ender is
> problematic and the # creeps in mysteriously under auto-fill. For
> example, in my current running emacs, this happens almost certainly in
> all org files that has # in their header. The only (temporary) solution
> seems to reboot emacs (which is painful and disruptive).
>
> If you try eval (forward-comment 1) at the beginning of an org file that
> has some "#+..." it will move to the end of file (the whole file is
> regarded as one single comment). So when auto-fill a long text, it will
> find the common prefix to be #.
>
> In addition, I don't think org mode has clear comment syntax or ideas on
> what to do with it.
>
> I can't see any gain from (modify-syntax-entry ?# "<") so I am proposing
> removing it entirely and get rid of this mysterious and annoying bug
> once and for all.
>
> The attached patch may (though I think it is quite safe) cause some bugs
> but those will be fixable unlike the one mentioned above.
>
> Best wishes,
>
> Leo
2010-06-18 09:10:44 +02:00
Carsten Dominik c201da51b8 Fix source code example bug with plain list export to HTML
* lisp/org-exp.el (org-export-format-source-code-or-example): Mark examples
by a property. o
* lisp/org-html.el (org-export-html-close-lists-maybe): Check if raw
HTML stuff was actually made from an example

Daniel Mahler writes:

> 2. I would like to embed source blocks in numbered lists, without
> breaking the numbering ie:
>
>    1) get ready
>     #+BEGIN_SRC sh
>    get_ready
>     #+END_SRC
>    2) go
>     #+BEGIN_SRC sh
>    go
>     #+END_SRC
>
>    currently the src blocks cause the numbering to reset, so all
> items in a sequence like this are numbered 1

This patch fixes this issue - but I cannot say anymore why the code in
org-export-html-close-lists-maybe does in fact work.  The code looks
wrong, but it seems to work.  What looks wrong is that i does not
check for the true indentation in the case when the line is not
protected.  It must be that this case is covered by some other code
further down in the exporter.
2010-06-18 08:49:25 +02:00
Eric Schulte 0d1aaf735f babel: declaring variable to satisfy compiler 2010-06-17 18:15:36 -07:00
Eric Schulte ffbeb7ffe6 babel: languages adding their extensions to `'org-babel-tangle-lang-exts' 2010-06-17 18:15:35 -07:00
Eric Schulte 752a59c58f babel: ensure no whitespace in language names
* lisp/babel/ob.el (org-babel-src-block-regexp):
  ensure no whitespace in language names

  (org-babel-inline-src-block-regexp):
  ensure no whitespace in language names
2010-06-17 18:15:35 -07:00
Eric Schulte 97ead27f78 babel: remove all language file reference to define language variables 2010-06-17 18:15:35 -07:00
Eric Schulte 9ae48928ca babel: removed ob-interpreters variable -- more natural evaluation decisions
Babel will now try to evaluate any source code block for which the
  required language-specific functions are defined.
2010-06-17 18:15:35 -07:00
Eric Schulte c981f6d697 babel: simplifying handling of tangle langs
- Removed the org-babel-tangle-langs variable.
  - Added the org-babel-tangle-lang-exts alist for associating
    languages with file extensions
  - Comments now only added when the :comments header argument is set
    to yes

* lisp/babel/ob-tangle.el (org-babel-tangle-w-comments):
  this is now a defcustom

  (org-babel-tangle-lang-exts): alist associating languages with file
  extension, this is also a defcustom

  (org-babel-spec-to-string): no longer using the complex tangle-lang
  variables
2010-06-17 18:15:35 -07:00
Eric Schulte 4482058c0c babel: some final compiler tweaks -- no more compiler warnings 2010-06-17 18:15:35 -07:00
Eric Schulte 32c985ffd9 babel: more compiler cleanup -- now only throwing 1 warning (which doesn't make sense anyways) 2010-06-17 18:15:35 -07:00
Eric Schulte a86734f526 babel: eliminated compiler warning about `org-babel-get-src-block-info' 2010-06-17 18:15:35 -07:00
Eric Schulte 5769cccd6a babel: ob-sqlite now handles column names
* lisp/babel/langs/ob-sqlite.el (org-babel-execute:sqlite):
  now handling column names

  (org-babel-sqlite-offset-colnames): now handling column names
2010-06-17 18:15:34 -07:00
Eric Schulte 7513cdb12a ob-sqlite.el -- sqlite3 support to org-babel
* lisp/babel/langs/ob-sqlite.el: sqlite3 support for org-babel
2010-06-17 18:15:34 -07:00
Eric Schulte b329b7a736 babel: uniform declare-function placement at the tops of files 2010-06-17 18:15:34 -07:00
Eric Schulte e853f11899 ob-sh: adding check of existence for session variable 2010-06-17 18:15:34 -07:00
Eric Schulte 292799681e babel: pre-setting variable for compiler
* lisp/babel/ob.el (call-process-region): declaring
  call-process-region as a variable so that we can set it's value
  later
2010-06-17 18:15:34 -07:00
Eric Schulte df5f954c79 babel: swapping function order to appease the compiler
* lisp/babel/ob-tangle.el (org-babel-spec-to-string): swap flet and
  let order to make compiler happy
2010-06-17 18:15:34 -07:00
Eric Schulte 0751f2ebfa fixes 2010-06-17 18:15:34 -07:00
Eric Schulte 892292c2d9 better initialization for call-process-region 2010-06-17 18:15:33 -07:00
Eric Schulte ca3f3baca6 remember the ob-comint-with-output is a macro 2010-06-17 18:15:33 -07:00
Eric Schulte 116d9cfa85 ob: adding ob-init.el to load everything 2010-06-17 18:15:33 -07:00
Eric Schulte b746686dfe ob-sh: should say declare-function not defun-function 2010-06-17 18:15:33 -07:00
Eric Schulte 0e939a7df5 babel: more compiler satisfaction 2010-06-17 18:15:33 -07:00
Eric Schulte b9a8df9d1c babel: defvar'ing `org-babel-library-of-babel' for compiler 2010-06-17 18:15:33 -07:00
Eric Schulte 0dabebc444 babel: eval-when-compile for 'cl in more babel files 2010-06-17 18:15:33 -07:00
Eric Schulte 6fa2ab7eac babel: replacing functions like "fifth" with "nth 4" 2010-06-17 18:15:33 -07:00
Eric Schulte defa2dcb2f babel: declaring functions and variables for the compiler 2010-06-17 18:15:33 -07:00
Eric Schulte 75a82240c6 babel: correct function name in reference resolution
* lisp/babel/ob-ref.el (org-babel-ref-resolve-reference): correcting
  mis-named function org-babel-read-file to org-babel-read-link
2010-06-17 18:15:33 -07:00
Eric Schulte 49e90002dc babel: define variables before their first use
* lisp/babel/ob.el (org-babel-interpreters): define this before it is
  first used

* lisp/babel/ob.el (org-babel-call-process-region-original): define
  this before it is first used
2010-06-17 18:15:33 -07:00
Eric Schulte 2dc30adf15 babel: call-process-region-original is no longer a free variable
* lisp/babel/ob.el (org-babel-execute-src-block):
  call-process-region-original is no longer free

  (org-babel-org-babel-call-process-region-original):
  call-process-region-original is no longer free and is now renamed
  org-babel-call-process-region-original
  (org-babel-tramp-handle-call-process-region):
  call-process-region-original is no longer free
2010-06-17 18:15:32 -07:00
Eric Schulte ea8565e2ed babel: replaced save-excursion' with with-current-buffer'
* lisp/babel/ob.el (org-babel-expand-noweb-references):
  `save-excursion' is not longer defeated by `set-buffer'
2010-06-17 18:15:32 -07:00
Eric Schulte e0b71bf8e2 babel: wrapping free language variable in result insertion code
* lisp/babel/ob.el (org-babel-execute-src-block): now passing
  additional optional argument to `org-babel-inert-results'

  (org-babel-insert-result): now accepting additional language
  variable
2010-06-17 18:15:32 -07:00
Eric Schulte 45841a8a9d babel: ensure org-babel-interpreters' is defined before org-babel-add-interpreter'
* lisp/babel/ob.el: ensure `org-babel-interpreters' is defined before `org-babel-add-interpreter'
2010-06-17 18:15:32 -07:00
Eric Schulte 6be47552ea babel: org-babel-comint-with-output' no longer assumes full-body' variable
* lisp/babel/ob-comint.el (org-babel-comint-with-output):
  Fixed egregious oversight in which we were assuming that the
  `full-body' variable would be in scope at the time of macro
  execution.  Thanks to the compiler for finding this bug.

* lisp/babel/langs/ob-R.el (org-babel-R-evaluate): now using the fixed
  `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-haskell.el (org-babel-execute:haskell): now
  using the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-ocaml.el (org-babel-execute:ocaml): now using
  the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-octave.el (org-babel-octave-evaluate-session):
  now using the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-python.el (org-babel-python-evaluate): now using
  the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-ruby.el (org-babel-ruby-evaluate): now using the
  fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-sh.el (org-babel-sh-evaluate): now using the
  fixed `org-babel-comint-with-output' macro
2010-06-17 18:15:32 -07:00
Eric Schulte 8e0faf35de ensuring the existence of a complete first sentence in the documentation of each babel function 2010-06-17 18:15:32 -07:00
Eric Schulte 0738893160 updating require and provide boilerplate for new ob* files 2010-06-17 18:15:32 -07:00
Eric Schulte 904bdaff9a ob.el now adds the lisp/langs/ directory to the load path 2010-06-17 18:15:32 -07:00
Eric Schulte 96e396ba77 new header for ob.el 2010-06-17 18:15:32 -07:00
Eric Schulte e0e4d76094 renaming all org-babel* function to ob* to conform with Emacs conventions 2010-06-17 18:15:32 -07:00
Eric Schulte 04152d3a06 moving org-babel into the main org-mode lisp directory
we are keeping two things in the contrib directory

  1) the library-of-babel.org file, this is with the goal of lowering
     the barrier of entry for contribution of functions to the library
     of babel

  2) we are also keeping a langs directory in the contrib directory
     because some language files do not have FSF copyright assignment
     -- current org-babel-oz.el is the only such file
2010-06-17 18:15:32 -07:00
Christian Egli d75f20ffc2 Newer Emacsen changed the API of start-process-shell-command and issue
a warning if called with more than 3 args.
2010-06-17 17:50:24 -04:00
Eric Schulte 18810580f5 removed 'cl functions from org-exp.el to assuage elisp compiler 2010-06-17 10:27:58 -07:00
Bastien Guerry 47996c02cb Fix and improve list exporting to latex.
* lisp/org-latex.el: items are no longer skipped when their first line
  ends on a protected element.
* lisp/org-list.el: protected environments looking like lists are not
  exported anymore.

Thanks to Nicolas Goaziou <n.goaziou@gmail.com> for this patch.
2010-06-16 21:26:49 +02:00
Eric Schulte f6e4790099 org-exp-blocks: cleanup trailing newline after block
* lisp/org-exp-blocks.el (org-export-blocks-preprocess):
  cleanup trailing newline after block
2010-06-16 10:23:39 -07:00
Bastien Guerry 8ac7e4800c Fix comments export in latex.
* lisp/org-exp.el: comment regexp now matches documentation. No more
protection check when deleting comments before export.

Thanks to Nicolas Goaziou <n.goaziou@gmail.com> for this patch.
2010-06-16 18:14:28 +02:00
Bastien Guerry 5633f7084a org-exp: now recursively resolve #+INCLUDE: files in a safe way
* lisp/org-exp.el (org-export-preprocess-string):
  now using `org-export-handle-include-files-recurse' to resolve
  included files

  (org-export-handle-include-files): now returns a list of the
  included files

  (org-export-handle-include-files-recurse): recursively calls
  `org-export-handle-include-files' while checking to see if the
  process has entered an infinite loop.

Thanks to Eric Schulte for this patch.
2010-06-16 18:13:13 +02:00
Bastien Guerry cdee45fa21 org.el (org-display-inline-images): allow more characters for image filenames.
Thanks to gregory@dynapse.com (Gregory J. Grubbs) for this patch.
2010-06-16 16:27:17 +02:00
Bastien Guerry 14b689946d * lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled):
* lisp/org.el (org-time-string-to-seconds):
For deadline and scheduled agenda display ignore the cyclic repeater
when calculating how many days late the task is.  If you have a weekly
task and miss the date the agenda view will show more than a week late
now instead of resetting on the cyclic repeating date.  This makes it
much more obvious when you missed a repeating task after the repeater.

Thanks to Bernt Hansen for this patch.
2010-06-16 16:12:31 +02:00
Bastien Guerry 359a6bd8be * org-exp.el (org-export-mark-blockquote-verse-center):
Consider environments that end at eob.

Thanks to David Maus for this patch.
2010-06-16 16:08:23 +02:00
Mikael Fornius 8759a77a39 Do not fontify subscripts of property keys.
* org.el (org-raise-scripts): Do not fontify sub/superscripts of text
with face `org-special-keyword'. Makes property keys as :LAST_REPEAT:
display correctly.
2010-06-16 02:17:06 -04:00
Mikael Fornius 4de326196a Use save-match-data macro instead of let.
* org.el (org-at-property-p): Use save-match-data macro instead of let.
2010-06-16 02:17:06 -04:00
Mikael Fornius 2560f72c33 Removed unused test function.
* org.el (test): Removed unused test function.
2010-06-16 02:17:06 -04:00
Sebastian Rose 2700ec42c7 possible Bug: non-interactive publishing (emacs 22.1)
This patch fixes batch-mode publishing. Tested in emacs24 like this:

   sh$   emacs -q -batch --eval='(org-publish "PROJECT_NAME" t)'
2010-06-16 02:17:05 -04:00
Martin Pohlack d18653505d Add modification hook for inline images
This patch adds a modification hook to remove inline-image overlays if
the underlying text is modified.  This prevents blind editing of text
behind images.
2010-06-16 02:17:05 -04:00
Eric Schulte e55c7d8b44 org-exp-blocks: fixed typo
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): fixed typo
2010-06-15 16:20:17 -07:00
Eric Schulte 67e16095f4 org-exp-blocks: now running the previously unhooked org-export-blocks-postblock-hook
* lisp/org-exp-blocks.el (org-export-blocks-postblock-hook): adding
  documentation to and turning into a defcustom

  (org-export-blocks-preprocess): actually running the
  `org-export-blocks-postblock-hook' hook after preprocessing
2010-06-15 15:54:52 -07:00
Eric Schulte e9b132d8ba fixed #+include file bug when :prefix was nil but :prefix1 was set
* lisp/org-exp.el (org-get-file-contents): by un-setting prefix1 to ""
  instead of to nil we avoid errors when :prefix1 is defined, but
  prefix is not.
2010-06-13 14:27:49 -07:00
Nicolas Goaziou 33445118cf org-latex.el : do not protect environments already protected.
Environments coming from latex backend specific instructions (#+LaTeX)
are already protected and won't be treated as normal environments.

* lisp/org-latex.el (org-export-latex-preprocess): Environments coming
  from latex backend specific instructions (#+LaTeX) are already
  protected and won't be treated as normal environments.
2010-06-13 09:20:09 -07:00
Eric Schulte d3b7952159 Fix typo in documentation
thanks to Puneeth Chaganti for the patch
2010-06-12 10:46:12 -07:00
Christian Egli 373199319a Merge branch 'master' into taskjuggler-export 2010-06-08 15:22:04 +02:00
Christian Egli e1de4db669 Avoid compiler warnings about reference to free variable `old-level' 2010-06-08 15:13:50 +02:00
Carsten Dominik deef19a786 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/ChangeLog
2010-06-08 12:05:52 +02:00
Bastien Guerry a85cb37d47 * org-timer.el (org-timer-set-timer): Fix typo in the docstring. 2010-06-08 09:35:07 +02:00
Christian Egli 8b7fd7d8ae Added taskjuggler export to the export dispatcher 2010-06-08 09:20:34 +02:00
Christian Egli 421423f0c2 Add a TODO about supporting SCHEDULED and DEADLINE information 2010-06-08 09:20:34 +02:00
Christian Egli c012637555 Add some documentation. 2010-06-08 09:20:33 +02:00
Christian Egli 68068aa661 Do not use the ID property frivolously
use a property named "task_id" instead as we do not search for task
ids across files. For resources use a property named "resource_id" or
only as a fall back the ID property.

Also issue a warning if a dependency cannot be resolved.
2010-06-08 09:20:33 +02:00
Christian Egli 399844ee52 Add more documentation about resource id generation 2010-06-08 09:20:33 +02:00
Christian Egli 5c89333555 Fix a typo 2010-06-08 09:20:33 +02:00
Christian Egli aae9115938 Make export work even if `org-odd-levels-only' is in use 2010-06-08 09:20:33 +02:00
Christian Egli 1a2229d785 Fail more gracefully if no tasks are defined 2010-06-08 09:20:33 +02:00
Christian Egli 97f3465176 Add some documentation about optional attributes for dependencies 2010-06-08 09:20:33 +02:00
Christian Egli d6de24e44b Added support for optional depends attributes 2010-06-08 09:20:33 +02:00
Christian Egli 020731ec2c Layout fixes 2010-06-08 09:20:33 +02:00
Christian Egli 4baa13b981 Add a changelog entry for org-taskjuggler 2010-06-08 09:20:33 +02:00
Christian Egli f6cb86ee5b Improve the documentation 2010-06-08 09:20:33 +02:00
Christian Egli a81d93a355 Do not treat the limits attribute any different than the others
i.e. you have to specify the limits attribute with {} so that
taskjuggler understands it properly. This is for the sake of
consistency.
2010-06-08 09:20:33 +02:00
Christian Egli f8fa4a2b3b Add some TODOs 2010-06-08 09:20:33 +02:00
Christian Egli f2d66428b4 Add usage documentation 2010-06-08 09:20:33 +02:00
Christian Egli d073c313aa Fix a problem with effort calculation based on hh:mm efforts 2010-06-08 09:20:33 +02:00
Christian Egli 3e0ce7b355 Make sure the reports are more flexible by changing the loadunit to shortauto 2010-06-08 09:20:33 +02:00
Christian Egli 1990e40816 Change the default project and resource tag to something that org mode accepts 2010-06-08 09:20:33 +02:00
Christian Egli 79b15d1073 changed some defcustom to contain more sensible values 2010-06-08 09:20:33 +02:00
Christian Egli 8e8bd469db Use a let instead of calculating a value twice. 2010-06-08 09:20:32 +02:00
Christian Egli c1508e9310 Add support for handling of multiple attributes values in the same node
e.g. multiple shift definitions in a resource are now properly
handled.
2010-06-08 09:20:32 +02:00
Christian Egli 24745790a2 Convert org priority properly to taskjuggler priority 2010-06-08 09:20:32 +02:00
Christian Egli 68cb44ccd4 Simplify the calculation of the project end 2010-06-08 09:20:32 +02:00
Christian Egli 96c3c0c194 Fix a bug with project end calculation and refactor attribute insertion
- Attributes are now insetred generically based on an item (resource
  or task) a list of attrbutes
- project end is now solely calculated and no longer inserted in the
  node
2010-06-08 09:20:32 +02:00
Christian Egli 5458afe24b Fix an error with unique id calculation 2010-06-08 09:20:32 +02:00
Christian Egli fd89c73c6a Add support for more resource attributes 2010-06-08 09:20:32 +02:00
Christian Egli 020bb514a4 Integrate org-taskjuggler in the rest of org-mode 2010-06-08 09:20:32 +02:00
Christian Egli 84de8a85f6 Add support for global properties 2010-06-08 09:20:32 +02:00
Christian Egli 3a30bc763b Some small correction from the imperative to a more functional style
after some reading of sicp
2010-06-08 09:20:32 +02:00
Christian Egli aa1a0daac2 Fix a problem with path calculation when the level is lowering 2010-06-08 09:20:32 +02:00
Christian Egli 4e988afcf1 Improve the default resource allocation graph 2010-06-08 09:20:32 +02:00
Christian Egli d01a04a269 Update TODOs to reflect the fact that dependencies are done 2010-06-08 09:20:32 +02:00
Christian Egli d783157907 Slightly change the default reports 2010-06-08 09:20:32 +02:00
Christian Egli 5841a1f469 Add support for explicit dependencies 2010-06-08 09:20:32 +02:00
Christian Egli 8d42317b4c Add more documentation 2010-06-08 09:20:31 +02:00
Christian Egli fcf43d1e94 Add some documentation 2010-06-08 09:20:31 +02:00
Christian Egli fd22a6f4e0 Derive completeness info from TODO state 2010-06-08 09:20:31 +02:00
Christian Egli d437e01372 Add TODO items and fix a problem with unique id assignment 2010-06-08 09:20:31 +02:00
Christian Egli cae01fcbed Map more resource attributes 2010-06-08 09:20:31 +02:00
Christian Egli b3a244baa8 Assign unique ids to resources 2010-06-08 09:20:31 +02:00
Christian Egli d0556719b9 Fix the id generation of a project 2010-06-08 09:20:31 +02:00
Christian Egli e0e433f1d7 Make sure the unique id resolving works 2010-06-08 09:20:31 +02:00
Christian Egli b8e9c4a11b Major overhaul. ORDERED dependencies sort of work 2010-06-08 09:20:31 +02:00
Christian Egli 01d0aab493 Add a command to open the project with TaskJugglerUI 2010-06-08 09:20:31 +02:00
Christian Egli 0b0ada4beb Add support for inserting and defining reports 2010-06-08 09:20:31 +02:00
Christian Egli 2b906dcfd7 Use cl function to increment a variable 2010-06-08 09:20:31 +02:00
Christian Egli 91246da189 Use the first resource for default allocations 2010-06-08 09:20:31 +02:00
Christian Egli 21b1713c64 Added an exporter to produce taskjuggler files 2010-06-08 09:20:31 +02:00
Eric Schulte cdc70ed68d color indented babel strings -- srcname, source, results, result, and call 2010-06-07 18:10:47 -07:00
Carsten Dominik b27c1c5113 Fix whitespace problems 2010-06-07 08:35:10 +02:00
Carsten Dominik 0d0dc0acb4 Do not format sub- and superscripts in links
* lisp/org.el (org-raise-scripts): Do not act in links.

Matt Lundin writes:

> Git commit 70d24c5d03 causes underscores
> in hyperlinks to display parts of link and description as subscripts.
> E.g., this link...
>
> [[http://www.samplepage.com/an_underscore][Some description words]]
>
> ...displays the word "Some" in the description as a subscript. With M-x
> visible-mode, the substring "underscore][Some" is displayed as a
> subscript.
2010-06-07 05:54:41 +02:00
Carsten Dominik 79b8411669 Fix bug with protected examples that look like table lines
* lisp/org-exp.el (org-export-remove-special-table-lines): Only fix table
lines that are not protected text.

Giovanni Moretti writes:

> I'm working up a presentation on orgmode for a local club and needed
> to prefix it with a brief emacs overview, and so included this:
>
> #+BEGIN_EXAMPLE
>                      ctrl-P (previous line)
>                           |
>                           |
> Ctrl-A <<<  Ctrl-B <---- o ----> Ctrl-F >>>  Ctrl-E
> Col 1      back char      !       fwd char        EOL
>                           !
>                      ctrl-N (next line)
> #+END_EXAMPLE
>
> :                       ctrl-P (previous line)
> :                            |
> :                            |
> : Ctrl-A <<<  Ctrl-B <---- o ----> Ctrl-F >>>  Ctrl-E
> : Col 1       back char      |       fwd char        EOL
> :                            |
> :                       ctrl-N (next line)
>
> I'm using Orgmode v6.36c and when exporting to HTML (and LaTex
> Beamer), the two lines containing the single vertical bar immediately
> below the "ctrl-P" line in the #+EXAMPLE block vanish, whereas using
> the alternate colon at the beginning of the line notation, the
> rendering is as expected.
>
> Interestingly, enabling the +n option (#+BEGIN_EXAMPLE +n) causes the
> missing lines (lines 2 & 3) to reappear.
2010-06-07 05:53:12 +02:00
Carsten Dominik 28babd4dff Better recognizing of source code snippets
* lisp/org.el (org-edit-special): Make sure source code editing goes
before table formula editing.
* lisp/org-table.el (org-table-fedit-map): "C-c '" will now also exit
the formula editor.
2010-06-06 12:51:27 +02:00
Dan Davison cab9fefbf9 Read-only src buffers
Carsten Dominik <dominik@uva.nl> writes:

> Hi Dan,
>
> after a long time, I tried to edit a fixed width region today.
> So I entered
>
>  : a
>  : b
>  : c
>
> and pressed "C-c '" in there.  The edit buffer came up in
> read-only mode, which should not be so.
>
> Also, when I do "C-c '" in an empty line, it used to be the case
> that I get an empty artist buffer which I can then edit.  Also this
> buffer comes up as read-only.
>
> I suspect that this has to do with the changes you made for read-only
> view buffers.  Before I dive into this issue myself, maybe it will be
> much
> easier if you do this?

Hi Carsten,

You're right that it dates from then. Here's the fix I suggest. I've
tested that this results in writable fixed-width edit buffers, writable
src edit buffers, and non-writable babel preview buffers.

Dan

--8<---------------cut here---------------start------------->8---
commit ed4eb9d150
Author: Dan Davison <davison@stats.ox.ac.uk>
Date:   Sat Jun 5 12:35:19 2010 +0100

    * lisp/org-src.el: Prevent fixed-width region edit buffers
    being created as read-only.

	Modified lisp/org-src.el
2010-06-05 14:31:35 +02:00
Carsten Dominik f70956ff5a Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-04 21:02:41 +02:00
Bernt Hansen dc602f3b2e Emacs 22 support - use org-string-match-p
* contrib/lisp/org-special-blocks.el (org-special-blocks-make-special-cookies):
Emacs 22 doesn't have string-match-p
* lisp/org-freemind.el (org-freemind-write-mm-buffer):
(org-freemind-get-node-style):
Emacs 22 doesn't have string-match-p
* lisp/org-html.el (org-html-make-link):
Use new org-string-match-p for compatibility
2010-06-04 21:01:29 +02:00
Eric Schulte c2c3e98004 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-04 07:31:58 -06:00
Carsten Dominik add40f96f1 Stop iCalendar export from failing with sexp dates
* lisp/org-icalendar.el (org-ical-ts-to-string): Catch error when
parsing tie string.
2010-06-04 13:13:54 +02:00
Carsten Dominik 1eb974ed62 Fix problem with calendar popping up in a different frame
* lisp/org.el (org-read-date): Bind `calendar-setup' to nil for the
scope of this command.
2010-06-04 12:57:39 +02:00
Carsten Dominik 420dd96768 Fix the date prompt for american-style dates
* lisp/org.el (org-read-date-analyze): Fix regular expression for
matching american dates

Daniel E. Doherty writes:

> In playing around with the date prompt (C-.), I ran across the following
> puzzling behavior from rather simple inputs.
>
> I entered the following on June 1, 2010.  Here is a date entered as
> "3/15": <2011-03-15 Tue>.  It interpreted it as the upcoming March 15 as
> expected.
>
> But here is a date entered as "5/21": <2021-06-05 Sat>.  Note how it
> interpreted the "21" as the year 2021, not at all what I expected from
> the documentation or the analogous "3/15" example.
>
> Maybe there is some underlying logic here that I'm not getting.  Perhaps
> it has to do with how 2-digit years are interpreted?
>
> What's going on here?  I am using org-version 6.36trans on emacs 23.1.

What was going on here is that the regular expression for matching
american-style dates was wrong.  It was looking for month numbers in
the second field and day numbers in the first field - wrong, of
course.
2010-06-04 12:35:41 +02:00
Carsten Dominik 6bad6fc737 Fix some issues in the entity and subscript code
* lisp/org-macs.el (org-rm-props): Add org-emphasis to the properties
that must be removed.
* lisp/org.el (org-do-emphasis-faces): Add org-emphasis property to
items that have emphasis done wit font-lock.
(org-fontify-entities): Do not do anything in commented lines.
(org-unfontify-region): Decompose the region as well, because we do
composition during font-lock.
(org-raise-scripts): Do nothing inside an emphasis string.

Reported by Eric Fraga in http://article.gmane.org/gmane.emacs.orgmode/25940
2010-06-04 08:25:50 +02:00
Carsten Dominik 48dfb47f52 Introduce a help function for entities
* lisp/org-entities.el (org-entities-help): New command.
2010-06-03 18:17:08 +02:00
Carsten Dominik 73f04ce48e Fix clickable images in HTML export
* lisp/org-html.el (org-export-as-html): Add the code to create
clickable images.
2010-06-03 10:27:58 +02:00
Carsten Dominik 0618aeafb3 Make raising and lowering not mess up table alignment
* lisp/org-compat.el (org-string-match-p):
(org-looking-at-p): New functions.
* lisp/org-table.el (org-table-align): Handle raised text with
invisible characters.
* lisp/org.el (org-script-display): Add raise properties for tables.
(org-raise-scripts): Handle raising differently inside tables.

Pretty display of subscripts and superscripts no longer messes up
table alignment.  This is achieved by two things:

1. Inside tables, the raised characters are not made smaller, they
   remains at the same size.  Instead they are raise/lowered more, by
   a full half character height to still be clearly readable as
   subscript or superscript.

2. The invisible characters are taken into account when computing the
   field width.
2010-06-03 10:24:04 +02:00
Carsten Dominik fd1d2992f6 Make it possible to protect hidden subtrees to be killed by `C-k'
* lisp/org.el (org-ctrl-k-protect-subtree): New option.
(org-kill-line): Protect hidden subtrees if the user wants it.
* doc/org.texi (Headlines): Mention the special behavior of C-k
in headlines.

Scott Otterson writes:

> For what must be the dozenth time, I've just accidentally deleted a
> large tree by typing C-k while in a headline.
>
> This is really easy to do because emacs users have "C-k deletes to the
> end of the line" worn deeply into their neural pathways -- it's so
> automatic for me that the keystroke is close to subconscious.  A
> mistaken C-k is especially hard to detect because org-mode displays
> the result exactly like what your subconscious expects, that is, a
> collapsed headline is deleted to the end -- and the tree underneath is
> wiped out with no noticeable warning.
>
> Feature request: add an option preventing tree deletion with C-k
> without user confirmation.  Actually, I'd like an option to prevent it
> period.
>
> If this option is already in there, then you're encouraged to tell me
> to RTFM.  But then also please tell me where it is, because I can't
> find it.

Carsten replies

> This is now possible due to the variable
> `org-ctrl-k-protect-subtree'.  But I predict that you are going to set
> it to nil again soon :D
2010-06-03 00:18:44 +02:00
Carsten Dominik 70d24c5d03 Implement pretty display of sub- and superscripts.
* doc/org.texi (Subscripts and superscripts): Document that `C-c C-x \'
will also format sub and superscripts.
* doc/orgcard.tex: Document that `C-c C-x \'
will also format sub and superscripts.
* lisp/org.el (org-use-sub-superscripts):
(org-pretty-entities-include-sub-superscripts): Move here from
org-exp.el.
(org-set-regexps-and-options): Parse subscript option and set
`org-use-sub-superscripts' as a local variable.
(org-match-sexp-depth):
(org-create-multibrace-regexp):
(org-match-substring-regexp):
(org-match-substring-with-braces-regexp): Moved here from org-exp.el
(org-set-font-lock-defaults): Call `org-raise-scripts'.
(org-remove-font-lock-display-properties): New function.
(org-unfontify-region): Call
`org-remove-font-lock-display-properties'.
(org-script-display): New constant.
(org-raise-scripts): New function.

When turning on entity display with `C-c C-x \', sub- and superscripts
will also be displayed in a smaller font, and raised/lowered.
2010-06-03 00:06:19 +02:00
Eric Schulte c4d385681f make org-show-block-all interactive as is org-hide-block-all 2010-06-02 15:03:53 -06:00
Carsten Dominik 31a9b70dfb Fix indentation 2010-06-02 15:02:36 +02:00
Carsten Dominik 5f23a22959 Fix whitespace issues 2010-06-01 17:16:37 +02:00
Carsten Dominik bc53b3da3b Minor fixes
* lisp/org-latex.el (org-export-latex-fontify): Avoid fontifying
several stars in a row.
* lisp/org.el (org-emphasis-alist): Mention
`org-export-docbook-emphasis-alist' in the docstring.
2010-06-01 09:43:03 +02:00
Carsten Dominik d34786f227 Move a function to org.el
* lisp/org.el (org-find-olp): Move the function here, from org-mobile.el
2010-05-31 18:57:01 +02:00
Carsten Dominik ea3cdc75f8 Improve MobileOrg documentation
* doc/org.texi (MobileOrg): Improve documentation about MobileOrg,
move all webdav server configuration to the FAQ.
2010-05-31 09:14:58 +02:00
Carsten Dominik 27ec3527f2 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-05-30 22:17:40 +02:00
Carsten Dominik b1b066b5f7 Fix some customization issues in org-beamer.el patch by Jan Moringen
* lisp/org-beamer.el (org-beamer-column-view-format):
(org-beamer-themes): Allow nil value, fix customize tags
(org-insert-beamer-options-template): Handle nil values of theme and
column view format.
2010-05-30 22:17:29 +02:00
Tassilo Horn 185625c810 org-gnus.el: Mention also Gmane in org-gnus-prefer-web-links
* org-gnus.el (org-gnus-prefer-web-links): Mention also Gmane
in the doc string.
2010-05-28 15:46:37 -06:00
David Maus 963f830b2e Escape percent character.
* org.el (org-fixup-message-id-for-http): Escape percent
character.
2010-05-28 15:46:32 -06:00
Carsten Dominik a082001643 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-05-28 17:34:12 +02:00
Carsten Dominik e90fe668ac Rename org-beamer-settings-template
* lisp/org-beamer.el (org-insert-beamer-options-template):
Renamed from `org-beamer-settings-template'.
2010-05-28 17:34:01 +02:00
Bastien Guerry 59badeeaaf `org-timer-set-timer': new prefix argument.
Called with a numeric prefix argument, `org-timer-set-timer' uses
this numeric value as the duration of the timer.

Called with a `C-u' prefix argument, use `org-timer-default-timer'
without prompting the user for a duration.

With two `C-u' prefix arguments, use `org-timer-default-timer'
without prompting the user for a duration and automatically
replace any running timer."
2010-05-28 12:38:29 +02:00
Carsten Dominik e7a3e1a223 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-05-28 09:18:37 +02:00
Carsten Dominik 4917ae9362 Fix typo
* lisp/org.el (org-show-context): Fix typo
2010-05-28 08:16:39 +02:00
Carsten Dominik a9a5e6b848 Fix id creation bug when remember is called from agenda
* lisp/org.el (org-store-link): Don't call org-store-link
interactively when called through remember from the agenda

Samuel Wales writes:

> For months, I found ID properties where they didn't belong.
> Finally I found that they are added when I do M-x
> org-remember in an agenda buffer, to the headline under
> point.  Feels like a bug.  [...]
2010-05-28 08:15:49 +02:00
David Maus 5349014e82 org.el: Remove duplicate code in `org-clone-subtree-with-time-shift'.
Operating on the clone (e.g. remove/recreated ID property) is
independent on whether the subtree is cloned with time shift or not.
2010-05-26 22:54:29 -06:00
David Maus a3e5a2f7e4 org-w3m.el: Get text property directly, not using macro `w3m-anchor'. 2010-05-26 22:53:36 -06:00
Sebastian Rose af080027fc file protocol in HTML links
The appended patch removes the protocol part from link URIs, if the
protocol is file. Neccessary, to show images again and make links work.
2010-05-26 22:48:06 -06:00
Tassilo Horn 54d513ee0c org.el (org-agenda-file-p): New predicate function.
The new function `org-agenda-file-p' checks if a given file is an org
agenda file.  Such a function is very useful in hooks, for example if
you want to export agenda files automatically when saving:

(defun th-org-mode-init ()
  ;; Update appointments and export to iCalendar when saving.
  (when (org-agenda-file-p)
    (add-hook 'after-save-hook 'th-org-agenda-to-appt t t)
    (add-hook 'after-save-hook 'org-export-icalendar-this-file t t)))
(add-hook 'org-agenda-mode-hook 'th-org-agenda-mode-init)
2010-05-26 22:46:34 -06:00