Commit 33306645 authored by Carsten Dominik's avatar Carsten Dominik

2008-12-17 Carsten Dominik <carsten.dominik@gmail.com>

	* Fix typos in comments and docstrings throughout Org-mode.

	* org.el (org-get-outline-path): Fix bug if level is not given.

	* org-agenda.el (org-finalize-agenda): Fix typo with variable
	name.
parent ff28a0bd
2008-12-17 Carsten Dominik <dominik@science.uva.nl>
* org.texi: Version number pushed to 6.15d.
2008-12-16 Carsten Dominik <dominik@science.uva.nl>
* org.texi: (Tables in LaTeX export): New section.
......
......@@ -6,7 +6,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.15a
;; Version: 6.15d
;;
;; This file is part of GNU Emacs.
;;
......@@ -93,7 +93,7 @@ This is done by leaving out unnecessary lines."
(defcustom org-agenda-exporter-settings nil
"Alist of variable/value pairs that should be active during agenda export.
This is a good place to set uptions for ps-print and for htmlize."
This is a good place to set options for ps-print and for htmlize."
:group 'org-agenda-export
:type '(repeat
(list
......@@ -199,7 +199,7 @@ you can \"misuse\" it to also add other text to the header. However,
(const :format "" quote)
(list
(choice
:tag "Skiping range"
:tag "Skipping range"
(const :tag "Skip entry" org-agenda-skip-entry-if)
(const :tag "Skip subtree" org-agenda-skip-subtree-if))
(repeat :inline t :tag "Conditions for skipping"
......@@ -254,7 +254,7 @@ files A list of files file to write the produced agenda buffer to
with the command `org-store-agenda-views'.
If a file name ends in \".html\", an HTML version of the buffer
is written out. If it ends in \".ps\", a postscript version is
produced. Otherwide, only the plain text is written to the file.
produced. Otherwise, only the plain text is written to the file.
You can also define a set of commands, to create a composite agenda buffer.
In this case, an entry looks like this:
......@@ -357,7 +357,7 @@ should provide a description for the prefix, like
(defcustom org-agenda-query-register ?o
"The register holding the current query string.
The prupose of this is that if you construct a query string interactively,
The purpose of this is that if you construct a query string interactively,
you can then use it to define a custom command."
:group 'org-agenda-custom-commands
:type 'character)
......@@ -410,7 +410,7 @@ files will be included.")
(defcustom org-agenda-skip-comment-trees t
"Non-nil means, skip trees that start with the COMMENT keyword.
When nil, these trees are also scand by agenda commands."
When nil, these trees are also scanned by agenda commands."
:group 'org-agenda-skip
:type 'boolean)
......@@ -461,10 +461,10 @@ is DONE."
:type 'boolean)
(defcustom org-agenda-skip-deadline-if-done nil
"Non-nil means don't show deadines when the corresponding item is done.
"Non-nil means don't show deadlines when the corresponding item is done.
When nil, the deadline is still shown and should give you a happy feeling.
This is relevant for the daily/weekly agenda. And it applied only to the
actualy date of the deadline. Warnings about approching and past-due
actually date of the deadline. Warnings about approaching and past-due
deadlines are always turned off when the item is DONE."
:group 'org-agenda-skip
:type 'boolean)
......@@ -636,8 +636,8 @@ the entries for specific days."
:type 'boolean)
(defcustom org-agenda-repeating-timestamp-show-all t
"Non-nil means, show all occurences of a repeating stamp in the agenda.
When nil, only one occurence is shown, either today or the
"Non-nil means, show all occurrences of a repeating stamp in the agenda.
When nil, only one occurrence is shown, either today or the
nearest into the future."
:group 'org-agenda-daily/weekly
:type 'boolean)
......@@ -1326,7 +1326,7 @@ The following commands are available:
(defvar org-agenda-undo-has-started-in nil
"Buffers that have already seen `undo-start' in the current undo sequence.")
(defvar org-agenda-pending-undo-list nil
"In a series of undo commands, this is the list of remaning undo items.")
"In a series of undo commands, this is the list of remaining undo items.")
(defun org-agenda-undo ()
......@@ -1997,7 +1997,7 @@ VALUE defaults to t."
(mapcar (lambda (x) (setcdr x (sort (copy-sequence (cdr x)) '<)) x)
tbl)))
(defvar org-agenda-marker-table nil) ; dyamically scoped parameter
(defvar org-agenda-marker-table nil) ; dynamically scoped parameter
(defun org-check-agenda-marker-table ()
"Check of the current entry is on the marker list."
(let ((file (buffer-file-name (or (buffer-base-buffer) (current-buffer))))
......@@ -2025,7 +2025,7 @@ VALUE defaults to t."
;;; Agenda prepare and finalize
(defvar org-agenda-multi nil) ; dynammically scoped
(defvar org-agenda-multi nil) ; dynamically scoped
(defvar org-agenda-buffer-name "*Org Agenda*")
(defvar org-pre-agenda-window-conf nil)
(defvar org-agenda-columns-active nil)
......@@ -2084,10 +2084,10 @@ VALUE defaults to t."
(org-agenda-align-tags)
(unless org-agenda-with-colors
(remove-text-properties (point-min) (point-max) '(face nil))))
(if (and (boundp 'org-overriding-columns-format)
org-overriding-columns-format)
(org-set-local 'org-overriding-columns-format
org-overriding-columns-format))
(if (and (boundp 'org-agenda-overriding-columns-format)
org-agenda-overriding-columns-format)
(org-set-local 'org-agenda-overriding-columns-format
org-agenda-overriding-columns-format))
(if (and (boundp 'org-agenda-view-columns-initially)
org-agenda-view-columns-initially)
(org-agenda-columns))
......@@ -2523,7 +2523,7 @@ given in `org-agenda-start-on-weekday'."
(defvar org-search-syntax-table nil
"Special syntax table for org-mode search.
In this table, we have single quotes not as word constituents, to
that when \"+Ameli\" is searchd as a work, it will also match \"Ameli's\"")
that when \"+Ameli\" is searched as a work, it will also match \"Ameli's\"")
(defun org-search-syntax-table ()
(unless org-search-syntax-table
......@@ -2812,7 +2812,7 @@ The prefix arg TODO-ONLY limits the search to TODO entries."
(org-get-agenda-file-buffer file)
(error "No such file %s" file)))
(if (not buffer)
;; If file does not exist, merror message to agenda
;; If file does not exist, error message to agenda
(setq rtn (list
(format "ORG-AGENDA-ERROR: No such org-file %s" file))
rtnall (append rtnall rtn))
......@@ -3049,7 +3049,7 @@ date. It also removes lines that contain only whitespace."
'(if (boundp 'diary-modify-entry-list-string-function)
;; We can rely on the hook, nothing to do
nil
;; Hook not avaiable, must use advice to make this work
;; Hook not available, must use advice to make this work
(defadvice add-to-diary-list (before org-mark-diary-entry activate)
"Make the position visible."
(if (and org-disable-agenda-to-diary ;; called from org-agenda
......@@ -5074,10 +5074,10 @@ the same tree node, and the headline of the tree node in the Org-mode file."
The new content of the line will be NEWHEAD (as modified by
`org-format-agenda-item'). HDMARKER is checked with
`equal' against all `org-hd-marker' text properties in the file.
If FIXFACE is non-nil, the face of each item is modified acording to
If FIXFACE is non-nil, the face of each item is modified according to
the new TODO state.
If JUST-THIS is non-nil, change just the current line, not all.
If FORCE-TAGS is non nil, the car of it ar the new tags."
If FORCE-TAGS is non nil, the car of it returns the new tags."
(let* ((inhibit-read-only t)
(line (org-current-line))
props m pl undone-face done-face finish new dotime cat tags)
......@@ -5606,7 +5606,7 @@ This is a command that has to be installed in `calendar-mode-map'."
(defun org-agenda-to-appt (&optional refresh filter)
"Activate appointments found in `org-agenda-files'.
With a \\[universal-argument] prefix, refresh the list of
appointements.
appointments.
If FILTER is t, interactively prompt the user for a regular
expression, and filter out entries that don't match it.
......
......@@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.15a
;; Version: 6.15d
;;
;; This file is part of GNU Emacs.
;;
......@@ -25,7 +25,7 @@
;;
;;; Commentary:
;; This file contains the face definitons for Org.
;; This file contains the face definitions for Org.
;;; Code:
......@@ -160,7 +160,7 @@ heading be marked DONE, and the current time will be added.
When called with prefix argument FIND-DONE, find whole trees without any
open TODO items and archive them (after getting confirmation from the user).
If the cursor is not at a headline when this comand is called, try all level
If the cursor is not at a headline when this command is called, try all level
1 trees. If the cursor is on a headline, only try the direct children of
this heading."
(interactive "P")
......
......@@ -4,7 +4,7 @@
;; Author: John Wiegley <johnw@newartisans.com>
;; Keywords: org data task
;; Version: 6.15a
;; Version: 6.15d
;; This file is part of GNU Emacs.
;;
......@@ -53,7 +53,7 @@
If this is a relative path, it will be interpreted relative to the directory
where the Org file lives."
:group 'org-attach
:type 'direcory)
:type 'directory)
(defcustom org-attach-auto-tag "ATTACH"
"Tag that will be triggered automatically when an entry has an attachment."
......
......@@ -6,7 +6,7 @@
;; Thomas Baumann <thomas dot baumann at ch dot tum dot de>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.15a
;; Version: 6.15d
;;
;; This file is part of GNU Emacs.
;;
......
......@@ -5,7 +5,7 @@
;; Author: Bastien Guerry <bzg at altern dot org>
;; Carsten Dominik <carsten dot dominik at gmail dot com>
;; Keywords: org, wp, remember
;; Version: 6.15a
;; Version: 6.15d
;;
;; This file is part of GNU Emacs.
;;
......@@ -27,7 +27,7 @@
;; This file implements links to database entries in BibTeX files.
;; Instead of defining a special link prefix, it uses the normal file
;; links combined with a custom search mechanism to find entries
;; by reference key. And it constucts a nice description tag for
;; by reference key. And it constructs a nice description tag for
;; the link that contains the author name, the year and a short title.
;;
;; It also stores detailed information about the entry so that
......
......@@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.15a
;; Version: 6.15d
;;
;; This file is part of GNU Emacs.
;;
......@@ -280,7 +280,7 @@ the clocking selection, associated with the letter `d'."
(setq selected-task (copy-marker selected-task))
(error "Abort")))
(when interrupting
;; We are interrupting the clocking of a differnt task.
;; We are interrupting the clocking of a different task.
;; Save a marker to this task, so that we can go back.
(move-marker org-clock-interrupted-task
(marker-position org-clock-marker)
......@@ -541,7 +541,7 @@ Puts the resulting times in minutes as a text property on each headline."
dt (- te ts)
t1 (if (> dt 0) (+ t1 (floor (/ dt 60))) t1)))
((match-end 4)
;; A naket time
;; A naked time
(setq t1 (+ t1 (string-to-number (match-string 5))
(* 60 (string-to-number (match-string 4))))))
(t ;; A headline
......
......@@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.15a
;; Version: 6.15d
;;
;; This file is part of GNU Emacs.
;;
......@@ -25,7 +25,7 @@
;;
;;; Commentary:
;; This file contains the face definitons for Org.
;; This file contains the column view for Org.
;;; Code:
......@@ -228,7 +228,7 @@ This is the compiled version of the format.")
org-columns-ellipses))))
(defvar org-columns-full-header-line-format nil
"Fthe full header line format, will be shifted by horizontal scrolling." )
"The full header line format, will be shifted by horizontal scrolling." )
(defvar org-previous-header-line-format nil
"The header line format before column view was turned on.")
(defvar org-columns-inhibit-recalculation nil
......@@ -326,7 +326,7 @@ for the duration of the command.")
(defvar org-agenda-columns-remove-prefix-from-item)
(defun org-agenda-columns-cleanup-item (item pl cphr fmt)
"Cleanup the tiem property for agenda column view.
"Cleanup the time property for agenda column view.
See also the variable `org-agenda-columns-remove-prefix-from-item'."
(let* ((org-complex-heading-regexp cphr)
(prefix (substring item 0 pl))
......@@ -737,7 +737,7 @@ around it."
(org-columns-redo)))
(defun org-columns-narrow (arg)
"Make the column nrrower by ARG characters."
"Make the column narrower by ARG characters."
(interactive "p")
(org-columns-widen (- arg)))
......@@ -1137,7 +1137,7 @@ PARAMS is a property list of parameters:
(defun org-listtable-to-string (tbl)
"Convert a listtable TBL to a string that contains the Org-mode table.
The table still need to be alligned. The resulting string has no leading
The table still need to be aligned. The resulting string has no leading
and tailing newline characters."
(mapconcat
(lambda (x)
......
......@@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.15a
;; Version: 6.15d
;;
;; This file is part of GNU Emacs.
;;
......
This diff is collapsed.
......@@ -4,7 +4,7 @@
;;
;; Emacs Lisp Archive Entry
;; Filename: org-export-latex.el
;; Version: 6.15a
;; Version: 6.15d
;; Author: Bastien Guerry <bzg AT altern DOT org>
;; Maintainer: Bastien Guerry <bzg AT altern DOT org>
;; Keywords: org, wp, tex
......@@ -259,15 +259,15 @@ These are the .aux, .log, .out, and .toc files."
"Call `org-export-as-latex', may be used in batch processing.
For example:
emacs --batch
--load=$HOME/lib/emacs/org.el
--eval \"(setq org-export-headline-levels 2)\"
--visit=MyFile --funcall org-export-as-latex-batch"
emacs --batch
--load=$HOME/lib/emacs/org.el
--eval \"(setq org-export-headline-levels 2)\"
--visit=MyFile --funcall org-export-as-latex-batch"
(org-export-as-latex org-export-headline-levels 'hidden))
;;;###autoload
(defun org-export-as-latex-to-buffer (arg)
"Call `org-exort-as-latex` with output to a temporary buffer.
"Call `org-export-as-latex` with output to a temporary buffer.
No file is created. The prefix ARG is passed through to `org-export-as-latex'."
(interactive "P")
(org-export-as-latex arg nil nil "*Org LaTeX Export*")
......@@ -419,7 +419,7 @@ when PUB-DIR is set, use this as the publishing directory."
coding-system))
(save-buffer-coding-system (or org-export-latex-coding-system
coding-system))
(region (buffer-substring
(region (buffer-substring
(if region-p (region-beginning) (point-min))
(if region-p (region-end) (point-max))))
(string-for-export
......@@ -829,10 +829,10 @@ links, keywords, lists, tables, fixed-width"
(replace-match
(org-export-latex-protect-string
(format "\\texttt{%s}"
(save-match-data
(replace-regexp-in-string
"_" "\\\\_" (match-string 0)))))
t t)))))
(save-match-data
(replace-regexp-in-string
"_" "\\\\_" (match-string 0)))))
t t)))))
(defun org-export-latex-fontify-headline (string)
"Fontify special words in STRING."
......@@ -922,12 +922,12 @@ See the `org-export-latex.el' code for a complete conversion table."
(match-string 1)
(match-string 3))) "") t t)))))))
'("^\\([^\n$]*?\\|^\\)\\(\\\\?\\$\\)\\([^\n$]*\\)$"
"\\([a-za-z0-9]+\\|[ \t\n]\\|\\b\\|\\\\\\)\\(_\\|\\^\\)\\([a-za-z0-9]+\\|[ \t\n]\\|[:punct:]\\|{[a-za-z0-9]+}\\|([a-za-z0-9]+)\\)"
"\\([a-za-z0-9]+\\|[ \t\n]\\|\\b\\|\\\\\\)\\(_\\|\\^\\)\\([a-za-z0-9]+\\|[ \t\n]\\|[:punct:]\\|{[a-za-z0-9]+}\\|([a-za-z0-9]+)\\)"
"\\(.\\|^\\)\\(\\\\\\)\\([ \t\n]\\|[a-zA-Z&#%{}\"]+\\)"
"\\(.\\|^\\)\\(&\\)"
"\\(.\\|^\\)\\(#\\)"
"\\(.\\|^\\)\\(%\\)"
"\\(.\\|^\\)\\({\\)"
"\\(.\\|^\\)\\(#\\)"
"\\(.\\|^\\)\\(%\\)"
"\\(.\\|^\\)\\({\\)"
"\\(.\\|^\\)\\(}\\)"
"\\(.\\|^\\)\\(~\\)"
"\\(.\\|^\\)\\(\\.\\.\\.\\)"
......@@ -1059,8 +1059,8 @@ If TIMESTAMPS, convert timestamps, otherwise delete them."
floatp (or caption label))
(setq lines (split-string raw-table "\n" t))
(apply 'delete-region (list beg end))
(when org-export-table-remove-special-lines
(setq lines (org-table-clean-before-export lines)))
(when org-export-table-remove-special-lines
(setq lines (org-table-clean-before-export lines)))
;; make a formatting string to reflect aligment
(setq olines lines)
(while (and (not line-fmt) (setq line (pop olines)))
......@@ -1102,7 +1102,7 @@ If TIMESTAMPS, convert timestamps, otherwise delete them."
(or (and (string-match "[ \t]*|-+" elem) 'hline)
(split-string (org-trim elem) "|" t)))
lines))
(when insert
(when insert
(insert (org-export-latex-protect-string
(concat
(if longtblp
......@@ -1116,7 +1116,7 @@ If TIMESTAMPS, convert timestamps, otherwise delete them."
(if longtblp "\\\\\n" "\n")
(if (not longtblp) "\\begin{center}\n")
(if (not longtblp) (concat "\\begin{tabular}{" align "}\n"))
(orgtbl-to-latex
(orgtbl-to-latex
lines
`(:tstart nil :tend nil
:hlend ,(if longtblp
......@@ -1180,7 +1180,7 @@ If TIMESTAMPS, convert timestamps, otherwise delete them."
((member type '("http" "https" "ftp"))
(concat type ":" raw-path))
((and re-radio (string-match re-radio raw-path))
(setq radiop t))
(setq radiop t))
((equal type "mailto")
(concat type ":" raw-path))
((equal type "file")
......@@ -1267,7 +1267,7 @@ If TIMESTAMPS, convert timestamps, otherwise delete them."
(while (re-search-forward "^----+.$" nil t)
(replace-match (org-export-latex-protect-string "\\hrule") t t))
;; Protect LaTeX commands like \commad[...]{...} or \command{...}
;; Protect LaTeX commands like \command[...]{...} or \command{...}
(goto-char (point-min))
(while (re-search-forward "\\\\[a-zA-Z]+\\(?:\\[.*\\]\\)?{.*}" nil t)
(add-text-properties (match-beginning 0) (match-end 0)
......
......@@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.15a
;; Version: 6.15d
;;
;; This file is part of GNU Emacs.
;;
......@@ -25,7 +25,7 @@
;;
;;; Commentary:
;; This file contains the face definitons for Org.
;; This file contains the face definitions for Org.
;;; Code:
......
......@@ -6,7 +6,7 @@
;; Tassilo Horn <tassilo at member dot fsf dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.15a
;; Version: 6.15d
;;
;; This file is part of GNU Emacs.
;;
......
......@@ -4,7 +4,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.15a
;; Version: 6.15d
;;
;; This file is part of GNU Emacs.
;;
......@@ -36,7 +36,7 @@
;; time of the ID, with microsecond accuracy. This virtually
;; guarantees globally unique identifiers, even if several people are
;; creating IDs at the same time in files that will eventually be used
;; together. As an exernal method `uuidgen' is supported, if installed
;; together. As an external method `uuidgen' is supported, if installed
;; on the system.
;;
;; This file defines the following API:
......@@ -79,7 +79,7 @@
:group 'org)
(defcustom org-id-method
(defcustom org-id-method
(condition-case nil
(if (string-match "\\`[-0-9a-fA-F]\\{36\\}\\'"
(org-trim (shell-command-to-string "uuidgen")))
......@@ -89,7 +89,7 @@
"The method that should be used to create new IDs.
If `uuidgen' is available on the system, it will be used as the default method.
if not. the methd `org' is used.
if not, the method `org' is used.
An ID will consist of the optional prefix specified in `org-id-prefix',
and a unique part created by the method this variable specifies.
......@@ -129,7 +129,7 @@ people to make this necessary."
:type 'boolean)
(defcustom org-id-track-globally t
"Non-nil means, track IDs trhough files, so that links work globally.
"Non-nil means, track IDs through files, so that links work globally.
This work by maintaining a hash table for IDs and writing this table
to disk when exiting Emacs. Because of this, it works best if you use
a single Emacs process, not many.
......@@ -173,7 +173,7 @@ This variable is only relevant when `org-id-track-globally' is set."
(defcustom org-id-search-archives t
"Non-nil means, search also the archive files of agenda files for entries.
This is a possibility to reduce overhead, but it measn that entries moved
This is a possibility to reduce overhead, but it means that entries moved
to the archives can no longer be found by ID.
This variable is only relevant when `org-id-track-globally' is set."
:group 'org-id
......@@ -377,7 +377,7 @@ Store the relation between files and corresponding IDs.
This will scan all agenda files, all associated archives, and all
files currently mentioned in `org-id-locations'.
When FILES is given, scan these files instead.
When CHECK is given, prepare detailed iinformation about duplicate IDs."
When CHECK is given, prepare detailed information about duplicate IDs."
(interactive)
(if (not org-id-track-globally)
(error "Please turn on `org-id-track-globally' if you want to track IDs.")
......@@ -470,9 +470,9 @@ When CHECK is given, prepare detailed iinformation about duplicate IDs."
(setq org-id-locations (org-id-alist-to-hash org-id-locations))))
(defun org-id-add-location (id file)
"Add the ID with location FILE to the database of ID loations."
"Add the ID with location FILE to the database of ID locations."
;; Only if global tracking is on, and when the buffer has a file
(when (and org-id-track-globally id file)
(when (and org-id-track-globally id file)
(unless org-id-locations (org-id-locations-load))
(puthash id (abbreviate-file-name file) org-id-locations)
(add-to-list 'org-id-files (abbreviate-file-name file))))
......
......@@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.15a
;; Version: 6.15d
;;
;; This file is part of GNU Emacs.
;;
......
......@@ -4,7 +4,7 @@
;;
;; Author: Philip Jackson <emacs@shellarchive.co.uk>
;; Keywords: erc, irc, link, org
;; Version: 6.15a
;; Version: 6.15d
;;
;; This file is part of GNU Emacs.
;;
......@@ -15,7 +15,7 @@
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
......@@ -51,7 +51,7 @@
(require 'org)
;; Declare the function fomr ERC that we use.
;; Declare the function form ERC that we use.
(declare-function erc-current-logfile "erc-log" (&optional buffer))
(declare-function erc-prompt "erc" ())
(declare-function erc-default-target "erc" ())
......@@ -91,7 +91,7 @@ Parse a LINK that looks like server:port/chan/user (port, chan
and user being optional) and return any of the port, channel or user
attributes that are found."
(let* ((parts (split-string link "/" t))
(len (length parts)))
(len (length parts)))
(when (or (< len 1) (> len 3))
(error "Failed to parse link needed 1-3 parts, got %d" len))
(setcar parts (split-string (car parts) ":" t))
......@@ -109,14 +109,14 @@ attributes that are found."
Strip starting and ending white space from STRING and replace any
chars that the value AFTER with '...'"
(let* ((after (number-to-string (or after 30)))
(replace-map (list (cons "^[ \t]*" "")
(cons "[ \t]*$" "")
(cons (concat "^\\(.\\{" after
"\\}\\).*") "\\1..."))))
(replace-map (list (cons "^[ \t]*" "")
(cons "[ \t]*$" "")
(cons (concat "^\\(.\\{" after
"\\}\\).*") "\\1..."))))
(mapc (lambda (x)
(when (string-match (car x) string)
(setq string (replace-match (cdr x) nil nil string))))
replace-map)
(when (string-match (car x) string)
(setq string (replace-match (cdr x) nil nil string))))
replace-map)
string))
;; ERC specific functions
......@@ -134,14 +134,14 @@ result is a cons of the filename and search string."
(abbreviate-file-name buffer-file-name)
;; can we get a '::' part?
(if (string= erc-line (erc-prompt))
(progn
(goto-char (point-at-bol))
(when (search-backward-regexp "^[^ ]" nil t)
(buffer-substring-no-properties (point-at-bol)
(point-at-eol))))
(when (search-backward erc-line nil t)
(buffer-substring-no-properties (point-at-bol)
(point-at-eol)))))))
(progn
(goto-char (point-at-bol))
(when (search-backward-regexp "^[^ ]" nil t)
(buffer-substring-no-properties (point-at-bol)
(point-at-eol))))
(when (search-backward erc-line nil t)
(buffer-substring-no-properties (point-at-bol)
(point-at-eol)))))))
(defun org-irc-erc-store-link ()
"Store a link to the IRC log file or the session itself.
......@@ -151,47 +151,47 @@ the session itself."
(require 'erc-log)
(if org-irc-link-to-logs
(let* ((erc-line (buffer-substring-no-properties