Re: [O] Brackets around title in HTML from org-e-html

2012-04-20 Thread Shaun Johnson

On 20/04/2012 14:19, Bastien wrote:

Hi Shaun,

Shaun Johnson  writes:


The appended org file when exported to HTML using org-e-html
(via org-export-dispatch) has brackets around the title. The
generated HTML is attached (t.html) as is a screenshot (t.png).

How can I avoid these brackets being inserted?


Mhh.. I cannot reproduce this.  Anyone else?


Jambunathan has already fixed this (on the 16th). So I guess you
are seeing his fix.

Shaun.



Re: [O] Bug: Footnotes badly positioned in HTML export [7.8.09 (release_7.8.09.234.g4a35)]

2012-04-20 Thread Shaun Johnson

On 20/04/2012 10:21, Nicolas Goaziou wrote:

Hello,

Shaun Johnson  writes:


Shaun Johnson   writes:


The attached example org file (t.org) with two footnotes generates the
attached HTML file (t.html). As you can see in the attached screenshot
(t.png) the footnote placement is odd to say the least.


This is a limitation from HTML exporter: it requires
`org-footnote-section' being non-nil.


Ah, ok, thanks. Is this documented?


No. I have pushed a workaround in master. Can you confirm that HTML
exporter now behaves as expected?


Yes, it now behaves as expected on my real document.

Many thanks,

Shaun.



Re: [O] Bug: Footnotes badly positioned in HTML export [7.8.09 (release_7.8.09.234.g4a35)]

2012-04-17 Thread Shaun Johnson

On 17/04/2012 09:48, Nicolas Goaziou wrote:

Hello,

Shaun Johnson  writes:


The attached example org file (t.org) with two footnotes generates the
attached HTML file (t.html). As you can see in the attached screenshot
(t.png) the footnote placement is odd to say the least.


This is a limitation from HTML exporter: it requires
`org-footnote-section' being non-nil.


Ah, ok, thanks. Is this documented?

Shaun.




Re: [O] Brackets around title in HTML from org-e-html

2012-04-16 Thread Shaun Johnson

On 16/04/2012 19:07, Jambunathan K wrote:

Shaun Johnson  writes:


Hi,

The appended org file when exported to HTML using org-e-html
(via org-export-dispatch) has brackets around the title. The
generated HTML is attached (t.html) as is a screenshot (t.png).

How can I avoid these brackets being inserted?


Fixed.  Please pull again.


Many thanks for the speedy response.

Shaun.



Re: [O] Bug: Footnotes badly positioned in HTML export [7.8.09 (release_7.8.09.234.g4a35)]

2012-04-16 Thread Shaun Johnson

On 16/04/2012 14:03, Shaun Johnson wrote:

Hi,

The attached example org file (t.org) with two footnotes generates the
attached HTML file (t.html). As you can see in the attached screenshot
(t.png) the footnote placement is odd to say the least.


This problem doesn't org with the new exporter (org-export based) exporter
so I will probably go down that road.

Shaun.



Re: [O] [PATCH] org-store-link: Fixed a bug where source block edit buffers were not recognized

2012-03-14 Thread Shaun Johnson

On 08/03/2012 22:33, Ilya Shlyakhter wrote:

attached.


Having just run into this same problem (being unable to create
and store a code reference link using C-l in a source block edit
buffer) I would like to second the inclusion of this or an
equivalent patch. Ilya's patch can be seen on the patchwork server
at:
  http://patchwork.newartisans.com/patch/1209/

I am currently using the following patch to work around this
problem:

diff --git a/lisp/org.el b/lisp/org.el
index ad63213..4a97cc9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8684,7 +8684,7 @@ For file links, arg negates `org-context-in-file-links'."
(setq link (plist-get org-store-link-plist :link)
 desc (or (plist-get org-store-link-plist :description) link)))

-  ((equal (buffer-name) "*Org Edit Src Example*")
+  ((org-bound-and-true-p org-edit-src-from-org-mode)
(let (label gc)
 (while (or (not label)
    (save-excursion

Shaun Johnson.



[O] Bug: Bug reporting doesn't work [7.8.03 (release_7.8.03.583.gd7943.dirty)]

2012-03-14 Thread Shaun Johnson
ditaa jar executable."
  :group 'org-babel
  :type 'string)

The second argument (specifying the standard value) can not be evaluated
in other contexts where load-file-name and buffer-file-name are
undefined. I think this can be traced to changing the original defvar to
a defcustom.

The following patch seems to fix the problem (at least well enough to
enable me to send this bug report):

diff --git a/lisp/org-exp-blocks.el b/lisp/org-exp-blocks.el
index 78eaa15..4ebbe34 100644
--- a/lisp/org-exp-blocks.el
+++ b/lisp/org-exp-blocks.el
@@ -233,7 +233,7 @@ which defaults to the value of `org-export-blocks-witheld'."
  (file-name-as-directory
   (expand-file-name
        "../contrib"
-   (file-name-directory (or load-file-name 
buffer-file-name)))
+   (file-name-directory (find-library-name 
"org")))
   "Path to the ditaa jar executable."
   :group 'org-babel
   :type 'string)

