When I give M-x org-mobile-push I get an error: Symbol's function definition is void: appt-make-list What could be wrong? I am running org-mode 7.7 Vikas
Vikas Rawal <vikaslists@agrarianresearch.org> writes: > When I give M-x org-mobile-push I get an error: > > Symbol's function definition is void: appt-make-list > > What could be wrong? > > I am running org-mode 7.7 (require 'appt) Ideally this should be done automatically. Looks like that's not the case. > Vikas > > --
Vikas Rawal <vikaslists@agrarianresearch.org> wrote:
> When I give M-x org-mobile-push I get an error:
>
> Symbol's function definition is void: appt-make-list
>
> What could be wrong?
>
> I am running org-mode 7.7
>
Who knows? org itself does not call appt-make-list from
anywhere, so you have probably set up a hook somewhere
to call it and forgotten all about it.
<soapbox>
It is one of the ambitions of my life (and I'm sure that ambition is
shared by several people on this list) to train everybody to get a
backtrace *first* after they get an error - do not post to the list, do
not pass GO, do not collect USD200 until you have the backtrace in
hand.[fn:1] Often, the backtrace tells enough so you can fix the problem
without any further ado, but even if you cannot or do not want to read
backtraces, the people on the list who are able/willing to look at the
problem find them very useful: trust me on that.
So pretty please: when you get an error, *at the very least*, do
M-x toggle-debug-on-error
and then try to reproduce the error. That will give you the
required backtrace. For extra points, reload uncompiled org
and then try to reproduce the error: the resulting backtrace
is more informative with uncompiled code.
</soapbox>
In your case, app-make-list is defined in appt.el and if you visit the
file, you will see at the very bottom that it does
(provide 'appt)
which means that you can load the file and therefore define the function
by inserting
(require 'appt)
somewhere in your initialization file. But I think of this as solving
the problem by peeking at the solutions in the back of the book:
wouldn't you want to find out what caused the problem in the
first place?
Cheers,
Nick
Footnotes:
[fn:1] But if you try and fail, which happens sometimes, feel free to
say so in your post. I don't want to dissuade anybody from asking
a question: I just want to expedite the process of getting to
the answer.
Thanks Nick and Jambunathan for taking the trouble to respond. > > So pretty please: when you get an error, *at the very least*, do > > M-x toggle-debug-on-error Thanks nick for teaching my how to use back-trace. Here is the output. May I request you to help identify what could be causing the problem. Debugger entered--Lisp error: (void-function appt-make-list) appt-make-list() run-hooks(diary-hook) diary-list-entries((9 26 2011) 1) byte-code("\301\302!\203\n\0\302\202\v\0\303\b\304\"\207" [date fboundp diary-list-entries list-diary-entries 1] 3) org-get-entries-from-diary((9 26 2011)) org-agenda-list(nil) call-interactively(org-agenda-list) (let ((org-agenda-title-append "<after>KEYS=a TITLE: Agenda </after>")) (call-interactively (quote org-agenda-list))) (let ((org-agenda-compact-blocks nil)) (let ((org-agenda-title-append "<after>KEYS=a TITLE: Agenda </after>")) (call-interactively (quote org-agenda-list)))) eval((let ((org-agenda-compact-blocks nil)) (let ((org-agenda-title-append "<after>KEYS=a TITLE: Agenda </after>")) (call-interactively (quote org-agenda-list))))) org-let2(((org-agenda-compact-blocks nil)) ((org-agenda-title-append "<after>KEYS=a TITLE: Agenda </after>")) (call-interactively (quote org-agenda-list))) org-agenda-run-series("SUMO" (((agenda nil ((org-agenda-title-append "<after>KEYS=a TITLE: Agenda </after>"))) (alltodo nil ((org-agenda-title-append "<after>KEYS=t TITLE: ALL TODO </after>"))) (agenda "" ((org-agenda-title-append "<after>KEYS=n#1 TITLE: Agenda and all TODO's </after>"))) (alltodo nil ((org-agenda-title-append "<after>KEYS=n#2 TITLE: Agenda and all TODO's </after>")))) ((org-agenda-compact-blocks nil)) ("/home/vikas/Dropbox/MobileOrg/agendas.org"))) byte-code("\306\x18\307 \232\203\r\0\310\202\x0e\0\n\x1a\v\x1c\311\306\312\313\v\"\"^[p\x1d\314\315 !\x1e@\306\211\x1eA\x1eB\306\211\x1eC\x1eD\306\211\x1eE\x1eF\x0eG\204X\0\316\317!\203C\0\x0e\x0f\204I\0\320\321\322\306#\210\306\x16H\x0eI\306\211\223\210\x0eJ\306\211\223\210\320\323\324\306#\210\320\323\325\306#\210p\x16K\x0eL\204z\0\326\b!\211\x16F@\x16L\x0eFA\x16M\x0eG\204\305\0\x0eM\203\305\0\320\321\322\x0e@C#\210\x0eM\327=\203\247\0\330\x16H\x0eI\331 \306\223\210\x0eJ\332 \306\223\210\202\305\0\x0eM\333=\203\305\0\212\330\x16H\334\330!\210\x0eI`\306\223\210\x0eJ\335\330!\306\223\210)\336\x0eL\v\"\211\x16A\203\322\x01\337\x0eA89\204\341\0\340\337\x0eA8!\203\301\x01\337\x0eA8\x16C\341\342\x0eA8!\x16D\343\x0eA8\x16E\320\323\324\x0eE#\210\x0eC\344=\203\v\x01\345\x0eE\346\"\202,\x03\x0eC\347=\203\x1a\x01\345\x0eE\350\"\202,\x03\x0eC\351=\203)\x01\345\x0eE\352\"\202,\x03\x0eC\353=\2038\x01\345\x0eE\354\"\202,\x03\x0eC\355=\203G\x01\345\x0eE\356\"\202,\x03\x0eC\357=\203V\x01\345\x0eE\360\"\202,\x03\x0eC\361=\203e\x01\345\x0eE\362\"\202,\x03\x0eC\363=\203w\x01\364 \210\345\x0eE\365\"\202,\x03\x0eC\366=\203\211\x01\364 \210\345\x0eE\367\"\202,\x03\x0eC\370=\203\233\x01\364 \210\345\x0eE\371\"\202,\x03\340\x0eC!\203\252\x01\345\x0eE\372\"\202,\x03\373\x0eC!\203\271\x01\345\x0eE\374\"\202,\x03\375\376\x0eC\"\202,\x03\377\x0eAA@\x0eA\211\x1eNAA)\"\202,\x03\x0eL\201S\0\232\203\345\x01\f\x13\201T\0\303!\202,\x03\x0eL\201U\0\232\203\370\x01\201V\0\201W\0!\202,\x03\x0eL\201X\0\232\203\v\x02\201V\0\201Y\0!\202,\x03\x0eL\201Z\0\232\203\x1e\x02\201V\0\201[\0!\202,\x03\x0eL\201\\\0\232\203D\x02\201[\0\x0eO\2062\x02\201]\0\x1eO\x1eP\x0eO\x1eQ\201V\0\x0eP!+\202,\x03\x0eL\201^\0\232\203W\x02\201V\0\201_\0!\202,\x03\x0eL\201`\0\232\203}\x02\201_\0\x0eO\206k\x02\201a\0\x1eO\x1eP\x0eO\x1eQ\201V\0\x0eP!+\202,\x03\x0eL\201b\0\232\203\220\x02\201V\0\201c\0!\202,\x03\x0eL\201d\0\232\203\261\x02\201_\0\306\201e\0\"\210\201f\0\201g\0\201h\0\330\211$\202,\x03\x0eL\201i\0\232\203\356\x02\x0eR\201j\0=\204\311\x02\375\201k\0!\210\x0eM?\205,\x03\320\321\322\x0e@C#\210\201l\0\x0eO\x1eO\x1eP\x0eO\x1eQ\201V\0\x0eP!+\202,\x03\x0eL\201m\0\232\203\x01\x03\201V\0\201n\0!\202,\x03\x0eL\201o\0\232\203\x14\x03\201V\0\201p\0!\202,\x03\x0eL\201q\0\232\203'\x03\201T\0\201r\0!\202,\x03\375\201s\0!.\f\207" [prefix-descriptions org-agenda-buffer-name org-agenda-window-setup org-agenda-custom-commands org-agenda-custom-commands-orig buf nil buffer-name current-window delq mapcar #[(x) "\bA;\203\f\0\b B\x11\302\207\bA@;\203\x15\0\b\207\bA@\204'\0\b@\303\b\211\x18AA)BB\207\b@\303\bABB\207" [x prefix-descriptions nil ""] 4] buffer-file-name buffer-base-buffer boundp org-agenda-keep-restricted-file-list put org-agenda-files org-restrict org-agenda-redo-command org-lprops last-args org-agenda-get-restriction-and-command region t region-beginning region-end subtree org-back-to-heading org-end-of-subtree assoc 2 functionp eval 3 4 agenda org-let (org-agenda-list current-prefix-arg) alltodo (org-todo-list current-prefix-arg) search (org-search-view current-prefix-arg match nil) stuck (org-agenda-list-stuck-projects current-prefix-arg) tags (org-tags-view current-prefix-arg match) tags-todo (org-tags-view (quote (4)) match) todo ...] 6) org-agenda(nil "X") (let ((org-agenda-compact-blocks nil)) (org-agenda nil thiscmdkey)) eval((let ((org-agenda-compact-blocks nil)) (org-agenda nil thiscmdkey))) byte-code("\b\205k\0\b\211A\x10@\211\x11@\x12\306 8\211\x13<\203\x1a\0\307\202^[\0\310 8\x14\v<\203'\0\310\202(\0\311 8\211\x15;\2033\0\rC\x15\r\203\0\0\312\313\314\x0e\x11\f\x0e\x12#\315E!\210\x0e\x13q\210\r\203\\\0\312\313\314\x0e\x11\f\x0e\x12#\316E!\210\202H\0\317\x0e\x13!\203\0\0\320\x0e\x13!\210\202\0\0\207" [cmds cmd thiscmdkey cmd-or-set opts files 2 3 4 5 eval let append (org-agenda nil thiscmdkey) (org-write-agenda (expand-file-name (pop files) dir) nil t) get-buffer kill-buffer org-agenda-exporter-settings pars org-agenda-buffer-name] 7) #[(&rest parameters) "\306\b!\307 \310\n!\307\211\211\211\211^[\x1c\x1d\x1e\n\x1e\v\x1e\f\x1e\r\x1e\x0e\x1e\x0f\311\213. \207" [org-agenda-custom-commands default-directory parameters cmd-or-set opts files org-agenda-normalize-custom-commands nil org-make-parameter-alist ((byte-code "\b\205k\0\b\211A\x10@\211\x11@\x12\306 8\211\x13<\203\x1a\0\307\202^[\0\310 8\x14\v<\203'\0\310\202(\0\311 8\211\x15;\2033\0\rC\x15\r\203\0\0\312\313\314\x0e\x11\f\x0e\x12#\315E!\210\x0e\x13q\210\r\203\\\0\312\313\314\x0e\x11\f\x0e\x12#\316E!\210\202H\0\317\x0e\x13!\203\0\0\320\x0e\x13!\210\202\0\0\207" [cmds cmd thiscmdkey cmd-or-set opts files 2 3 4 5 eval let append (org-agenda nil thiscmdkey) (org-write-agenda (expand-file-name (pop files) dir) nil t) get-buffer kill-buffer org-agenda-exporter-settings pars org-agenda-buffer-name] 7)) thiscmdkey cmd pars dir pop-up-frames cmds] 9 ("/usr/local/share/emacs/site-lisp/org-agenda.elc" . 106452)]() (org-batch-store-agenda-views) eval((org-batch-store-agenda-views)) org-store-agenda-views() org-mobile-create-sumo-agenda() org-mobile-push() call-interactively(org-mobile-push t nil) execute-extended-command(nil) call-interactively(execute-extended-command nil nil) > which means that you can load the file and therefore define the function > by inserting > > (require 'appt) Thanks Jambunathan and Nick. This indeed solves the problem. Vikas
Vikas Rawal <vikaslists@agrarianresearch.org> wrote: > Thanks Nick and Jambunathan for taking the trouble to respond. > > > > > So pretty please: when you get an error, *at the very least*, do > > > > M-x toggle-debug-on-error > > Thanks nick for teaching my how to use back-trace. Here is the > output. May I request you to help identify what could be causing the > problem. > The backtrace shows (you read it from the bottom up) that the following sequence of calls took place: org-mobile-push -> org-mobile-create-sumo-agenda -> org-store-agenda-views -> org-batch-store-agenda-views -> org-agenda(nil "X") -> org-agenda-run-series("SUMO" ...) -> org-agenda-list -> org-get-entries-from-diary -> diary-list-entries -> run the diary-hook -> appt-make-list In trying to call this last function, emacs gets an error: the function is not defined. Basically what happens is that org-mobile-push calculates the agenda, by calling org-agenda-list. This function checks the value of the variable org-agenda-include-diary, which in your case must be t, so it tries to add agenda entries from the diary. It calls org-get-entries-from-diary to do that, which calls diary-list-entries. This one runs the diary-hook and somewhere in your init files you must have done something like this: (add-hook 'diary-hook (function appt-make-list)) When the hook is run, emacs tries to call the function, does not find it and complains. To fix it, change the above line to (require 'appt) (add-hook 'diary-hook (function appt-make-list)) The (require 'appt) makes sure that the file that defines this function is loaded, the function is defined when emacs needs to call it and the problem is resolved. Strictly speaking, the function does not need to be defined that early: it only needs to be defined before it is called, but if you are going to call it, you might as well do it early. If that's not desirable for some reason, you can use the autoload mechanism (see the emacs manual for that). Note that there are two customizations (the setting of org-agenda-include-diary to t and the setting of diary-hook) that caused your problem. I don't include the diary in my agenda, so I would not have seen the problem at all. That's one of the reasons why it's important for everybody to have the Pavlovian response: error --> must get backtrace It can pinpoint where *your* problem is and show the way to a solution. HTH, Nick > Debugger entered--Lisp error: (void-function appt-make-list) > appt-make-list() > run-hooks(diary-hook) > diary-list-entries((9 26 2011) 1) > byte-code("\301\302!\203\nfter>"))) (alltodo nil ((org-agenda-title-append "<after>KEYS=t TITLE: ALL TODO </after>"))) (agenda "" ((org-agenda-title-append "<after>KEYS=n#1 TITLE: Agenda and all TODO's </after>"))) (alltodo nil ((org-agenda-title-append "<after>KEYS=n#2 TITLE: Agenda and all TODO's </after>")))) ((org-agenda-compact-blocks nil)) ("/home/vikas/Dropbox/MobileOrg/agendas.org"))) > ... > org-agenda(nil "X") > (let ((org-agenda-compact-blocks nil)) (org-agenda nil thiscmdkey)) > eval((let ((org-agenda-compact-blocks nil)) (org-agenda nil thiscmdkey))) > ... > ... > (org-batch-store-agenda-views) > eval((org-batch-store-agenda-views)) > org-store-agenda-views() > org-mobile-create-sumo-agenda() > org-mobile-push() > call-interactively(org-mobile-push t nil) > execute-extended-command(nil) > call-interactively(execute-extended-command nil nil) > > > which means that you can load the file and therefore define the function > > by inserting > > > > (require 'appt) > > Thanks Jambunathan and Nick. This indeed solves the problem. > > Vikas >
>
> In trying to call this last function, emacs gets an error: the function
> is not defined.
>
> Basically what happens is that org-mobile-push calculates the agenda, by
> calling org-agenda-list. This function checks the value of the variable
> org-agenda-include-diary, which in your case must be t, so it tries to
> add agenda entries from the diary. It calls org-get-entries-from-diary
> to do that, which calls diary-list-entries. This one runs the diary-hook
> and somewhere in your init files you must have done something like
> this:
>
> (add-hook 'diary-hook (function appt-make-list))
>
Thanks very much for explaining it so well.
Best wishes,
Vikas
I would like to export an org file to html using a batch command. This is the command I tried. emacs --batch --load=$HOME/lisp/org-7.01/lisp/org.el --eval "(setq org-export-headline-levels 1)" --visit=$HOME/file.org --funcall org-export-as-html-batch But I get an error which says: Symbol's function definition is void: org-in-block-p Could anyone explain what this could mean? Thanks, Vikas
Vikas Rawal <vikaslists@agrarianresearch.org> wrote:
> I would like to export an org file to html using a batch command. This
> is the command I tried.
>
> emacs --batch --load=$HOME/lisp/org-7.01/lisp/org.el --eval "(setq
> org-export-headline-levels 1)" --visit=$HOME/file.org --funcall org-export-as-html-batch
>
> But I get an error which says:
>
> Symbol's function definition is void: org-in-block-p
>
> Could anyone explain what this could mean?
>
Exactly what it says: the function org-in-block-p is not defined anywhere.
Generally speaking, just loading org.el is *not* the way to initialize
org. I have a minimal.emacs which looks like this:
--8<---------------cut here---------------start------------->8---
;;; -*- mode: emacs-lisp -*-
;;; constant part
(add-to-list 'load-path (expand-file-name "~/src/emacs/org/org-mode/lisp"))
(add-to-list 'load-path (expand-file-name "~/src/emacs/org/org-mode/contrib/lisp"))
(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
(require 'org-install)
(setq debug-on-error t)
(setq eval-expression-print-length nil)
(setq eval-expression-print-level nil)
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
--8<---------------cut here---------------end--------------->8---
(there is usually a "variable" part as well that is tailored for whatever
test I'm trying to do at the time). The important point is that to initialize
*my* installation of org, I have to (require 'org-install).
If you use org from git, you should have something similar. If not git, your
minimal .emacs should mimic pretty much your real .emacs (with extra
stuff stripped out).
With that, I can export with no problems:
,----
| $ emacs --batch --load=$HOME/minimal.emacs.org --eval "(setq org-export-headline-levels 1)" --visit=foo.org --funcall org-export-as-html-batch
| enabling speedbar support
| OVERVIEW
| Exporting...
| Exporting...
| Saving file /home/nick/src/org/html/foo.html...
| Wrote /home/nick/src/org/html/foo.html
| HTML export done, pushed to kill ring and clipboard
`----
Nick
Vikas Rawal <vikaslists@agrarianresearch.org> writes: > I would like to export an org file to html using a batch command. This > is the command I tried. > > emacs --batch --load=$HOME/lisp/org-7.01/lisp/org.el --eval "(setq > org-export-headline-levels 1)" --visit=$HOME/file.org --funcall org-export-as-html-batch That won't work. At least you will need to load org-install.el, which conatains all the autoload stuff that org-mode needs. The export will likely require some more customization of org-mode variables, so you'll probably want to load a startup file that includes those customizations and then a (require 'org-install). > But I get an error which says: > > Symbol's function definition is void: org-in-block-p > > Could anyone explain what this could mean? It means the function isn't already defined and emacs doesn't know any way to find that definition. Which is exactly what you prevented by not loading org-install. HTH, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf rackAttack V1.04R1: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
[-- Attachment #1: Type: text/plain, Size: 739 bytes --] I am having trouble in using org-exp-bibtex.el on debian sid. I was unable to install bibtex2html through the package manager because of dependency problem with ocaml-base-nox-3.12.1. I then installed ocaml separately, and compiled bibtex2html from source. Now, bibtex2html is working fine from the command line. But when I export a file having bibtex citations, orgmode complains saying "Execution of bibtex2html failed". It seemed to me that orgmode was unable to find bibtex2html. bibtex2html is installed in /usr/local/bin/bibtex2html. Since it was not being found, I also myself created a symlink to /usr/bin.bibtex2html. But that does not help either. My orgmode version is 7.9.2 Could anyone suggest what to do. Thanks, Vikas [-- Attachment #2: Type: text/html, Size: 897 bytes --]
On Tue, Nov 06, 2012 at 05:54:47AM +0900, Vikas Rawal wrote:
>
> But when I export a file having bibtex citations, orgmode complains saying
> "Execution of bibtex2html failed". It seemed to me that orgmode was unable
> to find bibtex2html. bibtex2html is installed
> in /usr/local/bin/bibtex2html. Since it was not being found, I also
> myself created a symlink to /usr/bin.bibtex2html. But that does not help
> either.
>
Just a couple of obvious suggestions; are you sure bibtex2html is in
your path when you launch Emacs? Maybe adding /usr/local/bin to your
PATH will do the trick. I would put such modifications in
~/bash_profile (assuming you use bash as shell), logout and login before
trying again.
The symlink you created, is it really /usr/bin.bibtex2html or is that a
typo?
Cheers,
--
Suvayu
Open source is the future. It sets us free.
>
> Just a couple of obvious suggestions; are you sure bibtex2html is in
> your path when you launch Emacs? Maybe adding /usr/local/bin to your
> PATH will do the trick. I would put such modifications in
> ~/bash_profile (assuming you use bash as shell), logout and login before
> trying again.
>
> The symlink you created, is it really /usr/bin.bibtex2html or is that a
> typo?
Sorry, that was a typo. I am able to directly run bibtex2html from the
bash shell prompt. ECHO $PATH shows /usr/local/bin. So that should not
be a problem. But somehow org-exp-bibtex.el cannot find it. I wonder
if org-exp-bibtex has the path hard-coded into it! Or something else?
Vikas
Vikas Rawal <vikaslists@agrarianresearch.org> wrote:
> >
> > Just a couple of obvious suggestions; are you sure bibtex2html is in
> > your path when you launch Emacs? Maybe adding /usr/local/bin to your
> > PATH will do the trick. I would put such modifications in
> > ~/bash_profile (assuming you use bash as shell), logout and login before
> > trying again.
> >
> > The symlink you created, is it really /usr/bin.bibtex2html or is that a
> > typo?
>
> Sorry, that was a typo. I am able to directly run bibtex2html from the
> bash shell prompt. ECHO $PATH shows /usr/local/bin. So that should not
> be a problem. But somehow org-exp-bibtex.el cannot find it. I wonder
> if org-exp-bibtex has the path hard-coded into it! Or something else?
>
Depending on how it is started, emacs may have a different idea of PATH
than bash. Check in emacs with (getenv "PATH") or by starting a shell
M-x shell and trying to run bibtex2html from there. org-exp-bibtex.el
does not hard code the path afaict, so if the above succeeds, then it
should succeed as well.
Nick
Hi Vikas, Vikas Rawal writes: >> >> Just a couple of obvious suggestions; are you sure bibtex2html is in >> your path when you launch Emacs? Maybe adding /usr/local/bin to your >> PATH will do the trick. I would put such modifications in >> ~/bash_profile (assuming you use bash as shell), logout and login before >> trying again. >> >> The symlink you created, is it really /usr/bin.bibtex2html or is that a >> typo? > > Sorry, that was a typo. I am able to directly run bibtex2html from the > bash shell prompt. ECHO $PATH shows /usr/local/bin. What does 'which bibtex2html' show? > So that should not be a problem. But somehow org-exp-bibtex.el cannot > find it. I wonder if org-exp-bibtex has the path hard-coded into it! > Or something else? > > Vikas Myles
On Tue, Nov 06, 2012 at 05:43:32PM +0100, Suvayu Ali wrote:
> On Tue, Nov 06, 2012 at 05:54:47AM +0900, Vikas Rawal wrote:
> >
> > But when I export a file having bibtex citations, orgmode complains saying
> > "Execution of bibtex2html failed". It seemed to me that orgmode was unable
> > to find bibtex2html. bibtex2html is installed
> > in /usr/local/bin/bibtex2html. Since it was not being found, I also
> > myself created a symlink to /usr/bin.bibtex2html. But that does not help
> > either.
> >
>
> Just a couple of obvious suggestions; are you sure bibtex2html is in
> your path when you launch Emacs? Maybe adding /usr/local/bin to your
> PATH will do the trick. I would put such modifications in
> ~/bash_profile (assuming you use bash as shell), logout and login before
> trying again.
>
> The symlink you created, is it really /usr/bin.bibtex2html or is that a
> typo?
>
Also, the latex export works fine. So bibtex and my #+BIBLIOGRAPHY are
ok.
Vikas
> > Sorry, that was a typo. I am able to directly run bibtex2html from the
> > bash shell prompt. ECHO $PATH shows /usr/local/bin.
>
> What does 'which bibtex2html' show?
>
from within M-x shell:
*****
[11:53:47][0][source]# bibtex2html
This is bibtex2html version 1.97, compiled on Mon Nov 5 07:16:12 JST
2012
Copyright (c) 1997-2010 Jean-Christophe Filliâtre and Claude Marché
This is free software with ABSOLUTELY NO WARRANTY (use option
--warranty)
Reading from standard input...
C-c C-c
[11:54:26][130][source]# which bibtex2html
/usr/local/bin/bibtex2html
*****
Vikas
Hello Vikas,
On 11月 07 2012, Vikas Rawal <vikaslists@agrarianresearch.org> wrote:
>> > Sorry, that was a typo. I am able to directly run bibtex2html from the
>> > bash shell prompt. ECHO $PATH shows /usr/local/bin.
>>
>> What does 'which bibtex2html' show?
>>
>
> from within M-x shell:
As Nick said in his previous mail, if the shell has executable in its path
doesn't ensure emacs to find it.
in your emacs,
M-: (executable-find "bibtex2html")
to see whether emacs can find the executable, if it doesn't, add the following
in your .emacs
(add-to-list 'exec-path "/path/to/your/bibtex2html/")
Hope that helps.,
Thanks
--
ఎందరో మహానుభావులు అందరికి వందనములు
YYR
> > > > Sorry, that was a typo. I am able to directly run bibtex2html from the > > bash shell prompt. ECHO $PATH shows /usr/local/bin. So that should not > > be a problem. But somehow org-exp-bibtex.el cannot find it. I wonder > > if org-exp-bibtex has the path hard-coded into it! Or something else? > > The problem was with my setup of bibtex2html. I needed to change /usr/share/texmf/web2c/texmf.cnf and replace "openout_any = p" with "openout_any = a". I found this at https://aur.archlinux.org/packages.php?ID=8140 Thanks everyone for help. Vikas
Yagnesh Raghava Yakkala <hi@yagnesh.org> wrote: > > Hello Vikas, > > On 11 07 2012, Vikas Rawal <vikaslists@agrarianresearch.org> wrote: > > >> > Sorry, that was a typo. I am able to directly run bibtex2html from the > >> > bash shell prompt. ECHO $PATH shows /usr/local/bin. > >> > >> What does 'which bibtex2html' show? > >> > > > > from within M-x shell: > > As Nick said in his previous mail, if the shell has executable in its path > doesn't ensure emacs to find it. > As an amendment to my previous note, normally, if the shell inside emacs can find the executable, then emacs should be able to find it too. There are some abnormal situations however (e.g. defining PATH in .bashrc or equiv - yecchh) that would cause the shell to find it whereas emacs would not be able to. So Yagnesh is correct in asking for more checking. Nick > in your emacs, > M-: (executable-find "bibtex2html") > > to see whether emacs can find the executable, if it doesn't, add the following > in your .emacs > > (add-to-list 'exec-path "/path/to/your/bibtex2html/") >
My problem with bibtex is in the context of a website I am developing using orgmode (http://www.indianstatistics.org). I would like some pages to have a bibliography of works relevant to the subject area. I need the kind of thing that is done using \nocite(key) in bibtex. \nocite is useful when one is building a standalone bibliography that is not accompanying any text where these works are cited. Now that I have org-exp-bibtex.el working, I find that it does not support \nocite{key}. You have to use \cite{key}. To sum, I need a way of making a bibliography out of selected entries form a bibtex database, and be able to export it to html. Will be grateful if somebody could point me to a solution. Thanks, Vikas
> I would like some pages to have a bibliography of works relevant to
> the subject area. I need the kind of thing that is done using
> \nocite(key) in bibtex. \nocite is useful when one is building a
> standalone bibliography that is not accompanying any text where these
> works are cited.
>
> Now that I have org-exp-bibtex.el working, I find that it does not
> support \nocite{key}. You have to use \cite{key}.
I am able to produce this effect by putting all citations --
\cite{key} -- in a separate headline that is commented. So I have
something like this:
* COMMENT Citations
\cite{key1}
\ccite{key2}
There are, however, two further problems.
org-exp-bibtex messes up the Table of Contents. It produces some
garbled html code when there is a Table of Contents. So I have to turn
off the table of contents. Has anyone else faced this?
I also do not like the fact that it inserts, at the bottom of every
page, a footer saying "This file was generated by bibtext2html..". Any
ideas about how to get rid of that?
Vikas
> I also do not like the fact that it inserts, at the bottom of every > page, a footer saying "This file was generated by bibtext2html..". Any > ideas about how to get rid of that? I have had some success with this. I patched org-exp-bibtex.el as follows. Line 101 to 110 look as follows: ####### (with-temp-buffer (save-match-data (insert-file-contents (concat file ".html")) (goto-char (point-min)) (while (re-search-forward (org-re "a name=\"\\([-_[:word:]]+\\)\">\\([[:word:]]+\\)") nil t) (setq oebp-cite-plist (cons (cons (match-string 1) (match-string 2)) oebp-cite-plist))) (goto-char (point-min)) (while (re-search-forward "<hr>" nil t) (replace-match "<hr/>" t t)) (concat "\n#+BEGIN_HTML\n<div id=\"bibliography\">\n<h2>References</h2>\n" (buffer-string) "\n</div>\n#+END_HTML\n")))) ####### I inserted four lines as follows: ####### (with-temp-buffer (save-match-data (insert-file-contents (concat file ".html")) (goto-char (point-min)) (while (re-search-forward (org-re "a name=\"\\([-_[:word:]]+\\)\">\\([[:word:]]+\\)") nil t) (setq oebp-cite-plist (cons (cons (match-string 1) (match-string 2)) oebp-cite-plist))) (goto-char (point-min)) (while (re-search-forward "<hr>" nil t) (replace-match "<hr/>" t t)) (while (re-search-forward "<em>This file was generated by" nil t) (replace-match "")) (while (re-search-forward "<a href=\"http://www.lri.fr/~filliatr/bibtex2html/\">bibtex2html</a> 1.97.</em>" nil t) (replace-match "")) (concat "\n#+BEGIN_HTML\n<div id=\"bibliography\">\n<h2>References</h2>\n" (buffer-string) "\n</div>\n#+END_HTML\n")))) ####### As you would note, the entire string produced by my version of bibtex2html (including the version number) is hard coded into the syntax. Can somebody help improve it to make it more general so that it would work irrespective of the version. Vikas