[Orgmode] Errors in git?

2009-08-03 Thread Michael Zeller
Hello,

I just cloned git on a remote machine, and I'm getting the following
error using Emacs 23.1.50.2 to make install. I just tried on two
machines.

Wrote /home/zellerm/workspace/opt/org-mode/lisp/org-agenda.elc
emacs -batch -q -eval (progn (add-to-list (quote load-path) 
\~/workspace/opt/emacs/share/emacs/site-lisp\) (add-to-list (quote load-path) 
(expand-file-name \./lisp/\))) -f batch-byte-compile lisp/org-ascii.el

In toplevel form:
lisp/org-ascii.el:29:1:Error: Symbol's function definition is void: 
backup-inhibited
make: *** [lisp/org-ascii.elc] Error 1

I had to change org-exp.el to compile:

diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 98de3cb..dbeaefc 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -2511,8 +2511,8 @@ directory.
   (file-truename bfname))
(concat (file-name-sans-extension filename)
-source.
-   (file-name-extension filename)
- filename)))
+   (file-name-extension filename
+ filename)
 (backup-inhibited t)
 (buffer (find-file-noselect filename))
 (region (buffer-string)))

Apologies if this is just something I did wrong, but all I did was git
clone and change the Makefile! Not sure how the mismatched parens
creeped in.

Thanks,
~Michael Zeller


___
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] Include mechanism for web publishing

2009-07-28 Thread Michael Zeller
Israel Herraiz i...@herraiz.org writes:

 Hi all,

 I use org-mode for web publishing. My web contains four pages that
 share a common (HTML) header, with some links to the different
 sections of the web and other stuff.

 At some point, I decided to include a common raw HTML in every
 page. This raw HTML is Javascript stuff for visits counting using
 Google Analytics.

 That file is included in every page right after the title, using
 #+INCLUDE header/header.org.

 Everything was working fine when I had just links, but now that I have
 included the #+BEGIN_HTML stuff, it is escaped when exporting
 everything to HTML, and instead of my raw HTML in the output files I
 get a line starting by ,#+BEGIN... (properly written and escaped in
 HTML; notice the initial comma).

I had the exact same issue last night, and oddly enough, it used to work
in 6.21b, which is what comes with CVS emacs!

Anyways, here is what I changed so that you can do an #+INCLUDE
header/header.org org to include as raw Org. Personally, I'd like the
default to be Org, but I see why it was changed. 

diff --git a/doc/org.texi b/doc/org.texi
index e28b185..43cd2ab 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -8262,13 +8262,15 @@ include your @file{.emacs} file, you could use:
 @end example
 @noindent
 The optional second and third parameter are the markup (@samp{quote},
-...@samp{example}, or @samp{src}), and, if the markup is @samp{src}, the
-language for formatting the contents.  The markup is optional, if it is not
-given, the text will be assumed to be in Org mode format and will be
-processed normally.  The include line will also allow additional keyword
-parameters @code{:prefix1} and @code{:prefix} to specify prefixes for the
-first line and for each following line, as well as any options accepted by
-the selected markup.  For example, to include a file as an item, use
+...@samp{example}, @samp{org}, or @samp{src}), and, if the markup is 
@samp{src},
+the language for formatting the contents. If the markup is @samp{org}, the
+text will be assumed to be in Org mode format and will be processed
+normally. The markup is optional, if it is not given, the text will be
+included as is and any Org markup will be escaped.  The include line will
+also allow additional keyword parameters @code{:prefix1} and @code{:prefix}
+to specify prefixes for the first line and for each following line, as well
+as any options accepted by the selected markup.  For example, to include a
+file as an item, use
 
 @example
 #+INCLUDE: ~/snippets/xx :prefix1+  :prefix  
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 280b1f4..83f9b74 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -2085,13 +2085,14 @@ TYPE must be a string, any of:
  (not (file-readable-p file)))
  (insert (format CANNOT INCLUDE FILE %s file))
