emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Berthier <nberth@member.fsf.org>
To: emacs-orgmode@gnu.org
Subject: [PATCH] `file-name-base' missing in Emacs < 24.3
Date: Mon, 25 Aug 2014 16:53:01 +0200	[thread overview]
Message-ID: <vp0o1ts462pe.fsf@epicea.irisa.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 205 bytes --]


Hello,

A recent patch introduced a call to `file-name-base' in contributed
"ox-bibtex.el"; however, this function was only introduced in Emacs
version 24.3.  The attached patch is a basic fix for that.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-contrib-lisp-ox-bibtex.el-Fixup-for-Emacs-24.3.patch --]
[-- Type: text/x-patch, Size: 1109 bytes --]

From 362e07699a767ea16d99a7f67f6fcb92d1521e0c Mon Sep 17 00:00:00 2001
From: Nicolas Berthier <nberth@member.fsf.org>
Date: Mon, 25 Aug 2014 16:01:20 +0200
Subject: [PATCH] contrib/lisp/ox-bibtex.el: Fixup for Emacs < 24.3

* contrib/lisp/ox-bibtex.el (org-bibtex-process-bib-files): Avoid
using `file-name-base', only available since Emacs version 24.3.
---
 contrib/lisp/ox-bibtex.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/lisp/ox-bibtex.el b/contrib/lisp/ox-bibtex.el
index 7cb8972..4016480 100644
--- a/contrib/lisp/ox-bibtex.el
+++ b/contrib/lisp/ox-bibtex.el
@@ -200,7 +200,8 @@ Return new parse tree."
 			   (file-name-sans-extension file) file))
 	    ;; Outpufiles of bibtex2html will be put into current working directory
 	    ;; so define a variable for this.
-	    (setq out-file (file-name-base file))
+	    (setq out-file (file-name-sans-extension 
+			    (file-name-nondirectory file)))
 	    ;; limit is set: collect citations throughout the document
 	    ;; in TEMP-FILE and pass it to "bibtex2html" as "-citefile"
 	    ;; argument.
-- 
2.0.0.rc4


[-- Attachment #3: Type: text/plain, Size: 88 bytes --]


Regards,

-- 
Nicolas Berthier                                        FSF Member #7975

             reply	other threads:[~2014-08-25 14:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25 14:53 Nicolas Berthier [this message]
2014-10-12 11:55 ` [PATCH] `file-name-base' missing in Emacs < 24.3 Bastien
2014-12-01 15:53 ` Bastien

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vp0o1ts462pe.fsf@epicea.irisa.fr \
    --to=nberth@member.fsf.org \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).