diff options
| author | Miles Bader | 2006-06-20 07:35:06 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-06-20 07:35:06 +0000 |
| commit | 7ffefb0856637762050ca248013d2b2f1cf7554e (patch) | |
| tree | aadd0178b0d1f637ea0a8fffce9c7a3fa1cf4dc0 | |
| parent | 47067d3ec0ec1eea6ba561306349576a890cc274 (diff) | |
| parent | 1e0fd4cd530948277283d0fe7b07e00a73fee934 (diff) | |
| download | emacs-7ffefb0856637762050ca248013d2b2f1cf7554e.tar.gz emacs-7ffefb0856637762050ca248013d2b2f1cf7554e.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 314-319)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 107)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-78
| -rw-r--r-- | etc/ChangeLog | 6 | ||||
| -rw-r--r-- | etc/TODO | 2 | ||||
| -rw-r--r-- | etc/orgcard.tex | 161 | ||||
| -rw-r--r-- | lisp/ChangeLog | 95 | ||||
| -rw-r--r-- | lisp/bindings.el | 3 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 4 | ||||
| -rw-r--r-- | lisp/ediff-diff.el | 74 | ||||
| -rw-r--r-- | lisp/ediff-mult.el | 36 | ||||
| -rw-r--r-- | lisp/ediff-vers.el | 26 | ||||
| -rw-r--r-- | lisp/ediff-wind.el | 2 | ||||
| -rw-r--r-- | lisp/ediff.el | 80 | ||||
| -rw-r--r-- | lisp/emulation/viper-cmd.el | 90 | ||||
| -rw-r--r-- | lisp/emulation/viper-util.el | 4 | ||||
| -rw-r--r-- | lisp/emulation/viper.el | 6 | ||||
| -rw-r--r-- | lisp/files.el | 51 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 2 | ||||
| -rw-r--r-- | lisp/international/characters.el | 5 | ||||
| -rw-r--r-- | lisp/mouse.el | 21 | ||||
| -rw-r--r-- | lisp/textmodes/org.el | 694 | ||||
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 2 | ||||
| -rw-r--r-- | lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | lispref/processes.texi | 13 | ||||
| -rw-r--r-- | man/ChangeLog | 20 | ||||
| -rw-r--r-- | man/ediff.texi | 12 | ||||
| -rw-r--r-- | man/faq.texi | 2 | ||||
| -rw-r--r-- | man/info.texi | 9 | ||||
| -rw-r--r-- | man/message.texi | 83 | ||||
| -rw-r--r-- | man/org.texi | 494 | ||||
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/syntax.c | 14 | ||||
| -rw-r--r-- | src/window.c | 87 |
32 files changed, 1369 insertions, 747 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog index 3dc253983fb..b07d428efd9 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-06-19 Carsten Dominik <dominik@science.uva.nl> | ||
| 2 | |||
| 3 | * orgcard.tex (section{Clocking Time}): Add new clocking | ||
| 4 | commands. | ||
| 5 | (section{Structure Editing}): Add global archiving command. | ||
| 6 | |||
| 1 | 2006-06-14 Thien-Thi Nguyen <ttn@gnu.org> | 7 | 2006-06-14 Thien-Thi Nguyen <ttn@gnu.org> |
| 2 | 8 | ||
| 3 | * yow.lines: Delete existing data; add a new entry. | 9 | * yow.lines: Delete existing data; add a new entry. |
| @@ -305,6 +305,8 @@ typically due to pilot errors and should thus be in debug-ignored-errors. | |||
| 305 | 305 | ||
| 306 | ** Check what hooks would help Emacspeak -- see the defadvising in W3. | 306 | ** Check what hooks would help Emacspeak -- see the defadvising in W3. |
| 307 | 307 | ||
| 308 | ** Add definitions for symbol properties, for documentation purposes. | ||
| 309 | |||
| 308 | ** Add horizontal scroll bars. | 310 | ** Add horizontal scroll bars. |
| 309 | 311 | ||
| 310 | ** Provide an optional feature which computes a scroll bar slider's | 312 | ** Provide an optional feature which computes a scroll bar slider's |
diff --git a/etc/orgcard.tex b/etc/orgcard.tex index 646a03b0277..95e810e5ed5 100644 --- a/etc/orgcard.tex +++ b/etc/orgcard.tex | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | % Reference Card for Org Mode | 1 | % Reference Card for Org Mode |
| 2 | \def\orgversionnumber{4.37} | 2 | \def\orgversionnumber{4.38} |
| 3 | \def\year{2006} | 3 | \def\year{2006} |
| 4 | % | 4 | % |
| 5 | %**start of header | 5 | %**start of header |
| @@ -288,10 +288,8 @@ are preserved on all copies. | |||
| 288 | 288 | ||
| 289 | \section{Motion} | 289 | \section{Motion} |
| 290 | 290 | ||
| 291 | \key{next heading}{C-c C-n} | 291 | \key{next/previous heading}{C-c C-n/p} |
| 292 | \key{previous heading}{C-c C-p} | 292 | \key{next/previous heading, same level}{C-c C-f/b} |
| 293 | \key{next heading, same level}{C-c C-f} | ||
| 294 | \key{previous heading, same level}{C-c C-b} | ||
| 295 | \key{backward to higher level heading}{C-c C-u} | 293 | \key{backward to higher level heading}{C-c C-u} |
| 296 | \key{jump to another place in document}{C-c C-j} | 294 | \key{jump to another place in document}{C-c C-j} |
| 297 | \key{previous/next plain list item}{S-UP/DOWN$^3$} | 295 | \key{previous/next plain list item}{S-UP/DOWN$^3$} |
| @@ -306,13 +304,14 @@ are preserved on all copies. | |||
| 306 | \key{promote current subtree up one level}{M-S-LEFT} | 304 | \key{promote current subtree up one level}{M-S-LEFT} |
| 307 | \key{demote current subtree down one level}{M-S-RIGHT} | 305 | \key{demote current subtree down one level}{M-S-RIGHT} |
| 308 | 306 | ||
| 309 | \key{move subtree/list item up}{M-S-UP} | 307 | \key{move subtree/list item up/down}{M-S-UP/DOWN} |
| 310 | \key{move subtree/list item down}{M-S-DOWN} | ||
| 311 | \key{kill subtree}{C-c C-x C-w} | 308 | \key{kill subtree}{C-c C-x C-w} |
| 312 | \key{copy subtree}{C-c C-x M-w} | 309 | \key{copy subtree}{C-c C-x M-w} |
| 313 | \key{yank subtree}{C-c C-x C-y} | 310 | \key{yank subtree}{C-c C-x C-y} |
| 311 | \key{narrow buffer to current subtree}{C-x n s} | ||
| 314 | 312 | ||
| 315 | \key{archive subtree}{C-c \$} | 313 | \key{archive subtree}{C-c \$} |
| 314 | \key{archive all fully done children}{C-u C-c \$} | ||
| 316 | To set archive location for current file, add a line like$^2$: | 315 | To set archive location for current file, add a line like$^2$: |
| 317 | \vskip -1mm | 316 | \vskip -1mm |
| 318 | \beginexample% | 317 | \beginexample% |
| @@ -329,18 +328,13 @@ To set archive location for current file, add a line like$^2$: | |||
| 329 | %\key{agenda for the week}{C-c a$^1$} | 328 | %\key{agenda for the week}{C-c a$^1$} |
| 330 | %\key{agenda for date at cursor}{C-c C-o} | 329 | %\key{agenda for date at cursor}{C-c C-o} |
| 331 | 330 | ||
| 332 | \section{Tags} | 331 | \section{Dynamic Blocks} |
| 333 | 332 | ||
| 334 | \key{set tags for current heading}{C-c C-c} | 333 | \key{update dynamic block at point}{C-c C-x C-u} |
| 335 | \key{realign tags in all headings}{C-u C-c C-c} | 334 | \metax{update all dynamic blocks}{C-u C-c C-x C-u} |
| 336 | \key{create sparse tree with matching tags}{C-c \\} | ||
| 337 | \key{globally (agenda) match tags at cursor}{C-c C-o} | ||
| 338 | 335 | ||
| 339 | \section{Tables} | 336 | \section{Tables} |
| 340 | 337 | ||
| 341 | %Org-mode has its own built-in intuitive table editor with unique | ||
| 342 | %capabilities. | ||
| 343 | |||
| 344 | {\bf Creating a table} | 338 | {\bf Creating a table} |
| 345 | 339 | ||
| 346 | %\metax{insert a new Org-mode table}{M-x org-table-create} | 340 | %\metax{insert a new Org-mode table}{M-x org-table-create} |
| @@ -466,6 +460,39 @@ formula, \kbd{:=} a named-field formula. | |||
| 466 | %\key{\kbd{vm://myself@some.where.org/folder\#id}}{\rm VM remote} | 460 | %\key{\kbd{vm://myself@some.where.org/folder\#id}}{\rm VM remote} |
| 467 | 461 | ||
| 468 | 462 | ||
| 463 | \section{Remember-mode Integration} | ||
| 464 | |||
| 465 | See the manual for how to make remember.el use Org-mode links and | ||
| 466 | files. The note-finishing command \kbd{C-c C-c} will first prompt for | ||
| 467 | an org file. In the file, find a location with: | ||
| 468 | |||
| 469 | \key{rotate subtree visibility}{TAB} | ||
| 470 | \key{next heading}{DOWN} | ||
| 471 | \key{previous heading}{UP} | ||
| 472 | |||
| 473 | Insert the note with one of the following: | ||
| 474 | |||
| 475 | \key{as sublevel of heading at cursor}{RET} | ||
| 476 | \key{right here (cursor not on heading)}{RET} | ||
| 477 | \key{before current heading}{LEFT} | ||
| 478 | \key{after current heading}{RIGHT} | ||
| 479 | \key{shortcut to end of buffer (cursor at buf-start)}{RET} | ||
| 480 | \key{Abort}{q} | ||
| 481 | |||
| 482 | \section{Completion} | ||
| 483 | |||
| 484 | In-buffer completion completes TODO keywords at headline start, TeX | ||
| 485 | macros after ``{\tt \\}'', option keywords after ``{\tt \#-}'', TAGS | ||
| 486 | after ``{\tt :}'', and dictionary words elsewhere. | ||
| 487 | |||
| 488 | \key{Complete word at point}{M-TAB} | ||
| 489 | |||
| 490 | |||
| 491 | \newcolumn | ||
| 492 | \title{Org-Mode Reference Card (2/2)} | ||
| 493 | |||
| 494 | \centerline{(for version \orgversionnumber)} | ||
| 495 | |||
| 469 | \section{TODO Items} | 496 | \section{TODO Items} |
| 470 | 497 | ||
| 471 | \key{rotate the state of the current item}{C-c C-t} | 498 | \key{rotate the state of the current item}{C-c C-t} |
| @@ -480,6 +507,13 @@ formula, \kbd{:=} a named-field formula. | |||
| 480 | \key{\kbd{\#+SEQ_TODO: TODO TRY BLUFF DONE}}{\rm todo workflow} | 507 | \key{\kbd{\#+SEQ_TODO: TODO TRY BLUFF DONE}}{\rm todo workflow} |
| 481 | \key{\kbd{\#+TYP_TODO: Phil home work DONE}}{\rm todo types} | 508 | \key{\kbd{\#+TYP_TODO: Phil home work DONE}}{\rm todo types} |
| 482 | 509 | ||
| 510 | \section{Tags} | ||
| 511 | |||
| 512 | \key{set tags for current heading}{C-c C-c} | ||
| 513 | \key{realign tags in all headings}{C-u C-c C-c} | ||
| 514 | \key{create sparse tree with matching tags}{C-c \\} | ||
| 515 | \key{globally (agenda) match tags at cursor}{C-c C-o} | ||
| 516 | |||
| 483 | \section{Timestamps} | 517 | \section{Timestamps} |
| 484 | 518 | ||
| 485 | \key{prompt for date and insert timestamp}{C-c .} | 519 | \key{prompt for date and insert timestamp}{C-c .} |
| @@ -502,18 +536,15 @@ formula, \kbd{:=} a named-field formula. | |||
| 502 | %\key{... forward/backward one month}{M-S-LEFT/RIGT} | 536 | %\key{... forward/backward one month}{M-S-LEFT/RIGT} |
| 503 | 537 | ||
| 504 | 538 | ||
| 505 | \newcolumn | ||
| 506 | \title{Org-Mode Reference Card (2/2)} | ||
| 507 | |||
| 508 | \centerline{(for version \orgversionnumber)} | ||
| 509 | |||
| 510 | \section{Clocking Time} | 539 | \section{Clocking Time} |
| 511 | 540 | ||
| 512 | \key{start clock on current item}{C-c C-x C-i} | 541 | \key{start clock on current item}{C-c C-x C-i} |
| 513 | \key{stop clock on current item}{C-c C-x C-o} | 542 | \key{stop clock on current item}{C-c C-x C-o} |
| 514 | \key{cancel current clock}{C-c C-x C-x} | 543 | \key{cancel current clock}{C-c C-x C-x} |
| 544 | |||
| 515 | \key{display total subtree times}{C-c C-x C-d} | 545 | \key{display total subtree times}{C-c C-x C-d} |
| 516 | \key{remove displayed times}{C-c C-c} | 546 | \key{remove displayed times}{C-c C-c} |
| 547 | \key{insert/update table with clock report}{C-c C-x C-r} | ||
| 517 | 548 | ||
| 518 | \section{Agenda Views} | 549 | \section{Agenda Views} |
| 519 | 550 | ||
| @@ -577,7 +608,6 @@ To set categories, add lines like$^2$: | |||
| 577 | \key{Stop the clock (clock-out)}{O} | 608 | \key{Stop the clock (clock-out)}{O} |
| 578 | \key{Cancel current clock}{X} | 609 | \key{Cancel current clock}{X} |
| 579 | 610 | ||
| 580 | \newcolumn | ||
| 581 | 611 | ||
| 582 | {\bf Calendar commands} | 612 | {\bf Calendar commands} |
| 583 | 613 | ||
| @@ -593,6 +623,13 @@ To set categories, add lines like$^2$: | |||
| 593 | \key{quit agenda, remove agenda buffer}{q} | 623 | \key{quit agenda, remove agenda buffer}{q} |
| 594 | \key{exit agenda, remove all agenda buffers}{x} | 624 | \key{exit agenda, remove all agenda buffers}{x} |
| 595 | 625 | ||
| 626 | \section{Calendar and Diary Integration} | ||
| 627 | |||
| 628 | To include entries from the Emacs diary in your Org-mode agenda: | ||
| 629 | \beginexample% | ||
| 630 | (setq org-agenda-include-diary t) | ||
| 631 | \endexample | ||
| 632 | |||
| 596 | \section{Exporting and Publishing} | 633 | \section{Exporting and Publishing} |
| 597 | 634 | ||
| 598 | Exporting creates files with extensions {\it .txt\/} and {\it .html\/} | 635 | Exporting creates files with extensions {\it .txt\/} and {\it .html\/} |
| @@ -629,18 +666,19 @@ keywords. {\tt M-TAB} again just after keyword is complete inserts examples. | |||
| 629 | \key{language code for html}{\#+LANGUAGE:} | 666 | \key{language code for html}{\#+LANGUAGE:} |
| 630 | \key{free text description of file}{\#+TEXT:} | 667 | \key{free text description of file}{\#+TEXT:} |
| 631 | \key{... which can carry over multiple lines}{\#+TEXT:} | 668 | \key{... which can carry over multiple lines}{\#+TEXT:} |
| 632 | \key{settings for the export process - see below}{\#+OPTIONS:} | 669 | %\key{settings for the export process - see below}{\#+OPTIONS:} |
| 633 | 670 | \key{settings for the export process}{\#+OPTIONS:} | |
| 634 | \key{set number of headline levels for export}{H:2} | 671 | |
| 635 | \key{turn on/off section numbers}{num:t} | 672 | %\key{set number of headline levels for export}{H:2} |
| 636 | \key{turn on/off table of contents}{toc:t} | 673 | %\key{turn on/off section numbers}{num:t} |
| 637 | \key{turn on/off linebreak preservation}{\\n:nil} | 674 | %\key{turn on/off table of contents}{toc:t} |
| 638 | \key{turn on/off quoted html tags}{@:t} | 675 | %\key{turn on/off linebreak preservation}{\\n:nil} |
| 639 | \key{turn on/off fixed width sections}{::t} | 676 | %\key{turn on/off quoted html tags}{@:t} |
| 640 | \key{turn on/off tables}{|:t} | 677 | %\key{turn on/off fixed width sections}{::t} |
| 641 | \key{turn on/off \TeX\ syntax for sub/super-scripts}{\^{}:t} | 678 | %\key{turn on/off tables}{|:t} |
| 642 | \key{turn on/off emphasised text}{*:nil} | 679 | %\key{turn on/off \TeX\ syntax for sub/super-scripts}{\^{}:t} |
| 643 | \key{turn on/off \TeX\ macros}{TeX:t} | 680 | %\key{turn on/off emphasised text}{*:nil} |
| 681 | %\key{turn on/off \TeX\ macros}{TeX:t} | ||
| 644 | 682 | ||
| 645 | {\bf Comments: Text not being exported} | 683 | {\bf Comments: Text not being exported} |
| 646 | 684 | ||
| @@ -651,53 +689,20 @@ Subtrees whose header starts with COMMENT are never exported. | |||
| 651 | 689 | ||
| 652 | \key{toggle COMMENT keyword on entry}{C-c ;} | 690 | \key{toggle COMMENT keyword on entry}{C-c ;} |
| 653 | 691 | ||
| 654 | \section{Completion} | ||
| 655 | |||
| 656 | In-buffer completion completes TODO keywords at headline start, TeX | ||
| 657 | macros after ``{\tt \\}'', option keywords after ``{\tt \#-}'', TAGS | ||
| 658 | after ``{\tt :}'', and dictionary words elsewhere. | ||
| 659 | |||
| 660 | \key{Complete word at point}{M-TAB} | ||
| 661 | |||
| 662 | \section{Calendar and Diary Integration} | ||
| 663 | |||
| 664 | To include entries from the Emacs diary in your Org-mode agenda: | ||
| 665 | \beginexample% | ||
| 666 | (setq org-agenda-include-diary t) | ||
| 667 | \endexample | ||
| 668 | |||
| 669 | \section{Remember-mode Integration} | ||
| 670 | 692 | ||
| 671 | See the manual for how to make remember.el use Org-mode links and | 693 | %\section{CUA and pc-select compatibility}% |
| 672 | files. The note-finishing command \kbd{C-c C-c} will first prompt for | ||
| 673 | an org file. In the file, find a location with: | ||
| 674 | 694 | ||
| 675 | \key{rotate subtree visibility}{TAB} | 695 | %Configure the variable {\tt org-CUA-compatibility} to make Org-mode |
| 676 | \key{next heading}{DOWN} | 696 | %avoid the \kbd{S-<cursor>} bindings used by these modes. When set, |
| 677 | \key{previous heading}{UP} | 697 | %Org-mode will change the following keybindings (also in the agenda |
| 678 | 698 | %buffer, but not during date selection). See note mark four$^3$ | |
| 679 | Insert the note with one of the following: | 699 | %throughout the reference card. |
| 680 | 700 | %%\vskip-mm | |
| 681 | \key{as sublevel of heading at cursor}{RET} | 701 | %\beginexample |
| 682 | \key{right here (cursor not on heading)}{RET} | 702 | %S-UP $\to$ M-p S-DOWN $\to$ M-n |
| 683 | \key{before current heading}{LEFT} | 703 | %S-LEFT $\to$ M-- S-RIGHT $\to$ M-+ |
| 684 | \key{after current heading}{RIGHT} | 704 | %S-RET $\to$ C-S-RET |
| 685 | \key{shortcut to end of buffer (cursor at buf-start)}{RET} | 705 | %\endexample |
| 686 | \key{Abort}{q} | ||
| 687 | |||
| 688 | \section{CUA and pc-select compatibility} | ||
| 689 | |||
| 690 | Configure the variable {\tt org-CUA-compatibility} to make Org-mode | ||
| 691 | avoid the \kbd{S-<cursor>} bindings used by these modes. When set, | ||
| 692 | Org-mode will change the following keybindings (also in the agenda | ||
| 693 | buffer, but not during date selection). See note mark four$^3$ | ||
| 694 | throughout the reference card. | ||
| 695 | %\vskip-mm | ||
| 696 | \beginexample | ||
| 697 | S-UP $\to$ M-p S-DOWN $\to$ M-n | ||
| 698 | S-LEFT $\to$ M-- S-RIGHT $\to$ M-+ | ||
| 699 | S-RET $\to$ C-S-RET | ||
| 700 | \endexample | ||
| 701 | 706 | ||
| 702 | \section{Notes} | 707 | \section{Notes} |
| 703 | $^1$ This is only a suggestion for a binding of this command. Choose | 708 | $^1$ This is only a suggestion for a binding of this command. Choose |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9666bfa58aa..1869e0a33f7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,98 @@ | |||
| 1 | 2006-06-20 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * international/characters.el (word-combining-categories): Add | ||
| 4 | entries for 2-byte Han characters. | ||
| 5 | |||
| 6 | 2006-06-19 Richard Stallman <rms@gnu.org> | ||
| 7 | |||
| 8 | * bindings.el (mode-line-format): Save some mode line space. | ||
| 9 | |||
| 10 | * files.el (find-file-noselect): Improve the question wording. | ||
| 11 | (basic-save-buffer-2): Mask UMASK against 666. | ||
| 12 | |||
| 13 | * mouse.el (mouse-drag-vertical-line-rightward-window): New function. | ||
| 14 | (mouse-drag-vertical-line): Call it. | ||
| 15 | |||
| 16 | * cus-edit.el (customize-option, customize-option-other-window): | ||
| 17 | Error if SYMBOL is nil. | ||
| 18 | |||
| 19 | 2006-06-19 Carsten Dominik <dominik@science.uva.nl> | ||
| 20 | |||
| 21 | * textmodes/org.el: Require noutline, also on XEmacs. | ||
| 22 | (org-end-of-subtree): Return point. | ||
| 23 | (org-dblock-start-re, org-dblock-end-re): New constants. | ||
| 24 | (org-create-dblock, org-prepare-dblock, org-map-dblocks) | ||
| 25 | (org-dblock-update, org-update-dblock, org-beginning-of-dblock) | ||
| 26 | (org-update-all-dblocks, org-find-dblock): New functions. | ||
| 27 | (org-collect-clock-time-entries): New function. | ||
| 28 | (org-html-handle-time-stamps): Never export CLOCK timeranges. | ||
| 29 | (org-fixup-indentation): Modified to deadl correctly with lines | ||
| 30 | starting with TAB. Only one argument DIFF now. | ||
| 31 | (org-demote, org-promote): Call `org-fixup-indentation' with just | ||
| 32 | one argument, DIFF. | ||
| 33 | (org-mode): Don't mark buffer as modified when aligning tables. | ||
| 34 | (org-clock-sum): Don't makr buffer modified when adding time sum | ||
| 35 | properties. | ||
| 36 | (org-export-as-html): Added support for a link validation | ||
| 37 | function. | ||
| 38 | (org-archive-all-done): New function. | ||
| 39 | (org-archive-subtree): New prefix argument. When set, archive all | ||
| 40 | done subtrees in this buffer. | ||
| 41 | (org-remove-clock-overlays) | ||
| 42 | (org-remove-occur-highlights): Use | ||
| 43 | `org-inhibit-highlight-removal'. | ||
| 44 | (org-inhibit-highlight-removal): New variable, for dynamic | ||
| 45 | scoping. | ||
| 46 | (org-put-clock-overlay): Don't swallow last headline character | ||
| 47 | when displaying overlay. | ||
| 48 | (org-store-link): Link to `image-mode' with just the file name. | ||
| 49 | |||
| 50 | |||
| 51 | 2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu> | ||
| 52 | |||
| 53 | * viper-cmd.el (viper-special-read-and-insert-char): use | ||
| 54 | read-key-sequence. | ||
| 55 | (viper-after-change-undo-hook): enhancements. | ||
| 56 | (viper-after-change-undo-hook): new hook. | ||
| 57 | (viper-undo): use viper-after-change-undo-hook. | ||
| 58 | (viper-add-newline-at-eob-if-necessary): widen before making changes. | ||
| 59 | (viper-next-line-at-bol): If point is on a widget or a button, simulate | ||
| 60 | clicking on that widget/button. | ||
| 61 | |||
| 62 | * viper.el (viper-mode): allow for a separate cursor color in Emacs | ||
| 63 | state. | ||
| 64 | |||
| 65 | * ediff-diff (ediff-test-patch-utility): catch errors. | ||
| 66 | (ediff-actual-diff-options, ediff-actual-diff3-options): new variables. | ||
| 67 | (ediff-set-actual-diff-options): new function. | ||
| 68 | (ediff-reset-diff-options, ediff-toggle-ignore-case): | ||
| 69 | use ediff-set-actual-diff-options. | ||
| 70 | (ediff-extract-diffs): catch errors. | ||
| 71 | (ediff-whitespace): add nonbreakable space. | ||
| 72 | (ediff-same-file-contents): catch errors. | ||
| 73 | |||
| 74 | * ediff-mult.el (ediff-collect-custom-diffs): save | ||
| 75 | coding-system-for-read. | ||
| 76 | |||
| 77 | * ediff-vers.el (ediff-keep-tmp-versions): new var. | ||
| 78 | (ediff-vc-internal, ediff-vc-merge-internal): use | ||
| 79 | ediff-delete-version-file. | ||
| 80 | (ediff-delete-version-file): new function. | ||
| 81 | |||
| 82 | * ediff-wind.el (ediff-control-frame-parameters): set frame fringes. | ||
| 83 | |||
| 84 | * ediff.el (ediff-directories, ediff-directory-revisions, | ||
| 85 | ediff-merge-directories, ediff-merge-directories-with-ancestor, | ||
| 86 | ediff-directories-internal, ediff-merge-directory-revisions, | ||
| 87 | ediff-merge-directory-revisions-with-ancestor, | ||
| 88 | ediff-directories3): use read-directory-name. | ||
| 89 | |||
| 90 | 2006-06-18 Ralf Angeli <angeli@caeruleus.net> | ||
| 91 | |||
| 92 | * textmodes/tex-mode.el (tex-font-lock-match-suscript): Remove | ||
| 93 | superfluous part of regexp for brace matching which is handled by | ||
| 94 | `scan-lists' call. | ||
| 95 | |||
| 1 | 2006-06-16 Richard Stallman <rms@gnu.org> | 96 | 2006-06-16 Richard Stallman <rms@gnu.org> |
| 2 | 97 | ||
| 3 | * obsolete/options.el (list-options): Put "obsolete" msg in buffer. | 98 | * obsolete/options.el (list-options): Put "obsolete" msg in buffer. |
diff --git a/lisp/bindings.el b/lisp/bindings.el index 4fdfb172e3e..da039716507 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -299,8 +299,7 @@ Keymap to display on minor modes.") | |||
| 299 | 'mode-line-buffer-identification | 299 | 'mode-line-buffer-identification |
| 300 | (propertize " " 'help-echo help-echo) | 300 | (propertize " " 'help-echo help-echo) |
| 301 | 'mode-line-position | 301 | 'mode-line-position |
| 302 | '(vc-mode vc-mode) | 302 | `(vc-mode ("" vc-mode ,(propertize " " 'help-echo help-echo))) |
| 303 | (propertize " " 'help-echo help-echo) | ||
| 304 | 'mode-line-modes | 303 | 'mode-line-modes |
| 305 | `(which-func-mode ("" which-func-format ,dashes)) | 304 | `(which-func-mode ("" which-func-format ,dashes)) |
| 306 | `(global-mode-string (,dashes global-mode-string)) | 305 | `(global-mode-string (,dashes global-mode-string)) |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index e700cd47d16..53f92f2243b 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -1055,6 +1055,8 @@ then prompt for the MODE to customize." | |||
| 1055 | (defun customize-option (symbol) | 1055 | (defun customize-option (symbol) |
| 1056 | "Customize SYMBOL, which must be a user option variable." | 1056 | "Customize SYMBOL, which must be a user option variable." |
| 1057 | (interactive (custom-variable-prompt)) | 1057 | (interactive (custom-variable-prompt)) |
| 1058 | (unless symbol | ||
| 1059 | (error "No variable specified")) | ||
| 1058 | (let ((basevar (indirect-variable symbol))) | 1060 | (let ((basevar (indirect-variable symbol))) |
| 1059 | (custom-buffer-create (list (list basevar 'custom-variable)) | 1061 | (custom-buffer-create (list (list basevar 'custom-variable)) |
| 1060 | (format "*Customize Option: %s*" | 1062 | (format "*Customize Option: %s*" |
| @@ -1070,6 +1072,8 @@ then prompt for the MODE to customize." | |||
| 1070 | "Customize SYMBOL, which must be a user option variable. | 1072 | "Customize SYMBOL, which must be a user option variable. |
| 1071 | Show the buffer in another window, but don't select it." | 1073 | Show the buffer in another window, but don't select it." |
| 1072 | (interactive (custom-variable-prompt)) | 1074 | (interactive (custom-variable-prompt)) |
| 1075 | (unless symbol | ||
| 1076 | (error "No variable specified")) | ||
| 1073 | (let ((basevar (indirect-variable symbol))) | 1077 | (let ((basevar (indirect-variable symbol))) |
| 1074 | (custom-buffer-create-other-window | 1078 | (custom-buffer-create-other-window |
| 1075 | (list (list basevar 'custom-variable)) | 1079 | (list (list basevar 'custom-variable)) |
diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el index 7746954292d..e3675064010 100644 --- a/lisp/ediff-diff.el +++ b/lisp/ediff-diff.el | |||
| @@ -65,10 +65,11 @@ Must produce output compatible with Unix's diff3 program." | |||
| 65 | ;; The following functions needed for setting diff/diff3 options | 65 | ;; The following functions needed for setting diff/diff3 options |
| 66 | ;; test if diff supports the --binary option | 66 | ;; test if diff supports the --binary option |
| 67 | (defsubst ediff-test-utility (diff-util option &optional files) | 67 | (defsubst ediff-test-utility (diff-util option &optional files) |
| 68 | (condition-case () | 68 | (condition-case nil |
| 69 | (eq 0 (apply 'call-process | 69 | (eq 0 (apply 'call-process |
| 70 | (append (list diff-util nil nil nil option) files))) | 70 | (append (list diff-util nil nil nil option) files))) |
| 71 | (file-error nil))) | 71 | (error (format "Cannot execute program %S." diff-util))) |
| 72 | ) | ||
| 72 | 73 | ||
| 73 | (defun ediff-diff-mandatory-option (diff-util) | 74 | (defun ediff-diff-mandatory-option (diff-util) |
| 74 | (let ((file (if (boundp 'null-device) null-device "/dev/null"))) | 75 | (let ((file (if (boundp 'null-device) null-device "/dev/null"))) |
| @@ -77,13 +78,17 @@ Must produce output compatible with Unix's diff3 program." | |||
| 77 | ((and (string= diff-util ediff-diff-program) | 78 | ((and (string= diff-util ediff-diff-program) |
| 78 | (ediff-test-utility | 79 | (ediff-test-utility |
| 79 | ediff-diff-program "--binary" (list file file))) | 80 | ediff-diff-program "--binary" (list file file))) |
| 80 | "--binary") | 81 | "--binary ") |
| 81 | ((and (string= diff-util ediff-diff3-program) | 82 | ((and (string= diff-util ediff-diff3-program) |
| 82 | (ediff-test-utility | 83 | (ediff-test-utility |
| 83 | ediff-diff3-program "--binary" (list file file file))) | 84 | ediff-diff3-program "--binary" (list file file file))) |
| 84 | "--binary") | 85 | "--binary ") |
| 85 | (t "")))) | 86 | (t "")))) |
| 86 | 87 | ||
| 88 | |||
| 89 | ;; must be before ediff-reset-diff-options to avoid compiler errors | ||
| 90 | (fset 'ediff-set-actual-diff-options '(lambda () nil)) | ||
| 91 | |||
| 87 | ;; make sure that mandatory options are added even if the user changes | 92 | ;; make sure that mandatory options are added even if the user changes |
| 88 | ;; ediff-diff-options or ediff-diff3-options in the customization widget | 93 | ;; ediff-diff-options or ediff-diff3-options in the customization widget |
| 89 | (defun ediff-reset-diff-options (symb val) | 94 | (defun ediff-reset-diff-options (symb val) |
| @@ -91,12 +96,9 @@ Must produce output compatible with Unix's diff3 program." | |||
| 91 | (if (eq symb 'ediff-diff-options) | 96 | (if (eq symb 'ediff-diff-options) |
| 92 | ediff-diff-program | 97 | ediff-diff-program |
| 93 | ediff-diff3-program)) | 98 | ediff-diff3-program)) |
| 94 | (mandatory-option (ediff-diff-mandatory-option diff-program)) | 99 | (mandatory-option (ediff-diff-mandatory-option diff-program))) |
| 95 | (spacer (if (string-equal mandatory-option "") "" " "))) | 100 | (set symb (concat mandatory-option val)) |
| 96 | (set symb | 101 | (ediff-set-actual-diff-options) |
| 97 | (if (string-match mandatory-option val) | ||
| 98 | val | ||
| 99 | (concat mandatory-option spacer val))) | ||
| 100 | )) | 102 | )) |
| 101 | 103 | ||
| 102 | 104 | ||
| @@ -155,7 +157,7 @@ GNU diff3 doesn't have such an option." | |||
| 155 | :group 'ediff-diff) | 157 | :group 'ediff-diff) |
| 156 | 158 | ||
| 157 | ;; the actual options used in comparison | 159 | ;; the actual options used in comparison |
| 158 | (ediff-defvar-local ediff-actual-diff-options "" "") | 160 | (ediff-defvar-local ediff-actual-diff-options ediff-diff-options "") |
| 159 | 161 | ||
| 160 | (defcustom ediff-custom-diff-program ediff-diff-program | 162 | (defcustom ediff-custom-diff-program ediff-diff-program |
| 161 | "*Program to use for generating custom diff output for saving it in a file. | 163 | "*Program to use for generating custom diff output for saving it in a file. |
| @@ -178,7 +180,7 @@ This output is not used by Ediff internally." | |||
| 178 | :group 'ediff-diff) | 180 | :group 'ediff-diff) |
| 179 | 181 | ||
| 180 | ;; the actual options used in comparison | 182 | ;; the actual options used in comparison |
| 181 | (ediff-defvar-local ediff-actual-diff3-options "" "") | 183 | (ediff-defvar-local ediff-actual-diff3-options ediff-diff3-options "") |
| 182 | 184 | ||
| 183 | (defcustom ediff-diff3-ok-lines-regexp | 185 | (defcustom ediff-diff3-ok-lines-regexp |
| 184 | "^\\([1-3]:\\|====\\| \\|.*Warning *:\\|.*No newline\\|.*missing newline\\|^\C-m$\\)" | 186 | "^\\([1-3]:\\|====\\| \\|.*Warning *:\\|.*No newline\\|.*missing newline\\|^\C-m$\\)" |
| @@ -1272,7 +1274,9 @@ delimiter regions")) | |||
| 1272 | ;; Similarly for Windows-* | 1274 | ;; Similarly for Windows-* |
| 1273 | ;; In DOS, must synchronize because DOS doesn't have | 1275 | ;; In DOS, must synchronize because DOS doesn't have |
| 1274 | ;; asynchronous processes. | 1276 | ;; asynchronous processes. |
| 1275 | (apply 'call-process program nil buffer nil args) | 1277 | (condition-case nil |
| 1278 | (apply 'call-process program nil buffer nil args) | ||
| 1279 | (error (format "Cannot execute program %S." program))) | ||
| 1276 | ;; On other systems, do it asynchronously. | 1280 | ;; On other systems, do it asynchronously. |
| 1277 | (setq proc (get-buffer-process buffer)) | 1281 | (setq proc (get-buffer-process buffer)) |
| 1278 | (if proc (kill-process proc)) | 1282 | (if proc (kill-process proc)) |
| @@ -1328,7 +1332,8 @@ delimiter regions")) | |||
| 1328 | Used for splitting difference regions into individual words.") | 1332 | Used for splitting difference regions into individual words.") |
| 1329 | (make-variable-buffer-local 'ediff-forward-word-function) | 1333 | (make-variable-buffer-local 'ediff-forward-word-function) |
| 1330 | 1334 | ||
| 1331 | (defvar ediff-whitespace " \n\t\f" | 1335 | ;; \240 is unicode symbol for nonbreakable whitespace |
| 1336 | (defvar ediff-whitespace " \n\t\f\r\240" | ||
| 1332 | "*Characters constituting white space. | 1337 | "*Characters constituting white space. |
| 1333 | These characters are ignored when differing regions are split into words.") | 1338 | These characters are ignored when differing regions are split into words.") |
| 1334 | (make-variable-buffer-local 'ediff-whitespace) | 1339 | (make-variable-buffer-local 'ediff-whitespace) |
| @@ -1442,11 +1447,13 @@ arguments to `skip-chars-forward'." | |||
| 1442 | "Return t if files F1 and F2 have identical contents." | 1447 | "Return t if files F1 and F2 have identical contents." |
| 1443 | (if (and (not (file-directory-p f1)) | 1448 | (if (and (not (file-directory-p f1)) |
| 1444 | (not (file-directory-p f2))) | 1449 | (not (file-directory-p f2))) |
| 1445 | (let ((res | 1450 | (condition-case nil |
| 1446 | (apply 'call-process ediff-cmp-program nil nil nil | 1451 | (let ((res |
| 1447 | (append ediff-cmp-options (list f1 f2))))) | 1452 | (apply 'call-process ediff-cmp-program nil nil nil |
| 1448 | (and (numberp res) (eq res 0)))) | 1453 | (append ediff-cmp-options (list f1 f2))))) |
| 1449 | ) | 1454 | (and (numberp res) (eq res 0))) |
| 1455 | (error (format "Cannot execute program %S." ediff-cmp-program))) | ||
| 1456 | )) | ||
| 1450 | 1457 | ||
| 1451 | 1458 | ||
| 1452 | (defun ediff-same-contents (d1 d2 &optional filter-re) | 1459 | (defun ediff-same-contents (d1 d2 &optional filter-re) |
| @@ -1521,21 +1528,30 @@ affects only files whose names match the expression." | |||
| 1521 | (setq file-list-list (cdr file-list-list))) | 1528 | (setq file-list-list (cdr file-list-list))) |
| 1522 | (reverse result))) | 1529 | (reverse result))) |
| 1523 | 1530 | ||
| 1531 | |||
| 1532 | (defun ediff-set-actual-diff-options () | ||
| 1533 | (if ediff-ignore-case | ||
| 1534 | (setq ediff-actual-diff-options | ||
| 1535 | (concat ediff-diff-options " " ediff-ignore-case-option) | ||
| 1536 | ediff-actual-diff3-options | ||
| 1537 | (concat ediff-diff3-options " " ediff-ignore-case-option3)) | ||
| 1538 | (setq ediff-actual-diff-options ediff-diff-options | ||
| 1539 | ediff-actual-diff3-options ediff-diff3-options) | ||
| 1540 | ) | ||
| 1541 | (setq-default ediff-actual-diff-options ediff-actual-diff-options | ||
| 1542 | ediff-actual-diff3-options ediff-actual-diff3-options) | ||
| 1543 | ) | ||
| 1544 | |||
| 1545 | |||
| 1524 | ;; Ignore case handling - some ideas from drew.adams@@oracle.com | 1546 | ;; Ignore case handling - some ideas from drew.adams@@oracle.com |
| 1525 | (defun ediff-toggle-ignore-case () | 1547 | (defun ediff-toggle-ignore-case () |
| 1526 | (interactive) | 1548 | (interactive) |
| 1527 | (ediff-barf-if-not-control-buffer) | 1549 | (ediff-barf-if-not-control-buffer) |
| 1528 | (setq ediff-ignore-case (not ediff-ignore-case)) | 1550 | (setq ediff-ignore-case (not ediff-ignore-case)) |
| 1529 | (cond (ediff-ignore-case | 1551 | (ediff-set-actual-diff-options) |
| 1530 | (setq ediff-actual-diff-options | 1552 | (if ediff-ignore-case |
| 1531 | (concat ediff-diff-options " " ediff-ignore-case-option) | 1553 | (message "Ignoring regions that differ only in case") |
| 1532 | ediff-actual-diff3-options | 1554 | (message "Ignoring case differences turned OFF")) |
| 1533 | (concat ediff-diff3-options " " ediff-ignore-case-option3)) | ||
| 1534 | (message "Ignoring regions that differ only in case")) | ||
| 1535 | (t | ||
| 1536 | (setq ediff-actual-diff-options ediff-diff-options | ||
| 1537 | ediff-actual-diff3-options ediff-diff3-options) | ||
| 1538 | (message "Ignoring case differences turned OFF"))) | ||
| 1539 | (cond (ediff-merge-job | 1555 | (cond (ediff-merge-job |
| 1540 | (message "Ignoring letter case is too dangerous in merge jobs")) | 1556 | (message "Ignoring letter case is too dangerous in merge jobs")) |
| 1541 | ((and ediff-diff3-job (string= ediff-ignore-case-option3 "")) | 1557 | ((and ediff-diff3-job (string= ediff-ignore-case-option3 "")) |
diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el index 0bbd3298c7a..71859a5d4c5 100644 --- a/lisp/ediff-mult.el +++ b/lisp/ediff-mult.el | |||
| @@ -1656,22 +1656,26 @@ This operation is defined only for `ediff-directories' and | |||
| 1656 | multifile patches. For `ediff-directory-revisions', we insist that | 1656 | multifile patches. For `ediff-directory-revisions', we insist that |
| 1657 | all marked sessions must be active." | 1657 | all marked sessions must be active." |
| 1658 | (interactive) | 1658 | (interactive) |
| 1659 | (or (ediff-buffer-live-p ediff-meta-diff-buffer) | 1659 | (let ((coding-system-for-read ediff-coding-system-for-read)) |
| 1660 | (setq ediff-meta-diff-buffer | 1660 | (or (ediff-buffer-live-p ediff-meta-diff-buffer) |
| 1661 | (get-buffer-create | 1661 | (setq ediff-meta-diff-buffer |
| 1662 | (ediff-unique-buffer-name "*Ediff Multifile Diffs" "*")))) | 1662 | (get-buffer-create |
| 1663 | (ediff-with-current-buffer ediff-meta-diff-buffer | 1663 | (ediff-unique-buffer-name "*Ediff Multifile Diffs" "*")))) |
| 1664 | (setq buffer-read-only nil) | 1664 | (ediff-with-current-buffer ediff-meta-diff-buffer |
| 1665 | (erase-buffer)) | 1665 | (setq buffer-read-only nil) |
| 1666 | (if (> (ediff-operate-on-marked-sessions 'ediff-append-custom-diff) 0) | 1666 | (erase-buffer)) |
| 1667 | ;; did something | 1667 | (if (> (ediff-operate-on-marked-sessions 'ediff-append-custom-diff) 0) |
| 1668 | (progn | 1668 | ;; did something |
| 1669 | (display-buffer ediff-meta-diff-buffer 'not-this-window) | 1669 | (progn |
| 1670 | (ediff-with-current-buffer ediff-meta-diff-buffer | 1670 | (display-buffer ediff-meta-diff-buffer 'not-this-window) |
| 1671 | (set-buffer-modified-p nil) | 1671 | (ediff-with-current-buffer ediff-meta-diff-buffer |
| 1672 | (setq buffer-read-only t))) | 1672 | (set-buffer-modified-p nil) |
| 1673 | (beep) | 1673 | (setq buffer-read-only t)) |
| 1674 | (message "No marked sessions found"))) | 1674 | (if (fboundp 'diff-mode) |
| 1675 | (with-current-buffer ediff-meta-diff-buffer | ||
| 1676 | (diff-mode)))) | ||
| 1677 | (beep) | ||
| 1678 | (message "No marked sessions found")))) | ||
| 1675 | 1679 | ||
| 1676 | (defun ediff-meta-show-patch () | 1680 | (defun ediff-meta-show-patch () |
| 1677 | "Show the multi-file patch associated with this group session." | 1681 | "Show the multi-file patch associated with this group session." |
diff --git a/lisp/ediff-vers.el b/lisp/ediff-vers.el index 3e8b1c37572..4cd1492a1c7 100644 --- a/lisp/ediff-vers.el +++ b/lisp/ediff-vers.el | |||
| @@ -52,6 +52,13 @@ | |||
| 52 | ))) | 52 | ))) |
| 53 | ;; end pacifier | 53 | ;; end pacifier |
| 54 | 54 | ||
| 55 | (defcustom ediff-keep-tmp-versions nil | ||
| 56 | "*If t, do not delete temporary previous versions for the files on which | ||
| 57 | comparison or merge operations are being performed." | ||
| 58 | :type 'boolean | ||
| 59 | :group 'ediff-vers | ||
| 60 | ) | ||
| 61 | |||
| 55 | ;; VC.el support | 62 | ;; VC.el support |
| 56 | 63 | ||
| 57 | (defun ediff-vc-latest-version (file) | 64 | (defun ediff-vc-latest-version (file) |
| @@ -87,8 +94,8 @@ | |||
| 87 | file2 (buffer-file-name))) | 94 | file2 (buffer-file-name))) |
| 88 | (setq startup-hooks | 95 | (setq startup-hooks |
| 89 | (cons `(lambda () | 96 | (cons `(lambda () |
| 90 | (delete-file ,file1) | 97 | (ediff-delete-version-file ,file1) |
| 91 | (or ,(string= rev2 "") (delete-file ,file2))) | 98 | (or ,(string= rev2 "") (ediff-delete-version-file ,file2))) |
| 92 | startup-hooks))) | 99 | startup-hooks))) |
| 93 | (ediff-buffers | 100 | (ediff-buffers |
| 94 | rev1buf rev2buf | 101 | rev1buf rev2buf |
| @@ -199,12 +206,12 @@ | |||
| 199 | (setq startup-hooks | 206 | (setq startup-hooks |
| 200 | (cons | 207 | (cons |
| 201 | `(lambda () | 208 | `(lambda () |
| 202 | (delete-file ,(buffer-file-name buf1)) | 209 | (ediff-delete-version-file ,(buffer-file-name buf1)) |
| 203 | (or ,(string= rev2 "") | 210 | (or ,(string= rev2 "") |
| 204 | (delete-file ,(buffer-file-name buf2))) | 211 | (ediff-delete-version-file ,(buffer-file-name buf2))) |
| 205 | (or ,(string= ancestor-rev "") | 212 | (or ,(string= ancestor-rev "") |
| 206 | ,(not ancestor-rev) | 213 | ,(not ancestor-rev) |
| 207 | (delete-file ,(buffer-file-name ancestor-buf))) | 214 | (ediff-delete-version-file ,(buffer-file-name ancestor-buf))) |
| 208 | ) | 215 | ) |
| 209 | startup-hooks))) | 216 | startup-hooks))) |
| 210 | (if ancestor-rev | 217 | (if ancestor-rev |
| @@ -305,8 +312,13 @@ | |||
| 305 | (find-file-noselect (cvs-fileinfo->full-name fileinfo))) | 312 | (find-file-noselect (cvs-fileinfo->full-name fileinfo))) |
| 306 | nil ; startup-hooks | 313 | nil ; startup-hooks |
| 307 | 'ediff-revisions))) | 314 | 'ediff-revisions))) |
| 308 | (if (stringp tmp-file) (delete-file tmp-file)) | 315 | (if (stringp tmp-file) (ediff-delete-version-file tmp-file)) |
| 309 | (if (stringp ancestor-file) (delete-file ancestor-file)))) | 316 | (if (stringp ancestor-file) (ediff-delete-version-file ancestor-file)))) |
| 317 | |||
| 318 | |||
| 319 | ;; delete version file on exit unless ediff-keep-tmp-versions is true | ||
| 320 | (defun ediff-delete-version-file (file) | ||
| 321 | (or ediff-keep-tmp-versions (delete-file file))) | ||
| 310 | 322 | ||
| 311 | 323 | ||
| 312 | (provide 'ediff-vers) | 324 | (provide 'ediff-vers) |
diff --git a/lisp/ediff-wind.el b/lisp/ediff-wind.el index 28369f9f6bd..c0786b9cc43 100644 --- a/lisp/ediff-wind.el +++ b/lisp/ediff-wind.el | |||
| @@ -158,6 +158,8 @@ In this case, Ediff will use those frames to display these buffers." | |||
| 158 | '(scrollbar-height . 0) ; XEmacs only | 158 | '(scrollbar-height . 0) ; XEmacs only |
| 159 | '(menu-bar-lines . 0) ; Emacs only | 159 | '(menu-bar-lines . 0) ; Emacs only |
| 160 | '(tool-bar-lines . 0) ; Emacs 21+ only | 160 | '(tool-bar-lines . 0) ; Emacs 21+ only |
| 161 | '(left-fringe . 0) | ||
| 162 | '(right-fringe . 0) | ||
| 161 | ;; don't lower but auto-raise | 163 | ;; don't lower but auto-raise |
| 162 | '(auto-lower . nil) | 164 | '(auto-lower . nil) |
| 163 | '(auto-raise . t) | 165 | '(auto-raise . t) |
diff --git a/lisp/ediff.el b/lisp/ediff.el index 14f634f0cd2..3e0be86b18b 100644 --- a/lisp/ediff.el +++ b/lisp/ediff.el | |||
| @@ -500,12 +500,13 @@ expression; only file names that match the regexp are considered." | |||
| 500 | (let ((dir-A (ediff-get-default-directory-name)) | 500 | (let ((dir-A (ediff-get-default-directory-name)) |
| 501 | (default-regexp (eval ediff-default-filtering-regexp)) | 501 | (default-regexp (eval ediff-default-filtering-regexp)) |
| 502 | f) | 502 | f) |
| 503 | (list (setq f (ediff-read-file-name "Directory A to compare:" dir-A nil)) | 503 | (list (setq f (read-directory-name |
| 504 | (ediff-read-file-name "Directory B to compare:" | 504 | "Directory A to compare:" dir-A nil 'must-match)) |
| 505 | (if ediff-use-last-dir | 505 | (read-directory-name "Directory B to compare:" |
| 506 | ediff-last-dir-B | 506 | (if ediff-use-last-dir |
| 507 | (ediff-strip-last-dir f)) | 507 | ediff-last-dir-B |
| 508 | nil) | 508 | (ediff-strip-last-dir f)) |
| 509 | nil 'must-match) | ||
| 509 | (read-string | 510 | (read-string |
| 510 | (if (stringp default-regexp) | 511 | (if (stringp default-regexp) |
| 511 | (format "Filter through regular expression (default %s): " | 512 | (format "Filter through regular expression (default %s): " |
| @@ -532,8 +533,8 @@ names. Only the files that are under revision control are taken into account." | |||
| 532 | (let ((dir-A (ediff-get-default-directory-name)) | 533 | (let ((dir-A (ediff-get-default-directory-name)) |
| 533 | (default-regexp (eval ediff-default-filtering-regexp)) | 534 | (default-regexp (eval ediff-default-filtering-regexp)) |
| 534 | ) | 535 | ) |
| 535 | (list (ediff-read-file-name | 536 | (list (read-directory-name |
| 536 | "Directory to compare with revision:" dir-A nil) | 537 | "Directory to compare with revision:" dir-A nil 'must-match) |
| 537 | (read-string | 538 | (read-string |
| 538 | (if (stringp default-regexp) | 539 | (if (stringp default-regexp) |
| 539 | (format "Filter through regular expression (default %s): " | 540 | (format "Filter through regular expression (default %s): " |
| @@ -561,17 +562,17 @@ regular expression; only file names that match the regexp are considered." | |||
| 561 | (let ((dir-A (ediff-get-default-directory-name)) | 562 | (let ((dir-A (ediff-get-default-directory-name)) |
| 562 | (default-regexp (eval ediff-default-filtering-regexp)) | 563 | (default-regexp (eval ediff-default-filtering-regexp)) |
| 563 | f) | 564 | f) |
| 564 | (list (setq f (ediff-read-file-name "Directory A to compare:" dir-A nil)) | 565 | (list (setq f (read-directory-name "Directory A to compare:" dir-A nil)) |
| 565 | (setq f (ediff-read-file-name "Directory B to compare:" | 566 | (setq f (read-directory-name "Directory B to compare:" |
| 566 | (if ediff-use-last-dir | 567 | (if ediff-use-last-dir |
| 567 | ediff-last-dir-B | 568 | ediff-last-dir-B |
| 568 | (ediff-strip-last-dir f)) | 569 | (ediff-strip-last-dir f)) |
| 569 | nil)) | 570 | nil 'must-match)) |
| 570 | (ediff-read-file-name "Directory C to compare:" | 571 | (read-directory-name "Directory C to compare:" |
| 571 | (if ediff-use-last-dir | 572 | (if ediff-use-last-dir |
| 572 | ediff-last-dir-C | 573 | ediff-last-dir-C |
| 573 | (ediff-strip-last-dir f)) | 574 | (ediff-strip-last-dir f)) |
| 574 | nil) | 575 | nil 'must-match) |
| 575 | (read-string | 576 | (read-string |
| 576 | (if (stringp default-regexp) | 577 | (if (stringp default-regexp) |
| 577 | (format "Filter through regular expression (default %s): " | 578 | (format "Filter through regular expression (default %s): " |
| @@ -597,12 +598,13 @@ expression; only file names that match the regexp are considered." | |||
| 597 | (let ((dir-A (ediff-get-default-directory-name)) | 598 | (let ((dir-A (ediff-get-default-directory-name)) |
| 598 | (default-regexp (eval ediff-default-filtering-regexp)) | 599 | (default-regexp (eval ediff-default-filtering-regexp)) |
| 599 | f) | 600 | f) |
| 600 | (list (setq f (ediff-read-file-name "Directory A to merge:" dir-A nil)) | 601 | (list (setq f (read-directory-name "Directory A to merge:" |
| 601 | (ediff-read-file-name "Directory B to merge:" | 602 | dir-A nil 'must-match)) |
| 602 | (if ediff-use-last-dir | 603 | (read-directory-name "Directory B to merge:" |
| 603 | ediff-last-dir-B | 604 | (if ediff-use-last-dir |
| 604 | (ediff-strip-last-dir f)) | 605 | ediff-last-dir-B |
| 605 | nil) | 606 | (ediff-strip-last-dir f)) |
| 607 | nil 'must-match) | ||
| 606 | (read-string | 608 | (read-string |
| 607 | (if (stringp default-regexp) | 609 | (if (stringp default-regexp) |
| 608 | (format "Filter through regular expression (default %s): " | 610 | (format "Filter through regular expression (default %s): " |
| @@ -633,17 +635,17 @@ only file names that match the regexp are considered." | |||
| 633 | (let ((dir-A (ediff-get-default-directory-name)) | 635 | (let ((dir-A (ediff-get-default-directory-name)) |
| 634 | (default-regexp (eval ediff-default-filtering-regexp)) | 636 | (default-regexp (eval ediff-default-filtering-regexp)) |
| 635 | f) | 637 | f) |
| 636 | (list (setq f (ediff-read-file-name "Directory A to merge:" dir-A nil)) | 638 | (list (setq f (read-directory-name "Directory A to merge:" dir-A nil)) |
| 637 | (setq f (ediff-read-file-name "Directory B to merge:" | 639 | (setq f (read-directory-name "Directory B to merge:" |
| 638 | (if ediff-use-last-dir | 640 | (if ediff-use-last-dir |
| 639 | ediff-last-dir-B | 641 | ediff-last-dir-B |
| 640 | (ediff-strip-last-dir f)) | 642 | (ediff-strip-last-dir f)) |
| 641 | nil)) | 643 | nil 'must-match)) |
| 642 | (ediff-read-file-name "Ancestor directory:" | 644 | (read-directory-name "Ancestor directory:" |
| 643 | (if ediff-use-last-dir | 645 | (if ediff-use-last-dir |
| 644 | ediff-last-dir-C | 646 | ediff-last-dir-C |
| 645 | (ediff-strip-last-dir f)) | 647 | (ediff-strip-last-dir f)) |
| 646 | nil) | 648 | nil 'must-match) |
| 647 | (read-string | 649 | (read-string |
| 648 | (if (stringp default-regexp) | 650 | (if (stringp default-regexp) |
| 649 | (format "Filter through regular expression (default %s): " | 651 | (format "Filter through regular expression (default %s): " |
| @@ -669,8 +671,8 @@ names. Only the files that are under revision control are taken into account." | |||
| 669 | (let ((dir-A (ediff-get-default-directory-name)) | 671 | (let ((dir-A (ediff-get-default-directory-name)) |
| 670 | (default-regexp (eval ediff-default-filtering-regexp)) | 672 | (default-regexp (eval ediff-default-filtering-regexp)) |
| 671 | ) | 673 | ) |
| 672 | (list (ediff-read-file-name | 674 | (list (read-directory-name |
| 673 | "Directory to merge with revisions:" dir-A nil) | 675 | "Directory to merge with revisions:" dir-A nil 'must-match) |
| 674 | (read-string | 676 | (read-string |
| 675 | (if (stringp default-regexp) | 677 | (if (stringp default-regexp) |
| 676 | (format "Filter through regular expression (default %s): " | 678 | (format "Filter through regular expression (default %s): " |
| @@ -699,8 +701,9 @@ names. Only the files that are under revision control are taken into account." | |||
| 699 | (let ((dir-A (ediff-get-default-directory-name)) | 701 | (let ((dir-A (ediff-get-default-directory-name)) |
| 700 | (default-regexp (eval ediff-default-filtering-regexp)) | 702 | (default-regexp (eval ediff-default-filtering-regexp)) |
| 701 | ) | 703 | ) |
| 702 | (list (ediff-read-file-name | 704 | (list (read-directory-name |
| 703 | "Directory to merge with revisions and ancestors:" dir-A nil) | 705 | "Directory to merge with revisions and ancestors:" |
| 706 | dir-A nil 'must-match) | ||
| 704 | (read-string | 707 | (read-string |
| 705 | (if (stringp default-regexp) | 708 | (if (stringp default-regexp) |
| 706 | (format "Filter through regular expression (default %s): " | 709 | (format "Filter through regular expression (default %s): " |
| @@ -733,11 +736,6 @@ names. Only the files that are under revision control are taken into account." | |||
| 733 | (defun ediff-directories-internal (dir1 dir2 dir3 regexp action jobname | 736 | (defun ediff-directories-internal (dir1 dir2 dir3 regexp action jobname |
| 734 | &optional startup-hooks | 737 | &optional startup-hooks |
| 735 | merge-autostore-dir) | 738 | merge-autostore-dir) |
| 736 | ;; ediff-read-file-name is set to attach a previously entered file name if | ||
| 737 | ;; the currently entered file is a directory. This code takes care of that. | ||
| 738 | (setq dir1 (if (file-directory-p dir1) dir1 (file-name-directory dir1)) | ||
| 739 | dir2 (if (file-directory-p dir2) dir2 (file-name-directory dir2))) | ||
| 740 | |||
| 741 | (if (stringp dir3) | 739 | (if (stringp dir3) |
| 742 | (setq dir3 (if (file-directory-p dir3) dir3 (file-name-directory dir3)))) | 740 | (setq dir3 (if (file-directory-p dir3) dir3 (file-name-directory dir3)))) |
| 743 | 741 | ||
| @@ -763,7 +761,7 @@ names. Only the files that are under revision control are taken into account." | |||
| 763 | (ediff-merge-metajob jobname) | 761 | (ediff-merge-metajob jobname) |
| 764 | (not merge-autostore-dir)) | 762 | (not merge-autostore-dir)) |
| 765 | (setq merge-autostore-dir | 763 | (setq merge-autostore-dir |
| 766 | (read-file-name "Save merged files in directory: " | 764 | (read-directory-name "Save merged files in directory: " |
| 767 | (if ediff-use-last-dir | 765 | (if ediff-use-last-dir |
| 768 | ediff-last-merge-autostore-dir | 766 | ediff-last-merge-autostore-dir |
| 769 | (ediff-strip-last-dir dir1)) | 767 | (ediff-strip-last-dir dir1)) |
| @@ -823,7 +821,7 @@ names. Only the files that are under revision control are taken into account." | |||
| 823 | (ediff-merge-metajob jobname) | 821 | (ediff-merge-metajob jobname) |
| 824 | (not merge-autostore-dir)) | 822 | (not merge-autostore-dir)) |
| 825 | (setq merge-autostore-dir | 823 | (setq merge-autostore-dir |
| 826 | (read-file-name "Save merged files in directory: " | 824 | (read-directory-name "Save merged files in directory: " |
| 827 | (if ediff-use-last-dir | 825 | (if ediff-use-last-dir |
| 828 | ediff-last-merge-autostore-dir | 826 | ediff-last-merge-autostore-dir |
| 829 | (ediff-strip-last-dir dir1)) | 827 | (ediff-strip-last-dir dir1)) |
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 645f4f26eaf..0dce3b94ff0 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el | |||
| @@ -887,12 +887,15 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to | |||
| 887 | (setq ch (aref (read-key-sequence nil) 0))) | 887 | (setq ch (aref (read-key-sequence nil) 0))) |
| 888 | (insert ch)) | 888 | (insert ch)) |
| 889 | (t | 889 | (t |
| 890 | (setq ch (read-char-exclusive)) | 890 | ;;(setq ch (read-char-exclusive)) |
| 891 | (setq ch (aref (read-key-sequence nil) 0)) | ||
| 891 | ;; replace ^M with the newline | 892 | ;; replace ^M with the newline |
| 892 | (if (eq ch ?\C-m) (setq ch ?\n)) | 893 | (if (eq ch ?\C-m) (setq ch ?\n)) |
| 893 | ;; Make sure ^V and ^Q work as quotation chars | 894 | ;; Make sure ^V and ^Q work as quotation chars |
| 894 | (if (memq ch '(?\C-v ?\C-q)) | 895 | (if (memq ch '(?\C-v ?\C-q)) |
| 895 | (setq ch (read-char-exclusive))) | 896 | ;;(setq ch (read-char-exclusive)) |
| 897 | (setq ch (aref (read-key-sequence nil) 0)) | ||
| 898 | ) | ||
| 896 | (insert ch)) | 899 | (insert ch)) |
| 897 | ) | 900 | ) |
| 898 | (setq last-command-event | 901 | (setq last-command-event |
| @@ -1730,20 +1733,34 @@ invokes the command before that, etc." | |||
| 1730 | 1733 | ||
| 1731 | ;; undoing | 1734 | ;; undoing |
| 1732 | 1735 | ||
| 1736 | ;; hook used inside undo | ||
| 1737 | (defvar viper-undo-functions nil) | ||
| 1738 | |||
| 1739 | ;; Runs viper-before-change-functions inside before-change-functions | ||
| 1740 | (defun viper-undo-sentinel (beg end length) | ||
| 1741 | (run-hook-with-args 'viper-undo-functions beg end length)) | ||
| 1742 | |||
| 1743 | (add-hook 'after-change-functions 'viper-undo-sentinel) | ||
| 1744 | |||
| 1745 | ;; Hook used in viper-undo | ||
| 1746 | (defun viper-after-change-undo-hook (beg end len) | ||
| 1747 | (setq undo-beg-posn beg | ||
| 1748 | undo-end-posn (or end beg)) | ||
| 1749 | ;; some other hooks may be changing various text properties in | ||
| 1750 | ;; the buffer in response to 'undo'; so remove this hook to avoid | ||
| 1751 | ;; its repeated invocation | ||
| 1752 | (remove-hook 'viper-undo-functions 'viper-after-change-undo-hook 'local)) | ||
| 1753 | |||
| 1733 | (defun viper-undo () | 1754 | (defun viper-undo () |
| 1734 | "Undo previous change." | 1755 | "Undo previous change." |
| 1735 | (interactive) | 1756 | (interactive) |
| 1736 | (message "undo!") | 1757 | (message "undo!") |
| 1737 | (let ((modified (buffer-modified-p)) | 1758 | (let ((modified (buffer-modified-p)) |
| 1738 | (before-undo-pt (point-marker)) | 1759 | (before-undo-pt (point-marker)) |
| 1739 | (after-change-functions after-change-functions) | ||
| 1740 | undo-beg-posn undo-end-posn) | 1760 | undo-beg-posn undo-end-posn) |
| 1741 | 1761 | ||
| 1742 | ;; no need to remove this hook, since this var has scope inside a let. | 1762 | ;; the viper-after-change-undo-hook removes itself after the 1st invocation |
| 1743 | (add-hook 'after-change-functions | 1763 | (add-hook 'viper-undo-functions 'viper-after-change-undo-hook nil 'local) |
| 1744 | '(lambda (beg end len) | ||
| 1745 | (setq undo-beg-posn beg | ||
| 1746 | undo-end-posn (or end beg)))) | ||
| 1747 | 1764 | ||
| 1748 | (undo-start) | 1765 | (undo-start) |
| 1749 | (undo-more 2) | 1766 | (undo-more 2) |
| @@ -1765,7 +1782,8 @@ invokes the command before that, etc." | |||
| 1765 | (goto-char undo-beg-posn))) | 1782 | (goto-char undo-beg-posn))) |
| 1766 | (push-mark before-undo-pt t)) | 1783 | (push-mark before-undo-pt t)) |
| 1767 | (if (and (eolp) (not (bolp))) (backward-char 1)) | 1784 | (if (and (eolp) (not (bolp))) (backward-char 1)) |
| 1768 | (if (not modified) (set-buffer-modified-p t))) | 1785 | ;;(if (not modified) (set-buffer-modified-p t)) |
| 1786 | ) | ||
| 1769 | (setq this-command 'viper-undo)) | 1787 | (setq this-command 'viper-undo)) |
| 1770 | 1788 | ||
| 1771 | ;; Continue undoing previous changes. | 1789 | ;; Continue undoing previous changes. |
| @@ -1813,7 +1831,7 @@ invokes the command before that, etc." | |||
| 1813 | (setq viper-undo-needs-adjustment t))))) | 1831 | (setq viper-undo-needs-adjustment t))))) |
| 1814 | 1832 | ||
| 1815 | 1833 | ||
| 1816 | 1834 | ;;; Viper's destructive Command ring utilities | |
| 1817 | 1835 | ||
| 1818 | (defun viper-display-current-destructive-command () | 1836 | (defun viper-display-current-destructive-command () |
| 1819 | (let ((text (nth 4 viper-d-com)) | 1837 | (let ((text (nth 4 viper-d-com)) |
| @@ -1927,12 +1945,15 @@ Undo previous insertion and inserts new." | |||
| 1927 | (end-of-line) | 1945 | (end-of-line) |
| 1928 | ;; make sure all lines end with newline, unless in the minibuffer or | 1946 | ;; make sure all lines end with newline, unless in the minibuffer or |
| 1929 | ;; when requested otherwise (require-final-newline is nil) | 1947 | ;; when requested otherwise (require-final-newline is nil) |
| 1930 | (if (and (eobp) | 1948 | (save-restriction |
| 1931 | (not (bolp)) | 1949 | (widen) |
| 1932 | require-final-newline | 1950 | (if (and (eobp) |
| 1933 | (not (viper-is-in-minibuffer)) | 1951 | (not (bolp)) |
| 1934 | (not buffer-read-only)) | 1952 | require-final-newline |
| 1935 | (insert "\n")))) | 1953 | (not (viper-is-in-minibuffer)) |
| 1954 | (not buffer-read-only)) | ||
| 1955 | (insert "\n"))) | ||
| 1956 | )) | ||
| 1936 | 1957 | ||
| 1937 | (defun viper-yank-defun () | 1958 | (defun viper-yank-defun () |
| 1938 | (mark-defun) | 1959 | (mark-defun) |
| @@ -3045,19 +3066,34 @@ On reaching beginning of line, stop and signal error." | |||
| 3045 | (setq this-command 'next-line) | 3066 | (setq this-command 'next-line) |
| 3046 | (if com (viper-execute-com 'viper-next-line val com)))) | 3067 | (if com (viper-execute-com 'viper-next-line val com)))) |
| 3047 | 3068 | ||
| 3069 | |||
| 3048 | (defun viper-next-line-at-bol (arg) | 3070 | (defun viper-next-line-at-bol (arg) |
| 3049 | "Next line at beginning of line." | 3071 | "Next line at beginning of line. |
| 3072 | If point is on a widget or a button, simulate clicking on that widget/button." | ||
| 3050 | (interactive "P") | 3073 | (interactive "P") |
| 3051 | (viper-leave-region-active) | 3074 | (let* ((field (get-char-property (point) 'field)) |
| 3052 | (save-excursion | 3075 | (button (get-char-property (point) 'button)) |
| 3053 | (end-of-line) | 3076 | (doc (get-char-property (point) 'widget-doc)) |
| 3054 | (if (eobp) (error "Last line in buffer"))) | 3077 | (widget (or field button doc))) |
| 3055 | (let ((val (viper-p-val arg)) | 3078 | (if (and widget |
| 3056 | (com (viper-getCom arg))) | 3079 | (if (symbolp widget) |
| 3057 | (if com (viper-move-marker-locally 'viper-com-point (point))) | 3080 | (get widget 'widget-type) |
| 3058 | (forward-line val) | 3081 | (and (consp widget) |
| 3059 | (back-to-indentation) | 3082 | (get (widget-type widget) 'widget-type)))) |
| 3060 | (if com (viper-execute-com 'viper-next-line-at-bol val com)))) | 3083 | (widget-button-press (point)) |
| 3084 | (if (button-at (point)) | ||
| 3085 | (push-button) | ||
| 3086 | ;; not a widget or a button | ||
| 3087 | (viper-leave-region-active) | ||
| 3088 | (save-excursion | ||
| 3089 | (end-of-line) | ||
| 3090 | (if (eobp) (error "Last line in buffer"))) | ||
| 3091 | (let ((val (viper-p-val arg)) | ||
| 3092 | (com (viper-getCom arg))) | ||
| 3093 | (if com (viper-move-marker-locally 'viper-com-point (point))) | ||
| 3094 | (forward-line val) | ||
| 3095 | (back-to-indentation) | ||
| 3096 | (if com (viper-execute-com 'viper-next-line-at-bol val com))))))) | ||
| 3061 | 3097 | ||
| 3062 | 3098 | ||
| 3063 | (defun viper-previous-line (arg) | 3099 | (defun viper-previous-line (arg) |
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index c7fe792b5f2..252088a476d 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el | |||
| @@ -139,8 +139,8 @@ | |||
| 139 | 139 | ||
| 140 | (defsubst viper-get-cursor-color () | 140 | (defsubst viper-get-cursor-color () |
| 141 | (viper-cond-compile-for-xemacs-or-emacs | 141 | (viper-cond-compile-for-xemacs-or-emacs |
| 142 | ;; xemacs | 142 | (color-instance-name |
| 143 | (color-instance-name (frame-property (selected-frame) 'cursor-color)) | 143 | (frame-property (selected-frame) 'cursor-color)) ; xemacs |
| 144 | (cdr (assoc 'cursor-color (frame-parameters))) ; emacs | 144 | (cdr (assoc 'cursor-color (frame-parameters))) ; emacs |
| 145 | )) | 145 | )) |
| 146 | 146 | ||
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index fc55d291550..8f858526da3 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el | |||
| @@ -534,6 +534,10 @@ If Viper is enabled, turn it off. Otherwise, turn it on." | |||
| 534 | (defun viper-mode () | 534 | (defun viper-mode () |
| 535 | "Turn on Viper emulation of Vi in Emacs. See Info node `(viper)Viper'." | 535 | "Turn on Viper emulation of Vi in Emacs. See Info node `(viper)Viper'." |
| 536 | (interactive) | 536 | (interactive) |
| 537 | (if (null viper-vi-state-cursor-color) | ||
| 538 | (modify-frame-parameters | ||
| 539 | (selected-frame) | ||
| 540 | (list (cons 'viper-vi-state-cursor-color (viper-get-cursor-color))))) | ||
| 537 | (if (not noninteractive) | 541 | (if (not noninteractive) |
| 538 | (progn | 542 | (progn |
| 539 | ;; if the user requested viper-mode explicitly | 543 | ;; if the user requested viper-mode explicitly |
| @@ -545,8 +549,6 @@ If Viper is enabled, turn it off. Otherwise, turn it on." | |||
| 545 | (if viper-first-time ; Important check. Prevents mix-up of startup | 549 | (if viper-first-time ; Important check. Prevents mix-up of startup |
| 546 | (progn ; and expert-level msgs when viper-mode recurses | 550 | (progn ; and expert-level msgs when viper-mode recurses |
| 547 | (setq viper-first-time nil) | 551 | (setq viper-first-time nil) |
| 548 | (setq viper-vi-state-cursor-color | ||
| 549 | (viper-get-cursor-color)) | ||
| 550 | (if (not viper-inhibit-startup-message) | 552 | (if (not viper-inhibit-startup-message) |
| 551 | (save-window-excursion | 553 | (save-window-excursion |
| 552 | (setq viper-inhibit-startup-message t) | 554 | (setq viper-inhibit-startup-message t) |
diff --git a/lisp/files.el b/lisp/files.el index 3313f003d89..8a5a331da71 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1514,23 +1514,53 @@ the various files." | |||
| 1514 | ;; hexl-mode. | 1514 | ;; hexl-mode. |
| 1515 | (not (eq major-mode 'hexl-mode))) | 1515 | (not (eq major-mode 'hexl-mode))) |
| 1516 | (if (buffer-modified-p) | 1516 | (if (buffer-modified-p) |
| 1517 | (if (y-or-n-p (if rawfile | 1517 | (if (y-or-n-p |
| 1518 | "Save file and revisit literally? " | 1518 | (format |
| 1519 | "Save file and revisit non-literally? ")) | 1519 | (if rawfile |
| 1520 | "The file %s is already visited normally, | ||
| 1521 | and you have edited the buffer. Now you have asked to visit it literally, | ||
| 1522 | meaning no coding system handling, format conversion, or local variables. | ||
| 1523 | Emacs can only visit a file in one way at a time. | ||
| 1524 | |||
| 1525 | Do you want to save the file, and visit it literally instead? " | ||
| 1526 | "The file %s is already visited literally, | ||
| 1527 | meaning no coding system handling, format conversion, or local variables. | ||
| 1528 | You have edited the buffer. Now you have asked to visit the file normally, | ||
| 1529 | but Emacs can only visit a file in one way at a time. | ||
| 1530 | |||
| 1531 | Do you want to save the file, and visit it normally instead? ") | ||
| 1532 | (file-name-nondirectory filename))) | ||
| 1520 | (progn | 1533 | (progn |
| 1521 | (save-buffer) | 1534 | (save-buffer) |
| 1522 | (find-file-noselect-1 buf filename nowarn | 1535 | (find-file-noselect-1 buf filename nowarn |
| 1523 | rawfile truename number)) | 1536 | rawfile truename number)) |
| 1524 | (if (y-or-n-p (if rawfile | 1537 | (if (y-or-n-p |
| 1525 | "Discard your edits and revisit file literally? " | 1538 | (format |
| 1526 | "Discard your edits and revisit file non-literally? ")) | 1539 | (if rawfile |
| 1540 | "\ | ||
| 1541 | Do you want to discard your changes, and visit the file literally now? " | ||
| 1542 | "\ | ||
| 1543 | Do you want to discard your changes, and visit the file normally now? "))) | ||
| 1527 | (find-file-noselect-1 buf filename nowarn | 1544 | (find-file-noselect-1 buf filename nowarn |
| 1528 | rawfile truename number) | 1545 | rawfile truename number) |
| 1529 | (error (if rawfile "File already visited non-literally" | 1546 | (error (if rawfile "File already visited non-literally" |
| 1530 | "File already visited literally")))) | 1547 | "File already visited literally")))) |
| 1531 | (if (y-or-n-p (if rawfile | 1548 | (if (y-or-n-p |
| 1532 | "Revisit file literally? " | 1549 | (format |
| 1533 | "Revisit file non-literally? ")) | 1550 | (if rawfile |
| 1551 | "The file %s is already visited normally. | ||
| 1552 | You have asked to visit it literally, | ||
| 1553 | meaning no coding system decoding, format conversion, or local variables. | ||
| 1554 | But Emacs can only visit a file in one way at a time. | ||
| 1555 | |||
| 1556 | Do you want to revisit the file literally now? " | ||
| 1557 | "The file %s is already visited literally, | ||
| 1558 | meaning no coding system decoding, format conversion, or local variables. | ||
| 1559 | You have asked to visit it normally, | ||
| 1560 | but Emacs can only visit a file in one way at a time. | ||
| 1561 | |||
| 1562 | Do you want to revisit the file normally now? ") | ||
| 1563 | (file-name-nondirectory filename))) | ||
| 1534 | (find-file-noselect-1 buf filename nowarn | 1564 | (find-file-noselect-1 buf filename nowarn |
| 1535 | rawfile truename number) | 1565 | rawfile truename number) |
| 1536 | (error (if rawfile "File already visited non-literally" | 1566 | (error (if rawfile "File already visited non-literally" |
| @@ -3631,7 +3661,8 @@ Before and after saving the buffer, this function runs | |||
| 3631 | ;; Since we have created an entirely new file, | 3661 | ;; Since we have created an entirely new file, |
| 3632 | ;; make sure it gets the right permission bits set. | 3662 | ;; make sure it gets the right permission bits set. |
| 3633 | (setq setmodes (or setmodes | 3663 | (setq setmodes (or setmodes |
| 3634 | (cons (or (file-modes buffer-file-name) umask) | 3664 | (cons (or (file-modes buffer-file-name) |
| 3665 | (logand ?\666 umask)) | ||
| 3635 | buffer-file-name))) | 3666 | buffer-file-name))) |
| 3636 | ;; We succeeded in writing the temp file, | 3667 | ;; We succeeded in writing the temp file, |
| 3637 | ;; so rename it. | 3668 | ;; so rename it. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 1899fd9d845..60a7e6b1e8b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2006-06-19 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * message.el (message-syntax-checks): Doc fix. | ||
| 4 | |||
| 1 | 2006-06-16 Katsumi Yamaoka <yamaoka@jpl.org> | 5 | 2006-06-16 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 6 | ||
| 3 | * message.el (message-syntax-checks): Doc fix. | 7 | * message.el (message-syntax-checks): Doc fix. |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 91ac018f324..4ee87933967 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -194,7 +194,7 @@ Checks include `approved', `continuation-headers', `control-chars', | |||
| 194 | `empty', `existing-newsgroups', `from', `illegible-text', | 194 | `empty', `existing-newsgroups', `from', `illegible-text', |
| 195 | `invisible-text', `long-header-lines', `long-lines', `message-id', | 195 | `invisible-text', `long-header-lines', `long-lines', `message-id', |
| 196 | `multiple-headers', `new-text', `newsgroups', `quoting-style', | 196 | `multiple-headers', `new-text', `newsgroups', `quoting-style', |
| 197 | `repeated-newsgroups', `reply-to', `sendsys', `shoot', | 197 | `repeated-newsgroups', `reply-to', `sender', `sendsys', `shoot', |
| 198 | `shorten-followup-to', `signature', `size', `subject', `subject-cmsg' | 198 | `shorten-followup-to', `signature', `size', `subject', `subject-cmsg' |
| 199 | and `valid-newsgroups'." | 199 | and `valid-newsgroups'." |
| 200 | :group 'message-news | 200 | :group 'message-news |
diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 9b2b244d6ea..26d6cd93439 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el | |||
| @@ -1078,7 +1078,10 @@ | |||
| 1078 | char-script-table) | 1078 | char-script-table) |
| 1079 | 1079 | ||
| 1080 | (setq word-combining-categories | 1080 | (setq word-combining-categories |
| 1081 | '((?l . ?l))) | 1081 | '((?l . ?l) |
| 1082 | (?C . ?C) | ||
| 1083 | (?C . ?H) | ||
| 1084 | (?C . ?K))) | ||
| 1082 | 1085 | ||
| 1083 | (setq word-separating-categories ; (2-byte character sets) | 1086 | (setq word-separating-categories ; (2-byte character sets) |
| 1084 | '((?A . ?K) ; Alpha numeric - Katakana | 1087 | '((?A . ?K) ; Alpha numeric - Katakana |
diff --git a/lisp/mouse.el b/lisp/mouse.el index c399515a3d2..145eb76446f 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -529,6 +529,24 @@ resized by dragging their header-line." | |||
| 529 | (mouse-drag-mode-line-1 start-event nil)))) | 529 | (mouse-drag-mode-line-1 start-event nil)))) |
| 530 | 530 | ||
| 531 | 531 | ||
| 532 | (defun mouse-drag-vertical-line-rightward-window (window) | ||
| 533 | "Return a window that is immediately to the right of WINDOW, or nil." | ||
| 534 | (let ((bottom (nth 3 (window-inside-edges window))) | ||
| 535 | (left (nth 0 (window-inside-edges window))) | ||
| 536 | best best-right | ||
| 537 | (try (previous-window window))) | ||
| 538 | (while (not (eq try window)) | ||
| 539 | (let ((try-top (nth 1 (window-inside-edges try))) | ||
| 540 | (try-bottom (nth 3 (window-inside-edges try))) | ||
| 541 | (try-right (nth 2 (window-inside-edges try)))) | ||
| 542 | (if (and (< try-top bottom) | ||
| 543 | (>= try-bottom bottom) | ||
| 544 | (< try-right left) | ||
| 545 | (or (null best-right) (> try-right best-right))) | ||
| 546 | (setq best-right try-right best try))) | ||
| 547 | (setq try (previous-window try))) | ||
| 548 | best)) | ||
| 549 | |||
| 532 | (defun mouse-drag-vertical-line (start-event) | 550 | (defun mouse-drag-vertical-line (start-event) |
| 533 | "Change the width of a window by dragging on the vertical line." | 551 | "Change the width of a window by dragging on the vertical line." |
| 534 | (interactive "e") | 552 | (interactive "e") |
| @@ -594,7 +612,8 @@ resized by dragging their header-line." | |||
| 594 | ;; adjust the window on the left. | 612 | ;; adjust the window on the left. |
| 595 | (if (eq which-side 'right) | 613 | (if (eq which-side 'right) |
| 596 | (selected-window) | 614 | (selected-window) |
| 597 | (previous-window)))) | 615 | (mouse-drag-vertical-line-rightward-window |
| 616 | (selected-window))))) | ||
| 598 | (setq x (- (car (cdr mouse)) | 617 | (setq x (- (car (cdr mouse)) |
| 599 | (if (eq which-side 'right) 0 2)) | 618 | (if (eq which-side 'right) 0 2)) |
| 600 | edges (window-edges window) | 619 | edges (window-edges window) |
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index dd4dfc1a857..c4e739fdf77 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Carsten Dominik <dominik at science dot uva dot nl> | 5 | ;; Author: Carsten Dominik <dominik at science dot uva dot nl> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ | 7 | ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ |
| 8 | ;; Version: 4.36b | 8 | ;; Version: 4.38 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
| @@ -90,6 +90,14 @@ | |||
| 90 | ;; | 90 | ;; |
| 91 | ;; Recent changes | 91 | ;; Recent changes |
| 92 | ;; -------------- | 92 | ;; -------------- |
| 93 | ;; Version 4.38 | ||
| 94 | ;; - noutline.el is now required (important for XEmacs users only). | ||
| 95 | ;; - Dynamic blocks. | ||
| 96 | ;; - Archiving of all level 1 trees without open TODO items. | ||
| 97 | ;; - Clock reports can be inserted into the file in a special section. | ||
| 98 | ;; - FAQ removed from the manual, now only on the web. | ||
| 99 | ;; - Bug fixes. | ||
| 100 | ;; | ||
| 93 | ;; Version 4.37 | 101 | ;; Version 4.37 |
| 94 | ;; - Clock-feature for measuring time spent on specific items. | 102 | ;; - Clock-feature for measuring time spent on specific items. |
| 95 | ;; - Improved emphasizing allows configuration and stacking. | 103 | ;; - Improved emphasizing allows configuration and stacking. |
| @@ -170,13 +178,18 @@ | |||
| 170 | (eval-when-compile | 178 | (eval-when-compile |
| 171 | (require 'cl) | 179 | (require 'cl) |
| 172 | (require 'calendar)) | 180 | (require 'calendar)) |
| 173 | (require 'outline) | 181 | ;; For XEmacs, noutline is not yet provided by outline.el, so arrange for |
| 182 | ;; the file noutline.el being loaded. | ||
| 183 | (if (featurep 'xemacs) (condition-case nil (require 'noutline))) | ||
| 184 | ;; We require noutline, which might be provided in outline.el | ||
| 185 | (require 'outline) (require 'noutline) | ||
| 186 | ;; Other stuff we need. | ||
| 174 | (require 'time-date) | 187 | (require 'time-date) |
| 175 | (require 'easymenu) | 188 | (require 'easymenu) |
| 176 | 189 | ||
| 177 | ;;; Customization variables | 190 | ;;; Customization variables |
| 178 | 191 | ||
| 179 | (defvar org-version "4.36b" | 192 | (defvar org-version "4.38" |
| 180 | "The version number of the file org.el.") | 193 | "The version number of the file org.el.") |
| 181 | (defun org-version () | 194 | (defun org-version () |
| 182 | (interactive) | 195 | (interactive) |
| @@ -2202,7 +2215,7 @@ stacked Non-nil means, allow stacked styles. This works only in HTML | |||
| 2202 | `org-emphasis-alist') will be allowed as pre/post, aiding | 2215 | `org-emphasis-alist') will be allowed as pre/post, aiding |
| 2203 | inside-out matching. | 2216 | inside-out matching. |
| 2204 | Use customize to modify this, or restart emacs after changing it." | 2217 | Use customize to modify this, or restart emacs after changing it." |
| 2205 | :group 'org-fixme | 2218 | :group 'org-font-lock |
| 2206 | :set 'org-set-emph-re | 2219 | :set 'org-set-emph-re |
| 2207 | :type '(list | 2220 | :type '(list |
| 2208 | (sexp :tag "Allowed chars in pre ") | 2221 | (sexp :tag "Allowed chars in pre ") |
| @@ -2216,19 +2229,23 @@ Use customize to modify this, or restart emacs after changing it." | |||
| 2216 | '(("*" bold "<b>" "</b>") | 2229 | '(("*" bold "<b>" "</b>") |
| 2217 | ("/" italic "<i>" "</i>") | 2230 | ("/" italic "<i>" "</i>") |
| 2218 | ("_" underline "<u>" "</u>") | 2231 | ("_" underline "<u>" "</u>") |
| 2219 | ("=" shadow "<code>" "</code>")) | 2232 | ("=" shadow "<code>" "</code>") |
| 2233 | ("+" (:strike-through t) "<del>" "</del>") | ||
| 2234 | ) | ||
| 2220 | "Special syntax for emphasised text. | 2235 | "Special syntax for emphasised text. |
| 2221 | Text starting and ending with a special character will be emphasized, for | 2236 | Text starting and ending with a special character will be emphasized, for |
| 2222 | example *bold*, _underlined_ and /italic/. This variable sets the marker | 2237 | example *bold*, _underlined_ and /italic/. This variable sets the marker |
| 2223 | characters, the face to bbe used by font-lock for highlighting in Org-mode | 2238 | characters, the face to bbe used by font-lock for highlighting in Org-mode |
| 2224 | emacs buffers, and the HTML tags to be used for this. | 2239 | emacs buffers, and the HTML tags to be used for this. |
| 2225 | Use customize to modify this, or restart emacs after changing it." | 2240 | Use customize to modify this, or restart emacs after changing it." |
| 2226 | :group 'org-fixme | 2241 | :group 'org-font-lock |
| 2227 | :set 'org-set-emph-re | 2242 | :set 'org-set-emph-re |
| 2228 | :type '(repeat | 2243 | :type '(repeat |
| 2229 | (list | 2244 | (list |
| 2230 | (string :tag "Marker character") | 2245 | (string :tag "Marker character") |
| 2231 | (face :tag "Font-lock-face") | 2246 | (choice |
| 2247 | (face :tag "Font-lock-face") | ||
| 2248 | (plist :tag "Face property list")) | ||
| 2232 | (string :tag "HTML start tag") | 2249 | (string :tag "HTML start tag") |
| 2233 | (string :tag "HTML end tag")))) | 2250 | (string :tag "HTML end tag")))) |
| 2234 | 2251 | ||
| @@ -2708,6 +2725,7 @@ Also put tags into group 4 if tags are present.") | |||
| 2708 | (defvar gnus-group-name) ; from gnus | 2725 | (defvar gnus-group-name) ; from gnus |
| 2709 | (defvar gnus-article-current) ; from gnus | 2726 | (defvar gnus-article-current) ; from gnus |
| 2710 | (defvar w3m-current-url) ; from w3m | 2727 | (defvar w3m-current-url) ; from w3m |
| 2728 | (defvar w3m-current-title) ; from w3m | ||
| 2711 | (defvar mh-progs) ; from MH-E | 2729 | (defvar mh-progs) ; from MH-E |
| 2712 | (defvar mh-current-folder) ; from MH-E | 2730 | (defvar mh-current-folder) ; from MH-E |
| 2713 | (defvar mh-show-folder-buffer) ; from MH-E | 2731 | (defvar mh-show-folder-buffer) ; from MH-E |
| @@ -2823,8 +2841,10 @@ The following commands are available: | |||
| 2823 | (insert " -*- mode: org -*-\n\n")) | 2841 | (insert " -*- mode: org -*-\n\n")) |
| 2824 | 2842 | ||
| 2825 | (unless org-inhibit-startup | 2843 | (unless org-inhibit-startup |
| 2826 | (if org-startup-align-all-tables | 2844 | (when org-startup-align-all-tables |
| 2827 | (org-table-map-tables 'org-table-align)) | 2845 | (let ((bmp (buffer-modified-p))) |
| 2846 | (org-table-map-tables 'org-table-align) | ||
| 2847 | (set-buffer-modified-p bmp))) | ||
| 2828 | (if org-startup-with-deadline-check | 2848 | (if org-startup-with-deadline-check |
| 2829 | (call-interactively 'org-check-deadlines) | 2849 | (call-interactively 'org-check-deadlines) |
| 2830 | (cond | 2850 | (cond |
| @@ -3722,9 +3742,7 @@ in the region." | |||
| 3722 | (replace-match up-head nil t) | 3742 | (replace-match up-head nil t) |
| 3723 | ;; Fixup tag positioning | 3743 | ;; Fixup tag positioning |
| 3724 | (and org-auto-align-tags (org-set-tags nil t)) | 3744 | (and org-auto-align-tags (org-set-tags nil t)) |
| 3725 | (if org-adapt-indentation | 3745 | (if org-adapt-indentation (org-fixup-indentation (- diff))))) |
| 3726 | (org-fixup-indentation (if (> diff 1) "^ " "^ ") "" | ||
| 3727 | (if (> diff 1) "^ ? ?\\S-" "^ ?\\S-"))))) | ||
| 3728 | 3746 | ||
| 3729 | (defun org-demote () | 3747 | (defun org-demote () |
| 3730 | "Demote the current heading lower down the tree. | 3748 | "Demote the current heading lower down the tree. |
| @@ -3737,8 +3755,7 @@ in the region." | |||
| 3737 | (replace-match down-head nil t) | 3755 | (replace-match down-head nil t) |
| 3738 | ;; Fixup tag positioning | 3756 | ;; Fixup tag positioning |
| 3739 | (and org-auto-align-tags (org-set-tags nil t)) | 3757 | (and org-auto-align-tags (org-set-tags nil t)) |
| 3740 | (if org-adapt-indentation | 3758 | (if org-adapt-indentation (org-fixup-indentation diff)))) |
| 3741 | (org-fixup-indentation "^ " (if (> diff 1) " " " ") "^\\S-")))) | ||
| 3742 | 3759 | ||
| 3743 | (defun org-map-tree (fun) | 3760 | (defun org-map-tree (fun) |
| 3744 | "Call FUN for every heading underneath the current one." | 3761 | "Call FUN for every heading underneath the current one." |
| @@ -3767,20 +3784,23 @@ in the region." | |||
| 3767 | (not (eobp))) | 3784 | (not (eobp))) |
| 3768 | (funcall fun))))) | 3785 | (funcall fun))))) |
| 3769 | 3786 | ||
| 3770 | ;; FIXME: this does not work well with Tabulators. This has to be re-written entirely. | 3787 | (defun org-fixup-indentation (diff) |
| 3771 | (defun org-fixup-indentation (from to prohibit) | 3788 | "Change the indentation in the current entry by DIFF |
| 3772 | "Change the indentation in the current entry by re-replacing FROM with TO. | 3789 | However, if any line in the current entry has no indentation, or if it |
| 3773 | However, if the regexp PROHIBIT matches at all, don't do anything. | 3790 | would end up with no indentation after the change, nothing at all is done." |
| 3774 | This is being used to change indentation along with the length of the | ||
| 3775 | heading marker. But if there are any lines which are not indented, nothing | ||
| 3776 | is changed at all." | ||
| 3777 | (save-excursion | 3791 | (save-excursion |
| 3778 | (let ((end (save-excursion (outline-next-heading) | 3792 | (let ((end (save-excursion (outline-next-heading) |
| 3779 | (point-marker)))) | 3793 | (point-marker))) |
| 3794 | (prohibit (if (> diff 0) | ||
| 3795 | "^\\S-" | ||
| 3796 | (concat "^ \\{0," (int-to-string (- diff)) "\\}\\S-"))) | ||
| 3797 | col) | ||
| 3780 | (unless (save-excursion (re-search-forward prohibit end t)) | 3798 | (unless (save-excursion (re-search-forward prohibit end t)) |
| 3781 | (while (re-search-forward from end t) | 3799 | (while (re-search-forward "^[ \t]+" end t) |
| 3782 | (replace-match to) | 3800 | (goto-char (match-end 0)) |
| 3783 | (beginning-of-line 2))) | 3801 | (setq col (current-column)) |
| 3802 | (if (< diff 0) (replace-match "")) | ||
| 3803 | (indent-to (+ diff col)))) | ||
| 3784 | (move-marker end nil)))) | 3804 | (move-marker end nil)))) |
| 3785 | 3805 | ||
| 3786 | ;;; Vertical tree motion, cutting and pasting of subtrees | 3806 | ;;; Vertical tree motion, cutting and pasting of subtrees |
| @@ -3984,6 +4004,14 @@ If optional TXT is given, check this string instead of the current kill." | |||
| 3984 | (throw 'exit nil))) | 4004 | (throw 'exit nil))) |
| 3985 | t)))) | 4005 | t)))) |
| 3986 | 4006 | ||
| 4007 | (defun org-narrow-to-subtree () | ||
| 4008 | "Narrow buffer to the current subtree." | ||
| 4009 | (interactive) | ||
| 4010 | (save-excursion | ||
| 4011 | (narrow-to-region | ||
| 4012 | (progn (org-back-to-heading) (point)) | ||
| 4013 | (progn (org-end-of-subtree t) (point))))) | ||
| 4014 | |||
| 3987 | ;;; Plain list items | 4015 | ;;; Plain list items |
| 3988 | 4016 | ||
| 3989 | (defun org-at-item-p () | 4017 | (defun org-at-item-p () |
| @@ -4292,103 +4320,259 @@ with something like \"1.\" or \"2)\"." | |||
| 4292 | 4320 | ||
| 4293 | ;;; Archiving | 4321 | ;;; Archiving |
| 4294 | 4322 | ||
| 4295 | (defun org-archive-subtree () | 4323 | (defun org-archive-subtree (&optional find-done) |
| 4296 | "Move the current subtree to the archive. | 4324 | "Move the current subtree to the archive. |
| 4297 | The archive can be a certain top-level heading in the current file, or in | 4325 | The archive can be a certain top-level heading in the current file, or in |
| 4298 | a different file. The tree will be moved to that location, the subtree | 4326 | a different file. The tree will be moved to that location, the subtree |
| 4299 | heading be marked DONE, and the current time will be added." | 4327 | heading be marked DONE, and the current time will be added. |
| 4300 | (interactive) | 4328 | |
| 4301 | ;; Save all relevant TODO keyword-relatex variables | 4329 | When called with prefix argument FIND-DONE, find whole trees without any |
| 4302 | (let ((tr-org-todo-line-regexp org-todo-line-regexp) ; keep despite compiler | 4330 | open TODO items and archive them (after getting confirmation from the user). |
| 4303 | (tr-org-todo-keywords org-todo-keywords) | 4331 | If the cursor is not at a headline when this comand is called, try all level |
| 4304 | (tr-org-todo-interpretation org-todo-interpretation) | 4332 | 1 trees. If the cursor is on a headline, only try the direct children of |
| 4305 | (tr-org-done-string org-done-string) | 4333 | this heading. " |
| 4306 | (tr-org-todo-regexp org-todo-regexp) | 4334 | (interactive "P") |
| 4307 | (tr-org-todo-line-regexp org-todo-line-regexp) | 4335 | (if find-done |
| 4308 | (this-buffer (current-buffer)) | 4336 | (org-archive-all-done) |
| 4309 | file heading buffer level newfile-p) | 4337 | ;; Save all relevant TODO keyword-relatex variables |
| 4310 | (if (string-match "\\(.*\\)::\\(.*\\)" org-archive-location) | 4338 | |
| 4339 | (let ((tr-org-todo-line-regexp org-todo-line-regexp) ; keep despite compiler | ||
| 4340 | (tr-org-todo-keywords org-todo-keywords) | ||
| 4341 | (tr-org-todo-interpretation org-todo-interpretation) | ||
| 4342 | (tr-org-done-string org-done-string) | ||
| 4343 | (tr-org-todo-regexp org-todo-regexp) | ||
| 4344 | (tr-org-todo-line-regexp org-todo-line-regexp) | ||
| 4345 | (this-buffer (current-buffer)) | ||
| 4346 | file heading buffer level newfile-p) | ||
| 4347 | (if (string-match "\\(.*\\)::\\(.*\\)" org-archive-location) | ||
| 4348 | (progn | ||
| 4349 | (setq file (format (match-string 1 org-archive-location) | ||
| 4350 | (file-name-nondirectory buffer-file-name)) | ||
| 4351 | heading (match-string 2 org-archive-location))) | ||
| 4352 | (error "Invalid `org-archive-location'")) | ||
| 4353 | (if (> (length file) 0) | ||
| 4354 | (setq newfile-p (not (file-exists-p file)) | ||
| 4355 | buffer (find-file-noselect file)) | ||
| 4356 | (setq buffer (current-buffer))) | ||
| 4357 | (unless buffer | ||
| 4358 | (error "Cannot access file \"%s\"" file)) | ||
| 4359 | (if (and (> (length heading) 0) | ||
| 4360 | (string-match "^\\*+" heading)) | ||
| 4361 | (setq level (match-end 0)) | ||
| 4362 | (setq heading nil level 0)) | ||
| 4363 | (save-excursion | ||
| 4364 | ;; We first only copy, in case something goes wrong | ||
| 4365 | ;; we need to protect this-command, to avoid kill-region sets it, | ||
| 4366 | ;; which would lead to duplication of subtrees | ||
| 4367 | (let (this-command) (org-copy-subtree)) | ||
| 4368 | (set-buffer buffer) | ||
| 4369 | ;; Enforce org-mode for the archive buffer | ||
| 4370 | (if (not (eq major-mode 'org-mode)) | ||
| 4371 | ;; Force the mode for future visits. | ||
| 4372 | (let ((org-insert-mode-line-in-empty-file t)) | ||
| 4373 | (call-interactively 'org-mode))) | ||
| 4374 | (when newfile-p | ||
| 4375 | (goto-char (point-max)) | ||
| 4376 | (insert (format "\nArchived entries from file %s\n\n" | ||
| 4377 | (buffer-file-name this-buffer)))) | ||
| 4378 | ;; Force the TODO keywords of the original buffer | ||
| 4379 | (let ((org-todo-line-regexp tr-org-todo-line-regexp) | ||
| 4380 | (org-todo-keywords tr-org-todo-keywords) | ||
| 4381 | (org-todo-interpretation tr-org-todo-interpretation) | ||
| 4382 | (org-done-string tr-org-done-string) | ||
| 4383 | (org-todo-regexp tr-org-todo-regexp) | ||
| 4384 | (org-todo-line-regexp tr-org-todo-line-regexp)) | ||
| 4385 | (goto-char (point-min)) | ||
| 4386 | (if heading | ||
| 4387 | (progn | ||
| 4388 | (if (re-search-forward | ||
| 4389 | (concat "\\(^\\|\r\\)" | ||
| 4390 | (regexp-quote heading) "[ \t]*\\($\\|\r\\)") | ||
| 4391 | nil t) | ||
| 4392 | (goto-char (match-end 0)) | ||
| 4393 | ;; Heading not found, just insert it at the end | ||
| 4394 | (goto-char (point-max)) | ||
| 4395 | (or (bolp) (insert "\n")) | ||
| 4396 | (insert "\n" heading "\n") | ||
| 4397 | (end-of-line 0)) | ||
| 4398 | ;; Make the subtree visible | ||
| 4399 | (show-subtree) | ||
| 4400 | (org-end-of-subtree t) | ||
| 4401 | (skip-chars-backward " \t\r\n]") | ||
| 4402 | (and (looking-at "[ \t\r\n]*") | ||
| 4403 | (replace-match "\n\n"))) | ||
| 4404 | ;; No specific heading, just go to end of file. | ||
| 4405 | (goto-char (point-max)) (insert "\n")) | ||
| 4406 | ;; Paste | ||
| 4407 | (org-paste-subtree (1+ level)) | ||
| 4408 | ;; Mark the entry as done, i.e. set to last work in org-todo-keywords | ||
| 4409 | (if org-archive-mark-done | ||
| 4410 | (org-todo (length org-todo-keywords))) | ||
| 4411 | ;; Move cursor to right after the TODO keyword | ||
| 4412 | (when org-archive-stamp-time | ||
| 4413 | (beginning-of-line 1) | ||
| 4414 | (looking-at org-todo-line-regexp) | ||
| 4415 | (goto-char (or (match-end 2) (match-beginning 3))) | ||
| 4416 | (insert "(" (format-time-string (cdr org-time-stamp-formats) | ||
| 4417 | (org-current-time)) | ||
| 4418 | ")")) | ||
| 4419 | ;; Save the buffer, if it is not the same buffer. | ||
| 4420 | (if (not (eq this-buffer buffer)) (save-buffer)))) | ||
| 4421 | ;; Here we are back in the original buffer. Everything seems to have | ||
| 4422 | ;; worked. So now cut the tree and finish up. | ||
| 4423 | (let (this-command) (org-cut-subtree)) | ||
| 4424 | (if (and (not (eobp)) (looking-at "[ \t]*$")) (kill-line)) | ||
| 4425 | (message "Subtree archived %s" | ||
| 4426 | (if (eq this-buffer buffer) | ||
| 4427 | (concat "under heading: " heading) | ||
| 4428 | (concat "in file: " (abbreviate-file-name file))))))) | ||
| 4429 | |||
| 4430 | (defun org-archive-all-done () | ||
| 4431 | "Archive sublevels of the current tree without open TODO items. | ||
| 4432 | If the cursor is not on a headline, try all level 1 trees. If | ||
| 4433 | it is on a headline, try all direct children." | ||
| 4434 | (let ((re (concat "^\\*+ +" org-not-done-regexp)) re1 | ||
| 4435 | (begm (make-marker)) | ||
| 4436 | (endm (make-marker)) | ||
| 4437 | beg end (cntarch 0)) | ||
| 4438 | (if (org-on-heading-p) | ||
| 4311 | (progn | 4439 | (progn |
| 4312 | (setq file (format (match-string 1 org-archive-location) | 4440 | (setq re1 (concat "^" (regexp-quote |
| 4313 | (file-name-nondirectory buffer-file-name)) | 4441 | (make-string |
| 4314 | heading (match-string 2 org-archive-location))) | 4442 | (1+ (- (match-end 0) (match-beginning 0))) |
| 4315 | (error "Invalid `org-archive-location'")) | 4443 | ?*)) |
| 4316 | (if (> (length file) 0) | 4444 | " ")) |
| 4317 | (setq newfile-p (not (file-exists-p file)) | 4445 | (move-marker begm (point)) |
| 4318 | buffer (find-file-noselect file)) | 4446 | (move-marker endm (org-end-of-subtree))) |
| 4319 | (setq buffer (current-buffer))) | 4447 | (setq re1 "^* ") |
| 4320 | (unless buffer | 4448 | (move-marker begm (point-min)) |
| 4321 | (error "Cannot access file \"%s\"" file)) | 4449 | (move-marker endm (point-max))) |
| 4322 | (if (and (> (length heading) 0) | ||
| 4323 | (string-match "^\\*+" heading)) | ||
| 4324 | (setq level (match-end 0)) | ||
| 4325 | (setq heading nil level 0)) | ||
| 4326 | (save-excursion | 4450 | (save-excursion |
| 4327 | ;; We first only copy, in case something goes wrong | 4451 | (goto-char begm) |
| 4328 | ;; we need to protect this-command, to avoid kill-region sets it, | 4452 | (while (re-search-forward re1 endm t) |
| 4329 | ;; which would lead to duplication of subtrees | 4453 | beg (match-beginning 0) |
| 4330 | (let (this-command) (org-copy-subtree)) | 4454 | end (save-excursion (org-end-of-subtree t) (point))) |
| 4331 | (set-buffer buffer) | 4455 | (goto-char beg) |
| 4332 | ;; Enforce org-mode for the archive buffer | 4456 | (if (re-search-forward re end t) |
| 4333 | (if (not (eq major-mode 'org-mode)) | 4457 | (goto-char end) |
| 4334 | ;; Force the mode for future visits. | 4458 | (goto-char beg) |
| 4335 | (let ((org-insert-mode-line-in-empty-file t)) | 4459 | (if (y-or-n-p "Archive this subtree (no open TODO items)? ") |
| 4336 | (call-interactively 'org-mode))) | 4460 | (progn |
| 4337 | (when newfile-p | 4461 | (org-archive-subtree) |
| 4338 | (goto-char (point-max)) | 4462 | (setq cntarch (1+ cntarch))) |
| 4339 | (insert (format "\nArchived entries from file %s\n\n" | 4463 | (goto-char end)))) |
| 4340 | (buffer-file-name this-buffer)))) | 4464 | (message "%d trees archived" cntarch))) |
| 4341 | ;; Force the TODO keywords of the original buffer | 4465 | |
| 4342 | (let ((org-todo-line-regexp tr-org-todo-line-regexp) | 4466 | ;;; Dynamic blocks |
| 4343 | (org-todo-keywords tr-org-todo-keywords) | 4467 | |
| 4344 | (org-todo-interpretation tr-org-todo-interpretation) | 4468 | (defun org-find-dblock (name) |
| 4345 | (org-done-string tr-org-done-string) | 4469 | "Find the first dynamic block with name NAME in the buffer. |
| 4346 | (org-todo-regexp tr-org-todo-regexp) | 4470 | If not found, stay at current position and return nil." |
| 4347 | (org-todo-line-regexp tr-org-todo-line-regexp)) | 4471 | (let (pos) |
| 4348 | (goto-char (point-min)) | 4472 | (save-excursion |
| 4349 | (if heading | 4473 | (goto-char (point-min)) |
| 4350 | (progn | 4474 | (setq pos (and (re-search-forward (concat "^#\\+BEGIN:[ \t]+" name "\\>") |
| 4351 | (if (re-search-forward | 4475 | nil t) |
| 4352 | (concat "\\(^\\|\r\\)" | 4476 | (match-beginning 0)))) |
| 4353 | (regexp-quote heading) "[ \t]*\\($\\|\r\\)") | 4477 | (if pos (goto-char pos)) |
| 4354 | nil t) | 4478 | pos)) |
| 4355 | (goto-char (match-end 0)) | 4479 | |
| 4356 | ;; Heading not found, just insert it at the end | 4480 | (defconst org-dblock-start-re |
| 4357 | (goto-char (point-max)) | 4481 | "^#\\+BEGIN:[ \t]+\\(\\S-+\\)[ \t]+\\(.*\\)" |
| 4358 | (or (bolp) (insert "\n")) | 4482 | "Matches the startline of a dynamic block, with parameters.") |
| 4359 | (insert "\n" heading "\n") | 4483 | |
| 4360 | (end-of-line 0)) | 4484 | (defconst org-dblock-end-re "^#\\+END\\([: \t\r\n]\\|$\\)" |
| 4361 | ;; Make the subtree visible | 4485 | "Matches the end of a dyhamic block.") |
| 4362 | (show-subtree) | 4486 | |
| 4363 | (org-end-of-subtree t) | 4487 | (defun org-create-dblock (plist) |
| 4364 | (skip-chars-backward " \t\r\n]") | 4488 | "Create a dynamic block section, with parameters taken from PLIST. |
| 4365 | (and (looking-at "[ \t\r\n]*") | 4489 | PLIST must containe a :name entry which is used as name of the block." |
| 4366 | (replace-match "\n\n"))) | 4490 | (unless (bolp) (newline)) |
| 4367 | ;; No specific heading, just go to end of file. | 4491 | (let ((name (plist-get plist :name))) |
| 4368 | (goto-char (point-max)) (insert "\n")) | 4492 | (insert "#+BEGIN: " name) |
| 4369 | ;; Paste | 4493 | (while plist |
| 4370 | (org-paste-subtree (1+ level)) | 4494 | (if (eq (car plist) :name) |
| 4371 | ;; Mark the entry as done, i.e. set to last work in org-todo-keywords | 4495 | (setq plist (cddr plist)) |
| 4372 | (if org-archive-mark-done | 4496 | (insert " " (prin1-to-string (pop plist))))) |
| 4373 | (org-todo (length org-todo-keywords))) | 4497 | (insert "\n\n#+END:\n") |
| 4374 | ;; Move cursor to right after the TODO keyword | 4498 | (beginning-of-line -2))) |
| 4375 | (when org-archive-stamp-time | 4499 | |
| 4376 | (beginning-of-line 1) | 4500 | (defun org-prepare-dblock () |
| 4377 | (looking-at org-todo-line-regexp) | 4501 | "Prepare dynamic block for refresh. |
| 4378 | (goto-char (or (match-end 2) (match-beginning 3))) | 4502 | This empties the block, puts the cursor at the insert position and returns |
| 4379 | (insert "(" (format-time-string (cdr org-time-stamp-formats) | 4503 | the property list including an extra property :name with the block name." |
| 4380 | (org-current-time)) | 4504 | (unless (looking-at org-dblock-start-re) |
| 4381 | ")")) | 4505 | (error "Not at a dynamic block")) |
| 4382 | ;; Save the buffer, if it is not the same buffer. | 4506 | (let* ((beg (match-beginning 0)) |
| 4383 | (if (not (eq this-buffer buffer)) (save-buffer)))) | 4507 | (begdel (1+ (match-end 0))) |
| 4384 | ;; Here we are back in the original buffer. Everything seems to have | 4508 | (name (match-string 1)) |
| 4385 | ;; worked. So now cut the tree and finish up. | 4509 | (params (append (list :name name) |
| 4386 | (let (this-command) (org-cut-subtree)) | 4510 | (read (concat "(" (match-string 2) ")"))))) |
| 4387 | (if (and (not (eobp)) (looking-at "[ \t]*$")) (kill-line)) | 4511 | (unless (re-search-forward org-dblock-end-re nil t) |
| 4388 | (message "Subtree archived %s" | 4512 | (error "Dynamic block not terminated")) |
| 4389 | (if (eq this-buffer buffer) | 4513 | (delete-region begdel (match-beginning 0)) |
| 4390 | (concat "under heading: " heading) | 4514 | (goto-char begdel) |
| 4391 | (concat "in file: " (abbreviate-file-name file)))))) | 4515 | (open-line 1) |
| 4516 | params)) | ||
| 4517 | |||
| 4518 | (defun org-map-dblocks (&optional command) | ||
| 4519 | "Apply COMMAND to all dynamic blocks in the current buffer. | ||
| 4520 | If COMMAND is not given, use `org-update-dblock'." | ||
| 4521 | (let ((cmd (or command 'org-update-dblock)) | ||
| 4522 | pos) | ||
| 4523 | (save-excursion | ||
| 4524 | (goto-char (point-min)) | ||
| 4525 | (while (re-search-forward org-dblock-start-re nil t) | ||
| 4526 | (goto-char (setq pos (match-beginning 0))) | ||
| 4527 | (condition-case nil | ||
| 4528 | (funcall cmd) | ||
| 4529 | (error (message "Error during update of dynamic block"))) | ||
| 4530 | (goto-char pos) | ||
| 4531 | (unless (re-search-forward org-dblock-end-re nil t) | ||
| 4532 | (error "Dynamic block not terminated")))))) | ||
| 4533 | |||
| 4534 | (defun org-dblock-update (&optional arg) | ||
| 4535 | "User command for updating dynamic blocks. | ||
| 4536 | Update the dynamic block at point. With prefix ARG, update all dynamic | ||
| 4537 | blocks in the buffer." | ||
| 4538 | (interactive "P") | ||
| 4539 | (if arg | ||
| 4540 | (org-update-all-dblocks) | ||
| 4541 | (or (looking-at org-dblock-start-re) | ||
| 4542 | (org-beginning-of-dblock)) | ||
| 4543 | (org-update-dblock))) | ||
| 4544 | |||
| 4545 | (defun org-update-dblock () | ||
| 4546 | "Update the dynamic block at point | ||
| 4547 | This means to empty the block, parse for parameters and then call | ||
| 4548 | the correct writing function." | ||
| 4549 | (let* ((pos (point)) | ||
| 4550 | (params (org-prepare-dblock)) | ||
| 4551 | (name (plist-get params :name)) | ||
| 4552 | (cmd (intern (concat "org-dblock-write:" name)))) | ||
| 4553 | (funcall cmd params) | ||
| 4554 | (goto-char pos))) | ||
| 4555 | |||
| 4556 | (defun org-beginning-of-dblock () | ||
| 4557 | "Find the beginning of the dynamic block at point. | ||
| 4558 | Error if there is no scuh block at point." | ||
| 4559 | (let ((pos (point)) | ||
| 4560 | beg end) | ||
| 4561 | (end-of-line 1) | ||
| 4562 | (if (and (re-search-backward org-dblock-start-re nil t) | ||
| 4563 | (setq beg (match-beginning 0)) | ||
| 4564 | (re-search-forward org-dblock-end-re nil t) | ||
| 4565 | (> (match-end 0) pos)) | ||
| 4566 | (goto-char beg) | ||
| 4567 | (goto-char pos) | ||
| 4568 | (error "Not in a dynamic block")))) | ||
| 4569 | |||
| 4570 | (defun org-update-all-dblocks () | ||
| 4571 | "Update all dynamic blocks in the buffer. | ||
| 4572 | This function can be used in a hook." | ||
| 4573 | (when (eq major-mode 'org-mode) | ||
| 4574 | (org-map-dblocks 'org-update-dblock))) | ||
| 4575 | |||
| 4392 | 4576 | ||
| 4393 | ;;; Completion | 4577 | ;;; Completion |
| 4394 | 4578 | ||
| @@ -4783,16 +4967,18 @@ that the match should indeed be shown." | |||
| 4783 | (org-overlay-put ov 'face 'secondary-selection) | 4967 | (org-overlay-put ov 'face 'secondary-selection) |
| 4784 | (push ov org-occur-highlights))) | 4968 | (push ov org-occur-highlights))) |
| 4785 | 4969 | ||
| 4970 | (defvar org-inhibit-highlight-removal nil) | ||
| 4786 | (defun org-remove-occur-highlights (&optional beg end noremove) | 4971 | (defun org-remove-occur-highlights (&optional beg end noremove) |
| 4787 | "Remove the occur highlights from the buffer. | 4972 | "Remove the occur highlights from the buffer. |
| 4788 | BEG and END are ignored. If NOREMOVE is nil, remove this function | 4973 | BEG and END are ignored. If NOREMOVE is nil, remove this function |
| 4789 | from the `before-change-functions' in the current buffer." | 4974 | from the `before-change-functions' in the current buffer." |
| 4790 | (interactive) | 4975 | (interactive) |
| 4791 | (mapc 'org-delete-overlay org-occur-highlights) | 4976 | (unless org-inhibit-highlight-removal |
| 4792 | (setq org-occur-highlights nil) | 4977 | (mapc 'org-delete-overlay org-occur-highlights) |
| 4793 | (unless noremove | 4978 | (setq org-occur-highlights nil) |
| 4794 | (remove-hook 'before-change-functions | 4979 | (unless noremove |
| 4795 | 'org-remove-occur-highlights 'local))) | 4980 | (remove-hook 'before-change-functions |
| 4981 | 'org-remove-occur-highlights 'local)))) | ||
| 4796 | 4982 | ||
| 4797 | ;;; Priorities | 4983 | ;;; Priorities |
| 4798 | 4984 | ||
| @@ -5449,8 +5635,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set." | |||
| 5449 | "Sum the times for each subtree. | 5635 | "Sum the times for each subtree. |
| 5450 | Puts the resulting times in minutes as a text property on each headline." | 5636 | Puts the resulting times in minutes as a text property on each headline." |
| 5451 | (interactive) | 5637 | (interactive) |
| 5452 | (remove-text-properties (point-min) (point-max) '(:org-clock-minutes t)) | 5638 | (let* ((bmp (buffer-modified-p)) |
| 5453 | (let* ((re (concat "^\\(\\*+\\)[ \t]\\|^[ \t]*" | 5639 | (re (concat "^\\(\\*+\\)[ \t]\\|^[ \t]*" |
| 5454 | org-clock-string | 5640 | org-clock-string |
| 5455 | ".*=>[ \t]*\\([0-9]+\\):\\([0-9]+\\)[ \t]*$")) | 5641 | ".*=>[ \t]*\\([0-9]+\\):\\([0-9]+\\)[ \t]*$")) |
| 5456 | (lmax 30) | 5642 | (lmax 30) |
| @@ -5458,6 +5644,7 @@ Puts the resulting times in minutes as a text property on each headline." | |||
| 5458 | (t1 0) | 5644 | (t1 0) |
| 5459 | (level 0) | 5645 | (level 0) |
| 5460 | (lastlevel 0) time) | 5646 | (lastlevel 0) time) |
| 5647 | (remove-text-properties (point-min) (point-max) '(:org-clock-minutes t)) | ||
| 5461 | (save-excursion | 5648 | (save-excursion |
| 5462 | (goto-char (point-max)) | 5649 | (goto-char (point-max)) |
| 5463 | (while (re-search-backward re nil t) | 5650 | (while (re-search-backward re nil t) |
| @@ -5475,7 +5662,8 @@ Puts the resulting times in minutes as a text property on each headline." | |||
| 5475 | (aset ltimes l 0)) | 5662 | (aset ltimes l 0)) |
| 5476 | (goto-char (match-beginning 0)) | 5663 | (goto-char (match-beginning 0)) |
| 5477 | (put-text-property (point) (point-at-eol) :org-clock-minutes time)))) | 5664 | (put-text-property (point) (point-at-eol) :org-clock-minutes time)))) |
| 5478 | (setq org-clock-file-total-minutes (aref ltimes 0))))) | 5665 | (setq org-clock-file-total-minutes (aref ltimes 0))) |
| 5666 | (set-buffer-modified-p bmp))) | ||
| 5479 | 5667 | ||
| 5480 | (defun org-clock-display (&optional total-only) | 5668 | (defun org-clock-display (&optional total-only) |
| 5481 | "Show subtree times in the entire buffer. | 5669 | "Show subtree times in the entire buffer. |
| @@ -5510,11 +5698,11 @@ will be easy to remove." | |||
| 5510 | (off 0) | 5698 | (off 0) |
| 5511 | ov tx) | 5699 | ov tx) |
| 5512 | (move-to-column c) | 5700 | (move-to-column c) |
| 5513 | (if (eolp) (setq off 1)) | ||
| 5514 | (unless (eolp) (skip-chars-backward "^ \t")) | 5701 | (unless (eolp) (skip-chars-backward "^ \t")) |
| 5515 | (skip-chars-backward " \t") | 5702 | (skip-chars-backward " \t") |
| 5516 | (setq ov (org-make-overlay (- (point) off) (point-at-eol)) | 5703 | (setq ov (org-make-overlay (1- (point)) (point-at-eol)) |
| 5517 | tx (concat (make-string (+ off (max 0 (- c (current-column)))) ?.) | 5704 | tx (concat (buffer-substring (1- (point)) (point)) |
| 5705 | (make-string (+ off (max 0 (- c (current-column)))) ?.) | ||
| 5518 | (org-add-props (format "%s %2d:%02d%s" | 5706 | (org-add-props (format "%s %2d:%02d%s" |
| 5519 | (make-string l ?*) h m | 5707 | (make-string l ?*) h m |
| 5520 | (make-string (- 10 l) ?\ )) | 5708 | (make-string (- 10 l) ?\ )) |
| @@ -5528,11 +5716,12 @@ will be easy to remove." | |||
| 5528 | BEG and END are ignored. If NOREMOVE is nil, remove this function | 5716 | BEG and END are ignored. If NOREMOVE is nil, remove this function |
| 5529 | from the `before-change-functions' in the current buffer." | 5717 | from the `before-change-functions' in the current buffer." |
| 5530 | (interactive) | 5718 | (interactive) |
| 5531 | (mapc 'org-delete-overlay org-clock-overlays) | 5719 | (unless org-inhibit-highlight-removal |
| 5532 | (setq org-clock-overlays nil) | 5720 | (mapc 'org-delete-overlay org-clock-overlays) |
| 5533 | (unless noremove | 5721 | (setq org-clock-overlays nil) |
| 5534 | (remove-hook 'before-change-functions | 5722 | (unless noremove |
| 5535 | 'org-remove-clock-overlays 'local))) | 5723 | (remove-hook 'before-change-functions |
| 5724 | 'org-remove-clock-overlays 'local)))) | ||
| 5536 | 5725 | ||
| 5537 | (defun org-clock-out-if-current () | 5726 | (defun org-clock-out-if-current () |
| 5538 | "Clock out if the current entry contains the running clock. | 5727 | "Clock out if the current entry contains the running clock. |
| @@ -5557,6 +5746,113 @@ If yes, offer to stop it and to save the buffer with the changes." | |||
| 5557 | (when (y-or-n-p "Save changed buffer?") | 5746 | (when (y-or-n-p "Save changed buffer?") |
| 5558 | (save-buffer)))) | 5747 | (save-buffer)))) |
| 5559 | 5748 | ||
| 5749 | (defun org-clock-report () | ||
| 5750 | "Create a table containing a report about clocked time. | ||
| 5751 | If the buffer contains lines | ||
| 5752 | #+BEGIN: clocktable :maxlevel 3 :emphasize nil | ||
| 5753 | |||
| 5754 | #+END: clocktable | ||
| 5755 | then the table will be inserted between these lines, replacing whatever | ||
| 5756 | is was there before. If these lines are not in the buffer, the table | ||
| 5757 | is inserted at point, surrounded by the special lines. | ||
| 5758 | The BEGIN line can contain parameters. Allowed are: | ||
| 5759 | :maxlevel The maximum level to be included in the table. Default is 3. | ||
| 5760 | :emphasize t/nil, if levell 1 and level 2 should be bold/italic in the table." | ||
| 5761 | (interactive) | ||
| 5762 | (org-remove-clock-overlays) | ||
| 5763 | (unless (org-find-dblock "clocktable") | ||
| 5764 | (org-create-dblock (list :name "clocktable" | ||
| 5765 | :maxlevel 2 :emphasize nil))) | ||
| 5766 | (org-update-dblock)) | ||
| 5767 | |||
| 5768 | (defun org-dblock-write:clocktable (params) | ||
| 5769 | "Write the standard clocktable." | ||
| 5770 | (let ((hlchars '((1 . "*") (2 . ?/))) | ||
| 5771 | (emph nil) | ||
| 5772 | (pos (point)) ipos | ||
| 5773 | (ins (make-marker)) | ||
| 5774 | time h m p level hlc hdl maxlevel) | ||
| 5775 | (setq maxlevel (or (plist-get params :maxlevel) 3) | ||
| 5776 | emph (plist-get params :emphasize)) | ||
| 5777 | (move-marker ins (point)) | ||
| 5778 | (setq ipos (point)) | ||
| 5779 | (insert-before-markers "Clock summary at [" | ||
| 5780 | (substring | ||
| 5781 | (format-time-string (cdr org-time-stamp-formats)) | ||
| 5782 | 1 -1) | ||
| 5783 | "]\n|L|Headline|Time|\n") | ||
| 5784 | (org-clock-sum) | ||
| 5785 | (setq h (/ org-clock-file-total-minutes 60) | ||
| 5786 | m (- org-clock-file-total-minutes (* 60 h))) | ||
| 5787 | (insert-before-markers "|-\n|0|" "*Total file time*| " | ||
| 5788 | (format "*%d:%02d*" h m) | ||
| 5789 | "|\n") | ||
| 5790 | (goto-char (point-min)) | ||
| 5791 | (while (setq p (next-single-property-change (point) :org-clock-minutes)) | ||
| 5792 | (goto-char p) | ||
| 5793 | (when (setq time (get-text-property p :org-clock-minutes)) | ||
| 5794 | (beginning-of-line 1) | ||
| 5795 | (when (and (looking-at "\\(\\*+\\)[ \t]+\\(.*?\\)\\([ \t]+:[0-9a-zA-Z_@:]+:\\)?[ \t]*$") | ||
| 5796 | (setq level (- (match-end 1) (match-beginning 1))) | ||
| 5797 | (<= level maxlevel)) | ||
| 5798 | (setq hlc (if emph (or (cdr (assoc level hlchars)) "") "") | ||
| 5799 | hdl (match-string 2) | ||
| 5800 | h (/ time 60) | ||
| 5801 | m (- time (* 60 h))) | ||
| 5802 | (save-excursion | ||
| 5803 | (goto-char ins) | ||
| 5804 | (if (= level 1) (insert-before-markers "|-\n")) | ||
| 5805 | (insert-before-markers | ||
| 5806 | "| " (int-to-string level) "|" hlc hdl hlc " |" | ||
| 5807 | (make-string (1- level) ?|) | ||
| 5808 | hlc | ||
| 5809 | (format "%d:%02d" h m) | ||
| 5810 | hlc | ||
| 5811 | " |\n"))))) | ||
| 5812 | (goto-char ins) | ||
| 5813 | (backward-delete-char 1) | ||
| 5814 | (goto-char ipos) | ||
| 5815 | (skip-chars-forward "^|") | ||
| 5816 | (org-table-align))) | ||
| 5817 | |||
| 5818 | (defun org-collect-clock-time-entries () | ||
| 5819 | "Return an internal list with clocking information. | ||
| 5820 | This list has one entry for each CLOCK interval. | ||
| 5821 | FIXME: describe the elements." | ||
| 5822 | (interactive) | ||
| 5823 | (let ((re (concat "^[ \t]*" org-clock-string | ||
| 5824 | " *\\[\\(.*?\\)\\]--\\[\\(.*?\\)\\]")) | ||
| 5825 | rtn beg end next cont level title total closedp leafp | ||
| 5826 | clockpos titlepos h m donep) | ||
| 5827 | (save-excursion | ||
| 5828 | (org-clock-sum) | ||
| 5829 | (goto-char (point-min)) | ||
| 5830 | (while (re-search-forward re nil t) | ||
| 5831 | (setq clockpos (match-beginning 0) | ||
| 5832 | beg (match-string 1) end (match-string 2) | ||
| 5833 | cont (match-end 0)) | ||
| 5834 | (setq beg (apply 'encode-time (org-parse-time-string beg)) | ||
| 5835 | end (apply 'encode-time (org-parse-time-string end))) | ||
| 5836 | (org-back-to-heading t) | ||
| 5837 | (setq donep (org-entry-is-done-p)) | ||
| 5838 | (setq titlepos (point) | ||
| 5839 | total (or (get-text-property (1+ (point)) :org-clock-minutes) 0) | ||
| 5840 | h (/ total 60) m (- total (* 60 h)) | ||
| 5841 | total (cons h m)) | ||
| 5842 | (looking-at "\\(\\*+\\) +\\(.*\\)") | ||
| 5843 | (setq level (- (match-end 1) (match-beginning 1)) | ||
| 5844 | title (org-match-string-no-properties 2)) | ||
| 5845 | (save-excursion (outline-next-heading) (setq next (point))) | ||
| 5846 | (setq closedp (re-search-forward org-closed-time-regexp next t)) | ||
| 5847 | (goto-char next) | ||
| 5848 | (setq leafp (and (looking-at "^\\*+ ") | ||
| 5849 | (<= (- (match-end 0) (point)) level))) | ||
| 5850 | (push (list beg end clockpos closedp donep | ||
| 5851 | total title titlepos level leafp) | ||
| 5852 | rtn) | ||
| 5853 | (goto-char cont))) | ||
| 5854 | (nreverse rtn))) | ||
| 5855 | |||
| 5560 | ;;; Agenda, and Diary Integration | 5856 | ;;; Agenda, and Diary Integration |
| 5561 | 5857 | ||
| 5562 | ;;; Define the mode | 5858 | ;;; Define the mode |
| @@ -9186,8 +9482,8 @@ For file links, arg negates `org-context-in-file-links'." | |||
| 9186 | (setq cpltxt (url-view-url t) | 9482 | (setq cpltxt (url-view-url t) |
| 9187 | link (org-make-link cpltxt))) | 9483 | link (org-make-link cpltxt))) |
| 9188 | ((eq major-mode 'w3m-mode) | 9484 | ((eq major-mode 'w3m-mode) |
| 9189 | (setq cpltxt w3m-current-url | 9485 | (setq cpltxt (or w3m-current-title w3m-current-url) |
| 9190 | link (org-make-link cpltxt))) | 9486 | link (org-make-link w3m-current-url))) |
| 9191 | 9487 | ||
| 9192 | ((setq search (run-hook-with-args-until-success | 9488 | ((setq search (run-hook-with-args-until-success |
| 9193 | 'org-create-file-search-functions)) | 9489 | 'org-create-file-search-functions)) |
| @@ -9195,6 +9491,11 @@ For file links, arg negates `org-context-in-file-links'." | |||
| 9195 | "::" search)) | 9491 | "::" search)) |
| 9196 | (setq cpltxt (or description link))) | 9492 | (setq cpltxt (or description link))) |
| 9197 | 9493 | ||
| 9494 | ((eq major-mode 'image-mode) | ||
| 9495 | (setq cpltxt (concat "file:" | ||
| 9496 | (abbreviate-file-name buffer-file-name)) | ||
| 9497 | link (org-make-link cpltxt))) | ||
| 9498 | |||
| 9198 | ((eq major-mode 'org-mode) | 9499 | ((eq major-mode 'org-mode) |
| 9199 | ;; Just link to current headline | 9500 | ;; Just link to current headline |
| 9200 | (setq cpltxt (concat "file:" | 9501 | (setq cpltxt (concat "file:" |
| @@ -9414,7 +9715,9 @@ subdirectory. Otherwise, the link will be the absolute path as | |||
| 9414 | completed in the minibuffer (i.e. normally ~/path/to/file). | 9715 | completed in the minibuffer (i.e. normally ~/path/to/file). |
| 9415 | 9716 | ||
| 9416 | With two \\[universal-argument] prefixes, enforce an absolute path even if the file | 9717 | With two \\[universal-argument] prefixes, enforce an absolute path even if the file |
| 9417 | is in the current directory or below." | 9718 | is in the current directory or below. |
| 9719 | With three \\[universal-argument] prefixes, negate the meaning of | ||
| 9720 | `org-keep-stored-link-after-insertion'." | ||
| 9418 | (interactive "P") | 9721 | (interactive "P") |
| 9419 | (let (link desc entry remove file (pos (point))) | 9722 | (let (link desc entry remove file (pos (point))) |
| 9420 | (cond | 9723 | (cond |
| @@ -9430,7 +9733,7 @@ is in the current directory or below." | |||
| 9430 | (setq link (read-string "Link: " | 9733 | (setq link (read-string "Link: " |
| 9431 | (org-link-unescape | 9734 | (org-link-unescape |
| 9432 | (org-match-string-no-properties 1))))) | 9735 | (org-match-string-no-properties 1))))) |
| 9433 | (complete-file | 9736 | ((equal complete-file '(4)) |
| 9434 | ;; Completing read for file names. | 9737 | ;; Completing read for file names. |
| 9435 | (setq file (read-file-name "File: ")) | 9738 | (setq file (read-file-name "File: ")) |
| 9436 | (let ((pwd (file-name-as-directory (expand-file-name "."))) | 9739 | (let ((pwd (file-name-as-directory (expand-file-name "."))) |
| @@ -9455,7 +9758,8 @@ is in the current directory or below." | |||
| 9455 | org-insert-link-history | 9758 | org-insert-link-history |
| 9456 | (or (car (car org-stored-links))))) | 9759 | (or (car (car org-stored-links))))) |
| 9457 | (setq entry (assoc link org-stored-links)) | 9760 | (setq entry (assoc link org-stored-links)) |
| 9458 | (if (not org-keep-stored-link-after-insertion) | 9761 | (if (funcall (if (equal complete-file '(64)) 'not 'identity) |
| 9762 | (not org-keep-stored-link-after-insertion)) | ||
| 9459 | (setq org-stored-links (delq (assoc link org-stored-links) | 9763 | (setq org-stored-links (delq (assoc link org-stored-links) |
| 9460 | org-stored-links))) | 9764 | org-stored-links))) |
| 9461 | (setq link (if entry (nth 1 entry) link) | 9765 | (setq link (if entry (nth 1 entry) link) |
| @@ -12199,7 +12503,8 @@ ones and overrule settings in the other lists." | |||
| 12199 | \[X] publish... (project will be prompted for) | 12503 | \[X] publish... (project will be prompted for) |
| 12200 | \[A] publish all projects") | 12504 | \[A] publish all projects") |
| 12201 | (cmds | 12505 | (cmds |
| 12202 | '((?v . org-export-visible) | 12506 | '((?t . org-insert-export-options-template) |
| 12507 | (?v . org-export-visible) | ||
| 12203 | (?a . org-export-as-ascii) | 12508 | (?a . org-export-as-ascii) |
| 12204 | (?h . org-export-as-html) | 12509 | (?h . org-export-as-html) |
| 12205 | (?b . org-export-as-html-and-open) | 12510 | (?b . org-export-as-html-and-open) |
| @@ -12566,7 +12871,7 @@ translations. There is currently no way for users to extend this.") | |||
| 12566 | (match-string 1) "[[" (match-string 2) ":" (match-string 3) "]]") | 12871 | (match-string 1) "[[" (match-string 2) ":" (match-string 3) "]]") |
| 12567 | t t)) | 12872 | t t)) |
| 12568 | ;; Find multiline emphasis and put them into single line | 12873 | ;; Find multiline emphasis and put them into single line |
| 12569 | (when (assq :emph-multiline parameters) | 12874 | (when (memq :emph-multiline parameters) |
| 12570 | (goto-char (point-min)) | 12875 | (goto-char (point-min)) |
| 12571 | (while (re-search-forward org-emph-re nil t) | 12876 | (while (re-search-forward org-emph-re nil t) |
| 12572 | (subst-char-in-region (match-beginning 0) (match-end 0) ?\n ?\ t) | 12877 | (subst-char-in-region (match-beginning 0) (match-end 0) ?\n ?\ t) |
| @@ -12858,13 +13163,18 @@ command." | |||
| 12858 | (interactive | 13163 | (interactive |
| 12859 | (list (progn | 13164 | (list (progn |
| 12860 | (message "Export visible: [a]SCII [h]tml [b]rowse HTML [x]OXO [ ]keep buffer") | 13165 | (message "Export visible: [a]SCII [h]tml [b]rowse HTML [x]OXO [ ]keep buffer") |
| 12861 | (char-to-string (read-char-exclusive))) | 13166 | (read-char-exclusive)) |
| 12862 | current-prefix-arg)) | 13167 | current-prefix-arg)) |
| 12863 | (if (not (member type '("a" "\C-a" "b" "\C-b" "h" "x" " "))) | 13168 | (if (not (member type '(?a ?\C-a ?b ?\C-b ?h ?x ?\ ))) |
| 12864 | (error "Invalid export key")) | 13169 | (error "Invalid export key")) |
| 12865 | ;; FIXME: do this more explicit? | 13170 | (let* ((binding (cdr (assoc type |
| 12866 | (let* ((binding (key-binding (concat "\C-c\C-x" type))) | 13171 | '((?a . org-export-as-ascii) |
| 12867 | (keepp (equal type " ")) | 13172 | (?\C-a . org-export-as-ascii) |
| 13173 | (?b . org-export-as-html-and-open) | ||
| 13174 | (?\C-b . org-export-as-html-and-open) | ||
| 13175 | (?h . org-export-as-html) | ||
| 13176 | (?x . org-export-as-xoxo))))) | ||
| 13177 | (keepp (equal type ?\ )) | ||
| 12868 | (file buffer-file-name) | 13178 | (file buffer-file-name) |
| 12869 | (buffer (get-buffer-create "*Org Export Visible*")) | 13179 | (buffer (get-buffer-create "*Org Export Visible*")) |
| 12870 | s e) | 13180 | s e) |
| @@ -13049,6 +13359,8 @@ org-mode's default settings, but still inferior to file-local settings." | |||
| 13049 | (org-infile-export-plist))) | 13359 | (org-infile-export-plist))) |
| 13050 | 13360 | ||
| 13051 | (style (plist-get opt-plist :style)) | 13361 | (style (plist-get opt-plist :style)) |
| 13362 | (link-validate (plist-get opt-plist :link-validation-function)) | ||
| 13363 | valid | ||
| 13052 | (odd org-odd-levels-only) | 13364 | (odd org-odd-levels-only) |
| 13053 | (region-p (org-region-active-p)) | 13365 | (region-p (org-region-active-p)) |
| 13054 | (region | 13366 | (region |
| @@ -13068,6 +13380,7 @@ org-mode's default settings, but still inferior to file-local settings." | |||
| 13068 | (file-name-sans-extension | 13380 | (file-name-sans-extension |
| 13069 | (file-name-nondirectory buffer-file-name)) | 13381 | (file-name-nondirectory buffer-file-name)) |
| 13070 | ".html")) | 13382 | ".html")) |
| 13383 | (current-dir (file-name-directory buffer-file-name)) | ||
| 13071 | (buffer (find-file-noselect filename)) | 13384 | (buffer (find-file-noselect filename)) |
| 13072 | (levels-open (make-vector org-level-max nil)) | 13385 | (levels-open (make-vector org-level-max nil)) |
| 13073 | (date (format-time-string "%Y/%m/%d" (current-time))) | 13386 | (date (format-time-string "%Y/%m/%d" (current-time))) |
| @@ -13314,6 +13627,10 @@ lang=\"%s\" xml:lang=\"%s\"> | |||
| 13314 | (if (string-match "::\\(.*\\)" filename) | 13627 | (if (string-match "::\\(.*\\)" filename) |
| 13315 | (setq search (match-string 1 filename) | 13628 | (setq search (match-string 1 filename) |
| 13316 | filename (replace-match "" t nil filename))) | 13629 | filename (replace-match "" t nil filename))) |
| 13630 | (setq valid | ||
| 13631 | (if (functionp link-validate) | ||
| 13632 | (funcall link-validate filename current-dir) | ||
| 13633 | t)) | ||
| 13317 | (setq file-is-image-p | 13634 | (setq file-is-image-p |
| 13318 | (string-match (org-image-file-name-regexp) filename)) | 13635 | (string-match (org-image-file-name-regexp) filename)) |
| 13319 | (setq thefile (if abs-p (expand-file-name filename) filename)) | 13636 | (setq thefile (if abs-p (expand-file-name filename) filename)) |
| @@ -13339,7 +13656,8 @@ lang=\"%s\" xml:lang=\"%s\"> | |||
| 13339 | (and org-export-html-inline-images | 13656 | (and org-export-html-inline-images |
| 13340 | (not descp)))) | 13657 | (not descp)))) |
| 13341 | (concat "<img src=\"" thefile "\"/>") | 13658 | (concat "<img src=\"" thefile "\"/>") |
| 13342 | (concat "<a href=\"" thefile "\">" desc "</a>"))))) | 13659 | (concat "<a href=\"" thefile "\">" desc "</a>"))) |
| 13660 | (if (not valid) (setq rpl desc)))) | ||
| 13343 | ((member type '("bbdb" "vm" "wl" "mhe" "rmail" "gnus" "shell" "info" "elisp")) | 13661 | ((member type '("bbdb" "vm" "wl" "mhe" "rmail" "gnus" "shell" "info" "elisp")) |
| 13344 | (setq rpl (concat "<i><" type ":" | 13662 | (setq rpl (concat "<i><" type ":" |
| 13345 | (save-match-data (org-link-unescape path)) | 13663 | (save-match-data (org-link-unescape path)) |
| @@ -13650,27 +13968,31 @@ But it has the disadvantage, that Org-mode's HTML conversions cannot be used." | |||
| 13650 | 13968 | ||
| 13651 | (defun org-html-handle-time-stamps (s) | 13969 | (defun org-html-handle-time-stamps (s) |
| 13652 | "Format time stamps in string S, or remove them." | 13970 | "Format time stamps in string S, or remove them." |
| 13653 | (let (r b) | 13971 | (catch 'exit |
| 13654 | (while (string-match org-maybe-keyword-time-regexp s) | 13972 | (let (r b) |
| 13655 | (or b (setq b (substring s 0 (match-beginning 0)))) | 13973 | (while (string-match org-maybe-keyword-time-regexp s) |
| 13656 | (if (not org-export-with-timestamps) | 13974 | ;; FIXME: is it good to never export CLOCK, or do we need control? |
| 13657 | (setq r (concat r (substring s 0 (match-beginning 0))) | 13975 | (if (and (match-end 1) (equal (match-string 1 s) org-clock-string)) |
| 13658 | s (substring s (match-end 0))) | 13976 | (throw 'exit "")) |
| 13659 | (setq r (concat | 13977 | (or b (setq b (substring s 0 (match-beginning 0)))) |
| 13660 | r (substring s 0 (match-beginning 0)) | 13978 | (if (not org-export-with-timestamps) |
| 13661 | (if (match-end 1) | 13979 | (setq r (concat r (substring s 0 (match-beginning 0))) |
| 13662 | (format "@<span class=\"timestamp-kwd\">%s @</span>" | 13980 | s (substring s (match-end 0))) |
| 13663 | (match-string 1 s))) | 13981 | (setq r (concat |
| 13664 | (format " @<span class=\"timestamp\">%s@</span>" | 13982 | r (substring s 0 (match-beginning 0)) |
| 13665 | (substring (match-string 3 s) 1 -1))) | 13983 | (if (match-end 1) |
| 13666 | s (substring s (match-end 0))))) | 13984 | (format "@<span class=\"timestamp-kwd\">%s @</span>" |
| 13667 | ;; Line break of line started and ended with time stamp stuff | 13985 | (match-string 1 s))) |
| 13668 | (if (not r) | 13986 | (format " @<span class=\"timestamp\">%s@</span>" |
| 13669 | s | 13987 | (substring (match-string 3 s) 1 -1))) |
| 13670 | (setq r (concat r s)) | 13988 | s (substring s (match-end 0))))) |
| 13671 | (unless (string-match "\\S-" (concat b s)) | 13989 | ;; Line break if line started and ended with time stamp stuff |
| 13672 | (setq r (concat r "@<br/>"))) | 13990 | (if (not r) |
| 13673 | r))) | 13991 | s |
| 13992 | (setq r (concat r s)) | ||
| 13993 | (unless (string-match "\\S-" (concat b s)) | ||
| 13994 | (setq r (concat r "@<br/>"))) | ||
| 13995 | r)))) | ||
| 13674 | 13996 | ||
| 13675 | (defun org-html-protect (s) | 13997 | (defun org-html-protect (s) |
| 13676 | ;; convert & to &, < to < and > to > | 13998 | ;; convert & to &, < to < and > to > |
| @@ -14212,6 +14534,7 @@ a time), or the day by one (if it does not contain a time)." | |||
| 14212 | ;; All the other keys | 14534 | ;; All the other keys |
| 14213 | 14535 | ||
| 14214 | (define-key org-mode-map "\C-c\C-a" 'show-all) ; in case allout messed up. | 14536 | (define-key org-mode-map "\C-c\C-a" 'show-all) ; in case allout messed up. |
| 14537 | (define-key org-mode-map "\C-xns" 'org-narrow-to-subtree) | ||
| 14215 | (define-key org-mode-map "\C-c$" 'org-archive-subtree) | 14538 | (define-key org-mode-map "\C-c$" 'org-archive-subtree) |
| 14216 | (define-key org-mode-map "\C-c\C-j" 'org-goto) | 14539 | (define-key org-mode-map "\C-c\C-j" 'org-goto) |
| 14217 | (define-key org-mode-map "\C-c\C-t" 'org-todo) | 14540 | (define-key org-mode-map "\C-c\C-t" 'org-todo) |
| @@ -14255,24 +14578,7 @@ a time), or the day by one (if it does not contain a time)." | |||
| 14255 | (define-key org-mode-map "\C-c~" 'org-table-create-with-table.el) | 14578 | (define-key org-mode-map "\C-c~" 'org-table-create-with-table.el) |
| 14256 | (define-key org-mode-map "\C-c\C-q" 'org-table-wrap-region) | 14579 | (define-key org-mode-map "\C-c\C-q" 'org-table-wrap-region) |
| 14257 | (define-key org-mode-map "\C-c\C-e" 'org-export) | 14580 | (define-key org-mode-map "\C-c\C-e" 'org-export) |
| 14258 | ;(define-key org-mode-map "\C-c\C-xa" 'org-export-as-ascii) | ||
| 14259 | ;(define-key org-mode-map "\C-c\C-x\C-a" 'org-export-as-ascii) | ||
| 14260 | ;(define-key org-mode-map "\C-c\C-xv" 'org-export-visible) | ||
| 14261 | ;(define-key org-mode-map "\C-c\C-x\C-v" 'org-export-visible) | ||
| 14262 | ;; OPML support is only an option for the future | ||
| 14263 | ;(define-key org-mode-map "\C-c\C-xo" 'org-export-as-opml) | ||
| 14264 | ;(define-key org-mode-map "\C-c\C-x\C-o" 'org-export-as-opml) | ||
| 14265 | ;(define-key org-mode-map "\C-c\C-xi" 'org-export-icalendar-this-file) | ||
| 14266 | ;(define-key org-mode-map "\C-c\C-x\C-i" 'org-export-icalendar-all-agenda-files) | ||
| 14267 | ;(define-key org-mode-map "\C-c\C-xc" 'org-export-icalendar-combine-agenda-files) | ||
| 14268 | ;(define-key org-mode-map "\C-c\C-x\C-c" 'org-export-icalendar-combine-agenda-files) | ||
| 14269 | ;(define-key org-mode-map "\C-c\C-xt" 'org-insert-export-options-template) | ||
| 14270 | (define-key org-mode-map "\C-c:" 'org-toggle-fixed-width-section) | 14581 | (define-key org-mode-map "\C-c:" 'org-toggle-fixed-width-section) |
| 14271 | ;(define-key org-mode-map "\C-c\C-xh" 'org-export-as-html) | ||
| 14272 | ;(define-key org-mode-map "\C-c\C-xx" 'org-export-as-xoxo) | ||
| 14273 | ;(define-key org-mode-map "\C-c\C-x\C-x" 'org-export-as-xoxo) | ||
| 14274 | ;(define-key org-mode-map "\C-c\C-xb" 'org-export-as-html-and-open) | ||
| 14275 | ;(define-key org-mode-map "\C-c\C-x\C-b" 'org-export-as-html-and-open) | ||
| 14276 | 14582 | ||
| 14277 | (define-key org-mode-map "\C-c\C-x\C-k" 'org-cut-special) | 14583 | (define-key org-mode-map "\C-c\C-x\C-k" 'org-cut-special) |
| 14278 | (define-key org-mode-map "\C-c\C-x\C-w" 'org-cut-special) | 14584 | (define-key org-mode-map "\C-c\C-x\C-w" 'org-cut-special) |
| @@ -14283,15 +14589,9 @@ a time), or the day by one (if it does not contain a time)." | |||
| 14283 | (define-key org-mode-map "\C-c\C-x\C-o" 'org-clock-out) | 14589 | (define-key org-mode-map "\C-c\C-x\C-o" 'org-clock-out) |
| 14284 | (define-key org-mode-map "\C-c\C-x\C-x" 'org-clock-cancel) | 14590 | (define-key org-mode-map "\C-c\C-x\C-x" 'org-clock-cancel) |
| 14285 | (define-key org-mode-map "\C-c\C-x\C-d" 'org-clock-display) | 14591 | (define-key org-mode-map "\C-c\C-x\C-d" 'org-clock-display) |
| 14592 | (define-key org-mode-map "\C-c\C-x\C-r" 'org-clock-report) | ||
| 14286 | 14593 | ||
| 14287 | ;(define-key org-mode-map "\C-c\C-ef" 'org-publish-current-file) | 14594 | (define-key org-mode-map "\C-c\C-x\C-u" 'org-dblock-update) |
| 14288 | ;(define-key org-mode-map "\C-c\C-ep" 'org-publish-current-project) | ||
| 14289 | ;(define-key org-mode-map "\C-c\C-ec" 'org-publish) | ||
| 14290 | ;(define-key org-mode-map "\C-c\C-ea" 'org-publish-all) | ||
| 14291 | ;(define-key org-mode-map "\C-c\C-e\C-f" 'org-publish-current-file) | ||
| 14292 | ;(define-key org-mode-map "\C-c\C-e\C-p" 'org-publish-current-project) | ||
| 14293 | ;(define-key org-mode-map "\C-c\C-e\C-c" 'org-publish) | ||
| 14294 | ;(define-key org-mode-map "\C-c\C-e\C-a" 'org-publish-all) | ||
| 14295 | 14595 | ||
| 14296 | (when (featurep 'xemacs) | 14596 | (when (featurep 'xemacs) |
| 14297 | (define-key org-mode-map 'button3 'popup-mode-menu)) | 14597 | (define-key org-mode-map 'button3 'popup-mode-menu)) |
| @@ -14785,6 +15085,7 @@ See the individual commands for more information." | |||
| 14785 | ["Clock out" org-clock-out t] | 15085 | ["Clock out" org-clock-out t] |
| 14786 | ["Clock cancel" org-clock-cancel t] | 15086 | ["Clock cancel" org-clock-cancel t] |
| 14787 | ["Display times" org-clock-display t] | 15087 | ["Display times" org-clock-display t] |
| 15088 | ["Create clock table" org-clock-report t] | ||
| 14788 | "--" | 15089 | "--" |
| 14789 | ["Record DONE time" | 15090 | ["Record DONE time" |
| 14790 | (progn (setq org-log-done (not org-log-done)) | 15091 | (progn (setq org-log-done (not org-log-done)) |
| @@ -15284,7 +15585,8 @@ When ENTRY is non-nil, show the entire entry." | |||
| 15284 | (forward-char -1) | 15585 | (forward-char -1) |
| 15285 | (if (memq (preceding-char) '(?\n ?\^M)) | 15586 | (if (memq (preceding-char) '(?\n ?\^M)) |
| 15286 | ;; leave blank line before heading | 15587 | ;; leave blank line before heading |
| 15287 | (forward-char -1)))))) | 15588 | (forward-char -1))))) |
| 15589 | (point)) | ||
| 15288 | 15590 | ||
| 15289 | (defun org-show-subtree () | 15591 | (defun org-show-subtree () |
| 15290 | "Show everything after this heading at deeper levels." | 15592 | "Show everything after this heading at deeper levels." |
| @@ -15334,8 +15636,12 @@ Show the heading too, if it is currently invisible." | |||
| 15334 | (org-invisible-p))) | 15636 | (org-invisible-p))) |
| 15335 | (org-show-hierarchy-above))) | 15637 | (org-show-hierarchy-above))) |
| 15336 | 15638 | ||
| 15337 | ;;; Finish up | ||
| 15338 | 15639 | ||
| 15640 | ;;; Experimental code | ||
| 15641 | |||
| 15642 | |||
| 15643 | ;;; Finish up | ||
| 15644 | |||
| 15339 | (provide 'org) | 15645 | (provide 'org) |
| 15340 | 15646 | ||
| 15341 | (run-hooks 'org-load-hook) | 15647 | (run-hooks 'org-load-hook) |
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 8ca7c3026e8..9e78f4b6015 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -597,7 +597,7 @@ An alternative value is \" . \", if you use a font with a narrow period." | |||
| 597 | (defun tex-font-lock-match-suscript (limit) | 597 | (defun tex-font-lock-match-suscript (limit) |
| 598 | "Match subscript and superscript patterns up to LIMIT." | 598 | "Match subscript and superscript patterns up to LIMIT." |
| 599 | (when (re-search-forward "[_^] *\\([^\n\\{}]\\|\ | 599 | (when (re-search-forward "[_^] *\\([^\n\\{}]\\|\ |
| 600 | \\\\\\([a-zA-Z@]+\\|[^ \t\n]\\)\\|{[^\\{]*}\\|\\({\\)\\)" limit t) | 600 | \\\\\\([a-zA-Z@]+\\|[^ \t\n]\\)\\|\\({\\)\\)" limit t) |
| 601 | (when (match-end 3) | 601 | (when (match-end 3) |
| 602 | (let ((beg (match-beginning 3)) | 602 | (let ((beg (match-beginning 3)) |
| 603 | (end (save-restriction | 603 | (end (save-restriction |
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index e965f92a279..ec4b3650f07 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2006-06-19 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * processes.texi (Bindat Spec): Clarify previous change. | ||
| 4 | |||
| 1 | 2006-06-16 Richard Stallman <rms@gnu.org> | 5 | 2006-06-16 Richard Stallman <rms@gnu.org> |
| 2 | 6 | ||
| 3 | * tips.texi (Coding Conventions): Better explain conventions | 7 | * tips.texi (Coding Conventions): Better explain conventions |
diff --git a/lispref/processes.texi b/lispref/processes.texi index 0f0b617e36c..abaa607d1d4 100644 --- a/lispref/processes.texi +++ b/lispref/processes.texi | |||
| @@ -2230,13 +2230,12 @@ of @var{form}. A non-@code{nil} result indicates a match. | |||
| 2230 | @var{tag} matches unconditionally if it is @code{t}. | 2230 | @var{tag} matches unconditionally if it is @code{t}. |
| 2231 | @end itemize | 2231 | @end itemize |
| 2232 | 2232 | ||
| 2233 | @item repeat @var{count} @var{field-spec}@dots{} | 2233 | @item repeat @var{count} @var{field-specs}@dots{} |
| 2234 | Process the set of @var{field-spec}s recursively, in order, and loop | 2234 | Process the @var{field-specs} recursively, in order, then repeat |
| 2235 | starting from the first one, for @var{count} times overall (looping | 2235 | starting from the first one, processing all the specs @var{count} |
| 2236 | @code{@var{count} @minus{} 1} times). | 2236 | times overall. @var{count} may be an integer, or a list of one |
| 2237 | @var{count} may be an integer, or a list of one element naming a | 2237 | element that names a previous field. For correct operation, each spec |
| 2238 | previous field. For correct operation, each @var{field-spec} must | 2238 | in @var{field-specs} must include a name. |
| 2239 | include a name. | ||
| 2240 | @end table | 2239 | @end table |
| 2241 | 2240 | ||
| 2242 | @node Bindat Functions | 2241 | @node Bindat Functions |
diff --git a/man/ChangeLog b/man/ChangeLog index 627f528de85..4b238b8a7ea 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2006-06-19 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * message.texi (News Headers): Update message-syntax-checks section. | ||
| 4 | |||
| 5 | 2006-06-19 Karl Berry <karl@gnu.org> | ||
| 6 | |||
| 7 | * info.texi (Advanced): mention C-q, especially with ?. | ||
| 8 | |||
| 9 | 2006-06-19 Carsten Dominik <dominik@science.uva.nl> | ||
| 10 | |||
| 11 | * org.texi (Publishing links): Document the `:link-validation-function' | ||
| 12 | property. | ||
| 13 | (Extensions and Hacking): New chapter, includes some sections of the | ||
| 14 | "Miscellaneous" chapter. | ||
| 15 | |||
| 1 | 2006-06-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 16 | 2006-06-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 17 | ||
| 3 | * macos.texi (Mac Input): Add description of mac-function-modifier. | 18 | * macos.texi (Mac Input): Add description of mac-function-modifier. |
| @@ -11,6 +26,11 @@ | |||
| 11 | 26 | ||
| 12 | * mule.texi (Recognize Coding): Clarify previous change. | 27 | * mule.texi (Recognize Coding): Clarify previous change. |
| 13 | 28 | ||
| 29 | 2006-06-09 Kenichi Handa <handa@m17n.org> | ||
| 30 | |||
| 31 | * mule.texi (Recognize Coding): Describe the convention of "CODING!" | ||
| 32 | notation. | ||
| 33 | |||
| 14 | 2006-06-07 Kevin Ryde <user42@zip.com.au> | 34 | 2006-06-07 Kevin Ryde <user42@zip.com.au> |
| 15 | 35 | ||
| 16 | * mule.texi (Coding Systems): Footnote xref "MS-DOS and MULE" in main | 36 | * mule.texi (Coding Systems): Footnote xref "MS-DOS and MULE" in main |
diff --git a/man/ediff.texi b/man/ediff.texi index c9778ce90f9..7a4c929a0eb 100644 --- a/man/ediff.texi +++ b/man/ediff.texi | |||
| @@ -1614,6 +1614,9 @@ The variable @code{ediff-ignore-case} controls whether Ediff starts out by | |||
| 1614 | ignoring letter case or not. It can be set in @file{.emacs} using | 1614 | ignoring letter case or not. It can be set in @file{.emacs} using |
| 1615 | @code{setq-default}. | 1615 | @code{setq-default}. |
| 1616 | 1616 | ||
| 1617 | When case sensitivity is toggled, all difference | ||
| 1618 | regions are recomputed. | ||
| 1619 | |||
| 1617 | @node Highlighting Difference Regions, Narrowing, Selective Browsing, Customization | 1620 | @node Highlighting Difference Regions, Narrowing, Selective Browsing, Customization |
| 1618 | @section Highlighting Difference Regions | 1621 | @section Highlighting Difference Regions |
| 1619 | 1622 | ||
| @@ -2316,6 +2319,14 @@ prior to starting Ediff, so Ediff just preserves status quo here. | |||
| 2316 | 2319 | ||
| 2317 | Using @code{ediff-cleanup-hook}, one can make Ediff delete the variants | 2320 | Using @code{ediff-cleanup-hook}, one can make Ediff delete the variants |
| 2318 | unconditionally (e.g., by making @code{ediff-janitor} into one of these hooks). | 2321 | unconditionally (e.g., by making @code{ediff-janitor} into one of these hooks). |
| 2322 | |||
| 2323 | @item ediff-keep-tmp-versions | ||
| 2324 | @vindex @code{ediff-keep-tmp-versions} | ||
| 2325 | Default is @code{nil}. If @code{t}, the versions of the files being | ||
| 2326 | compared or merged using operations such as @code{ediff-revision} or | ||
| 2327 | @code{ediff-merge-revisions} are not deleted on exit. The normal action is | ||
| 2328 | to clean up and delete these version files. | ||
| 2329 | |||
| 2319 | @item ediff-grab-mouse | 2330 | @item ediff-grab-mouse |
| 2320 | @vindex @code{ediff-grab-mouse} | 2331 | @vindex @code{ediff-grab-mouse} |
| 2321 | Default is @code{t}. Normally, Ediff grabs mouse and puts it in its | 2332 | Default is @code{t}. Normally, Ediff grabs mouse and puts it in its |
| @@ -2457,6 +2468,7 @@ Karl Heuer (kwzh@@gnu.org), | |||
| 2457 | (jaffe@@chipmunk.cita.utoronto.ca), | 2468 | (jaffe@@chipmunk.cita.utoronto.ca), |
| 2458 | David Karr (dkarr@@nmo.gtegsc.com), | 2469 | David Karr (dkarr@@nmo.gtegsc.com), |
| 2459 | Norbert Kiesel (norbert@@i3.informatik.rwth-aachen.de), | 2470 | Norbert Kiesel (norbert@@i3.informatik.rwth-aachen.de), |
| 2471 | Steffen Kilb (skilb@@gmx.net), | ||
| 2460 | Leigh L Klotz (klotz@@adoc.xerox.com), | 2472 | Leigh L Klotz (klotz@@adoc.xerox.com), |
| 2461 | Fritz Knabe (Fritz.Knabe@@ecrc.de), | 2473 | Fritz Knabe (Fritz.Knabe@@ecrc.de), |
| 2462 | Heinz Knutzen (hk@@informatik.uni-kiel.d400.de), | 2474 | Heinz Knutzen (hk@@informatik.uni-kiel.d400.de), |
diff --git a/man/faq.texi b/man/faq.texi index 3fa69aa4395..fbb75f4e64c 100644 --- a/man/faq.texi +++ b/man/faq.texi | |||
| @@ -3659,7 +3659,7 @@ lack certain features, such as the Emacs Lisp extension language. | |||
| 3659 | 3659 | ||
| 3660 | For information on Emacs for Windows 95 and NT, read the FAQ produced by | 3660 | For information on Emacs for Windows 95 and NT, read the FAQ produced by |
| 3661 | @email{voelker@@cs.washington.edu, Geoff Voelker} and currently maintained | 3661 | @email{voelker@@cs.washington.edu, Geoff Voelker} and currently maintained |
| 3662 | by @email{ramprasad_i82@@yahoo.com, Ramprasad B}, available at | 3662 | by @email{ramprasad@@gnu.org, Ramprasad B}, available at |
| 3663 | 3663 | ||
| 3664 | @uref{http://www.gnu.org/software/emacs/windows/ntemacs.html} | 3664 | @uref{http://www.gnu.org/software/emacs/windows/ntemacs.html} |
| 3665 | 3665 | ||
diff --git a/man/info.texi b/man/info.texi index f33038e0c30..308edf4b0d5 100644 --- a/man/info.texi +++ b/man/info.texi | |||
| @@ -918,6 +918,15 @@ are using a stand-alone Info reader, there are additional commands | |||
| 918 | specific to it, which are documented in several chapters of @ref{Top,, | 918 | specific to it, which are documented in several chapters of @ref{Top,, |
| 919 | GNU Info, info-stnd, GNU Info}.) | 919 | GNU Info, info-stnd, GNU Info}.) |
| 920 | 920 | ||
| 921 | @kindex C-q @r{(Info mode)} | ||
| 922 | One advanced command useful with most of the others described here | ||
| 923 | is @kbd{C-q}, which ``quotes'' the next character so that it is | ||
| 924 | entered literally (@pxref{Inserting Text,,,emacs,The GNU Emacs | ||
| 925 | Manual}). For example, pressing @kbd{?} ordinarily brings up a list | ||
| 926 | of completion possibilities. If you want to (for example) search for | ||
| 927 | an actual @samp{?} character, the simplest way is to insert it using | ||
| 928 | @kbd{C-q ?}. This works the same in Emacs and stand-alone Info. | ||
| 929 | |||
| 921 | @menu | 930 | @menu |
| 922 | * Search Text:: How to search Info documents. | 931 | * Search Text:: How to search Info documents. |
| 923 | * Search Index:: How to search the indices for specific subjects. | 932 | * Search Index:: How to search the indices for specific subjects. |
diff --git a/man/message.texi b/man/message.texi index 58906595f8f..e6e27428aeb 100644 --- a/man/message.texi +++ b/man/message.texi | |||
| @@ -1681,56 +1681,73 @@ to this list. | |||
| 1681 | Valid checks are: | 1681 | Valid checks are: |
| 1682 | 1682 | ||
| 1683 | @table @code | 1683 | @table @code |
| 1684 | @item subject-cmsg | ||
| 1685 | Check the subject for commands. | ||
| 1686 | @item sender | ||
| 1687 | @cindex Sender | ||
| 1688 | Insert a new @code{Sender} header if the @code{From} header looks odd. | ||
| 1689 | @item multiple-headers | ||
| 1690 | Check for the existence of multiple equal headers. | ||
| 1691 | @item sendsys | ||
| 1692 | @cindex sendsys | ||
| 1693 | Check for the existence of version and sendsys commands. | ||
| 1694 | @item message-id | ||
| 1695 | Check whether the @code{Message-ID} looks ok. | ||
| 1696 | @item from | ||
| 1697 | Check whether the @code{From} header seems nice. | ||
| 1698 | @item long-lines | ||
| 1699 | @cindex long lines | ||
| 1700 | Check for too long lines. | ||
| 1701 | @item control-chars | ||
| 1702 | Check for invalid characters. | ||
| 1703 | @item size | ||
| 1704 | Check for excessive size. | ||
| 1705 | @item new-text | ||
| 1706 | Check whether there is any new text in the messages. | ||
| 1707 | @item signature | ||
| 1708 | Check the length of the signature. | ||
| 1709 | @item approved | 1684 | @item approved |
| 1710 | @cindex approved | 1685 | @cindex approved |
| 1711 | Check whether the article has an @code{Approved} header, which is | 1686 | Check whether the article has an @code{Approved} header, which is |
| 1712 | something only moderators should include. | 1687 | something only moderators should include. |
| 1688 | @item continuation-headers | ||
| 1689 | Check whether there are continuation header lines that don't begin with | ||
| 1690 | whitespace. | ||
| 1691 | @item control-chars | ||
| 1692 | Check for invalid characters. | ||
| 1713 | @item empty | 1693 | @item empty |
| 1714 | Check whether the article is empty. | 1694 | Check whether the article is empty. |
| 1715 | @item invisible-text | ||
| 1716 | Check whether there is any invisible text in the buffer. | ||
| 1717 | @item empty-headers | ||
| 1718 | Check whether any of the headers are empty. | ||
| 1719 | @item existing-newsgroups | 1695 | @item existing-newsgroups |
| 1720 | Check whether the newsgroups mentioned in the @code{Newsgroups} and | 1696 | Check whether the newsgroups mentioned in the @code{Newsgroups} and |
| 1721 | @code{Followup-To} headers exist. | 1697 | @code{Followup-To} headers exist. |
| 1722 | @item valid-newsgroups | 1698 | @item from |
| 1723 | Check whether the @code{Newsgroups} and @code{Followup-to} headers | 1699 | Check whether the @code{From} header seems nice. |
| 1724 | are valid syntactically. | 1700 | @item illegible-text |
| 1701 | Check whether there is any non-printable character in the body. | ||
| 1702 | @item invisible-text | ||
| 1703 | Check whether there is any invisible text in the buffer. | ||
| 1704 | @item long-header-lines | ||
| 1705 | Check for too long header lines. | ||
| 1706 | @item long-lines | ||
| 1707 | @cindex long lines | ||
| 1708 | Check for too long lines in the body. | ||
| 1709 | @item message-id | ||
| 1710 | Check whether the @code{Message-ID} looks syntactically ok. | ||
| 1711 | @item multiple-headers | ||
| 1712 | Check for the existence of multiple equal headers. | ||
| 1713 | @item new-text | ||
| 1714 | Check whether there is any new text in the messages. | ||
| 1715 | @item newsgroups | ||
| 1716 | Check whether the @code{Newsgroups} header exists and is not empty. | ||
| 1717 | @item quoting-style | ||
| 1718 | Check whether text follows last quoted portion. | ||
| 1725 | @item repeated-newsgroups | 1719 | @item repeated-newsgroups |
| 1726 | Check whether the @code{Newsgroups} and @code{Followup-to} headers | 1720 | Check whether the @code{Newsgroups} and @code{Followup-to} headers |
| 1727 | contains repeated group names. | 1721 | contains repeated group names. |
| 1722 | @item reply-to | ||
| 1723 | Check whether the @code{Reply-To} header looks ok. | ||
| 1724 | @item sender | ||
| 1725 | @cindex Sender | ||
| 1726 | Insert a new @code{Sender} header if the @code{From} header looks odd. | ||
| 1727 | @item sendsys | ||
| 1728 | @cindex sendsys | ||
| 1729 | Check for the existence of version and sendsys commands. | ||
| 1730 | @item shoot | ||
| 1731 | Check whether the domain part of the @code{Message-ID} header looks ok. | ||
| 1728 | @item shorten-followup-to | 1732 | @item shorten-followup-to |
| 1729 | Check whether to add a @code{Followup-to} header to shorten the number | 1733 | Check whether to add a @code{Followup-to} header to shorten the number |
| 1730 | of groups to post to. | 1734 | of groups to post to. |
| 1735 | @item signature | ||
| 1736 | Check the length of the signature. | ||
| 1737 | @item size | ||
| 1738 | Check for excessive size. | ||
| 1739 | @item subject | ||
| 1740 | Check whether the @code{Subject} header exists and is not empty. | ||
| 1741 | @item subject-cmsg | ||
| 1742 | Check the subject for commands. | ||
| 1743 | @item valid-newsgroups | ||
| 1744 | Check whether the @code{Newsgroups} and @code{Followup-to} headers | ||
| 1745 | are valid syntactically. | ||
| 1731 | @end table | 1746 | @end table |
| 1732 | 1747 | ||
| 1733 | All these conditions are checked by default. | 1748 | All these conditions are checked by default, except for @code{sender} |
| 1749 | for which the check is disabled by default if | ||
| 1750 | @code{message-insert-canlock} is non-@code{nil} (@pxref{Canceling News}). | ||
| 1734 | 1751 | ||
| 1735 | @item message-ignored-news-headers | 1752 | @item message-ignored-news-headers |
| 1736 | @vindex message-ignored-news-headers | 1753 | @vindex message-ignored-news-headers |
diff --git a/man/org.texi b/man/org.texi index c88205887ba..4f614a6fe95 100644 --- a/man/org.texi +++ b/man/org.texi | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | @setfilename ../info/org | 3 | @setfilename ../info/org |
| 4 | @settitle Org Mode Manual | 4 | @settitle Org Mode Manual |
| 5 | 5 | ||
| 6 | @set VERSION 4.37 | 6 | @set VERSION 4.38 |
| 7 | @set DATE June 2006 | 7 | @set DATE June 2006 |
| 8 | 8 | ||
| 9 | @dircategory Emacs | 9 | @dircategory Emacs |
| @@ -86,6 +86,8 @@ Software Foundation raise funds for GNU development.'' | |||
| 86 | * Exporting:: Sharing and publishing of notes | 86 | * Exporting:: Sharing and publishing of notes |
| 87 | * Publishing:: Create a web site of linked Org-mode files | 87 | * Publishing:: Create a web site of linked Org-mode files |
| 88 | * Miscellaneous:: All the rest which did not fit elsewhere | 88 | * Miscellaneous:: All the rest which did not fit elsewhere |
| 89 | * Extensions and Hacking:: | ||
| 90 | * History and Acknowledgments:: | ||
| 89 | * Index:: The fast road to specific information | 91 | * Index:: The fast road to specific information |
| 90 | * Key Index:: Key bindings and where they are described | 92 | * Key Index:: Key bindings and where they are described |
| 91 | 93 | ||
| @@ -162,7 +164,7 @@ Timestamps | |||
| 162 | 164 | ||
| 163 | Progress Logging | 165 | Progress Logging |
| 164 | 166 | ||
| 165 | * Closing items:: When was this entry makred DONE? | 167 | * Closing items:: When was this entry marked DONE? |
| 166 | * Clocking work time:: When exactly did you work on this item? | 168 | * Clocking work time:: When exactly did you work on this item? |
| 167 | 169 | ||
| 168 | Tags | 170 | Tags |
| @@ -231,17 +233,19 @@ Miscellaneous | |||
| 231 | * The very busy C-c C-c key:: When in doubt, press C-c C-c | 233 | * The very busy C-c C-c key:: When in doubt, press C-c C-c |
| 232 | * Clean view:: Getting rid of leading stars in the outline | 234 | * Clean view:: Getting rid of leading stars in the outline |
| 233 | * TTY keys:: Using Org-mode on a tty | 235 | * TTY keys:: Using Org-mode on a tty |
| 234 | * FAQ:: Frequently asked questions | ||
| 235 | * Interaction:: Other Emacs packages | 236 | * Interaction:: Other Emacs packages |
| 236 | * Bugs:: Things which do not work perfectly | 237 | * Bugs:: Things which do not work perfectly |
| 237 | * Acknowledgments:: These people provided feedback and more | ||
| 238 | 238 | ||
| 239 | Interaction with other packages | 239 | Interaction with other packages |
| 240 | 240 | ||
| 241 | * Extensions:: Third-party extensions for Org-mode | ||
| 242 | * Cooperation:: Packages Org-mode cooperates with | 241 | * Cooperation:: Packages Org-mode cooperates with |
| 243 | * Conflicts:: Packages that lead to conflicts | 242 | * Conflicts:: Packages that lead to conflicts |
| 244 | 243 | ||
| 244 | Extensions and Hacking | ||
| 245 | |||
| 246 | * Extensions:: | ||
| 247 | * Dynamic blocks:: | ||
| 248 | |||
| 245 | @end detailmenu | 249 | @end detailmenu |
| 246 | @end menu | 250 | @end menu |
| 247 | 251 | ||
| @@ -296,9 +300,10 @@ example: | |||
| 296 | The Org-mode table editor can be integrated into any major mode by | 300 | The Org-mode table editor can be integrated into any major mode by |
| 297 | activating the minor Orgtbl-mode. | 301 | activating the minor Orgtbl-mode. |
| 298 | 302 | ||
| 303 | @cindex FAQ | ||
| 299 | There is a website for Org-mode which provides links to the newest | 304 | There is a website for Org-mode which provides links to the newest |
| 300 | version of Org-mode, as well as additional information, screen shots | 305 | version of Org-mode, as well as additional information, frequently asked |
| 301 | and example files. This page is located at | 306 | questions (FAQ), links to tutorials etc. This page is located at |
| 302 | @uref{http://www.astro.uva.nl/~dominik/Tools/org/}. | 307 | @uref{http://www.astro.uva.nl/~dominik/Tools/org/}. |
| 303 | 308 | ||
| 304 | @page | 309 | @page |
| @@ -341,6 +346,10 @@ them together with @file{org-install.el} on your load path. Then add to | |||
| 341 | (require 'org-install) | 346 | (require 'org-install) |
| 342 | @end lisp | 347 | @end lisp |
| 343 | 348 | ||
| 349 | If you use Org-mode with XEmacs, you also need to install the file | ||
| 350 | @file{noutline.el} from the @file{xemacs} subdirectory of the Org-mode | ||
| 351 | distribution. | ||
| 352 | |||
| 344 | @cindex org-mode, turning on | 353 | @cindex org-mode, turning on |
| 345 | With this setup, all files with extension @samp{.org} will be put into | 354 | With this setup, all files with extension @samp{.org} will be put into |
| 346 | Org-mode. As an alternative, make the first line of a file look like | 355 | Org-mode. As an alternative, make the first line of a file look like |
| @@ -621,9 +630,16 @@ to move the tree to an archive place, either in the same file under a | |||
| 621 | special top-level heading, or even to a different file. | 630 | special top-level heading, or even to a different file. |
| 622 | @table @kbd | 631 | @table @kbd |
| 623 | @kindex C-c $ | 632 | @kindex C-c $ |
| 624 | @item @kbd{C-c $} | 633 | @item C-c $ |
| 625 | Archive the subtree starting at the cursor position to the location | 634 | Archive the subtree starting at the cursor position to the location |
| 626 | given by @code{org-archive-location}. | 635 | given by @code{org-archive-location}. |
| 636 | @kindex C-u C-c $ | ||
| 637 | @item C-u C-c $ | ||
| 638 | When @kbd{C-c $} is called with @kbd{C-u} prefix argument, check for | ||
| 639 | (sub)trees without any open TODO items and offer to archive them. When | ||
| 640 | the cursor is on a headline when this command is called, inly check the | ||
| 641 | direct children of this headline. When the cursor is @emph{not} on a | ||
| 642 | headline, check all level 1 trees. | ||
| 627 | @end table | 643 | @end table |
| 628 | 644 | ||
| 629 | @cindex archive locations | 645 | @cindex archive locations |
| @@ -1674,7 +1690,11 @@ and activation}. | |||
| 1674 | Insert a link. This prompts for a link to be inserted into the buffer. | 1690 | Insert a link. This prompts for a link to be inserted into the buffer. |
| 1675 | You can just type a link, using text for an internal link, or one of the | 1691 | You can just type a link, using text for an internal link, or one of the |
| 1676 | link type prefixes mentioned in the examples above. Through completion, | 1692 | link type prefixes mentioned in the examples above. Through completion, |
| 1677 | all links stored during the current session can be accessed. The link | 1693 | all links stored during the current session can be |
| 1694 | accessed@footnote{After insertion of a stored link, the link will be | ||
| 1695 | removed from the list of stored links. To keep it in the list later | ||
| 1696 | use, use a triple @kbd{C-u} prefix to @kbd{C-c C-l}, or configure the | ||
| 1697 | option @code{org-keep-stored-link-after-insertion}.}. The link | ||
| 1678 | will be inserted into the buffer, along with a descriptive text. Note | 1698 | will be inserted into the buffer, along with a descriptive text. Note |
| 1679 | that you don't have to use this command to insert a link. Links in | 1699 | that you don't have to use this command to insert a link. Links in |
| 1680 | Org-mode are plain text, and you can type or paste them straight into | 1700 | Org-mode are plain text, and you can type or paste them straight into |
| @@ -2227,10 +2247,9 @@ brackets instead of angular brackets. | |||
| 2227 | @item Time range with CLOCK keyword | 2247 | @item Time range with CLOCK keyword |
| 2228 | @cindex CLOCK keyword | 2248 | @cindex CLOCK keyword |
| 2229 | When using the clock to time the work that is being done on specific | 2249 | When using the clock to time the work that is being done on specific |
| 2230 | items, time ranges preceeded by the CLOCK keyword are inserted | 2250 | items, time ranges preceded by the CLOCK keyword are inserted |
| 2231 | automatically into the file. The time stamps are enclosed in square | 2251 | automatically into the file. The time stamps are enclosed in square |
| 2232 | brackets instead of angular brackets. @xref{Clocking work time}. | 2252 | brackets instead of angular brackets. @xref{Clocking work time}. |
| 2233 | @c FIXME: Reference needed | ||
| 2234 | @end table | 2253 | @end table |
| 2235 | 2254 | ||
| 2236 | @node Creating timestamps, Progress logging, Time stamps, Timestamps | 2255 | @node Creating timestamps, Progress logging, Time stamps, Timestamps |
| @@ -2376,7 +2395,7 @@ items in a project by starting and stopping a clock when you start and | |||
| 2376 | stop working on an aspect of a project. | 2395 | stop working on an aspect of a project. |
| 2377 | 2396 | ||
| 2378 | @menu | 2397 | @menu |
| 2379 | * Closing items:: When was this entry makred DONE? | 2398 | * Closing items:: When was this entry marked DONE? |
| 2380 | * Clocking work time:: When exactly did you work on this item? | 2399 | * Clocking work time:: When exactly did you work on this item? |
| 2381 | @end menu | 2400 | @end menu |
| 2382 | 2401 | ||
| @@ -2405,8 +2424,8 @@ each day, giving you an overview of what has been done on a day. | |||
| 2405 | 2424 | ||
| 2406 | Org-mode allows you to clock the time you spent on specific tasks in a | 2425 | Org-mode allows you to clock the time you spent on specific tasks in a |
| 2407 | project. When you start working on an item, you can start the clock. | 2426 | project. When you start working on an item, you can start the clock. |
| 2408 | When you stop working on that tast, or when you makr the task done, the | 2427 | When you stop working on that task, or when you mark the task done, the |
| 2409 | clock is stoppend and the corresponding time interval is recorded. It | 2428 | clock is stopped and the corresponding time interval is recorded. It |
| 2410 | also computes the total time spent on each subtree of a project. | 2429 | also computes the total time spent on each subtree of a project. |
| 2411 | 2430 | ||
| 2412 | @table @kbd | 2431 | @table @kbd |
| @@ -2435,6 +2454,22 @@ puts overlays at the end of each headline, showing the total time | |||
| 2435 | recorded under that heading, including the time of any subheadings. You | 2454 | recorded under that heading, including the time of any subheadings. You |
| 2436 | can use visibility cycling to study the tree, but the overlays disappear | 2455 | can use visibility cycling to study the tree, but the overlays disappear |
| 2437 | automatically when the buffer is changed. | 2456 | automatically when the buffer is changed. |
| 2457 | @kindex C-c C-x C-r | ||
| 2458 | @item C-c C-x C-r | ||
| 2459 | Insert a dynamic block containing a clock report as an org-mode table | ||
| 2460 | into the current file. | ||
| 2461 | @example | ||
| 2462 | #+BEGIN: clocktable :maxlevel 2 :emphasize nil | ||
| 2463 | |||
| 2464 | #+END: clocktable | ||
| 2465 | @end example | ||
| 2466 | @noindent | ||
| 2467 | If such a block already exists, its content is replaced by the new | ||
| 2468 | table. The @samp{BEGIN} line can specify options: | ||
| 2469 | @example | ||
| 2470 | :maxlevels @r{Maximum level depth to which times are listed in the table.} | ||
| 2471 | :emphasize @r{When @code{t}, emphasize level one and level two items} | ||
| 2472 | @end example | ||
| 2438 | @end table | 2473 | @end table |
| 2439 | 2474 | ||
| 2440 | The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in | 2475 | The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in |
| @@ -3765,6 +3800,24 @@ careful with relative pathnames, and provided you have also configured | |||
| 3765 | org-publish to upload the related files, these links will work | 3800 | org-publish to upload the related files, these links will work |
| 3766 | too. @ref{Complex example} for an example of this usage. | 3801 | too. @ref{Complex example} for an example of this usage. |
| 3767 | 3802 | ||
| 3803 | Sometime an Org-mode file to be published may contain links that are | ||
| 3804 | only valid in your production environment, but not in the publishing | ||
| 3805 | location. In this case, use the property | ||
| 3806 | |||
| 3807 | @multitable @columnfractions 0.4 0.6 | ||
| 3808 | @item @code{:link-validation-function} | ||
| 3809 | @tab Function to validate links | ||
| 3810 | @end multitable | ||
| 3811 | |||
| 3812 | @noindent | ||
| 3813 | to define a function for checking link validity. This function must | ||
| 3814 | accept two arguments, the file name and a directory relative to which | ||
| 3815 | the file name is interpreted in the production environment. If this | ||
| 3816 | function returns @code{nil}, then the HTML generator will only insert a | ||
| 3817 | description into the HTML file, but no link. One option for this | ||
| 3818 | function is @code{org-publish-validate-link} which checks if the given | ||
| 3819 | file is part of any project in @code{org-publish-project-alist}. | ||
| 3820 | |||
| 3768 | @node Project page index, , Publishing links, Configuration | 3821 | @node Project page index, , Publishing links, Configuration |
| 3769 | @subsection Project page index | 3822 | @subsection Project page index |
| 3770 | 3823 | ||
| @@ -3891,7 +3944,7 @@ Org uses timestamps to track when a file has changed. The above | |||
| 3891 | functions normally only publish changed files. You can override this and | 3944 | functions normally only publish changed files. You can override this and |
| 3892 | force publishing of all files by giving a prefix argument. | 3945 | force publishing of all files by giving a prefix argument. |
| 3893 | 3946 | ||
| 3894 | @node Miscellaneous, Index, Publishing, Top | 3947 | @node Miscellaneous, Extensions and Hacking, Publishing, Top |
| 3895 | @chapter Miscellaneous | 3948 | @chapter Miscellaneous |
| 3896 | 3949 | ||
| 3897 | @menu | 3950 | @menu |
| @@ -3901,10 +3954,8 @@ force publishing of all files by giving a prefix argument. | |||
| 3901 | * The very busy C-c C-c key:: When in doubt, press C-c C-c | 3954 | * The very busy C-c C-c key:: When in doubt, press C-c C-c |
| 3902 | * Clean view:: Getting rid of leading stars in the outline | 3955 | * Clean view:: Getting rid of leading stars in the outline |
| 3903 | * TTY keys:: Using Org-mode on a tty | 3956 | * TTY keys:: Using Org-mode on a tty |
| 3904 | * FAQ:: Frequently asked questions | ||
| 3905 | * Interaction:: Other Emacs packages | 3957 | * Interaction:: Other Emacs packages |
| 3906 | * Bugs:: Things which do not work perfectly | 3958 | * Bugs:: Things which do not work perfectly |
| 3907 | * Acknowledgments:: These people provided feedback and more | ||
| 3908 | @end menu | 3959 | @end menu |
| 3909 | 3960 | ||
| 3910 | @node Completion, Customization, Miscellaneous, Miscellaneous | 3961 | @node Completion, Customization, Miscellaneous, Miscellaneous |
| @@ -4043,14 +4094,13 @@ The key @kbd{C-c C-c} has many purposes in org-mode, which are all | |||
| 4043 | mentioned scattered throughout this manual. One specific function of | 4094 | mentioned scattered throughout this manual. One specific function of |
| 4044 | this key is to add @emph{tags} to a headline (@pxref{Tags}). In many | 4095 | this key is to add @emph{tags} to a headline (@pxref{Tags}). In many |
| 4045 | other circumstances it means something like @emph{Hey Org-mode, look | 4096 | other circumstances it means something like @emph{Hey Org-mode, look |
| 4046 | here and update according to what you see here}. Here is a summary of what | 4097 | here and update according to what you see here}. Here is a summary of |
| 4047 | this means in different contexts. | 4098 | what this means in different contexts. |
| 4048 | 4099 | ||
| 4049 | @itemize @minus | 4100 | @itemize @minus |
| 4050 | @c @item | 4101 | @item |
| 4051 | @c If the cursor is in a headline, prompt for tags and insert them | 4102 | If there are highlichts in the buffer from the creation of a sparse |
| 4052 | @c into the current line, aligned to `org-tags-column'. When called | 4103 | tree, or from clock display, remove these highlights. |
| 4053 | @c with prefix arg, realign all tags in the current buffer. | ||
| 4054 | @item | 4104 | @item |
| 4055 | If the cursor is in one of the special @code{#+KEYWORD} lines, this | 4105 | If the cursor is in one of the special @code{#+KEYWORD} lines, this |
| 4056 | triggers scanning the buffer for these lines and updating the | 4106 | triggers scanning the buffer for these lines and updating the |
| @@ -4180,7 +4230,7 @@ double-star-per-level convention with @kbd{M-x org-convert-to-odd-levels | |||
| 4180 | RET} in that file. The reverse operation is @kbd{M-x | 4230 | RET} in that file. The reverse operation is @kbd{M-x |
| 4181 | org-convert-to-oddeven-levels}. | 4231 | org-convert-to-oddeven-levels}. |
| 4182 | 4232 | ||
| 4183 | @node TTY keys, FAQ, Clean view, Miscellaneous | 4233 | @node TTY keys, Interaction, Clean view, Miscellaneous |
| 4184 | @section Using org-mode on a tty | 4234 | @section Using org-mode on a tty |
| 4185 | @cindex tty keybindings | 4235 | @cindex tty keybindings |
| 4186 | 4236 | ||
| @@ -4217,251 +4267,19 @@ rather use @kbd{C-c .} to re-insert the timestamp. | |||
| 4217 | @item @kbd{S-@key{down}} @tab @kbd{C-c C-x @key{down}} @tab | 4267 | @item @kbd{S-@key{down}} @tab @kbd{C-c C-x @key{down}} @tab |
| 4218 | @end multitable | 4268 | @end multitable |
| 4219 | 4269 | ||
| 4220 | @node FAQ, Interaction, TTY keys, Miscellaneous | 4270 | @node Interaction, Bugs, TTY keys, Miscellaneous |
| 4221 | @section Frequently asked questions | ||
| 4222 | @cindex FAQ | ||
| 4223 | |||
| 4224 | @enumerate | ||
| 4225 | @cindex @code{keymapp nil} error | ||
| 4226 | @item @b{When I try to use Org-mode, I always get | ||
| 4227 | @code{(wrong-type-argument keymapp nil)}}.@* | ||
| 4228 | @cindex allout.el, conflict with | ||
| 4229 | This is a conflict with an outdated version of the @file{allout.el}. | ||
| 4230 | See @ref{Conflicts}. | ||
| 4231 | |||
| 4232 | @item @b{Org-mode seems to be a useful default mode for the various | ||
| 4233 | @file{README} files I have scattered through my directories. How do I | ||
| 4234 | turn it on for all @file{README} files?} | ||
| 4235 | |||
| 4236 | @lisp | ||
| 4237 | (add-to-list 'auto-mode-alist '("README$" . org-mode)) | ||
| 4238 | @end lisp | ||
| 4239 | |||
| 4240 | @item @b{I would like to use editing features of org-mode in other | ||
| 4241 | modes, is this possible?}@* | ||
| 4242 | @c | ||
| 4243 | Not really. For tables there is @code{orgtbl-mode} which implements the | ||
| 4244 | table editor as a minor mode. For other features you need to switch to | ||
| 4245 | Org-mode temporarily, or prepare text in a different buffer. | ||
| 4246 | |||
| 4247 | @item @b{Can I get the visibility-cycling features in outline-mode and | ||
| 4248 | outline-minor-mode?}@* | ||
| 4249 | @c | ||
| 4250 | Yes, these functions are written in a way that they are independent of | ||
| 4251 | the outline setup. The following setup provides standard Org-mode | ||
| 4252 | functionality in outline-mode on @key{TAB} and @kbd{S-@key{TAB}}. For | ||
| 4253 | outline-minor-mode, we use @kbd{C-@key{TAB}} instead of @key{TAB}, | ||
| 4254 | because @key{TAB} usually has mode-specific tasks. | ||
| 4255 | @lisp | ||
| 4256 | (add-hook 'outline-minor-mode-hook | ||
| 4257 | (lambda () | ||
| 4258 | (define-key outline-minor-mode-map [(control tab)] 'org-cycle) | ||
| 4259 | (define-key outline-minor-mode-map [(shift tab)] 'org-global-cycle))) | ||
| 4260 | (add-hook 'outline-mode-hook | ||
| 4261 | (lambda () | ||
| 4262 | (define-key outline-mode-map [(tab)] 'org-cycle) | ||
| 4263 | (define-key outline-mode-map [(shift tab)] 'org-global-cycle))) | ||
| 4264 | @end lisp | ||
| 4265 | |||
| 4266 | Or check out @file{outline-magic.el}, which does this and also provides | ||
| 4267 | promotion and demotion functionality. @file{outline-magic.el} is | ||
| 4268 | available at @url{http://www.astro.uva.nl/~dominik/Tools/OutlineMagic}. | ||
| 4269 | |||
| 4270 | @item @b{Some of my links stopped working after I upgraded to a version | ||
| 4271 | 4.20 or later. Why is this, and how can I fix it?}@* | ||
| 4272 | @c | ||
| 4273 | These must be links in plain text, containing white space, such as | ||
| 4274 | @samp{bbdb:Richard Stallman}. You need to protect these links by | ||
| 4275 | putting double brackets around them, like @samp{[[bbdb:Richard | ||
| 4276 | Stallman]]}. | ||
| 4277 | |||
| 4278 | @item @b{I see that Org-mode now creates links using the double bracket | ||
| 4279 | convention that hides the link part and the brackets, only showing the | ||
| 4280 | description part. How can I convert my old links to this new format?}@* | ||
| 4281 | @c | ||
| 4282 | Execute once in each Org-mode file: @kbd{M-x org-upgrade-old-links}. | ||
| 4283 | This replaces angular brackets with the new link format. | ||
| 4284 | |||
| 4285 | @item @b{I don't care if you find the new bracket links great, I am | ||
| 4286 | attached to the old style using angular brackets and no hiding of the | ||
| 4287 | link text. Please give them back to me, don't tell me it is not | ||
| 4288 | possible!}@* | ||
| 4289 | @c | ||
| 4290 | Would I let you down like that? If you must, you can do this | ||
| 4291 | |||
| 4292 | @lisp | ||
| 4293 | (setq org-link-style 'plain | ||
| 4294 | org-link-format "<%s>") | ||
| 4295 | @end lisp | ||
| 4296 | |||
| 4297 | @item @b{When I am executing shell/elisp links I always get a | ||
| 4298 | confirmation prompt and need to type @kbd{yes @key{RET}}, that's 4 key | ||
| 4299 | presses! Can I get rid of this?}@* | ||
| 4300 | @c | ||
| 4301 | @cindex shell links, confirmation | ||
| 4302 | @cindex dangerous commands | ||
| 4303 | The confirmation is there to protect you from unwantingly execute | ||
| 4304 | potentially dangerous commands. For example, imagine a link | ||
| 4305 | @samp{[[shell:rm -rf ~/*][Google Search]]}. In an Org-mode buffer, this | ||
| 4306 | command would look like @samp{Google Search}, but really it would remove | ||
| 4307 | your home directory. If you wish, you can make it easier to respond to | ||
| 4308 | the query by setting @code{org-confirm-shell-link-function} and/or | ||
| 4309 | @code{org-confirm-elisp-link-function} to @code{y-or-n-p}. Then a | ||
| 4310 | single @kbd{y} keypress will be enough to confirm those links. It is | ||
| 4311 | also possible to turn off this check entirely, but I do not recommend to | ||
| 4312 | do this. Be warned. | ||
| 4313 | |||
| 4314 | @item @b{All these stars are driving me mad, I just find the Emacs | ||
| 4315 | outlines unreadable. Can't you just put white space and a single star as a | ||
| 4316 | starter for headlines?}@* | ||
| 4317 | @c | ||
| 4318 | See @ref{Clean view}. | ||
| 4319 | |||
| 4320 | @item @b{I would like to have two windows on the same Org-mode | ||
| 4321 | file, but with different outline visibility. Is that possible?}@* | ||
| 4322 | @c | ||
| 4323 | @cindex @code{make-indirect-buffer} | ||
| 4324 | @cindex indirect buffers | ||
| 4325 | In GNU Emacs, you may use @emph{indirect buffers} which do exactly this. | ||
| 4326 | See the documentation on the command @code{make-indirect-buffer}. In | ||
| 4327 | XEmacs, this is currently not possible because of the different outline | ||
| 4328 | implementation. | ||
| 4329 | |||
| 4330 | @item @b{When I export my TODO list, every TODO item becomes a | ||
| 4331 | separate section. How do I enforce these items to be exported as an | ||
| 4332 | itemized list?}@* | ||
| 4333 | @c | ||
| 4334 | If you plan to use ASCII or HTML export, make sure things you want to | ||
| 4335 | be exported as item lists are level 4 at least, even if that does mean | ||
| 4336 | there is a level jump. For example: | ||
| 4337 | |||
| 4338 | @example | ||
| 4339 | * Todays top priorities | ||
| 4340 | **** TODO write a letter to xyz | ||
| 4341 | **** TODO Finish the paper | ||
| 4342 | **** Pick up kids at the school | ||
| 4343 | @end example | ||
| 4344 | |||
| 4345 | Alternatively, if you need a specific value for the heading/item | ||
| 4346 | transition in a particular file, use the @samp{+OPTIONS} line to | ||
| 4347 | configure the @samp{H} switch. | ||
| 4348 | |||
| 4349 | @example | ||
| 4350 | +OPTIONS: H:2; ... | ||
| 4351 | @end example | ||
| 4352 | |||
| 4353 | @item @b{I would like to export only a subtree of my file to HTML. | ||
| 4354 | How?}@* | ||
| 4355 | @c | ||
| 4356 | @cindex exporting a subtree | ||
| 4357 | If you want to export a subtree, mark the subtree as region and then | ||
| 4358 | export. Marking can be done with @kbd{C-c @@ C-x C-x}, for example. | ||
| 4359 | |||
| 4360 | @item @b{Org-mode takes over the S-cursor keys. I also want to use | ||
| 4361 | CUA-mode, is there a way to fix this conflict?}@* | ||
| 4362 | Yes, see @ref{Conflicts}. | ||
| 4363 | |||
| 4364 | @item @b{One of my table columns has started to fill up with | ||
| 4365 | @samp{#ERROR}. What is going on?}@* | ||
| 4366 | @c | ||
| 4367 | Org-mode tried to compute the column from other fields using a | ||
| 4368 | formula stored in the @samp{#+TBLFM:} line just below the table, and | ||
| 4369 | the evaluation of the formula fails. Fix the fields used in the | ||
| 4370 | formula, or fix the formula, or remove it! | ||
| 4371 | |||
| 4372 | @item @b{When I am in the last column of a table and just above a | ||
| 4373 | horizontal line in the table, pressing TAB creates a new table line | ||
| 4374 | @i{before} the horizontal line. How can I quickly move to the line | ||
| 4375 | @i{below} the horizontal line instead?}@* | ||
| 4376 | @c | ||
| 4377 | Press @key{down} (to get on the separator line) and then @key{TAB}. | ||
| 4378 | Or configure the variable @code{org-table-tab-jumps-over-hlines}. | ||
| 4379 | |||
| 4380 | @item @b{How can I change the indentation of an entire table without | ||
| 4381 | fixing every line by hand?}@* | ||
| 4382 | @c | ||
| 4383 | @cindex indentation, of tables | ||
| 4384 | The indentation of a table is set by the first line. So just fix the | ||
| 4385 | indentation of the first line and realign with @key{TAB}. | ||
| 4386 | |||
| 4387 | @item @b{Is it possible to include entries from org-mode files into my | ||
| 4388 | emacs diary?}@* | ||
| 4389 | @c | ||
| 4390 | Since the org-mode agenda is much more powerful and can contain the | ||
| 4391 | diary (@pxref{Calendar/Diary integration}), you should think twice | ||
| 4392 | before deciding to do this. Integrating Org-mode information into the | ||
| 4393 | diary is, however, possible. You need to turn on @emph{fancy diary | ||
| 4394 | display} by setting in @file{.emacs}: | ||
| 4395 | |||
| 4396 | @lisp | ||
| 4397 | (add-hook 'diary-display-hook 'fancy-diary-display) | ||
| 4398 | @end lisp | ||
| 4399 | |||
| 4400 | Then include the following line into your @file{~/diary} file, in | ||
| 4401 | order to get the entries from all files listed in the variable | ||
| 4402 | @code{org-agenda-files}: | ||
| 4403 | |||
| 4404 | @example | ||
| 4405 | &%%(org-diary) | ||
| 4406 | @end example | ||
| 4407 | @noindent | ||
| 4408 | You may also select specific files with | ||
| 4409 | |||
| 4410 | @example | ||
| 4411 | &%%(org-diary) ~/path/to/some/org-file.org | ||
| 4412 | &%%(org-diary) ~/path/to/another/org-file.org | ||
| 4413 | @end example | ||
| 4414 | |||
| 4415 | If you now launch the calendar and press @kbd{d} to display a diary, the | ||
| 4416 | headlines of entries containing a timestamp, date range, schedule, or | ||
| 4417 | deadline referring to the selected date will be listed. Just like | ||
| 4418 | Org-mode's agenda view, the diary for @emph{today} contains additional | ||
| 4419 | entries for overdue deadlines and scheduled items. See also the | ||
| 4420 | documentation of the @command{org-diary} function. Under XEmacs, it is | ||
| 4421 | not possible to jump back from the diary to the org, this works only in | ||
| 4422 | the agenda buffer. | ||
| 4423 | |||
| 4424 | @end enumerate | ||
| 4425 | |||
| 4426 | |||
| 4427 | @node Interaction, Bugs, FAQ, Miscellaneous | ||
| 4428 | @section Interaction with other packages | 4271 | @section Interaction with other packages |
| 4429 | @cindex packages, interaction with other | 4272 | @cindex packages, interaction with other |
| 4430 | Org-mode lives in the world of GNU Emacs and interacts in various ways | 4273 | Org-mode lives in the world of GNU Emacs and interacts in various ways |
| 4431 | with other code out there. | 4274 | with other code out there. |
| 4432 | 4275 | ||
| 4433 | @menu | 4276 | @menu |
| 4434 | * Extensions:: Third-party extensions for Org-mode | ||
| 4435 | * Cooperation:: Packages Org-mode cooperates with | 4277 | * Cooperation:: Packages Org-mode cooperates with |
| 4436 | * Conflicts:: Packages that lead to conflicts | 4278 | * Conflicts:: Packages that lead to conflicts |
| 4437 | @end menu | 4279 | @end menu |
| 4438 | 4280 | ||
| 4439 | @node Extensions, Cooperation, Interaction, Interaction | ||
| 4440 | @subsection Third-party extensions for Org-mode | ||
| 4441 | |||
| 4442 | The following extensions for Org-mode have been written by other people: | ||
| 4443 | |||
| 4444 | @table @asis | ||
| 4445 | @cindex @file{org-mouse.el} | ||
| 4446 | @item @file{org-mouse.el} by Piotr Zielinski | ||
| 4447 | This package implements extended mouse functionality for Org-mode. It | ||
| 4448 | allows you to cycle visibility and to edit the document structure with | ||
| 4449 | the mouse. Best of all, it provides a context-sensitive menu on | ||
| 4450 | @key{mouse-3} that changes depending on the context of a mouse-click. | ||
| 4451 | @file{org-mouse.el} is freely available at @url{http://www.cl.cam.ac.uk/~pz215/files/org-mouse.el}. | ||
| 4452 | @cindex @file{org-publish.el} | ||
| 4453 | @item @file{org-publish.el} by David O'Toole | ||
| 4454 | This package provides facilities for publishing related sets of Org-mode | ||
| 4455 | files together with linked files like images as a webpages. It is | ||
| 4456 | highly configurable and can be used for other publishing purposes as | ||
| 4457 | well. As of Org-mode version 4.30, @file{org-publish.el} is part of | ||
| 4458 | the Org-mode distribution. It is not yet part of Emacs, however, due to | ||
| 4459 | a pending copyright assignment. In the mean time, @file{org-publish.el} | ||
| 4460 | can be downloaded from David's site: | ||
| 4461 | @url{http://dto.freeshell.org/e/org-publish.el}. | ||
| 4462 | @end table | ||
| 4463 | 4281 | ||
| 4464 | @node Cooperation, Conflicts, Extensions, Interaction | 4282 | @node Cooperation, Conflicts, Interaction, Interaction |
| 4465 | @subsection Packages that Org-mode cooperates with | 4283 | @subsection Packages that Org-mode cooperates with |
| 4466 | 4284 | ||
| 4467 | @table @asis | 4285 | @table @asis |
| @@ -4538,7 +4356,7 @@ in the paragraph above about CUA mode also applies here. | |||
| 4538 | @end table | 4356 | @end table |
| 4539 | 4357 | ||
| 4540 | 4358 | ||
| 4541 | @node Bugs, Acknowledgments, Interaction, Miscellaneous | 4359 | @node Bugs, , Interaction, Miscellaneous |
| 4542 | @section Bugs | 4360 | @section Bugs |
| 4543 | @cindex bugs | 4361 | @cindex bugs |
| 4544 | 4362 | ||
| @@ -4564,10 +4382,6 @@ When the application called by @kbd{C-c C-o} to open a file link fails | |||
| 4564 | (for example because the application does not exist or refuses to open | 4382 | (for example because the application does not exist or refuses to open |
| 4565 | the file), it does so silently. No error message is displayed. | 4383 | the file), it does so silently. No error message is displayed. |
| 4566 | @item | 4384 | @item |
| 4567 | Plain list items should be able to hold a TODO item. Unfortunately this | ||
| 4568 | has so many technical problems that I will only consider this change for | ||
| 4569 | the next major release (5.0). | ||
| 4570 | @item | ||
| 4571 | The remote-editing commands in the agenda buffer cannot be undone with | 4385 | The remote-editing commands in the agenda buffer cannot be undone with |
| 4572 | @code{undo} called from within the agenda buffer. But you can go to | 4386 | @code{undo} called from within the agenda buffer. But you can go to |
| 4573 | the corresponding buffer (using @key{TAB} or @key{RET} and execute | 4387 | the corresponding buffer (using @key{TAB} or @key{RET} and execute |
| @@ -4577,22 +4391,140 @@ Recalculating a table line applies the formulas from left to right. | |||
| 4577 | If a formula uses @emph{calculated} fields further down the row, | 4391 | If a formula uses @emph{calculated} fields further down the row, |
| 4578 | multiple recalculation may be needed to get all fields consistent. | 4392 | multiple recalculation may be needed to get all fields consistent. |
| 4579 | @item | 4393 | @item |
| 4580 | Several words in a row may @b{*be made bold*}, but this does not work if | 4394 | A single letter cannot be made bold, for example @samp{*a*}. |
| 4581 | the string is distributed over two lines. | ||
| 4582 | @item | 4395 | @item |
| 4583 | The exporters work well, but could be made more efficient. | 4396 | The exporters work well, but could be made more efficient. |
| 4584 | @end itemize | 4397 | @end itemize |
| 4585 | 4398 | ||
| 4586 | @node Acknowledgments, , Bugs, Miscellaneous | 4399 | |
| 4587 | @section Acknowledgments | 4400 | @node Extensions and Hacking, History and Acknowledgments, Miscellaneous, Top |
| 4401 | @appendix Extensions, Hooks and Hacking | ||
| 4402 | |||
| 4403 | This appendix lists extensions for Org-mode written by other authors. | ||
| 4404 | It also covers some aspects where users can easily extend the | ||
| 4405 | functionality of Org-mode. | ||
| 4406 | |||
| 4407 | @menu | ||
| 4408 | * Extensions:: | ||
| 4409 | * Dynamic blocks:: | ||
| 4410 | @end menu | ||
| 4411 | |||
| 4412 | @node Extensions, Dynamic blocks, Extensions and Hacking, Extensions and Hacking | ||
| 4413 | @section Third-party extensions for Org-mode | ||
| 4414 | |||
| 4415 | The following extensions for Org-mode have been written by other people: | ||
| 4416 | |||
| 4417 | @table @asis | ||
| 4418 | @cindex @file{org-mouse.el} | ||
| 4419 | @item @file{org-mouse.el} by Piotr Zielinski | ||
| 4420 | This package implements extended mouse functionality for Org-mode. It | ||
| 4421 | allows you to cycle visibility and to edit the document structure with | ||
| 4422 | the mouse. Best of all, it provides a context-sensitive menu on | ||
| 4423 | @key{mouse-3} that changes depending on the context of a mouse-click. | ||
| 4424 | @file{org-mouse.el} is freely available at @url{http://www.cl.cam.ac.uk/~pz215/files/org-mouse.el}. | ||
| 4425 | @cindex @file{org-publish.el} | ||
| 4426 | @item @file{org-publish.el} by David O'Toole | ||
| 4427 | This package provides facilities for publishing related sets of Org-mode | ||
| 4428 | files together with linked files like images as a webpages. It is | ||
| 4429 | highly configurable and can be used for other publishing purposes as | ||
| 4430 | well. As of Org-mode version 4.30, @file{org-publish.el} is part of the | ||
| 4431 | Org-mode distribution. It is not yet part of Emacs, however, a delay | ||
| 4432 | caused by the preparations for the 22.1 release. In the mean time, | ||
| 4433 | @file{org-publish.el} can be downloaded from David's site: | ||
| 4434 | @url{http://dto.freeshell.org/e/org-publish.el}. | ||
| 4435 | @cindex @file{org-blog.el} | ||
| 4436 | @item @file{org-blog.el} by David O'Toole | ||
| 4437 | A blogging plug-in for @file{org-publish.el}. | ||
| 4438 | @cindex @file{org-blogging.el} | ||
| 4439 | @item @file{org-blogging.el} by Bastien Guerry | ||
| 4440 | Publish Org-mode files as | ||
| 4441 | blogs. @url{http://www.cognition.ens.fr/~guerry/org-blogging.html}. | ||
| 4442 | @end table | ||
| 4443 | |||
| 4444 | @node Dynamic blocks, , Extensions, Extensions and Hacking | ||
| 4445 | @section Dynamic blocks | ||
| 4446 | |||
| 4447 | Org-mode documents can contain @emph{dynamic blocks}. These are | ||
| 4448 | specially marked regions that are updates by some user-written | ||
| 4449 | function. A good example for such a block is the clock table inserted | ||
| 4450 | by the command @kbd{C-c C-x C-r} (@pxref{Clocking work time}). | ||
| 4451 | |||
| 4452 | Dynamic block are enclosed by a BEGIN-END structure that assigns a name | ||
| 4453 | to the block and can also specify parameters for the function producing | ||
| 4454 | the content of the block. | ||
| 4455 | |||
| 4456 | @example | ||
| 4457 | #+BEGIN: myblock :parameter1 value1 :parameter2 value2 ..... | ||
| 4458 | |||
| 4459 | #+END: | ||
| 4460 | @end example | ||
| 4461 | |||
| 4462 | Dynamic blocks are updated with the following commands | ||
| 4463 | |||
| 4464 | @table @kbd | ||
| 4465 | @kindex C-c C-x C-u | ||
| 4466 | @item C-c C-x C-u | ||
| 4467 | Update dynamic block at point. | ||
| 4468 | @kindex C-u C-c C-x C-u | ||
| 4469 | @item C-u C-c C-x C-u | ||
| 4470 | Update all dynamic blocks in the current file. | ||
| 4471 | @end table | ||
| 4472 | |||
| 4473 | Updating a dynamic block means to remove all the text between BEGIN and | ||
| 4474 | END, parse the BEGIN line for parameters and then call the specific | ||
| 4475 | writer function for this block to insert the new content. For a block | ||
| 4476 | with name @code{myblock}, the writer function is | ||
| 4477 | @code{org-dblock-write:myblock} with as only parameter a property list | ||
| 4478 | with the parameters given in the begin line. Here is a trivial example | ||
| 4479 | of a block that keeps track of when the block update function was last | ||
| 4480 | run: | ||
| 4481 | |||
| 4482 | @example | ||
| 4483 | #+BEGIN: block-update-time :format "on %m/%d/%Y at %H:%M" | ||
| 4484 | |||
| 4485 | #+END: | ||
| 4486 | @end example | ||
| 4487 | |||
| 4488 | @noindent | ||
| 4489 | The corresponding block writer function could look like this: | ||
| 4490 | |||
| 4491 | @lisp | ||
| 4492 | (defun org-dblock-write:date-and-time (params) | ||
| 4493 | (let ((fmt (or (plist-get params :format) "%d. %m. %Y"))) | ||
| 4494 | (insert "Last block update at: " | ||
| 4495 | (format-time-string fmt (current-time))))) | ||
| 4496 | @end lisp | ||
| 4497 | |||
| 4498 | If you want to make sure that all dynamic blocks are always up-to-date, | ||
| 4499 | you could add the function @code{org-update-all-dblocks} to a hook, for | ||
| 4500 | example @code{before-save-hook}. @code{org-update-all-dblocks} is | ||
| 4501 | written in a way that is does nothing in buffers that are not in Org-mode. | ||
| 4502 | |||
| 4503 | |||
| 4504 | @node History and Acknowledgments, Index, Extensions and Hacking, Top | ||
| 4505 | @appendix History and Acknowledgments | ||
| 4588 | @cindex acknowledgments | 4506 | @cindex acknowledgments |
| 4507 | @cindex history | ||
| 4589 | @cindex thanks | 4508 | @cindex thanks |
| 4590 | 4509 | ||
| 4591 | Org-mode was created by @value{AUTHOR}, who still maintains it at the | 4510 | Org-mode was conceived in 2003 out of frustration over the user |
| 4592 | Org-mode homepage @uref{http://www.astro.uva.nl/~dominik/Tools/org/}. | 4511 | interface of the emacs outline-mode. The first driver was simply to |
| 4593 | The following people (in alphabetic order) have helped the development | 4512 | make working with an outline tree possible without having to remember |
| 4594 | along with ideas, suggestions and patches. Many thanks to all of you, | 4513 | more than 10 commands just for hiding and unhiding parts of the outline |
| 4595 | Org-mode would not be what it is without your input. | 4514 | tree, and to allow to restructure a tree easily. Visibility cycling and |
| 4515 | structure editing were originally implemented in the package | ||
| 4516 | @file{outline-magic.el}, but quickly moved to the more general | ||
| 4517 | @file{org.el}. TODO entries and table support were added relatively | ||
| 4518 | quickly, and pointed to the two main drivers of Org-mode: Creating a | ||
| 4519 | new plain text mode with intuitive editing features, and to | ||
| 4520 | incorporate project planning functionality directly into a notes file. | ||
| 4521 | |||
| 4522 | Since the first release, hundreds of emails either directly to me or | ||
| 4523 | later on @code{emacs-orgmode@@gnu.org} have been a constant source of | ||
| 4524 | bug reports, feedback and new ideas. While I cannot mention everyone, I | ||
| 4525 | try to keep here a list of the people who had significant | ||
| 4526 | influence in shaping one or more aspects of Org-mode. Many thanks to | ||
| 4527 | all of you. If I have forgotten someone, please accept my apologies. | ||
| 4596 | 4528 | ||
| 4597 | @itemize @bullet | 4529 | @itemize @bullet |
| 4598 | @item | 4530 | @item |
| @@ -4607,8 +4539,9 @@ for Remember. | |||
| 4607 | @i{Pavel Chalmoviansky} influenced the agenda treatment of items with | 4539 | @i{Pavel Chalmoviansky} influenced the agenda treatment of items with |
| 4608 | specified time. | 4540 | specified time. |
| 4609 | @item | 4541 | @item |
| 4610 | @i{Gregory Chenov} patched support for lisp forms into table | 4542 | @i{Gregory Chernov} patched support for lisp forms into table |
| 4611 | calculations and improved XEmacs compatibility. | 4543 | calculations and improved XEmacs compatibility, in particular by porting |
| 4544 | @file{nouline.el} to XEmacs. | ||
| 4612 | @item | 4545 | @item |
| 4613 | @i{Sacha Chua} suggested to copy some linking code from Planner. | 4546 | @i{Sacha Chua} suggested to copy some linking code from Planner. |
| 4614 | @item | 4547 | @item |
| @@ -4619,6 +4552,8 @@ patched CSS formatting into the HTML exporter, and inspired the agenda. | |||
| 4619 | @item | 4552 | @item |
| 4620 | @i{Nic Ferrier} contributed mailcap and XOXO support. | 4553 | @i{Nic Ferrier} contributed mailcap and XOXO support. |
| 4621 | @item | 4554 | @item |
| 4555 | @i{Bastien Guerry} provoded extensive feedback. | ||
| 4556 | @item | ||
| 4622 | @i{Kai Grossjohann} pointed out key-binding conflicts caused by | 4557 | @i{Kai Grossjohann} pointed out key-binding conflicts caused by |
| 4623 | Org-mode. | 4558 | Org-mode. |
| 4624 | @item | 4559 | @item |
| @@ -4655,6 +4590,10 @@ other things. | |||
| 4655 | @item | 4590 | @item |
| 4656 | Linking to VM/BBDB/GNUS was inspired by @i{Tom Shannon}'s | 4591 | Linking to VM/BBDB/GNUS was inspired by @i{Tom Shannon}'s |
| 4657 | @file{organizer-mode.el}. | 4592 | @file{organizer-mode.el}. |
| 4593 | @c FIXME: | ||
| 4594 | @c @item | ||
| 4595 | @c @i{Daniel Sinder} came up with the idea if internal archiving my locking | ||
| 4596 | @c subtrees. | ||
| 4658 | @item | 4597 | @item |
| 4659 | @i{David O'Toole} wrote @file{org-publish.el} and drafted the manual | 4598 | @i{David O'Toole} wrote @file{org-publish.el} and drafted the manual |
| 4660 | chapter about publishing. | 4599 | chapter about publishing. |
| @@ -4684,9 +4623,10 @@ work on a tty. | |||
| 4684 | @i{Piotr Zielinski} wrote @file{org-mouse.el} and showed how to follow | 4623 | @i{Piotr Zielinski} wrote @file{org-mouse.el} and showed how to follow |
| 4685 | links with mouse-1. | 4624 | links with mouse-1. |
| 4686 | @end itemize | 4625 | @end itemize |
| 4687 | 4626 | ||
| 4688 | @node Index, Key Index, Miscellaneous, Top | 4627 | |
| 4689 | @chapter Index | 4628 | @node Index, Key Index, History and Acknowledgments, Top |
| 4629 | @unnumbered Index | ||
| 4690 | 4630 | ||
| 4691 | @printindex cp | 4631 | @printindex cp |
| 4692 | 4632 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index c4c798e6f77..3e523d28f8d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2006-06-19 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * window.c (size_window): New arg FIRST_ONLY. All callers changed. | ||
| 4 | (adjust_window_trailing_edge): Specially compute FIRST_PARALLEL | ||
| 5 | for the case of a top-level window and the following minibuffer. | ||
| 6 | Don't exit because of no `next' when there is a parent. | ||
| 7 | Use the FIRST_ONLY feature when resizing following windows. | ||
| 8 | |||
| 9 | * syntax.c (init_syntax_once): Give most control chars' syntax Spunct. | ||
| 10 | |||
| 1 | 2006-06-17 Kim F. Storm <storm@cua.dk> | 11 | 2006-06-17 Kim F. Storm <storm@cua.dk> |
| 2 | 12 | ||
| 3 | * dispnew.c (update_frame): Check for input pending on entry. | 13 | * dispnew.c (update_frame): Check for input pending on entry. |
diff --git a/src/syntax.c b/src/syntax.c index 3f6058e3b1a..4f5481ca111 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -3346,6 +3346,20 @@ init_syntax_once () | |||
| 3346 | 3346 | ||
| 3347 | Vstandard_syntax_table = Fmake_char_table (Qsyntax_table, temp); | 3347 | Vstandard_syntax_table = Fmake_char_table (Qsyntax_table, temp); |
| 3348 | 3348 | ||
| 3349 | /* Control characters should not be whitespace. */ | ||
| 3350 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Spunct]; | ||
| 3351 | for (i = 0; i <= ' ' - 1; i++) | ||
| 3352 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, i, temp); | ||
| 3353 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, 0177, temp); | ||
| 3354 | |||
| 3355 | /* Except that a few really are whitespace. */ | ||
| 3356 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Swhitespace]; | ||
| 3357 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, ' ', temp); | ||
| 3358 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '\t', temp); | ||
| 3359 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '\n', temp); | ||
| 3360 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, 015, temp); | ||
| 3361 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, 014, temp); | ||
| 3362 | |||
| 3349 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Sword]; | 3363 | temp = XVECTOR (Vsyntax_code_object)->contents[(int) Sword]; |
| 3350 | for (i = 'a'; i <= 'z'; i++) | 3364 | for (i = 'a'; i <= 'z'; i++) |
| 3351 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, i, temp); | 3365 | SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, i, temp); |
diff --git a/src/window.c b/src/window.c index 6a1edb24efb..5a03296a18a 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -63,7 +63,7 @@ static void window_scroll_pixel_based P_ ((Lisp_Object, int, int, int)); | |||
| 63 | static void window_scroll_line_based P_ ((Lisp_Object, int, int, int)); | 63 | static void window_scroll_line_based P_ ((Lisp_Object, int, int, int)); |
| 64 | static int window_min_size_1 P_ ((struct window *, int)); | 64 | static int window_min_size_1 P_ ((struct window *, int)); |
| 65 | static int window_min_size P_ ((struct window *, int, int, int *)); | 65 | static int window_min_size P_ ((struct window *, int, int, int *)); |
| 66 | static void size_window P_ ((Lisp_Object, int, int, int)); | 66 | static void size_window P_ ((Lisp_Object, int, int, int, int, int)); |
| 67 | static int freeze_window_start P_ ((struct window *, void *)); | 67 | static int freeze_window_start P_ ((struct window *, void *)); |
| 68 | static int window_fixed_size_p P_ ((struct window *, int, int)); | 68 | static int window_fixed_size_p P_ ((struct window *, int, int)); |
| 69 | static void enlarge_window P_ ((Lisp_Object, int, int)); | 69 | static void enlarge_window P_ ((Lisp_Object, int, int)); |
| @@ -2826,17 +2826,23 @@ shrink_windows (total, size, nchildren, shrinkable, | |||
| 2826 | 2826 | ||
| 2827 | /* Set WINDOW's height or width to SIZE. WIDTH_P non-zero means set | 2827 | /* Set WINDOW's height or width to SIZE. WIDTH_P non-zero means set |
| 2828 | WINDOW's width. Resize WINDOW's children, if any, so that they | 2828 | WINDOW's width. Resize WINDOW's children, if any, so that they |
| 2829 | keep their proportionate size relative to WINDOW. Propagate | 2829 | keep their proportionate size relative to WINDOW. |
| 2830 | WINDOW's top or left edge position to children. Delete windows | 2830 | |
| 2831 | that become too small unless NODELETE_P is non-zero. | 2831 | If FIRST_ONLY is 1, change only the first of WINDOW's children when |
| 2832 | they are in series. If LAST_ONLY is 1, change only the last of | ||
| 2833 | WINDOW's children when they are in series. | ||
| 2834 | |||
| 2835 | Propagate WINDOW's top or left edge position to children. Delete | ||
| 2836 | windows that become too small unless NODELETE_P is non-zero. | ||
| 2832 | 2837 | ||
| 2833 | If NODELETE_P is 2, that means we do delete windows that are | 2838 | If NODELETE_P is 2, that means we do delete windows that are |
| 2834 | too small, even if they were too small before! */ | 2839 | too small, even if they were too small before! */ |
| 2835 | 2840 | ||
| 2836 | static void | 2841 | static void |
| 2837 | size_window (window, size, width_p, nodelete_p) | 2842 | size_window (window, size, width_p, nodelete_p, first_only, last_only) |
| 2838 | Lisp_Object window; | 2843 | Lisp_Object window; |
| 2839 | int size, width_p, nodelete_p; | 2844 | int size, width_p, nodelete_p; |
| 2845 | int first_only, last_only; | ||
| 2840 | { | 2846 | { |
| 2841 | struct window *w = XWINDOW (window); | 2847 | struct window *w = XWINDOW (window); |
| 2842 | struct window *c; | 2848 | struct window *c; |
| @@ -2911,6 +2917,7 @@ size_window (window, size, width_p, nodelete_p) | |||
| 2911 | 2917 | ||
| 2912 | if (!NILP (*sideward)) | 2918 | if (!NILP (*sideward)) |
| 2913 | { | 2919 | { |
| 2920 | /* We have a chain of parallel siblings whose size should all change. */ | ||
| 2914 | for (child = *sideward; !NILP (child); child = c->next) | 2921 | for (child = *sideward; !NILP (child); child = c->next) |
| 2915 | { | 2922 | { |
| 2916 | c = XWINDOW (child); | 2923 | c = XWINDOW (child); |
| @@ -2918,9 +2925,45 @@ size_window (window, size, width_p, nodelete_p) | |||
| 2918 | c->left_col = w->left_col; | 2925 | c->left_col = w->left_col; |
| 2919 | else | 2926 | else |
| 2920 | c->top_line = w->top_line; | 2927 | c->top_line = w->top_line; |
| 2921 | size_window (child, size, width_p, nodelete_p); | 2928 | size_window (child, size, width_p, nodelete_p, |
| 2929 | first_only, last_only); | ||
| 2922 | } | 2930 | } |
| 2923 | } | 2931 | } |
| 2932 | else if (!NILP (*forward) && last_only) | ||
| 2933 | { | ||
| 2934 | /* Change the last in a series of siblings. */ | ||
| 2935 | Lisp_Object last_child; | ||
| 2936 | int child_size; | ||
| 2937 | |||
| 2938 | for (child = *forward; !NILP (child); child = c->next) | ||
| 2939 | { | ||
| 2940 | c = XWINDOW (child); | ||
| 2941 | last_child = child; | ||
| 2942 | } | ||
| 2943 | |||
| 2944 | child_size = XINT (width_p ? c->total_cols : c->total_lines); | ||
| 2945 | size_window (last_child, | ||
| 2946 | size - old_size + child_size, | ||
| 2947 | width_p, nodelete_p, first_only, last_only); | ||
| 2948 | } | ||
| 2949 | else if (!NILP (*forward) && first_only) | ||
| 2950 | { | ||
| 2951 | /* Change the first in a series of siblings. */ | ||
| 2952 | int child_size; | ||
| 2953 | |||
| 2954 | child = *forward; | ||
| 2955 | c = XWINDOW (child); | ||
| 2956 | |||
| 2957 | if (width_p) | ||
| 2958 | c->left_col = w->left_col; | ||
| 2959 | else | ||
| 2960 | c->top_line = w->top_line; | ||
| 2961 | |||
| 2962 | child_size = XINT (width_p ? c->total_cols : c->total_lines); | ||
| 2963 | size_window (child, | ||
| 2964 | size - old_size + child_size, | ||
| 2965 | width_p, nodelete_p, first_only, last_only); | ||
| 2966 | } | ||
| 2924 | else if (!NILP (*forward)) | 2967 | else if (!NILP (*forward)) |
| 2925 | { | 2968 | { |
| 2926 | int fixed_size, each, extra, n; | 2969 | int fixed_size, each, extra, n; |
| @@ -2928,7 +2971,7 @@ size_window (window, size, width_p, nodelete_p) | |||
| 2928 | int last_pos, first_pos, nchildren, total; | 2971 | int last_pos, first_pos, nchildren, total; |
| 2929 | int *new_sizes = NULL; | 2972 | int *new_sizes = NULL; |
| 2930 | 2973 | ||
| 2931 | /* Determine the fixed-size portion of the this window, and the | 2974 | /* Determine the fixed-size portion of this window, and the |
| 2932 | number of child windows. */ | 2975 | number of child windows. */ |
| 2933 | fixed_size = nchildren = nfixed = total = 0; | 2976 | fixed_size = nchildren = nfixed = total = 0; |
| 2934 | for (child = *forward; !NILP (child); child = c->next, ++nchildren) | 2977 | for (child = *forward; !NILP (child); child = c->next, ++nchildren) |
| @@ -2991,7 +3034,7 @@ size_window (window, size, width_p, nodelete_p) | |||
| 2991 | /* Set new height. Note that size_window also propagates | 3034 | /* Set new height. Note that size_window also propagates |
| 2992 | edge positions to children, so it's not a no-op if we | 3035 | edge positions to children, so it's not a no-op if we |
| 2993 | didn't change the child's size. */ | 3036 | didn't change the child's size. */ |
| 2994 | size_window (child, new_size, width_p, 1); | 3037 | size_window (child, new_size, width_p, 1, first_only, last_only); |
| 2995 | 3038 | ||
| 2996 | /* Remember the bottom/right edge position of this child; it | 3039 | /* Remember the bottom/right edge position of this child; it |
| 2997 | will be used to set the top/left edge of the next child. */ | 3040 | will be used to set the top/left edge of the next child. */ |
| @@ -3010,7 +3053,7 @@ size_window (window, size, width_p, nodelete_p) | |||
| 3010 | int child_size; | 3053 | int child_size; |
| 3011 | c = XWINDOW (child); | 3054 | c = XWINDOW (child); |
| 3012 | child_size = width_p ? XINT (c->total_cols) : XINT (c->total_lines); | 3055 | child_size = width_p ? XINT (c->total_cols) : XINT (c->total_lines); |
| 3013 | size_window (child, child_size, width_p, 2); | 3056 | size_window (child, child_size, width_p, 2, first_only, last_only); |
| 3014 | } | 3057 | } |
| 3015 | } | 3058 | } |
| 3016 | } | 3059 | } |
| @@ -3026,7 +3069,7 @@ set_window_height (window, height, nodelete) | |||
| 3026 | int height; | 3069 | int height; |
| 3027 | int nodelete; | 3070 | int nodelete; |
| 3028 | { | 3071 | { |
| 3029 | size_window (window, height, 0, nodelete); | 3072 | size_window (window, height, 0, nodelete, 0, 0); |
| 3030 | } | 3073 | } |
| 3031 | 3074 | ||
| 3032 | 3075 | ||
| @@ -3041,7 +3084,7 @@ set_window_width (window, width, nodelete) | |||
| 3041 | int width; | 3084 | int width; |
| 3042 | int nodelete; | 3085 | int nodelete; |
| 3043 | { | 3086 | { |
| 3044 | size_window (window, width, 1, nodelete); | 3087 | size_window (window, width, 1, nodelete, 0, 0); |
| 3045 | } | 3088 | } |
| 3046 | 3089 | ||
| 3047 | /* Change window heights in windows rooted in WINDOW by N lines. */ | 3090 | /* Change window heights in windows rooted in WINDOW by N lines. */ |
| @@ -4281,8 +4324,8 @@ adjust_window_trailing_edge (window, delta, horiz_flag) | |||
| 4281 | 4324 | ||
| 4282 | if (NILP (window)) | 4325 | if (NILP (window)) |
| 4283 | { | 4326 | { |
| 4284 | /* This can happen if WINDOW on the previous iteration was | 4327 | /* This happens if WINDOW on the previous iteration was |
| 4285 | at top level of the tree and we did not exit. */ | 4328 | at top level of the window tree. */ |
| 4286 | Fset_window_configuration (old_config); | 4329 | Fset_window_configuration (old_config); |
| 4287 | error ("Specified window edge is fixed"); | 4330 | error ("Specified window edge is fixed"); |
| 4288 | } | 4331 | } |
| @@ -4296,6 +4339,14 @@ adjust_window_trailing_edge (window, delta, horiz_flag) | |||
| 4296 | { | 4339 | { |
| 4297 | if (! NILP (parent) && !NILP (XWINDOW (parent)->vchild)) | 4340 | if (! NILP (parent) && !NILP (XWINDOW (parent)->vchild)) |
| 4298 | first_parallel = XWINDOW (parent)->vchild; | 4341 | first_parallel = XWINDOW (parent)->vchild; |
| 4342 | else if (NILP (parent) && !NILP (p->next)) | ||
| 4343 | { | ||
| 4344 | /* Handle the vertical chain of main window and minibuffer | ||
| 4345 | which has no parent. */ | ||
| 4346 | first_parallel = window; | ||
| 4347 | while (! NILP (XWINDOW (first_parallel)->prev)) | ||
| 4348 | first_parallel = XWINDOW (first_parallel)->prev; | ||
| 4349 | } | ||
| 4299 | } | 4350 | } |
| 4300 | else | 4351 | else |
| 4301 | { | 4352 | { |
| @@ -4304,8 +4355,10 @@ adjust_window_trailing_edge (window, delta, horiz_flag) | |||
| 4304 | } | 4355 | } |
| 4305 | 4356 | ||
| 4306 | /* If this level's succession is in the desired dimension, | 4357 | /* If this level's succession is in the desired dimension, |
| 4307 | and this window is the last one, its trailing edge is fixed. */ | 4358 | and this window is the last one, and there is no higher level, |
| 4308 | if (NILP (XWINDOW (window)->next) && NILP (first_parallel)) | 4359 | its trailing edge is fixed. */ |
| 4360 | if (NILP (XWINDOW (window)->next) && NILP (first_parallel) | ||
| 4361 | && NILP (parent)) | ||
| 4309 | { | 4362 | { |
| 4310 | Fset_window_configuration (old_config); | 4363 | Fset_window_configuration (old_config); |
| 4311 | error ("Specified window edge is fixed"); | 4364 | error ("Specified window edge is fixed"); |
| @@ -4347,7 +4400,7 @@ adjust_window_trailing_edge (window, delta, horiz_flag) | |||
| 4347 | XSETINT (CURBEG (p->next), | 4400 | XSETINT (CURBEG (p->next), |
| 4348 | XINT (CURBEG (p->next)) + delta); | 4401 | XINT (CURBEG (p->next)) + delta); |
| 4349 | size_window (p->next, XINT (CURSIZE (p->next)) - delta, | 4402 | size_window (p->next, XINT (CURSIZE (p->next)) - delta, |
| 4350 | horiz_flag, 0); | 4403 | horiz_flag, 0, 1, 0); |
| 4351 | break; | 4404 | break; |
| 4352 | } | 4405 | } |
| 4353 | } | 4406 | } |
| @@ -4359,7 +4412,7 @@ adjust_window_trailing_edge (window, delta, horiz_flag) | |||
| 4359 | child = XWINDOW (child)->next) | 4412 | child = XWINDOW (child)->next) |
| 4360 | if (! EQ (child, window)) | 4413 | if (! EQ (child, window)) |
| 4361 | size_window (child, XINT (CURSIZE (child)) + delta, | 4414 | size_window (child, XINT (CURSIZE (child)) + delta, |
| 4362 | horiz_flag, 0); | 4415 | horiz_flag, 0, 0, 1); |
| 4363 | 4416 | ||
| 4364 | window = parent; | 4417 | window = parent; |
| 4365 | } | 4418 | } |