Shaun Johnson.

Emacs  : GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600)
 of 2011-03-10 on 3249CTO
Package: Org-mode version 7.8.03 (release_7.8.03.583.gd7943.dirty)

current state:
==
(setq
 org-export-preprocess-before-backend-specifics-hook 
'(org-inlinetask-export-handler)
 org-emphasis-alist '(("*" bold "" "") ("/" italic "" "")
  ("_" underline "" "") ("=" org-code 
"" "" verbatim)
  ("~" org-verbatim "" "" verbatim))
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-agenda-files '("e:/Home/Shaun/Org/personal.org" "~/Play/Alexandria/alexandria.org" 
"e:/Home/Shaun/Org/Farrers.org"
"e:/Home/Shaun/Org/ScottishWater.org" "e:/Home/Shaun/Org/TEV.org" 
"e:/Home/Shaun/Org/Tesco.org"
"e:/Home/Shaun/Org/general.org" "e:/Home/Shaun/Org/hoj.org" 
"e:/Home/Shaun/Org/thor.org" "e:/Home/Shaun/Org/Sincal.org")
 org-agenda-include-diary t
 org-src-fontify-natively t
 org-clock-into-drawer "CLOCK"
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-footnote-section nil
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-id-method 'org
 org-log-note-clock-out t
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-hide-emphasis-markers t
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-directory "~/Org"
 org-imenu-depth 4
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-mode-hook '((lambda nil (org-add-hook (quote change-major-mode-hook) 
(quote org-babel-show-result-all) (quote append) (quote local)))
 (lambda nil (org-add-hook (quote change-major-mode-hook) 
(quote org-show-block-all) (quote append) (quote local)))
 #[nil "\300\301\302\303\304$\207" [org-add-hook 
change-major-mode-hook org-show-block-all append local] 5]
 #[nil "\300\301\302\303\304$\207" [org-add-hook 
change-major-mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-font-lock-hook '(org-inlinetask-fontify)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-emphasis-regexp-components '("('\"" "- .,:?;'\")_" "
\n,\"'" "." 1)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-interblocks '((src org-babel-exp-non-block-elements))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-occur-hook '(org-first-headline-recenter)
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-modules '(org-bbdb org-bibtex org-gnus org-id org-info org-jsinfo 
org-inlinetask org-irc org-mew org-mhe org-rmail org-vm org-wl org-w3m)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc 
org-beamer-auto-fragile-frames
   org-beamer-place-default-actions-for-lists)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-blocks '((src org-babel-exp-src-block nil) (export-comment 
org-export-blocks-format-comment t)
 (ditaa org-export-blocks-format-ditaa nil) (dot 
org-export-blocks-format-dot nil))
 )



[O] Capturing tables and a small proposal for a capture enhancement

2011-10-05 Thread Shaun Johnson

I am trying to use org-capture with a template that contains an org
table. The value of org-capture-templates is:

(("b" "Blood pressure" entry
  (file "~/Org/bp.org")
  (file "~/Org/CaptureTemplates/b.org")
  :prepend t :immediate-finish t :post-process))

The file ~/Org/CaptureTemplates/b.org contains:

* %U
| Systolic | Diastolic | Pulse |
|--+---+---|
| %^{Systolic} | %^{Diastolic} | %^{Pulse} |
| %^{Systolic} | %^{Diastolic} | %^{Pulse} |
| %^{Systolic} | %^{Diastolic} | %^{Pulse} |

(without the leading white space).

This works but the resulting table is not aligned, obviously I can
align it manually after capture but it would be nice if this could be
automated. I am unable to find any way to do this, am I missing
something or is this currently not possible?