(when markup
- (if (equal (downcase markup) src)
- (setq start (format #+begin_src %s %s\n
- (or lang fundamental)
- (or switches ))
- end #+end_src)
- (setq start (format #+begin_%s %s\n markup switches)
- end  (format #+end_%s markup
- (cond ((equal (downcase markup) src)
- (setq start (format #+begin_src %s %s\n
- (or lang fundamental)
- (or switches ))
- end #+end_src))
- ((equal (downcase markup) org) nil)
- (t (setq start (format #+begin_%s %s\n markup switches)
- end  (format #+end_%s markup)
(insert (or start ))
(insert (org-get-file-contents (expand-file-name file) prefix prefix1 
markup))
(or (bolp) (newline))

I hope that helps!
~Michael Zeller


___
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] Include mechanism for web publishing

2009-07-28 Thread Michael Zeller
Opps, for some reason the important portion didn't copy. You'll have to
forgive me, I'm still learning gnus.

Michael Zeller michael.dylan.zel...@gmail.com writes:

 diff --git a/doc/org.texi b/doc/org.texi
 index e28b185..43cd2ab 100644
 --- a/doc/org.texi
 +++ b/doc/org.texi
 @@ -8262,13 +8262,15 @@ include your @file{.emacs} file, you could use:
  @end example
  @noindent
  The optional second and third parameter are the markup (@samp{quote},
 -...@samp{example}, or @samp{src}), and, if the markup is @samp{src}, the
 -language for formatting the contents.  The markup is optional, if it is not
 -given, the text will be assumed to be in Org mode format and will be
 -processed normally.  The include line will also allow additional keyword
 -parameters @code{:prefix1} and @code{:prefix} to specify prefixes for the
 -first line and for each following line, as well as any options accepted by
 -the selected markup.  For example, to include a file as an item, use
 +...@samp{example}, @samp{org}, or @samp{src}), and, if the markup is 
 @samp{src},
 +the language for formatting the contents. If the markup is @samp{org}, the
 +text will be assumed to be in Org mode format and will be processed
 +normally. The markup is optional, if it is not given, the text will be
 +included as is and any Org markup will be escaped.  The include line will
 +also allow additional keyword parameters @code{:prefix1} and @code{:prefix}
 +to specify prefixes for the first line and for each following line, as well
 +as any options accepted by the selected markup.  For example, to include a
 +file as an item, use
  
  @example
  #+INCLUDE: ~/snippets/xx :prefix1+  :prefix  
 diff --git a/lisp/org-exp.el b/lisp/org-exp.el
 index 280b1f4..83f9b74 100644
 --- a/lisp/org-exp.el
 +++ b/lisp/org-exp.el
 @@ -2085,13 +2085,14 @@ TYPE must be a string, any of:
   (not (file-readable-p file)))
   (insert (format CANNOT INCLUDE FILE %s file))
 (when markup
 - (if (equal (downcase markup) src)
 - (setq start (format #+begin_src %s %s\n
 - (or lang fundamental)
 - (or switches ))
 - end #+end_src)
 - (setq start (format #+begin_%s %s\n markup switches)
 - end  (format #+end_%s markup
 - (cond ((equal (downcase markup) src)
 - (setq start (format #+begin_src %s %s\n
 - (or lang fundamental)
 - (or switches ))
 - end #+end_src))
 - ((equal (downcase markup) org) nil)
 - (t (setq start (format #+begin_%s %s\n markup switches)
 - end  (format #+end_%s markup)
+ (cond ((equal (downcase markup) src)
+ (setq start (format #+begin_src %s %s\n
+ (or lang fundamental)
+ (or switches ))
+   end #+end_src))
+((equal (downcase markup) org) nil)
+(t (setq start (format #+begin_%s %s\n markup switches)
+ end  (format #+end_%s markup)
 (insert (or start ))
 (insert (org-get-file-contents (expand-file-name file) prefix prefix1 
 markup))
 (or (bolp) (newline))

 I hope that helps!
 ~Michael Zeller


___
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] emacs on the iPhone

2009-07-21 Thread Michael Zeller
Sven Bretfeld sven.bretf...@gmx.ch writes:


 Connecting to my PC and starting emacsclient -t via a bash-alias (`ec')
 takes about 5 seconds from everywhere. I think running (and working
 with) a native Emacs on the phone itself (which isn't available anyway)
 could never be much faster. Gnus and Org-mode are ready to go. And no
 need to synchronize.

As an aside, you could actually run emacs natively on the g1. I've
followed the instructions from Jay Freeman (http://www.saurik.com/id/10,
seems to be down though, try using the Google cache) for installing
Debian on the g1 (on your SD card -- I recommend getting an 8GB
card). After you've installed Debian you run openssh and connect to
localhost using ConnectBot.

Even better, you could install xorg and run emacs using AndroidVNC in X,
although I've found this to be much slower. Although, theoretically
you could use a browser such as Conkeror in X to follow http links,
although this is extremely slow for me. You're better off with w3m-el,
until newer hardware comes out. Also note that the keyboard under
AndroidVNC is not as nice as ConnectBot's layout.


 This is the solution I always dreamed of and more than once asked about
 in this list. I can very much recommend Android (even if its
 relationship to Google can be annoying).

I also recommend Android.


 For those who want to give it a try: In ConnectBot CTRL is pressing the
 mouse ball once, META (ESC) is pressing it twice. TAB is twice pressing
 the mouse ball and hitting SPC. To expand a tree in an org file you have
 to set org-cycle to a key. Of course, you should have an internet
 flatrate if you want to write your PhD thesis that way ;-).

With my solution, you don't need to drop all of that money on an
internet plan, but you would need to sync your org files. For using the
g1 without a plan, just buy a prepaid SIM card and connect using adb
shell when registering the phone and execute:

am start -a android.intent.action.MAIN -n com.android.settings/.Settings

to bring up the Wifi settings and register without buying a dataplan. I
spend about $10 a month prepaid and use Skype for everything else.


 Greetings

 Sven

Thanks,
~Michael Zeller


___
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] Re: org-style folding for a .emacs

2009-07-15 Thread Michael Zeller
Seb,

 Though, is there a way to get the font used for org-levels in the Emacs config
 file?  That would really greatly improve the readability, then!

Try changing th-outline-minor-mode-init to:

(defun th-outline-minor-mode-init ()
 (interactive)
 (setq outline-regexp (th-outline-regexp))
 ;; highlight the headings
 ;; see http://www.gnu.org/software/emacs/manual/html_node/emacs/Font-Lock.html
 ;; use M-x customize-apropos face to customize faces
 ;; to find the corresponding face for each outline level see org-faces.el
 (let ((heading-1-regexp (concat (substring outline-regexp 0 -1) \\{1\\} 
\\(.*\\)))
   (heading-2-regexp (concat (substring outline-regexp 0 -1) \\{2\\} 
\\(.*\\)))
   (heading-3-regexp (concat (substring outline-regexp 0 -1) \\{3,\\} 
\\(.*\\
   (font-lock-add-keywords
nil
`((,heading-1-regexp 1 font-lock-function-name-face t)
  (,heading-2-regexp 1 font-lock-variable-name-face t)
  (,heading-3-regexp 1 font-lock-keyword-face   t)

That should atleast highlight the first three headings properly and make
it more readable. I'm not quite sure how to make it cycle through the 8
colors like org-mode does.

Hope that helps,
~Michael Zeller

Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 Hello Michael,

 Does anyone have a recipe for easy org-style folding of an elisp file? I'd
 like to divide my .emacs into segments to make it easier to oversee and
 navigate.

 I asked myself this question a couple of days ago. Telepathy. For real.
 Good it has been asked, and answered.

 In my case, I am very interested as well by the literate programming approach.
 But I will comment on this later.


 In summary, add the following to your ~/.emacs.el:

 (defun th-outline-regexp ()
  Calculate the outline regexp for the current mode.
  (let ((comment-starter (replace-regexp-in-string
  [[:space:]]+  comment-start)))
(when (string= comment-start ;)
  (setq comment-starter ;;))
(concat ^ comment-starter \\*+)))

 (defun th-outline-minor-mode-init ()
  (interactive)
  (setq outline-regexp (th-outline-regexp)))

 (add-hook 'outline-minor-mode-hook
   'th-outline-minor-mode-init)

 and add the following as the top line of your ~/.emacs.el:

 ; -*- mode: emacs-lisp; mode: outline-minor; -*-

 Now you can add ;;* and ;;**, etc as headings in your .emacs.el and
 cycle using M-tab, M-left and M-right will collapse or expand all
 headings respectively. I am guessing you mean to make segments such as
 ;;* SHORTCUTS and ;;* VARIABLES, this will do that, but not too much
 more.

 Done.

 Though, is there a way to get the font used for org-levels in the Emacs config
 file?  That would really greatly improve the readability, then!

 Best regards,
   Seb


___
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