Re: [Orgmode] Choosing external app at runtime?

2010-04-18 Thread Simon Guest
At Sun, 18 Apr 2010 08:24:41 +0200,
Carsten Dominik wrote:
> 
> 
> On Apr 16, 2010, at 7:35 AM, Simon Guest wrote:
> > When I follow a link, Org mode knows what application to use.  Except
> > that sometimes I want to override that choice.
> 
> Currently we do not have this.  I can see that this could be both  
> useful and annoying, if you have to answer a prompt each time.

If the choice was only offered when a C-u prefix was given, it
wouldn't be annoying.

What do you think?

cheers,
Simon


___
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


[Orgmode] Problem with sectioning function for LaTeX export

2010-04-18 Thread Sebastian Hofer

Hi all,
I'm trying to write my own sectioning function for latex export of my 
CV. What it does is to read out some property of the given headline and 
pass it to a latex command:


(defun my-org-cv-sectioning (lvl heading)
  (let ((year)
(formatlist)
(cleanheading (substring-no-properties heading 1)))
(with-current-buffer (org-find-base-buffer-visiting "cv.org")
  (let ((headingpoint (find-custom-id cleanheading)))
(if headingpoint
(progn
  (goto-char headingpoint)
  (setq year (org-entry-get nil "YEAR"))
(setq formatlist (nth (- 1 lvl) my-org-cv-sectioning-list))
(list cleanheading
  (format (car formatlist) (if year year "") cleanheading)
  (format (car (cdr formatlist)) (if year year "") cleanheading

The function find-custom-id returns the point of the heading, 
my-org-cv-sectioning list contains the customized latex commands. As you 
may see, I'm an elisp newbie, so excuse the coding style, or even 
better, make suggestions for improvements! There might be a much nicer 
way to read out the wanted properties (also cf. point 2 below), so if 
you have any suggestions on that, I would be glad to hear them!


Anyway, there are currently two problems:

- The function reads out the properties correctly, but the export 
command throws an error. So I guess I'm not getting the format of the 
output right, but I can't really make sense of the description in the 
org-export-latex-classes docstring. Currently the function is returning 
something like this: ("Heading" ("\section[year]{Heading}" 
"\section*[year]{Heading}")). Isn't this what it's supposed to look 
like? The error message is the following:


Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  format(nil "Heading" "")
  org-export-latex-subcontent()
  org-export-latex-sub()
  org-export-latex-global(((
  org-export-as-latex(nil nil nil "*Org LaTeX Export*")
  org-export-as-latex-to-buffer(nil)
  call-interactively(org-export-as-latex-to-buffer)
  org-export(nil)
  call-interactively(org-export nil nil)

- As you can see I am using org-find-base-buffer-visiting find the 
buffer of the org file, but of course its argument can't stay hardcoded 
like this. I could also use the org mapping function, but still I would 
need filename. Can someone give me a hint how to solve this in a nice way?


Thanks for any help and thanks to Carsten for his incredible work! I 
keep getting surprised be the capabilities of org-mode almost every day.

Cheers, Sebastian



___
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


Re: [Orgmode] Re: [Babel] Macro for begin_src?

2010-04-18 Thread Eric S Fraga
On Sat, 17 Apr 2010 15:55:51 -1000, "Thomas S. Dye"  wrote:
> On Apr 17, 2010, at 6:52 AM, Matt Lundin wrote:
> > 1. The first and simplest option is built into org-mode. Simply type:
> >
> >  Neat.  What would you use yasnippets for, if anything?
> 
> All the best,
> Tom

Good question!  One case I would still use yasnippets for is more
complex constructions.  For instance, I use tikz a lot for creating
drawings for teaching.  For a given course, many of these drawings are
similar.  One snippet I have is:

--8<---cut here---start->8---
#name : tikz
# --
#+begin_latex 
\tikzstyle{unit}=[rectangle, draw=blue!80!black, fill=black!5!white]
\tikzstyle{stream}=[rectangle, draw=white, fill=yellow!50!white]
\begin{tikzpicture}[node distance=2cm]
  \node[stream] (feed) {Feed};
  \node[unit] (reactor) [right of=feed] {Reactor} edge [<-] (feed);
  \node[unit] (separator) [right of=reactor] {Separation} edge [<-] (reactor);
$0
\end{tikzpicture}
#+end_latex
--8<---cut here---end--->8---

Before Carsten implemented the beamer option in org-mode, I also had a
snippet for setting up columns with blocks in org-mode for my custom
beamer setup I used to have.


___
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


Re: [Orgmode] Re: [Babel] Macro for begin_src?

2010-04-18 Thread Eric S Fraga
On Sun, 18 Apr 2010 01:01:56 + (UTC), Shelagh Manton 
 wrote:
> 
> On Sat, 17 Apr 2010 08:38:01 -0500, Nathan Neff wrote:
> 
> You could play around with artist-mode if you use X. It uses the mouse 
> with ascii symbols to create rectangles, lines etc. Then just change the  
> text how you need. There are some helpful functions on emacswiki that 
> show you how to set up ido with artist. Don't have the url handy though.
> 
> Sadly, it seems you can't get artist-mode to work in a tty, though I 
> believe you can in an xterm.

Shelagh,

artist-mode has a full set of key bindings.  I never use the mouse
(for anything at all, if I can help it, due to RSI issues) and
artist-mode is perfectly usable nonetheless!  Type "C-h m" in
artist-mode to see all the key bindings.

HTH,
eric


___
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


Re: [Orgmode] Precision setting for spreadsheet calculation

2010-04-18 Thread Michael Brand

On 10-03-02 9:15 PM, Michael Brand wrote:

I also played around quite a bit with the precision settings and will
put the resulting examples into the Worg FAQ. But I would like to
postpone my Worg FAQ update because its link to the manual would be
confusing before the manual update itself will have been made.


I added
http://orgmode.org/worg/org-faq.php#table-high-precision
and
http://orgmode.org/worg/org-faq.php#table-float-fraction


___
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


Re: [Orgmode] Re: Support (or not) for Emacs 21, and XEmacs

2010-04-18 Thread Carsten Dominik

Hi Michael,

On Apr 18, 2010, at 10:22 AM, Michael Sperber wrote:



Hi Carsten,

many thanks for your e-mail!  (And many thanks for your work on
org-mode, which is the best piece of software I've started using for a
few years.)

Carsten Dominik  writes:


However, I have recently more and more the feeling how having to
cater for several Emacs versions is a drag.


I understand and would feel the same in your situation.  So I was
wondering if I could make it easy enough for you so org-mode could  
keep

the XEmacs code in.


My feeling was also that the interest in the XEmacs side for
Org-mode is low.  To my knowledge there is no Org-mode package for
XEmacs, and the number of user on the mailing list seems to be very
limited.


Right.  However, the reason why this is so is trivial: org-mode is
GPLv3, and thus can't be a package for XEmacs, which is currently  
still

GPLv2.  (There has been a long and tedious discussion of this over in
XEmacs land which I'd like to spare you from.)  However, we've pretty
much resolved the GPLv3 issues over the past few months, and I hope  
that

we'll have a GPLv3 XEmacs very soon.  At which point I'll personally
make an XEmacs package.


So let me start with a question:  Is XEmacs still alive, innovative?
There has been no major release (it seems to me) for a very long  
time.
It was my feeling that the XEmacs project is on its way to a slow  
death.

I may be wrong about this.


Development, which was slow for a long time, has recently picked up
significantly.  Releases are a problem, I admit: The developers
essentially all use the development branch, which is by now vastly
different from the 21.4 release.  (Also, the GPLv3 issue has kept us
from being able to merge Emacs code for a long time.)  But we'll do a
release at some point.


You propose to help.  One way to go would be to continue a branch
based on Org-mode 6.35, and to merge any new stuff into that branch.


That's definitely a possibility.


So a dedicated XEmacs-related person could keep such an XEmacs.
In my test branch where I remove compatibility code (not only
XEmacs, but also Emacs 21, and I'd love to ditch support for
Emacs 22 - even though I cannot do that just yet), quite some code
has changed, and I am not sure how easy it would be to keep
a compatibility branch up to date.


Is there any way to leave the compatibility code in place and not  
worry
about it, so long as it does not interfere with your work on the  
current

Emacs?  (I don't know how big that interference is, I must admit.)  I
could then try to fix it up as development goes along.


Well,

here are some of the major annoyances for me:

1. posix character classes in regular expressions, thinks like [:alpha:]
   These are nice because they work well with arbitrary languages.
   Does XEmacs suppor these now?
2. The overlay API - I think XEmacs actually has a compatibility lib
   for these, is that correct?
   One of the things you could do it to figure out if I can also switch
   to the API calls overlays-in and overlays-at in that library.
   My own implementations are slightly different, and I am not sure I
   can rely on the ones in the xemacs library.
3. outline.el.  Last time  looked, XEmacs still had the horrible old
   outline.el which is pretty much impossible to program.
   I do have a port, xemacs/noutline.el in the Org distribution - if  
you

   could get that into XEmacs, that would get rid of a major annoyance,
   including complicated installation instructions.
4. Can you make XEmacs understand mouse-3 instead of button3 ?  Or
   maybe it does understand these by now?

If you would take it on yourself to make a package for XEmacs - that
would be helpful, because then I can remove special installation
instructions for XEmacs and just tell people to get the package.

I guess you could make such a package anyway - even if it currently
cannot get into the XEmacs distribution because of license discussions.

The compromise for me would be this:

- You fix the things above.
- I leave the rest of the necessary compatibility code in
- I program any new features with whatever is available
  in Emacs 22/23 and rely on you to make it XEmacs compatible.

Cheers

- Carsten



___
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


Re: [Orgmode] Re: emacs/org-mode on Droid?

2010-04-18 Thread Daniel Martins
Matthew,

Just a suggestion for newbies.

Could you generate a video of MobileOrg Android similar to those of
the MobileOrg Iphone.

I am still open to suggestions of Android smartphones.

If I need to access a remote ssh account and open Emacs, the available
keyborards are OK?

Daniel


PS I "bought"  an Android phone called Motorola Quench but due to a
"misunderstanding" with the operator I was forced to cancel the
purchase. (I am still very annoyed with this problem)



2010/4/13 Matthew Jones :
> I am the developer/maintainer of MobileOrg for Android and I'd appreciate
> any feedback on the application.   You can find more information and
> download links on the
> wiki: http://wiki.github.com/matburt/mobileorg-android/
> 73,
> Matthew W. Jones (KI4ZIB)
> http://matburt.net
>
>
> On Mon, Apr 12, 2010 at 10:08 PM, Daniel Martins 
> wrote:
>>
>> Please, share your first impressions!!! I just bought an Android phone
>> and would like to take similar routes.
>>
>> Daniel
>>
>> 2010/2/16 David Rogoff :
>> > On 2010-02-16 13:47:59 -0800, Tom Tobin said:
>> >
>> >> On Tue, Feb 16, 2010 at 12:18 PM, David Rogoff 
>> >> wrote:
>> >>>
>> >>> Hi all.
>> >>>
>> >>> New org-mode convert also looking at new phones.  It looks like
>> >>> theMoto
>> >>> Droid would be great for running org-mode.  Has anyone ported emacs to
>> >>> this
>> >>> platform and gotten org-mode running?
>> >>
>> >> I just switched from my iPhone back to an Android phone; I came across
>> >> this project:
>> >>
>> >> http://github.com/matburt/mobileorg-android
>> >>
>> >> I haven't tried it yet, though.
>> >
>> > Thanks - I'll take a look.
>> >
>> >
>> >
>> >
>> > ___
>> > 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
>> >
>>
>>
>> ___
>> 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
>
>


___
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


[Orgmode] suggestions of Android smartphones

2010-04-18 Thread Daniel Martins
 --- resending with a proper title ---

Matthew,

Just a suggestion for newbies.

Could you generate a video of MobileOrg Android similar to those of
the MobileOrg Iphone.

I am still open to suggestions of Android smartphones.

If I need to access a remote ssh account and open Emacs, the available
keyborards are OK?

Daniel


PS I "bought"  an Android phone called Motorola Quench but due to a
"misunderstanding" with the operator I was forced to cancel the
purchase. (I am still very annoyed with this problem)



2010/4/13 Matthew Jones :
> I am the developer/maintainer of MobileOrg for Android and I'd appreciate
> any feedback on the application.   You can find more information and
> download links on the
> wiki: http://wiki.github.com/matburt/mobileorg-android/
> 73,
> Matthew W. Jones (KI4ZIB)
> http://matburt.net
>
>
> On Mon, Apr 12, 2010 at 10:08 PM, Daniel Martins 
> wrote:
>>
>> Please, share your first impressions!!! I just bought an Android phone
>> and would like to take similar routes.
>>
>> Daniel
>>
>> 2010/2/16 David Rogoff :
>> > On 2010-02-16 13:47:59 -0800, Tom Tobin said:
>> >
>> >> On Tue, Feb 16, 2010 at 12:18 PM, David Rogoff 
>> >> wrote:
>> >>>
>> >>> Hi all.
>> >>>
>> >>> New org-mode convert also looking at new phones.  It looks like
>> >>> theMoto
>> >>> Droid would be great for running org-mode.  Has anyone ported emacs to
>> >>> this
>> >>> platform and gotten org-mode running?
>> >>
>> >> I just switched from my iPhone back to an Android phone; I came across
>> >> this project:
>> >>
>> >> http://github.com/matburt/mobileorg-android
>> >>
>> >> I haven't tried it yet, though.
>> >
>> > Thanks - I'll take a look.
>> >
>> >
>> >
>> >
>> > ___
>> > 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
>> >
>>
>>
>> ___
>> 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
>
>


___
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


[Orgmode] Tag Align

2010-04-18 Thread Chao Lu
Dear All,

I'm struggling for a neat Tag alignment, but haven't got any progress yet,
is there anybody who has the problem solved?

All the best,

Chao
<>___
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


[Orgmode] org-html link building diff

2010-04-18 Thread Tom Breton (Tehom)
I've refactored `org-export-as-html', factored code to build links
into `org-html-make-link'.

This does two things that I needed:

 * It allows custom link types to build anchors.
   * How: Call org-html-make-link.  Many parameters, see the function
 docstring.  It returns a string containing an HTML link.
 * It adds the capability to convert links when exporting.
   * How: Around the export call, bind org-html-cvt-link-fn to a
 function that takes 1 parameter (filename) and returns a url as a
 string.

I think it also makes the code cleaner.

There are more things that could be done - it's only used by some of
the cond branches, the others are unchanged.  But "publish early and
often", so here it is.

I will append the changes as a diff, since I can't push to the org
repository ("fatal: The remote end hung up unexpectedly")

Tom Breton (Tehom)
diff --git a/lisp/org-html.el b/lisp/org-html.el
index 74f3a55..9aaadec 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -533,6 +533,106 @@ in a window.  A non-interactive call will only return the buffer."
 
 (defvar html-table-tag nil) ; dynamically scoped into this.
 (defvar org-par-open nil)
+(defconst org-html-cvt-link-fn 
+   ;;In the future this might change to take more args: type + path +
+   ;;fragment
+   #'identity
+   "Function to convert link URLs to exportable URLs.
+Takes one argument, PATH.
+Returns exportable URL.
+Intended to be locally bound around a call to `org-export-as-html'." )
+
+;;; org-html-cvt-link-fn
+(defconst org-html-cvt-link-fn 
+   ;;In the future this might change to take more args: type + path +
+   ;;fragment
+   #'identity
+   "Function to convert link URLs to exportable URLs.
+Takes one argument, PATH.
+Returns exportable URL.
+Intended for remote exporting." )
+
+
+;;; org-html-make-link
+;;Special variables seen:
+;;`html-extension' -- From plist
+;;`org-par-open' is a special variable so it's not in the arglist.
+(defun org-html-make-link (type path fragment desc descp attr
+   may-inline-p) 
+   "Make an HTML link
+TYPE is the device-type of the link (And isn't used yet) (THIS://foo.html)
+PATH is the path of the link (http://THIS)
+FRAGMENT is the fragment part of the link, if any (The foo.html#THIS part)
+DESC is the link description, if any.
+DESCP is whether there originally was a description.
+ATTR is a string of other attributes of the a element.
+MAY-INLINE-P allows inlining it as an image."
+
+   (declare (special html-extension org-par-open))
+   (let ((filename path)
+	thefile)
+  (save-match-data
+	 ;;First pass.  Mostly deals with treating local files.  TYPE
+	 ;;may still change.
+	 (cond
+	((string= type "file")
+	   ;;Substitute just if original path was absolute.
+	   ;;(Otherwise path must remain relative)
+	   (setq thefile 
+		  (if (file-name-absolute-p filename) 
+		 (expand-file-name filename) 
+		 filename))
+		  
+	   (when (and org-export-html-link-org-files-as-html
+			(string-match "\\.org$" thefile))
+		  (setq type "http")
+		  (setq thefile (concat (substring thefile 0
+	   (match-beginning 0))
+   "." html-extension
+	(t (setq thefile filename)))
+	
+	 ;;If applicable, convert local path to remote URL
+	 (setq thefile
+	(or
+	   (funcall org-html-cvt-link-fn thefile)
+	   thefile))
+
+	 ;;Second pass.  Build final link except for leading type
+	 ;;spec.  Now TYPE is final.
+	 (cond
+	((or
+		(string= type "http")
+		(string= type "https"))
+	   (if fragment
+		  (setq thefile (concat thefile "#" fragment
+	   
+	(t))
+	
+	 ;;Final URL-build, for all types.
+	 (setq thefile 
+	(concat type ":" (org-export-html-format-href thefile)))
+
+	 (if (and 
+		may-inline-p
+		;;Can't inline a URL with a fragment.
+		(not fragment)
+		(or 
+		   (eq t org-export-html-inline-images)
+		   (and 
+		  org-export-html-inline-images
+		  (not descp)))
+		(org-file-image-p
+		   filename org-export-html-inline-image-extensions))
+
+	(progn
+	   (message "image %s %s" thefile org-par-open)
+	   (org-export-html-format-image thefile org-par-open))
+	(concat 
+	   ""
+	   (org-export-html-format-desc desc)
+	   "")
+
+;;; org-export-as-html
 ;;;###autoload
 (defun org-export-as-html (arg &optional hidden ext-plist
 			   to-buffer body-only pub-dir)
@@ -1014,7 +1114,7 @@ lang=\"%s\" xml:lang=\"%s\">
   "\" class=\"target\">" (match-string 1 line)
   "@ ")
 			  t t line)
-
+	
 	  (setq line (org-html-handle-time-stamps line))
 
 	  ;; replace "&" by "&", "<" and ">" by "<" and ">"
@@ -1070,28 +1170,25 @@ lang=\"%s\" xml:lang=\"%s\">
 	  (save-match-data
 		(setq id-file (file-relative-name
 			   id-file (file-name-directory org-current-export-file)))
-		(setq id-file (concat (file-name-sans-extension id-file)
-  "." html-extension))
-		(setq rpl (concat ""
-  (org-export-html-format-desc desc)
-  ""

[Orgmode] Tiny bug in org-html

2010-04-18 Thread Tom Breton (Tehom)
In the course of working with org-html, I noticed that
`org-export-as-html-and-open' seems to have a bug.  `kill-buffer'
needs an argument, a buffer, presumably the buffer that
`org-open-file' makes.  This code is "protected" by the nil default
value of `org-export-kill-product-buffer-when-displayed', so the bug
may not have been obvious.

Tom Breton (Tehom)




___
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


[Orgmode] And a question about org-html

2010-04-18 Thread Tom Breton (Tehom)
Does the image link building code before the big cond statement do
anything that the cond statement doesn't do anyways now?  I'm referring to
the block that begins with the comment:
;; Make an image out of the description if that is so wanted

It builds an image link in a slightly different way, but that doesn't seem
as good as a "real" image link, and it seems to duplicate functionality
that the cond statement has (and now in my new stuff, that
`org-html-make-link' always handles)

Tom Breton (Tehom)




___
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


Re: [Orgmode] Re: Support (or not) for Emacs 21, and XEmacs

2010-04-18 Thread Michael Sperber

Hi Carsten,

many thanks for your e-mail!  (And many thanks for your work on
org-mode, which is the best piece of software I've started using for a
few years.)

Carsten Dominik  writes:

> However, I have recently more and more the feeling how having to
> cater for several Emacs versions is a drag.

I understand and would feel the same in your situation.  So I was
wondering if I could make it easy enough for you so org-mode could keep
the XEmacs code in.

> My feeling was also that the interest in the XEmacs side for
> Org-mode is low.  To my knowledge there is no Org-mode package for
> XEmacs, and the number of user on the mailing list seems to be very
> limited.

Right.  However, the reason why this is so is trivial: org-mode is
GPLv3, and thus can't be a package for XEmacs, which is currently still
GPLv2.  (There has been a long and tedious discussion of this over in
XEmacs land which I'd like to spare you from.)  However, we've pretty
much resolved the GPLv3 issues over the past few months, and I hope that
we'll have a GPLv3 XEmacs very soon.  At which point I'll personally
make an XEmacs package.

> So let me start with a question:  Is XEmacs still alive, innovative?
> There has been no major release (it seems to me) for a very long time.
> It was my feeling that the XEmacs project is on its way to a slow death.
> I may be wrong about this.

Development, which was slow for a long time, has recently picked up
significantly.  Releases are a problem, I admit: The developers
essentially all use the development branch, which is by now vastly
different from the 21.4 release.  (Also, the GPLv3 issue has kept us
from being able to merge Emacs code for a long time.)  But we'll do a
release at some point.

> You propose to help.  One way to go would be to continue a branch
> based on Org-mode 6.35, and to merge any new stuff into that branch.

That's definitely a possibility.

> So a dedicated XEmacs-related person could keep such an XEmacs.
> In my test branch where I remove compatibility code (not only
> XEmacs, but also Emacs 21, and I'd love to ditch support for
> Emacs 22 - even though I cannot do that just yet), quite some code
> has changed, and I am not sure how easy it would be to keep
> a compatibility branch up to date.

Is there any way to leave the compatibility code in place and not worry
about it, so long as it does not interfere with your work on the current
Emacs?  (I don't know how big that interference is, I must admit.)  I
could then try to fix it up as development goes along.

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla


___
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


Re: [Orgmode] Re: [Babel] Macro for begin_src?

2010-04-18 Thread Dan Davison
Eric S Fraga  writes:

> On Sat, 17 Apr 2010 15:55:51 -1000, "Thomas S. Dye"  wrote:
>> On Apr 17, 2010, at 6:52 AM, Matt Lundin wrote:
>> > 1. The first and simplest option is built into org-mode. Simply type:
>> >
>> > 
> Thanks Matt for this.  I'd forgotten about the built-in definitions.
> These do make many of my yasnippets superfluous.
>
>> Neat.  What would you use yasnippets for, if anything?
>> 
>> All the best,
>> Tom
>
> Good question!  One case I would still use yasnippets for is more
> complex constructions.

I guess, for Nate's original application (converting existing code to
src blocks), what might have been most useful is something to enclose a
given region in a source block. Can anyone show how to do that with
yasnippet (or anything else)? Or is it best to make a custom function
for a task like this, e.g.

  (defun dan/enclose-region-in-src-block ()
(interactive)
(let* ((beg (if (region-active-p) (region-beginning) (point)))
   (end (if (region-active-p) (region-end) (point
  (goto-char end)
  (unless (eq (char-before) ?\n) (insert "\n"))
  (insert "#+end_src\n")
  (goto-char beg)
  (beginning-of-line)
  (insert "#+begin_src \n")
  (backward-char)))

Dan


>  For instance, I use tikz a lot for creating
> drawings for teaching.  For a given course, many of these drawings are
> similar.  One snippet I have is:
>
> #name : tikz
> # --
> #+begin_latex 
> \tikzstyle{unit}=[rectangle, draw=blue!80!black, fill=black!5!white]
> \tikzstyle{stream}=[rectangle, draw=white, fill=yellow!50!white]
> \begin{tikzpicture}[node distance=2cm]
>   \node[stream] (feed) {Feed};
>   \node[unit] (reactor) [right of=feed] {Reactor} edge [<-] (feed);
>   \node[unit] (separator) [right of=reactor] {Separation} edge [<-] (reactor);
> $0
> \end{tikzpicture}
> #+end_latex
>
> Before Carsten implemented the beamer option in org-mode, I also had a
> snippet for setting up columns with blocks in org-mode for my custom
> beamer setup I used to have.
>
>
> ___
> 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


___
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


[Orgmode] Why does org-html.org refuse to export a table of contents when body-only is t?

2010-04-18 Thread Jan Böcker
Hi all,

I'd like to add a table of contents to a HTML export with body-only set
to t (to feed into jekyll later), but org-html.el automatically disables
the TOC when body-only is given.

I have used the attached one-line patch without any problems, the (still
XHTML strict compliant) result can be seen here:

http://www.jboecker.de/2010/04/14/general-reference-filing-with-org-mode.html

gitk tells me that the line I have changed was first introduced in
Release 4.75, so is this just a use case that was not thought of when
this was programmed, or is there a specific reason?

Curious,
  Jan
>From bdd811611e4a3cd637b0bae22e9d574846acddc7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20B=C3=B6cker?= 
Date: Fri, 16 Apr 2010 10:17:49 +0200
Subject: [PATCH] Allow including a table of contents in a body-only export

---
 lisp/org-html.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-html.el b/lisp/org-html.el
index 74f3a55..ab1aac2 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -807,7 +807,7 @@ lang=\"%s\" xml:lang=\"%s\">
  (if title (insert (format org-export-html-title-format
(org-html-expand title))
 
-  (if (and org-export-with-toc (not body-only))
+  (if org-export-with-toc
  (progn
(push (format "%s\n"
  org-export-html-toplevel-hlevel
-- 
1.7.0.3

___
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


[Orgmode] Re: Tag Align

2010-04-18 Thread Bernt Hansen
Chao Lu  writes:

> Dear All,
>
> I'm struggling for a neat Tag alignment, but haven't got any progress yet, is 
> there anybody who has
> the problem solved?
>
> All the best,

M-x org-align-all-tags

-Bernt


___
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


Re: [Orgmode] suggestions of Android smartphones

2010-04-18 Thread Sven Bretfeld
Hi Daniel

Daniel Martins  writes:

> If I need to access a remote ssh account and open Emacs, the available
> keyborards are OK?

The standard (soft)keyboard is principally OK if you use Emacs on a
remote machine via ConnectBot, which is a free ssh client available in
the market. Pressing the Trackball once simulates CTRL, pressing it
twice simulates ESC/META. But there are sometimes problems with
TAB-expansion. 2 x Trackball + SPC simulates TAB. But this is sometimes
not working, for example for BBDB-expansions of Email addresses in Gnus,
also for some commands with M-x. "No expansion found". I don't know why.

Greetings,

Sven


___
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


[Orgmode] Re: [Babel] Macro for begin_src?

2010-04-18 Thread Eric S Fraga
On Sun, 18 Apr 2010 22:13:27 +0200, Štěpán Němec  wrote:
> 
> Dan Davison  writes:
> > I guess, for Nate's original application (converting existing code to
> > src blocks), what might have been most useful is something to enclose a
> > given region in a source block. Can anyone show how to do that with
> > yasnippet (or anything else)?
> 
> I don't have a ready-to-use snippet, but this is what you need:
> 
> http://yasnippet.googlecode.com/svn/trunk/doc/snippet-development.html#yas-wrap-around-region
> 
> 
> HTH,
> 
>   Štěpán

and you can also insert the value of yas/selected-text directly into
the snippet anywhere you want.  e.g.

--8<---cut here---start->8---
#name : testing yasnippets for org-mode
# --
#+BEGIN_LaTeX
`yas/selected-text`
$0
#+END_LaTeX
--8<---cut here---end--->8---

of course, you can only do this (or the wrap around region approach)
if you invoke the snippet directly using a key binding (e.g. the
default "C-c & C-s" or "M-x yas/insert-snippet") as opposed to tab
expansion on the snippet name (which is more convenient).

Note that you can assign key bindings directly to snippets.


___
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


Re: [Orgmode] suggestions of Android smartphones

2010-04-18 Thread Daniel Martins
Thank you very much!

BTW what Android smartphone do you have?

Daniel

2010/4/18 Sven Bretfeld :
> Hi Daniel
>
> Daniel Martins  writes:
>
>> If I need to access a remote ssh account and open Emacs, the available
>> keyborards are OK?
>
> The standard (soft)keyboard is principally OK if you use Emacs on a
> remote machine via ConnectBot, which is a free ssh client available in
> the market. Pressing the Trackball once simulates CTRL, pressing it
> twice simulates ESC/META. But there are sometimes problems with
> TAB-expansion. 2 x Trackball + SPC simulates TAB. But this is sometimes
> not working, for example for BBDB-expansions of Email addresses in Gnus,
> also for some commands with M-x. "No expansion found". I don't know why.
>
> Greetings,
>
> Sven
>
>
> ___
> 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
>


___
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


[Orgmode] [patch] typo: customization group org-plain-list

2010-04-18 Thread Sebastian Rose

Found a typo in lisp/org-list.el. Patch is against branch
`remove-compatibility-code'


diff --git a/lisp/org-list.el b/lisp/org-list.el
index 180bc5a..f45819a 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -119,7 +119,7 @@ When a string, it will be used as a regular expression.  When the bullet
 type of a list is changed, the new bullet type will be matched against this
 regexp. If it matches, there will be two spaces instead of one after
 the bullet in each item of he list."
-  :group 'org-plain-list
+  :group 'org-plain-lists
   :type '(choice
  (const :tag "never" nil)
  (regexp)))



   Sebastian
___
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


[Orgmode] [patch] Terminating lists by indentation of #+SPECIALS too

2010-04-18 Thread Sebastian Rose
Hello Carsten,


there was much discussion about a terminator and I ran into a problem,
that made me think we need one. But then I found we had one --- it's
just not used on HTML export.


Below is a little file I wrote. Thanks to the `- __' items, it results
in the XHTML closely to what I wanted it to.
But only as long as I use those _undocumented_ `- __' items. Once you
remove them, you'll see, that the `#+html: #+OPTIONS: toc:nil
#+STYLE: 
#+STYLE: body,p,div,td{font-size:13px;font-family:sans-serif;}
#+STYLE: div { text-align:left; }
#+STYLE: #content {width:550px;
#+STYLE: margin-left:auto;margin-right:auto;text-align:center; }
#+STYLE: #postamble { width:550px;clear:both;border-top:1px solid black;
#+STYLE:  margin-left:auto;margin-right:auto;text-align:center; }
#+STYLE: 

* List of design patterns

  #+HTML: 
  *Behavioural Patterns*
- [[file:BatchCommand][BatchCommand]]
- [[file:ChainOfResponsibility.org][Chain Of Responsibility]]
- [[file:Command.org][Command]], UndoableCommand and BatchCommand
- [[file:Interpreter.org][Interpreter]]
- [[file:Iterator.org][Iterator]]
- [[file:Mediator.org][Mediator]]
- [[file:Memento.org][Memento]]
- [[file:NullObject][NullObject]]
- [[file:Observer.org][Observer]]
- [[file:State.org][State]]
- [[file:Strategy.org][Strategy]]
- [[file:TemplateMethod.org][Template Method]]
- [[file:Visitor.org][Visitor]]
  *Creational Patterns*
- [[file:AbstractFactory.org][Abstract Factory]]
- [[file:Builder.org][Builder]]
- [[file:Factory.org][Factory]]
- [[file:FactoryMethod.org][Factory Method]]
- [[file:Prototype.org][Prototype]]
- [[file:Singleton.org][Singleton]]
- __
  #+html: 
  #+html: 
  *Structural Patterns*
- [[file:Adapter.org][Adapter]]
- [[file:Composite.org][Composite]]
- [[file::Bridge.org][Bridge]]
- [[file:Decorator.org][Decorator]]
- [[file:Facade.org][Facade]]
- [[file:Flyweight.org][Flyweight]]
- [[file:Proxy.org][Proxy]]
  *Unsorted*
- [[file:BusinessDelegate.org][Business Delegate]]
- [[file:DataAccessObject.org][Data Access Object]]
- [[file:DataTransferObject.org][Data Transfer Object]]
- [[file:DependencyInjection.org][Dependency Injection]]
- [[file:FluentInterface.org][Fluent Interface]]
- [[file:InversionOfControl.org][Inversion Of Control]]
- [[file:ModelViewControler.org][Model View Controler]]
- [[file:ModelViewPresenter.org][Model View Presenter]]
- [[file:Plugin.org][Plugin]]
- __
  #+HTML: 



And, finally, the patch. I would have used the function
`org-export-html-close-lists-maybe' but that didn't work, so I wrote
similar code just in place.

Carsten: If it makes things easier for you, I could apply the change to
the master branch and send an appropriate patch.

diff --git a/lisp/org-html.el b/lisp/org-html.el
index fcddd50..812e63c 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -929,6 +929,15 @@ lang=\"%s\" xml:lang=\"%s\">
 
 	  ;; Protected HTML
 	  (when (get-text-property 0 'org-protected line)
+(when in-local-list
+  (let ((ind (or (get-text-property 0 'original-indentation line) 0)))
+(while (and (car local-list-indent) (< ind (car local-list-indent)))
+  (org-close-li (car local-list-type))
+  (insert (format "\n" (car local-list-type)))
+  (setq local-list-indent (cdr local-list-indent))
+  (setq local-list-type (cdr local-list-type))
+  (setq in-local-list local-list-indent
+
 	(let (par (ind (get-text-property 0 'original-indentation line)))
 	  (when (re-search-backward
 		 "\\(\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t)




Best wishes

 Sebastian




Footnotes:

[fn:1] `org-end-of-item' and `org-end-of-item-list' already consider the
   decreased indentation of the `#+html:' line the end of the list.

   You can proof that by deleting the last dot and all empty lines,
   so that the `#+html:' line is directly below the last list
   item. Then move point somewhere on the item and do `M-x
   org-end-of-item RET'.

___
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


Re: [Orgmode] [patch] Terminating lists by indentation of #+SPECIALS too

2010-04-18 Thread Sebastian Rose
Haaarrrgh ---


the first patch in my previous mail does not work for all cases. Hairy
stuff


Here's what did _not_ work with my previous patch:

  #+html: 
  *Unsorted Patterns*
- a
- b
- c
  #+HTML: Somthing inside the last item!!!
  #+HTML: 





But this one finally works:


diff --git a/lisp/org-html.el b/lisp/org-html.el
index fcddd50..0174e43 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -929,6 +929,17 @@ lang=\"%s\" xml:lang=\"%s\">
 
 	  ;; Protected HTML
 	  (when (get-text-property 0 'org-protected line)
+(when in-local-list
+  (let ((ind (org-get-indentation line)))
+(while (and (car local-list-indent) (< ind (car local-list-indent)))
+  (org-close-li (car local-list-type))
+  (insert (format "\n" (car local-list-type)))
+  (setq local-list-indent (cdr local-list-indent))
+  (setq local-list-type (cdr local-list-type))
+  (setq in-local-list local-list-indent))
+(insert line "\n")
+(throw 'nextline nil)))
+
 	(let (par (ind (get-text-property 0 'original-indentation line)))
 	  (when (re-search-backward
 		 "\\(\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t)


Again: If it makes things easier, I could apply the change to the master
branch and send an appropriate patch.





Sebastian






Sebastian Rose  writes:
> Hello Carsten,
>
>
> there was much discussion about a terminator and I ran into a problem,
> that made me think we need one. But then I found we had one --- it's
> just not used on HTML export.
>
>
> Below is a little file I wrote. Thanks to the `- __' items, it results
> in the XHTML closely to what I wanted it to.
> But only as long as I use those _undocumented_ `- __' items. Once you
> remove them, you'll see, that the `#+html:  inside the last list item and the XHTML will not validate.
>
>
> As I looked at it, I found the most natural solution would be, to
> terminate the list by regarding the indentation of `#+WHATEVER' and
> `#+BEGIN_WHATEVER' if inside lists [fn:1].
>
>
>
> The patch below (diffed against `remove-compatibility-code') makes
> XHTML-export honor the indentation of `#+SPECIALS'.
>
>
>
> Here's the Org-file I wrote (remove and add the `- __' list items to see
> the effect):
>
>
> #+OPTIONS: toc:nil
> #+STYLE: 
> #+STYLE: body,p,div,td{font-size:13px;font-family:sans-serif;}
> #+STYLE: div { text-align:left; }
> #+STYLE: #content {width:550px;
> #+STYLE: margin-left:auto;margin-right:auto;text-align:center; }
> #+STYLE: #postamble { width:550px;clear:both;border-top:1px solid black;
> #+STYLE:  margin-left:auto;margin-right:auto;text-align:center; }
> #+STYLE: 
>
> * List of design patterns
>
>   #+HTML: 
>   *Behavioural Patterns*
> - [[file:BatchCommand][BatchCommand]]
> - [[file:ChainOfResponsibility.org][Chain Of Responsibility]]
> - [[file:Command.org][Command]], UndoableCommand and BatchCommand
> - [[file:Interpreter.org][Interpreter]]
> - [[file:Iterator.org][Iterator]]
> - [[file:Mediator.org][Mediator]]
> - [[file:Memento.org][Memento]]
> - [[file:NullObject][NullObject]]
> - [[file:Observer.org][Observer]]
> - [[file:State.org][State]]
> - [[file:Strategy.org][Strategy]]
> - [[file:TemplateMethod.org][Template Method]]
> - [[file:Visitor.org][Visitor]]
>   *Creational Patterns*
> - [[file:AbstractFactory.org][Abstract Factory]]
> - [[file:Builder.org][Builder]]
> - [[file:Factory.org][Factory]]
> - [[file:FactoryMethod.org][Factory Method]]
> - [[file:Prototype.org][Prototype]]
> - [[file:Singleton.org][Singleton]]
> - __
>   #+html: 
>   #+html: 
>   *Structural Patterns*
> - [[file:Adapter.org][Adapter]]
> - [[file:Composite.org][Composite]]
> - [[file::Bridge.org][Bridge]]
> - [[file:Decorator.org][Decorator]]
> - [[file:Facade.org][Facade]]
> - [[file:Flyweight.org][Flyweight]]
> - [[file:Proxy.org][Proxy]]
>   *Unsorted*
> - [[file:BusinessDelegate.org][Business Delegate]]
> - [[file:DataAccessObject.org][Data Access Object]]
> - [[file:DataTransferObject.org][Data Transfer Object]]
> - [[file:DependencyInjection.org][Dependency Injection]]
> - [[file:FluentInterface.org][Fluent Interface]]
> - [[file:InversionOfControl.org][Inversion Of Control]]
> - [[file:ModelViewControler.org][Model View Controler]]
> - [[file:ModelViewPresenter.org][Model View Presenter]]
> - [[file:Plugin.org][Plugin]]
> - __
>   #+HTML: 
>
>
>
> And, finally, the patch. I would have used the function
> `org-export-html-close-lists-maybe' but that didn't work, so I wrote
> similar code just in place.
>
> Carsten: If it makes things easier for you, I could apply the change to
> the master branch and send an appropriate patch.
>
>
> diff --git a/lisp/org-html.el b/lisp/org-html.el
> index fcddd50..812e63c 100644
> --- a/lisp/org-html.el
> +++ b/lisp/org-html.el
> @@ -92

[Orgmode] Typo in org-list.el

2010-04-18 Thread Sebastian Rose
diff --git a/lisp/org-list.el b/lisp/org-list.el
index 180bc5a..5a893aa 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -216,7 +216,7 @@ list, obtained by prompting the user."
(< (point) (match-end 0
 
 (defun org-in-item-p ()
-  "It the cursor inside a plain list item.
+  "Is the cursor inside a plain list item?
 Does not have to be the first line."
   (save-excursion
 (condition-case nil



   Sebastian
___
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


[Orgmode] Re: [Babel] Macro for begin_src?

2010-04-18 Thread Shelagh Manton
On Sun, 18 Apr 2010 11:44:24 +0100, Eric S Fraga wrote:

> On Sun, 18 Apr 2010 01:01:56 + (UTC), Shelagh Manton
>  wrote:
>> 
>> On Sat, 17 Apr 2010 08:38:01 -0500, Nathan Neff wrote:
>> 
>> You could play around with artist-mode if you use X. It uses the mouse
>> with ascii symbols to create rectangles, lines etc. Then just change
>> the text how you need. There are some helpful functions on emacswiki
>> that show you how to set up ido with artist. Don't have the url handy
>> though.
>> 
>> Sadly, it seems you can't get artist-mode to work in a tty, though I
>> believe you can in an xterm.
> 
> Shelagh,
> 
> artist-mode has a full set of key bindings.  I never use the mouse (for
> anything at all, if I can help it, due to RSI issues) and artist-mode is
> perfectly usable nonetheless!  Type "C-h m" in artist-mode to see all
> the key bindings.

I am aware of the keybindings, though I tend to use the mouse myself, but 
I have never been able to get artist-mode running properly in tty. If you 
have, I would be interested to know if you had to tweak anything to get 
it to work or whether it is the usual "my set-up is screwy and I don't 
know why" syndrome.

Shelagh
> 
> HTH,
> eric
> 
> 
> ___ 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




___
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


[Orgmode] Bug: C-c ' eats last newline of a figure [6.35trans (release_6.35g.72.g2e12)]

2010-04-18 Thread Bernt Hansen

With the following file if you use C-c ' to edit the ditta graphic in
artist mode and then just exit artist mode with another C-c '
the #+end_src line moves up one line which breaks the block.

--8<---cut here---start->8---
* Ditta Test
#+begin_src ditaa :file x.png :cmdline 
  +--+  
+-+
  |  |  |   
  |
  |  +<>+   
  |
  |cBLU  |  |  cF00 
  |
  |  +<+  +-+   |   
  |
  |  | |  | |   |   
  |
  +--+ |  | |   
+--+--+
   |  | |   
   |
   +--+cRED |   
   |
  | |   
   |
  | |   
   |
  | |
+-+
  +-++--+|
   ++   ||   v
   ||   ||  
++---+
   ||   ||  |   
 |
   |cGRE+<-=+|  |   
 |
   |||  |   
 |
   ||+->+   
 |
   ++   |  cYEL 
 |
|   
 |

++
#+end_src

#+results:
[[file:x.png]]
--8<---cut here---end--->8---

After the key sequence C-c ' C-c ' in the block the end of the block now
looks like this:

--8<---cut here---start->8---
|   
 |

++#+end_src
--8<---cut here---end--->8---

This occurs in both the master and compatibility branches.

Emacs  : GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11)
 of 2008-11-09 on raven, modified by Debian
Package: Org-mode version 6.35trans (release_6.35g.72.g2e12)

-Bernt


___
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


[Orgmode] Re: [Babel] Macro for begin_src?

2010-04-18 Thread Bernt Hansen
Shelagh Manton  writes:

> On Sun, 18 Apr 2010 11:44:24 +0100, Eric S Fraga wrote:
>
>> On Sun, 18 Apr 2010 01:01:56 + (UTC), Shelagh Manton
>>  wrote:
>>> 
>>> On Sat, 17 Apr 2010 08:38:01 -0500, Nathan Neff wrote:
>>> 
>>> You could play around with artist-mode if you use X. It uses the mouse
>>> with ascii symbols to create rectangles, lines etc. Then just change
>>> the text how you need. There are some helpful functions on emacswiki
>>> that show you how to set up ido with artist. Don't have the url handy
>>> though.
>>> 
>>> Sadly, it seems you can't get artist-mode to work in a tty, though I
>>> believe you can in an xterm.
>> 
>> Shelagh,
>> 
>> artist-mode has a full set of key bindings.  I never use the mouse (for
>> anything at all, if I can help it, due to RSI issues) and artist-mode is
>> perfectly usable nonetheless!  Type "C-h m" in artist-mode to see all
>> the key bindings.
>
> I am aware of the keybindings, though I tend to use the mouse myself, but 
> I have never been able to get artist-mode running properly in tty. If you 
> have, I would be interested to know if you had to tweak anything to get 
> it to work or whether it is the usual "my set-up is screwy and I don't 
> know why" syndrome.

The key bindings don't work well for me in regular emacs in X either.

GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of 2008-11-09
on raven, modified by Debian

Marking regions seems to lose the mark when I move around trying to draw
rectangles.  Using the mouse is much easier for this.

-Bernt


___
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


Re: [Orgmode] Using Org for browsing and managing buffers

2010-04-18 Thread Dan Davison
http://github.com/dandavison/org-buffers
http://github.com/dandavison/org-buffers/raw/master/org-buffers.el

Hi Eric,

Eric S Fraga  writes:
[...]
> - I like the fact I can customise RET or, more to the point, that it
>   be consistent with the rest of org-mode.  I personally would set
>   org-buffers-follow-link-method to 'current-window but then it would
>   be nice to have SPC, say, open the buffer in another window, to
>   behave consistently with org-agenda?

I've added the SPACE binding you suggest. And, although it would be
out-of-keeping with other org-mode links, it looks like there's a good
argument for making RET switch to the buffer in the same window, like
dired et al. I've done that. I've put a table at the end comparing
these bindings across a few different major modes.

> - I would prefer some consistency or symmetry in the creation and
>   burying of the buffer: given that (by default) org-buffers-list
>   brings up a new window in the current frame, quitting that buffer
>   should also delete the window;  otherwise, I would like it to not
>   split the frame.  Does that make sense?

Yes. This is all to do with pop-to-buffer versus switch-to-buffer, my
understanding of which was shaky. I have now changed to using
switch-to-buffer by default, and I think this gives behaviour
consistent with what you requested. I've also introduced a variable
org-buffers-switch-to-buffer-function which can be set to
'pop-to-buffer, in which case the variables pop-up-windows and
pop-up-frames, amongst others, become relevant.

> - what's the point of orb-buffers-toggle-heading? 

Cleaner (less starry) appearance, seeing as many buffers are named
*Like This*.

> I ask because I
>   don't understand what functionality it adds and the default binding
>   (h) conflicts with my speed keys (I use vi-like bindings for speed
>   motion keys).

I overlooked that before. I've moved it to H.

> - In column view mode (which I also have not figured out why it would
>   be used...), the heading uses a different font size than the normal
>   entries so the headings don't line up at all.  This may be my fault,
>   however.

I don't see this.

I've changed the column view binding to T ("tabular") so that the
standard speed commands c and C are available. As for the point, it kind
of comes full circle to the list-buffers / ibuffers appearance, thus
showing that most things are a subset of org.

> - if I bring up the buffers list a second time, having created a new
>   buffer in the meantime, the new buffer does not appear until I hit
>   'g'.  I think any invocation of org-buffers-list should do an
>   automatic update of the list.

A C-u prefix to org-buffers-list now forces update. I don't think I
agree that it should be default. Speed is my concern -- I'd like it to
show the listing immediately when possible. I believe we're both using
"atom"-powered netbooks, and mine at least is a little sluggish at
generating the listing. I notice dired says "The directory has changed
on disk, use g to update" so maybe I could do the same.

>
> - Lastly, it would be nice to either avoid the single blank line at
>   the start of the buffer or have point be at the first heading.
>   Having point at the first (empty) line seems to cause some problems
>   with speed motion keys sometimes...  it also wastes a line!

I've made point go to the first heading when the listing is
created. However, I am wary about getting rid of that initial line, as I
believe Carsten has said that Org/outline.el isn't always happy with
first heading on first line. Certainly, I'm not inserting that newline
character explicitly -- it appears via my (ab)use of Carsten's
functions.

>   Actually, I think it might be useful to have point be placed at the
>   heading that corresponds to the buffer currently being visited when
>   the org-buffers-list command is invoked.  A thought.

Yes I like that and I've done it. It will only happen with a fresh
listing though (first time, or C-u prefix), Otherwise buffer point is
maintained.

Along similar lines, I've made it so that if you invoke C-x f
(find-file) or C-x d (dired), the minibuffer prompt will start from the
directory of the buffer on the current line, rather than whatever
directory is associated with the listings buffer. I've found this useful
(only works for the keybindings currently, not for M-x or from menu).

Also you can now flag buffers for reversion (i.e. revert-buffer) using
"r"[6], and a few other changes.

Thanks, your suggestions have been really helpful.

Dan

This table is with (setq pop-up-windows t), which is default in emacs23.
|  | switch   | switch  | display other-window |
   |
|  | same window  | other window| without switch   | next 
item |
|  |  | (pop-to-buffer) |  |
   |
|--+--+-+--+---|
| dired| RET  | o   

Re: [Orgmode] suggestions of Android smartphones

2010-04-18 Thread Matthew Jones
Daniel, thanks for this suggestion it's a really good idea, I hope to make
some as part of the documentation effort in the near future.

I have a Droid and love it and its physical keyboard but I tend to do very
simple things via ConnectBot to whatever server I am connected to.

73,
Matthew W. Jones (KI4ZIB)
http://matburt.net


On Sun, Apr 18, 2010 at 10:07 AM, Daniel Martins wrote:

>  --- resending with a proper title ---
>
> Matthew,
>
> Just a suggestion for newbies.
>
> Could you generate a video of MobileOrg Android similar to those of
> the MobileOrg Iphone.
>
> I am still open to suggestions of Android smartphones.
>
> If I need to access a remote ssh account and open Emacs, the available
> keyborards are OK?
>
> Daniel
>
>
> PS I "bought"  an Android phone called Motorola Quench but due to a
> "misunderstanding" with the operator I was forced to cancel the
> purchase. (I am still very annoyed with this problem)
>
>
>
> 2010/4/13 Matthew Jones :
> > I am the developer/maintainer of MobileOrg for Android and I'd appreciate
> > any feedback on the application.   You can find more information and
> > download links on the
> > wiki: http://wiki.github.com/matburt/mobileorg-android/
> > 73,
> > Matthew W. Jones (KI4ZIB)
> > http://matburt.net
> >
> >
> > On Mon, Apr 12, 2010 at 10:08 PM, Daniel Martins 
> > wrote:
> >>
> >> Please, share your first impressions!!! I just bought an Android phone
> >> and would like to take similar routes.
> >>
> >> Daniel
> >>
> >> 2010/2/16 David Rogoff :
> >> > On 2010-02-16 13:47:59 -0800, Tom Tobin said:
> >> >
> >> >> On Tue, Feb 16, 2010 at 12:18 PM, David Rogoff  >
> >> >> wrote:
> >> >>>
> >> >>> Hi all.
> >> >>>
> >> >>> New org-mode convert also looking at new phones.  It looks like
> >> >>> theMoto
> >> >>> Droid would be great for running org-mode.  Has anyone ported emacs
> to
> >> >>> this
> >> >>> platform and gotten org-mode running?
> >> >>
> >> >> I just switched from my iPhone back to an Android phone; I came
> across
> >> >> this project:
> >> >>
> >> >> http://github.com/matburt/mobileorg-android
> >> >>
> >> >> I haven't tried it yet, though.
> >> >
> >> > Thanks - I'll take a look.
> >> >
> >> >
> >> >
> >> >
> >> > ___
> >> > 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
> >> >
> >>
> >>
> >> ___
> >> 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
> >
> >
>
>
> ___
> 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
>
___
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


Re: [Orgmode] Re: Bug: create latex png while export to HTML become very slow [6.35i]

2010-04-18 Thread Nick Dokos
Lucas Peng  wrote:

> I wanted to export some files to html, and they contain lots of LaTeX
> fragments.
> I've done some test on 6.35i and 6.34c.
> 6.35i included more packages when converting LaTeX to PNG, and that's a big
> issue for me because it is time consuming.
> And the result .dvi is much larger than 6.34c.
> 
> these are some of my test result.
> 6.35i
> http://pastebin.com/0YPhjdW2
> 
> 6.34c
> http://pastebin.com/A1azh7dW
> 

I did some profiling with these two releases and can confirm that 6.35i
is slower (by about a factor of 2.5 in my particular case). I exported
the following file (pretty much lifted from the manual) to HTML with
org-export-with-LaTeX-fragments set to t:

,
| 
| * foo
| 
|  \begin{equation}  % arbitrary environments,
|  x=\sqrt{b}% even tables, figures
|  \end{equation}% etc
| 
|  If $a^2=b$ and \( b=2 \), then the solution must be
|  either $$ a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \].
`

The profile starts like this for 6.35i:

org-export1   
10.622031 10.622031
org-export-as-html1   
9.529249  9.529249
org-export-preprocess-string  1   
9.510265  9.510265
org-export-html-preprocess1   
9.502661  9.502661
org-format-latex  1   
9.502494  9.502494
org-create-formula-image  5   
9.479597  1.8959194
org-mode  1   
0.004826  0.004826
...

and like this for 6.34c:

org-export2   
4.470028  2.235014
org-export-as-html2   
2.172419  1.0862095
org-export-preprocess-string  2   
2.03408   1.01704
org-export-html-preprocess2   
2.02233   1.011165
org-format-latex  1   
2.021664  2.021664
org-create-formula-image  5   
1.978296  0.3956592
org-mode  4   
0.213101  0.0532754999

Clearly, org-create-formula-image is eating much more time nowadays.

The complete profiling results are attached. I also did an ls -lR to get
some sizes after Lucas's mail above, but I have not looked into that yet
- nevertheless, the sizes are also in the results file.


Nick



* Org-mode version 6.35trans (release_6.35i)
** profile
org-export1   
10.622031 10.622031
org-export-as-html1   
9.529249  9.529249
org-export-preprocess-string  1   
9.510265  9.510265
org-export-html-preprocess1   
9.502661  9.502661
org-format-latex  1   
9.502494  9.502494
org-create-formula-image  5   
9.479597  1.8959194
org-mode  1   
0.004826  0.004826
org-export-push-to-kill-ring  1   
0.003082  0.003082
org-kill-new  1   
0.001904  0.001904
org-fit-window-to-buffer  1   
0.001263  0.001263
org-html-expand   13  
0.001239  9.530...e-05
org-install-agenda-files-menu 1   
0.001225  0.001225
org-html-do-expand18  
0.000931  5.172...e-05
org-agenda-files  1   
0.000757  0.000757
org-splice-latex-header   5   
0.000594  0.0001188
org-infile-export-plist   3   
0.000572  0.000190
org-export-normalize-links1   
0.000553  0.000553
org-file-image-p  5   
0.000525  0.000105
org-image-file-name-regexp5   
0.000468  9.36e-05
org-default-export-plist  1   
0.000405  0.000405
org-set-regexps-and-options   1   
0.000344  0.000344
org-export-define-heading-targets 1   
0.000267  

Re: [Orgmode] Re: Bug: create latex png while export to HTML become very slow [6.35i]

2010-04-18 Thread Nick Dokos
Nick Dokos  wrote:

> ... 
> The complete profiling results are attached. I also did an ls -lR to get
> some sizes after Lucas's mail above, but I have not looked into that yet
> - nevertheless, the sizes are also in the results file.
> 

The results file was incomplete: I forgot to save the file before
sending it out - sorry about that. The complete results are attached
here.

Nick


* Org-mode version 6.35trans (release_6.35i)
** profile
org-export1   
10.622031 10.622031
org-export-as-html1   
9.529249  9.529249
org-export-preprocess-string  1   
9.510265  9.510265
org-export-html-preprocess1   
9.502661  9.502661
org-format-latex  1   
9.502494  9.502494
org-create-formula-image  5   
9.479597  1.8959194
org-mode  1   
0.004826  0.004826
org-export-push-to-kill-ring  1   
0.003082  0.003082
org-kill-new  1   
0.001904  0.001904
org-fit-window-to-buffer  1   
0.001263  0.001263
org-html-expand   13  
0.001239  9.530...e-05
org-install-agenda-files-menu 1   
0.001225  0.001225
org-html-do-expand18  
0.000931  5.172...e-05
org-agenda-files  1   
0.000757  0.000757
org-splice-latex-header   5   
0.000594  0.0001188
org-infile-export-plist   3   
0.000572  0.000190
org-export-normalize-links1   
0.000553  0.000553
org-file-image-p  5   
0.000525  0.000105
org-image-file-name-regexp5   
0.000468  9.36e-05
org-default-export-plist  1   
0.000405  0.000405
org-set-regexps-and-options   1   
0.000344  0.000344
org-export-define-heading-targets 1   
0.000267  0.000267
org-export-html-convert-sub-super 18  
0.000245  1.361...e-05
org-latex-packages-to-string  5   
0.000236  4.719...e-05
org-export-blocks-preprocess  1   
0.000223  0.000223
org-link-unescape 10  
0.000220  2.21e-05
org-export-html-format-image  5   
0.000189  3.780...e-05
org-html-handle-time-stamps   10  
0.000181  1.810...e-05
org-footnote-normalize1   
0.000156  0.000156
org-html-level-start  2   
0.000146  7.3e-05
org-export-attach-captions-and-attributes 1   
0.000142  0.000142
org-export-html-convert-special-strings   18  
0.000122  6.777...e-06
org-export-html-convert-emphasize 18  
0.000120  6.666...e-06
org-export-remove-headline-metadata   1   
0.000115  0.000115
org-export-concatenate-multiline-emphasis 1   
0.000114  0.000114
org-open-par  7   
0.000111  1.585...e-05
org-export-select-backend-specific-text   1   
0.000109  0.000109
org-section-number3   
0.000104  3.466...e-05
org-export-protect-verbatim   1   
0.000104  0.000104
org-make-options-regexp   4   
0.000102  2.55e-05
org-export-replace-src-segments-and-examples  1   
9.5e-05   9.5e-05
org-html-protect  18  
8.300...e-05  4.611...e-06
org-file-menu-entry   15  
7.900...e-05  5.266...e-06
org-babel-exp-inline-src-blocks   1   
7.8e-05   7.8e-05
org-export-handle-export-tags 1   
7.6e-05   7.6e-05
org-split-string  5   
6.900...e-05  1

Re: [Orgmode] Bug: C-c ' eats last newline of a figure [6.35trans (release_6.35g.72.g2e12)]

2010-04-18 Thread Dan Davison
I've had a quick look at this. A minimal example is

#+begin_src ditaa
  +--
#+end_src

The problem seems to be that C-c ' concludes that we're in a table.el
table. One solution that came to mind is to move the test for table.el
context until after all the other block regexps have been tried. Patch
below.

Dan

commit 1dd6dd3bd79f06dfe2f27958b457c5b4766b3368
Author: Dan Davison 
Date:   Mon Apr 19 02:29:33 2010 -0400

Don't jump to conclusion that we are at table.el table

Test various block regexps before testing for table.el context

Modified lisp/org-src.el
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 54ec4af..3319a9e 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -459,15 +459,6 @@ the language, a switch telling if the content should be in 
a single line."
(pos (point))
re1 re2 single beg end lang lfmt match-re1 ind entry)
 (catch 'exit
-  (when (org-at-table.el-p)
-   (re-search-backward "^[\t]*[^ \t|\\+]" nil t)
-   (setq beg (1+ (point-at-eol)))
-   (goto-char beg)
-   (or (re-search-forward "^[\t]*[^ \t|\\+]" nil t)
-   (progn (goto-char (point-max)) (newline)))
-   (setq end (point-at-bol))
-   (setq ind (org-edit-src-get-indentation beg))
-   (throw 'exit (list beg end 'table.el nil nil ind)))
   (while (setq entry (pop re-list))
(setq re1 (car entry) re2 (nth 1 entry) lang (nth 2 entry)
  single (nth 3 entry))
@@ -498,7 +489,16 @@ the language, a switch telling if the content should be in 
a single line."
(throw 'exit
   (list (match-end 0) end
 (org-edit-src-get-lang lang)
-single lfmt ind
+single lfmt ind)
+  (when (org-at-table.el-p)
+   (re-search-backward "^[\t]*[^ \t|\\+]" nil t)
+   (setq beg (1+ (point-at-eol)))
+   (goto-char beg)
+   (or (re-search-forward "^[\t]*[^ \t|\\+]" nil t)
+   (progn (goto-char (point-max)) (newline)))
+   (setq end (point-at-bol))
+   (setq ind (org-edit-src-get-indentation beg))
+   (throw 'exit (list beg end 'table.el nil nil ind))
 
 (defun org-edit-src-get-lang (lang)
   "Extract the src language."



Bernt Hansen  writes:

> With the following file if you use C-c ' to edit the ditta graphic in
> artist mode and then just exit artist mode with another C-c '
> the #+end_src line moves up one line which breaks the block.
>
> * Ditta Test
> #+begin_src ditaa :file x.png :cmdline 
>   +--+  
> +-+
>   |  |  | 
> |
>   |  +<>+ 
> |
>   |cBLU  |  |  
> cF00   |
>   |  +<+  +-+   | 
> |
>   |  | |  | |   | 
> |
>   +--+ |  | |   
> +--+--+
>|  | | 
>  |
>+--+cRED | 
>  |
>   | | 
>  |
>   | | 
>  |
>   | |
> +-+
>   +-++--+|
>++   ||   v
>||   ||  
> ++---+
>||   ||  | 
>|
>|cGRE+<-=+|  | 
>|
>|||  | 
>|
>||+->+ 
>|
>++   |  cYEL   
>|
> | 
>|
> 
> ++
> #+end_src
>
> #+results:
> [[file:x.png]]
>
> After the key sequence C-c ' C-c ' in the block the end of the block now
> looks like this:
>
> | 
>|
> 
> ++#+end_src
>
> This occurs in both the