A general solution to this could be to add a new :post-process
property to the template definition whose value should be a function
which is called immediately before
org-capture-before-finalize-hook. My problem would be solved with a
template like:

(("b" "Blood pressure" entry
  (file "~/Org/bp.org")
  (file "~/Org/CaptureTemplates/b.org")
  :prepend t :immediate-finish t :post-process
  (lambda nil
(goto-char
 (point-min))
(search-forward "|-")
    (org-table-align

If there is any interest I can submit a patch.

Shaun Johnson.



[O] Bug: Bug in editing table.el tables [7.5 (release_7.5.36.g4e24)]

2011-03-31 Thread Shaun Johnson


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


Editing a table.el table (via C-c ') causes the table to migrate to
the right and also moves any following heading to the right.

The attached t.org is a test file containing a table.el table,
t1.org is the result of editing the table.

Shaun.


Emacs  : GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600)
 of 2011-03-10 on 3249CTO
Package: Org-mode version 7.5 (release_7.5.36.g4e24)

current state:
==
(setq
 org-emphasis-alist '(("*" bold "" "") ("/" italic "" "")
  ("_" underline "" 
"")
  ("=" org-code "" "" verbatim)
  ("~" org-verbatim "" "" verbatim))
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-agenda-files '("e:/Home/Shaun/Org/personal.org" 
"~/Play/Alexandria/alexandria.org"
"e:/Home/Shaun/Org/Farrers.org" 
"e:/Home/Shaun/Org/ScottishWater.org"
"e:/Home/Shaun/Org/TEV.org" "e:/Home/Shaun/Org/Tesco.org"
"e:/Home/Shaun/Org/general.org" "e:/Home/Shaun/Org/hoj.org"
"e:/Home/Shaun/Org/thor.org" "e:/Home/Shaun/Org/Sincal.org")
 org-agenda-include-diary t
 org-src-fontify-natively t
 org-clock-into-drawer "CLOCK"
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-id-method 'org
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-log-note-clock-out t
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-hide-emphasis-markers t
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-directory "~/Org"
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook org-show-block-all 
append local] 5]
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook 
org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-emphasis-regexp-components '("('\"" "- .,:?;'\")_" "
\n,\"'" "." 1)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src 
org-babel-exp-inline-src-blocks))
 org-occur-hook '(org-first-headline-recenter)
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-modules '(org-bbdb org-bibtex org-gnus org-id org-info org-jsinfo org-irc 
org-mew org-mhe
   org-rmail org-vm org-wl org-w3m)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
   org-beamer-auto-fragile-frames
   org-beamer-place-default-actions-for-lists)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-blocks '((src org-babel-exp-src-block nil) (comment 
org-export-blocks-format-comment t)
 (ditaa org-export-blocks-format-ditaa nil)
 (dot org-export-blocks-format-dot nil))
 )
* A table

+---+---+---+---+---+
|   |   |   |   |   |
+---+---+---+---+---+
|   |   |   |   |   |
+---+---+---+---+---+

* Another heading
  Blah

* A table

  +-+---+---+---+---+
  |abced|   |   |   |   |
  +-+---+---+---+---+
  | |   |   |   |   |
  +-+---+---+---+---+
  
  * Another heading
  Blah



[O] Following links in an indirect buffer

2011-03-17 Thread Shaun Johnson

Hi all,

I regularly work in an indirect buffer created by org-tree-to-indirect-buffer.

Following an id: type link in such a buffer seems to always switche to the
base buffer even if the target is visible in the indirect buffer.

Is the buffer switching intended behaviour or is this a bug?

Following an ordinary link (like [[Target]]) does not exhibit this buffer
switching behaviour. However if the target is outside the visible part of
the indirect buffer the buffer will be widened and point will move to the
target but only after being told that there is no match and asked if I want
to create a new heading.

In the case where the target is outside the visible part of the indirect
buffer I would prefer it if the link was opened in the base buffer.

Again is this intended behaviour or a bug?

Thanks in advance,

Shaun.




[O] [PATCH] Make tangling work in an indirect buffer

2011-03-09 Thread Shaun Johnson

The attached patch makes tangling (org-babel-tangle) work
in indirect buffers. Previously it would fail before running
org-babel-post-tangle-hook because indirect have a buffer-file-name
of nil whereas the code was expecting a string in the following
fragment:

