From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mikael Fornius Subject: [PATCH] org-attach-commit: Split by nulls and two typos. Date: Mon, 29 Mar 2010 18:11:48 +0200 Message-ID: <87634fm7jv.fsf@eee.lan> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwHVg-00083g-U1 for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 12:08:17 -0400 Received: from [140.186.70.92] (port=53080 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwHVe-00082d-Ak for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 12:08:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwHVc-00049d-6i for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 12:08:14 -0400 Received: from violet.abc.se ([62.80.200.155]:55081) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwHVb-000453-T0 for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 12:08:12 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode --=-=-= I got a problem when doing attachments (C-c C-a c/m/c). My *Messages* buffer is flooded with: "fatal: pathspec 'x' did not match any files" messages. This is because the `split-string' function call in `org-attach-commit' does not split correctly in my emacs version (23.1.92.1). Maybe other emacs versions split by NULL-characters when SEPARATORS is the empty string but mine does not so I suggest the attached change. It fixes this problem for me and is also correcting two other typos found when recompiling. Patch is against the current git head. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=org-attach-commit-and-typos.patch Content-Description: org-attach-commit-and-typos diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 23e2426..58703ed 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2010-03-29 Mikael Fornius + + * org-html.el (org-export-html-preprocess): Fix typo. + + * org-publish.el (org-publish-sanitize-plist): Fix typo. + + * org-attach.el (org-attach-commit): Split by null character fix. + 2010-03-29 Carsten Dominik * org-agenda.el (org-diary-last-run-time): New variable. diff --git a/lisp/org-attach.el b/lisp/org-attach.el index 8533a75..52a91ca 100644 --- a/lisp/org-attach.el +++ b/lisp/org-attach.el @@ -246,11 +246,10 @@ This checks for the existence of a \".git\" directory in that directory." (cd dir) (shell-command "git add .") (shell-command "git ls-files --deleted -z" t) - (mapc '(lambda (file) - (unless (string= file "") - (shell-command - (concat "git rm \"" file "\"")))) - (split-string (buffer-string) "")) + (mapc (lambda (file) + (shell-command + (concat "git rm \"" file "\""))) + (split-string (buffer-string) "[\0]" t)) (shell-command "git commit -m 'Synchronized attachments'"))))) (defun org-attach-tag (&optional off) diff --git a/lisp/org-html.el b/lisp/org-html.el index b8925e7..4ae694d 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -443,7 +443,7 @@ This may also be a function, building and inserting the postamble.") (if (string-match "\\`[a-z]\\{1,10\\}:\\(.+\\)" label) (setq l1 (substring label (match-beginning 1))) (setq l1 label))) - (replace-match (format "[[#%s][l1]]" label l1) t t))))) + (replace-match (format "[[#%s][%s]]" label l1) t t))))) ;;;###autoload (defun org-export-as-html-and-open (arg) diff --git a/lisp/org-publish.el b/lisp/org-publish.el index c8b06c5..8633140 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -42,11 +42,11 @@ (defun org-publish-sanitize-plist (plist) (mapcar (lambda (x) - (or (cdr (assoq x '((:index-filename . :sitemap-filename) - (:index-title . :sitemap-title) - (:index-function . :sitemap-function) - (:index-style . :sitemap-style) - (:auto-index . :auto-sitemap)))) + (or (cdr (assq x '((:index-filename . :sitemap-filename) + (:index-title . :sitemap-title) + (:index-function . :sitemap-function) + (:index-style . :sitemap-style) + (:auto-index . :auto-sitemap)))) x)) plist)) --=-=-= -- Mikael Fornius --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--