From: Mikael Fornius <mfo@abc.se>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [PATCH] org-attach-commit: Split by nulls and two typos.
Date: Mon, 29 Mar 2010 18:11:48 +0200 [thread overview]
Message-ID: <87634fm7jv.fsf@eee.lan> (raw)
[-- Attachment #1: Type: text/plain, Size: 560 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-attach-commit-and-typos --]
[-- Type: text/x-patch, Size: 2432 bytes --]
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 <mfo@abc.se>
+
+ * 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 <carsten.dominik@gmail.com>
* 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))
[-- Attachment #3: Type: text/plain, Size: 20 bytes --]
--
Mikael Fornius
[-- Attachment #4: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
reply other threads:[~2010-03-29 16:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87634fm7jv.fsf@eee.lan \
--to=mfo@abc.se \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.