(message "tangled %d code block%s from %s" block-counter
   (if (= block-counter 1) "" "s")
   (file-name-nondirectory (buffer-file-name (or 
(buffer-base-buffer) (current-buffer)


I hope the patch is in the correct format.

Shaun.
>From d11bae118dcc1e69fd148002a55e4ae29551c319 Mon Sep 17 00:00:00 2001
From: Shaun Johnson 
Date: Wed, 9 Mar 2011 15:32:40 +
Subject: [PATCH] Babel: Stop tangling failing in an indirect buffer

* ob-tangle.el (org-babel-tangle): Make it work in an indirect buffer.

The problem was that the message generated after tangling included the
file name of the current buffer which was nil in an indirect buffer.

TINYCHANGE
---
 lisp/ob-tangle.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 4e203be..f7f7047 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -243,7 +243,7 @@ exported source code blocks by language."
(org-babel-tangle-collect-blocks lang))
   (message "tangled %d code block%s from %s" block-counter
(if (= block-counter 1) "" "s")
-  (file-name-nondirectory (buffer-file-name (current-buffer
+  (file-name-nondirectory (buffer-file-name (or 
(buffer-base-buffer) (current-buffer)
   ;; run `org-babel-post-tangle-hook' in all tangled files
   (when org-babel-post-tangle-hook
(mapc
-- 
1.7.4.msysgit.0



[O] Bug: Tangling indirect buffers [7.5 (release_7.5.6.g11f19)]

2011-03-08 Thread Shaun Johnson


I reported this problem earlier against 7.4, it still occurs
with the latest GIT version. Maybe (probably) I'm being stupid,
if so could someone please tell me.

Tangling from an indirect buffer fails with the following stack trace:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  file-name-nondirectory(nil)
  (message "tangled %d code block%s from %s" block-counter (if (= block-counter 1) "" 
"s") (file-name-nondirectory (buffer-file-name ...)))
  (let ((block-counter 0) (org-babel-default-header-args ...) path-collector) (mapc (lambda ... ...) 
(org-babel-tangle-collect-blocks lang)) (message "tangled %d code block%s from %s" block-counter 
(if ... "" "s") (file-name-nondirectory ...)) (when org-babel-post-tangle-hook (mapc ... 
path-collector)) path-collector)
  (save-excursion (let (... ... path-collector) (mapc ... ...) (message "tangled 
%d code block%s from %s" block-counter ... ...) (when org-babel-post-tangle-hook 
...) path-collector))
  org-babel-tangle()
  call-interactively(org-babel-tangle t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)

The problem seems to be in this fragment of org-babel-tangle:

  (message "tangled %d code block%s from %s" block-counter
   (if (= block-counter 1) "" "s")
   (file-name-nondirectory (buffer-file-name (current-buffer

On an indirect buffer buffer-file-name returns nil, replacing this by:

  (message "tangled %d code block%s from %s" block-counter
   (if (= block-counter 1) "" "s")
   (file-name-nondirectory (buffer-file-name
(or (buffer-base-buffer) 
(current-buffer)

seems to do the right thing.

Shaun.

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.




Emacs  : GNU Emacs 23.2.1 (i386-mingw-nt5.1.2600)
 of 2010-05-08 on G41R2F1
Package: Org-mode version 7.5 (release_7.5.6.g11f19)

current state:
==
(setq
 org-emphasis-alist '(("*" bold "" "") ("/" italic "" "")
  ("_" underline
   "" "")
  ("=" org-code "" "" verbatim)
  ("~" org-verbatim "" "" verbatim))
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-agenda-files '("e:/Home/Shaun/Org/personal.org"
"~/Play/Alexandria/alexandria.org"
"e:/Home/Shaun/Org/Farrers.org"
"e:/Home/Shaun/Org/ScottishWater.org"
"e:/Home/Shaun/Org/TEV.org" "e:/Home/Shaun/Org/Tesco.org"
"e:/Home/Shaun/Org/general.org"
"e:/Home/Shaun/Org/hoj.org" "e:/Home/Shaun/Org/thor.org"
"e:/Home/Shaun/Org/Sincal.org")
 org-agenda-include-diary t
 org-clock-into-drawer "CLOCK"
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-id-method 'org
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-log-note-clock-out t
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-hide-emphasis-markers t
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-directory "~/Org"
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-mode-hook '((lambda nil
  (org-add-hook (quote change-major-mode-hook)
   (quote org-show-block-all) (quote append) (quote local))
  )
 (lambda nil
  (org-add-hook (quote change-major-mode-hook)
   (quote org-babel-show-result-all) (quote append)
   (quote local))
  )
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
  org-babel-execute-safely-maybe)
 org-emphasis-regexp-components '("('\"" "- .,:?;'\")_" " 

[Orgmode] Bug: Tangling indirect buffers [7.4]

2011-02-21 Thread Shaun Johnson

Tangling from an indirect buffer fails with the following stack trace:

  Debugger entered--Lisp error: (wrong-type-argument stringp nil)
file-name-nondirectory(nil)
(message "tangled %d code block%s from %s" block-counter (if (= block-counter 1) "" 
"s") (file-name-nondirectory (buffer-file-name ...)))
(let ((block-counter 0) (org-babel-default-header-args ...) path-collector) (mapc (lambda ... ...) 
(org-babel-tangle-collect-blocks lang)) (message "tangled %d code block%s from %s" block-counter 
(if ... "" "s") (file-name-nondirectory ...)) (when org-babel-post-tangle-hook (mapc ... 
path-collector)) path-collector)
(save-excursion (let (... ... path-collector) (mapc ... ...) (message "tangled 
%d code block%s from %s" block-counter ... ...) (when org-babel-post-tangle-hook 
...) path-collector))
org-babel-tangle()
call-interactively(org-babel-tangle nil nil)

The problem seems to be in this fragment of org-babel-tangle:

  (message "tangled %d code block%s from %s" block-counter
   (if (= block-counter 1) "" "s")
   (file-name-nondirectory (buffer-file-name (current-buffer

On an indirect buffer buffer-file-name returns nil, replacing this by:

  (message "tangled %d code block%s from %s" block-counter
   (if (= block-counter 1) "" "s")
   (file-name-nondirectory (buffer-file-name
(or (buffer-base-buffer) 
(current-buffer)

seems to do the right thing.

Shaun.

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.




Emacs  : GNU Emacs 23.2.1 (i386-mingw-nt5.1.2600)
 of 2010-05-08 on G41R2F1
Package: Org-mode version 7.4

current state:
==
(setq
 org-emphasis-alist '(("*" bold "" "") ("/" italic "" "")
  ("_" underline ""
   "")
  ("=" org-code "" "" verbatim)
  ("~" org-verbatim "" "" verbatim))
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-agenda-include-diary t
 org-clock-into-drawer "CLOCK"
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-babel-tangle-lang-exts '(("magik" . "magik") ("emacs-lisp" . "el"))
 org-id-method 'org
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-log-note-clock-out t
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-hide-emphasis-markers t
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-reveal-start-hook '(org-decrypt-entry)
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-directory "~/Org"
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-mode-hook '((lambda nil
  (org-add-hook (quote change-major-mode-hook)
   (quote org-babel-show-result-all) (quote append) (quote 
local))
  )
 (lambda nil
  (setq org-mouse-context-menu-function (quote 
org-mouse-context-menu))
  (when (memq (quote context-menu) org-mouse-features)
   (org-defkey org-mouse-map [mouse-3] nil)
   (org-defkey org-mode-map [mouse-3]
(quote org-mouse-show-context-menu))
   )
  (org-defkey org-mode-map [down-mouse-1] (quote 
org-mouse-down-mouse))
  (when (memq (quote context-menu) org-mouse-features)
   (org-defkey org-mouse-map [C-drag-mouse-1]
(quote org-mouse-move-tree))
   (org-defkey org-mouse-map [C-down-mouse-1]
(quote org-mouse-move-tree-start))
   )
  (when (memq (quote yank-link) org-mouse-features)
   (org-defkey org-mode-map [S-mouse-2] (quote 
org-mouse-yank-link))
   (org-defkey org-mode-map [drag-mouse-3] (quote 
org-mouse-yank-link))
   )
  (when (memq (quote move-tree) org-mouse-features)
   (org-defk

Re: [Orgmode] Online manual

2009-06-30 Thread Shaun Johnson

Many thanks.

Shaun.

Carsten Dominik wrote:

Actually, yes, there was a problem, fixed now.

- Carsten

On Jun 29, 2009, at 3:24 PM, Shaun Johnson wrote:


Hi All,

I've just visited the online manual (http://orgmode.org/org.html)and I 
see

it has changed - there is no longer a navigation sidebar.

Is this a mistake or a deliberate change? Did I miss something on the
mailing list?

Thanks,

Shaun Johnson.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode







___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Online manual

2009-06-29 Thread Shaun Johnson

Hi All,

I've just visited the online manual (http://orgmode.org/org.html)and I see
it has changed - there is no longer a navigation sidebar.

Is this a mistake or a deliberate change? Did I miss something on the
mailing list?

Thanks,

Shaun Johnson.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Two questions about code references and HTML export

2009-04-30 Thread Shaun Johnson

Hi,

Consider the following Org file:

   * Test

See [[(foo)][FOOBIE]]

#+BEGIN_EXAMPLE
: blah blah   (ref:foo)
#+END_EXAMPLE

Question 1)
  In Org mode the link displays as FOOBIE, in the exported HTML it
  displays as (foo). Is there any way to cause the link to use the
  description (FOOBIE) in HTML? If not would this be a useful option
  to add?

Question 2)
  Is there any way to remove the label (displayed as '(foo)') from the
  line (starting ':') in the exported HTML. Again, if not, would
  this be a useful option to add? Maybe a new option on the
  #+BEGIN... line.

Thanks in advance,

Shaun.

P.s. I am using version 6.26d in Emacs 22.2.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] POLL: the 40 variables project

2009-01-30 Thread Shaun Johnson

Hi,

(2nd attempt at sending it to the list...)

FWIW my two custom-set-variables entries:

 '(org-emphasis-regexp-components (quote (" ('\"" "- .,:?;'\")_" "

,\"'" "." 1)))
 '(org-hide-emphasis-markers t)

Shaun.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] M-TAB completion of options in indirect buffers

2009-01-27 Thread Shaun Johnson

With Emacs 22.1.1 and Org-mode 6.17c if I am editing a subtree in an indirect 
buffer
(via C-c C-x b) and try to complete an option (i.e. a line starting #+) then I 
get the
following backtrace (bytecodes elided):

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  file-name-nondirectory(nil)
  org-get-current-options()
  byte-code("...
  org-complete(nil)
  call-interactively(org-complete)
  recursive-edit()
  byte-code("...
  debug(error (wrong-type-argument stringp nil))
  file-name-nondirectory(nil)
  org-get-current-options()
  byte-code("...
  org-complete(nil)
  call-interactively(org-complete)

This seems to be because org-get-current-options uses buffer-file-name to 
determine the
category but buffer-file-name is nil in an indirect buffer.

If this has been fixed in a later version of Org mode or Emacs I will be happy 
(ish) to
upgrade.

Thanks,

Shaun.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Link question

2008-05-22 Thread Shaun Johnson

Carsten,

Ok, I will add this to my todo list - I might find time to start on it
this weekend.

How do I start the process of signing papers for the FSF.

Shaun.

Carsten Dominik wrote:

Hi Shaun,

I think this would indeed make sense.  I guess it should
use "/" as a separator, and it should ideally ignore TODO keywords,
priority cookies, and tags.

Please go ahead and give it a try - to include it into Org you would have
to sin the papers with the FSF.

Best wishes

- Carsten

On May 21, 2008, at 7:57 PM, Shaun Johnson wrote:

I'm a light user of Orgmode so the following might not be sensible or 
there might

be some existing way to achieve the same effect.

I have an Org file like:

* Glossary
...
** Address
...
* Implementation
...
** Address
...

What I would like is to have distinct links to the two 'Address' 
headlines. I can't
see a way to this with the standard link types. A possible solution 
would be to introduce
a 'path based' link type where the two 'Address' headlines have 
distinct paths through the

outline tree of ("Glossary" "Address") and ("Implementation" "Address").

Does this make sense or am I gibbering?

If it does make sense then my Elisp skills are probably up to 
implementing this.


Thanks in advance,

Shaun.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode







___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Link question

2008-05-21 Thread Shaun Johnson

I'm a light user of Orgmode so the following might not be sensible or there 
might
be some existing way to achieve the same effect.

I have an Org file like:

* Glossary
...
** Address
...
* Implementation
...
** Address
...

What I would like is to have distinct links to the two 'Address' headlines. I 
can't
see a way to this with the standard link types. A possible solution would be to 
introduce
a 'path based' link type where the two 'Address' headlines have distinct paths 
through the
outline tree of ("Glossary" "Address") and ("Implementation" "Address").

Does this make sense or am I gibbering?

If it does make sense then my Elisp skills are probably up to implementing this.

Thanks in advance,

Shaun.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode