[O] [PATCH] Org attach: use vc to find the git dir if it exists

2013-08-12 Thread Rémi Vanicat
Org attach use to fail to commit the attached file in git or git annex
when the .git repository is not in the data sub-directory. 

This new code will use vc-git to find the .git file, and from this do
what is needed for committing file into git or git annex.

---
 lisp/org-attach.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index faefa6b..9bf3cda 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -261,14 +261,15 @@ the ATTACH_DIR property) their own attachment directory.
 (defun org-attach-commit ()
   Commit changes to git if `org-attach-directory' is properly initialized.
 This checks for the existence of a \.git\ directory in that directory.
-  (let ((dir (expand-file-name org-attach-directory))
-   (changes 0))
-(when (file-exists-p (expand-file-name .git dir))
+  (let* ((dir (expand-file-name org-attach-directory))
+(git-dir (vc-git-root dir))
+(changes 0))
+(when git-dir
   (with-temp-buffer
(cd dir)
(let ((have-annex
   (and org-attach-git-annex-cutoff
-   (file-exists-p (expand-file-name .git/annex dir)
+   (file-exists-p (expand-file-name annex git-dir)
  (dolist (new-or-modified
   (split-string
(shell-command-to-string
-- 
1.8.4.rc2





Re: [O] [WORG] How to ediff folded Org files?

2013-08-01 Thread Rémi Vanicat
Ratish Punnoose rat...@gmail.com writes:

 Thorsten Jolitz tjolitz at gmail.com writes:


[...]

 #+BEGIN_SRC emacs-lisp
   ;; diff hooks for org mode
   (add-hook 'ediff-select-hook 'f-ediff-org-unfold-tree-element)
   (add-hook 'ediff-unselect-hook 'f-ediff-org-fold-tree)
   ;; Check for org mode and existence of buffer
   (defun f-ediff-org-showhide(buf command rest cmdargs)
 If buffer exists and is orgmode then execute command
 (if buf
 (if (eq (buffer-local-value 'major-mode (get-buffer buf)) 'org-mode)
 (save-excursion (set-buffer buf) (apply command cmdargs)))
   )
 )
 
   (defun f-ediff-org-unfold-tree-element ()
 Unfold tree at diff location
 (f-ediff-org-showhide ediff-buffer-A 'org-reveal)  
 (f-ediff-org-showhide ediff-buffer-B 'org-reveal)  
 (f-ediff-org-showhide ediff-buffer-C 'org-reveal)  
 )
   ;;
   (defun f-ediff-org-fold-tree ()
 Fold tree back to top level
 (f-ediff-org-showhide ediff-buffer-A 'hide-sublevels 1)  
 (f-ediff-org-showhide ediff-buffer-B 'hide-sublevels 1)  
 (f-ediff-org-showhide ediff-buffer-C 'hide-sublevels 1)  
 )
 #+END_SRC

Thanks for sharing.

Adding this to org-mode (at least in contrib, or worg) would be really cool.
-- 
Rémi Vanicat




Re: [O] [OT] Gnus mail tutorial?

2013-05-25 Thread Rémi Vanicat
Alan Schmitt alan.schm...@polytechnique.org writes:

 Glyn Millington writes:

 For me Gnus is the gold standard among mail/news clients.  It can be hard
 work to set it up but it is worth it.  Alas, some good resources have
 actually vanished from the web over  the years.

 Can Gnus be directly used with local mail in maildir format? If so, one
 could easily switch between clients.

The bigger bugs for me in gnus is its inferior maildir support: it fail
to properly mark mail as read, it use its own meta-data file that can
cause problem to other mail client Hence the configs (as Sacha Chua
does) where one use dovecot to read maildir, letting gnus to connect to
dovecot instead of reading maildir directly.



-- 
Rémi Vanicat




Re: [O] Android MobileOrg: appointments without SCHEDULED/DEADLINE

2013-04-24 Thread Rémi Vanicat
Eric S Fraga e.fr...@ucl.ac.uk writes:

 Rémi Vanicat vani...@debian.org writes:

 Karl Voit devn...@karl-voit.at writes:

 Hi!

 * Matthew Jones bsdmatb...@gmail.com wrote:
 - If you have issues and you don't tell us then we have no way of helping
 you and the problem might not go away.  

 I mainly use MobileOrg on my Android phone to capture URLs and
 tasks and I am *very* thankfully for this possibility!


 However, with Google getting untrustworthy (Reader, APIs, ...), I
 want to get rid of Google Calendar as well. As you can read in [1],
 many people are creating appointments by simply adding an active
 time-stamp without SCHEDULED/DEADLINE or TODO states:

 ** 2013-05-07 Tue 9:00-11:00 this is an event/appointment   :rem15:

 I use :

 ** this is an event/appointment   :rem15:
   2013-05-07 Tue 9:00-11:00 

 And my android sync it with the agenda.

 Yes but does it sync with the calendar app on the phone if you ask for
 calendar synchronisation?

It was what the previous line meant, sorry If I was not clear enough. 

-- 
Rémi Vanicat




Re: [O] Android MobileOrg and appointments; ICS export and Google Calendar

2013-04-23 Thread Rémi Vanicat
Karl Voit devn...@karl-voit.at writes:

 * Eric S Fraga e.fr...@ucl.ac.uk wrote:

 I tried out the sync to calendar option in MobileOrg.  It synced tasks
 (i.e. scheduled and deadline entries) but not entries with just active
 time stamps which are what I use for appointments.  

 Too bad.

I don't know what differ in my config, but here, entries with active
time stamps are synced with my mobile agenda using MobileOrg on
android. 

-- 
Rémi Vanicat




Re: [O] Android MobileOrg: appointments without SCHEDULED/DEADLINE

2013-04-23 Thread Rémi Vanicat
Karl Voit devn...@karl-voit.at writes:

 Hi!

 * Matthew Jones bsdmatb...@gmail.com wrote:
 - If you have issues and you don't tell us then we have no way of helping
 you and the problem might not go away.  

 I mainly use MobileOrg on my Android phone to capture URLs and
 tasks and I am *very* thankfully for this possibility!


 However, with Google getting untrustworthy (Reader, APIs, ...), I
 want to get rid of Google Calendar as well. As you can read in [1],
 many people are creating appointments by simply adding an active
 time-stamp without SCHEDULED/DEADLINE or TODO states:

 ** 2013-05-07 Tue 9:00-11:00 this is an event/appointment   :rem15:

I use :

** this is an event/appointment   :rem15:
  2013-05-07 Tue 9:00-11:00 

And my android sync it with the agenda.

I Just confirmed by testing that the bug is with timestamp on the
headline line.


My main problem with mobilorg is that it do not translate

  2013-05-07 Tue 9:00-11:00 +1w 

in a recurring event, and I would really like this to be solved.
[...]


-- 
Rémi Vanicat




[O] [PATCH] Re: orgtbl-to-generic with lfmt (wrong usage or bug)

2013-03-22 Thread Rémi Vanicat
Gerhard gsq...@gmail.com writes:

 Hi,

 I was happy to find out about the possibility to convert a table into 
 something else, but I struggle with obtaining a particular result. I 
 have addresses in a table and want them to be formatted for printing. 
 This is where I am so far.

 #+ORGTBL: SEND sofar orgtbl-to-generic :lfmt %s

Reading the documentation, this should be 

#+ORGTBL: SEND sofar orgtbl-to-generic :lfmt %s %s\n%s\n%s %s\n

to have your expected formatting.

But it seem there is a bug in orgtbl that make this to fail. This very
simple patch seem to do the trick solve this.

From 248ee115ffaa86e7284a111bffc750174997faf2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= vani...@debian.org
Date: Fri, 22 Mar 2013 09:22:51 +0100
Subject: [PATCH] Correctly format orgtbl line when there is a :lfmt argument.

orgtbl-apply-fmt need its arguments not in a line but as direct
argument, we need to call apply
---
 lisp/org-table.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 8da57b2..dec16c0 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -4595,7 +4595,7 @@ First element has index 0, or I0 if given.
    f)))
 	 line)))
   (push (if *orgtbl-lfmt*
-		(orgtbl-apply-fmt *orgtbl-lfmt* line)
+		(apply #'orgtbl-apply-fmt *orgtbl-lfmt* line)
 	  (concat (orgtbl-eval-str *orgtbl-lstart*)
 		  (mapconcat 'identity line *orgtbl-sep*)
 		  (orgtbl-eval-str *orgtbl-lend*)))
-- 
1.7.10.4


-- 
Rémi Vanicat


Re: [O] Bugs in org-cycle-internal-local?

2012-12-27 Thread Rémi Vanicat
Bastien b...@altern.org writes:

 Rémi Vanicat vani...@debian.org writes:


[...]

 Well, it was, I just skipped it inadvertantly.
 I can reproduce the problem, but don't have an easy fix
 at hand.  If you find one, please let us know.

This seem to do it

From e7344cd512af57fc9c85205876d6e3bfed2e53fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= vani...@debian.org
Date: Thu, 27 Dec 2012 16:41:28 +0100
Subject: [PATCH] Find end of section only at beginning of line when cycling

When hiding a section in non org-mode using outline-minor-mode, if the
next section begin with white space, its header line used to appeared
on the same line as the one we hide.
---
 lisp/org.el |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index ee4c70e..b1ffb8f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6399,7 +6399,8 @@ in special contexts.
 	(setq eos (save-excursion
 		(org-end-of-subtree t)
 		(unless (eobp)
-		  (skip-chars-forward  \t\n))
+		  (skip-chars-forward  \t\n)
+		  (forward-line 0))
 		(if (eobp) (point) (1- (point)
 	(setq has-children
 	  (or (save-excursion
-- 
1.7.10.4




-- 
Rémi Vanicat


Re: [O] Bugs in org-cycle-internal-local?

2012-12-18 Thread Rémi Vanicat
Bastien b...@altern.org writes:

 Hi Rémi,

 Rémi Vanicat vani...@debian.org writes:

 I've tried to use visibility cycling in outline minor mode[1] with ruby,

 I tried your minor mode with the minimal snippet you gave and it works
 well here.  

did you let the two space before the both def? Without those space,
every thing work find:

the full snipet is like

class XmmsInteract
  def get(info, attr, default=nil)
info[attr].to_a[0][1]
  end

  def initialize
@looking_for_medialib_list = []
  end
end

and the hide fail on the   def get

I admit that the importance of the space could be not obvious in my
first email.



 Could it be the version of org-mode you're using?

It's stock org-mode from Emacs

-- 
Rémi Vanicat



[O] Bugs in org-cycle-internal-local?

2012-12-17 Thread Rémi Vanicat
Hello,

I've tried to use visibility cycling in outline minor mode[1] with ruby,
and I've a problem with when hiding some subtree: when the next subtree
on the same level begin with space char, its heading is put on the same
line than the current one:

Something like:

  def get(info, attr, default=nil)

  end

  def initialize

become

  def get(info, attr, default=nil)... def initialize

when I expect
  def get(info, attr, default=nil)...
  def initialize

The problem seem to come from the org-cycle-internal-local function that
wrongly put the end of the subtree in the middle of a line, if the
beginning of this line is all white character.






Here is the code I use to setup ruby-mode for interesting integration
with outline-minor-mode and org cycling facilities:

#+begin_src emacs-lisp
  (defvar my-ruby-outline-regexp ### \\| *def| *module| *class\\)

  (defun my-ruby-outline-level ()
compute the level of a outline for ruby
(save-match-data
 (cond
   ((looking-at ###) 1)
   ((looking-at \\( *\\))
(+ 2 (length (match-string 1)))

  (defun define-ruby-outline ()
(make-local-variable 'outline-regexp)
(setq outline-regexp my-ruby-outline-regexp)
(make-local-variable 'outline-level)
(setq outline-level #'my-ruby-outline-level)
(outline-minor-mode))

  (add-hook 'ruby-mode-hook 'define-ruby-outline)

  (eval-after-load 'outline
'(progn
  (define-key outline-minor-mode-map [(control tab)] 'org-cycle)
  (define-key outline-minor-mode-map [(backtab)] 'org-global-cycle)))
#+end_src



[1]:http://orgmode.org/worg/org-faq.html#use-visibility-cycling-in-outline-mode

-- 
Rémi Vanicat




Re: [O] MobileOrg, webdav, correct use of org-mobile-directory?

2012-08-20 Thread Rémi Vanicat
Adam Spiers orgm...@adamspiers.org writes:

 On Sun, Aug 19, 2012 at 12:25 AM, Adam Spiers orgm...@adamspiers.org wrote:
 Agreed.  If at least one person lets me know that my explanations
 above make sense, I might find some time to tweak the FAQ accordingly.

 I went ahead and tweaked it anyway:

 http://orgmode.org/worg/org-faq.html#sec-20

 However, I can't figure out how to avoid the broken image, or how
 to activate ditaa rendering.  Can someone help please?


I personally use webdav for both synchronization using the staging
method and the following[1] makefile

then you have to run make pull before pulling, and make push after
pushing to really pull and push file to webdav.

#+begin_src makefile
  ORG_FILES = $(shell ls *.org)
  CHECKSUMS = checksums.dat
  STMP_FILES = $(ORG_FILES:.org=.stmp) checksums.stmp
  # replace with the webdav host:
  HOST=example.org
  # Put full url of the webdav directory
  URL=http://$(HOST)/mobileorg/   
  # put your username there:
  USER=itsme
  # put your password there
  PASSWD=secret
  # you could also use
  # PASSWD=$(shell gpg --use-agent --no-tty  $(HOME)/.authinfo.gpg | grep 
$(HOST) | sed /$(USER)/s/.*password //)
  # if your .authinfo.gpg file contain a line like
  #   
  #   machine example login user password secret
  
  default: push
  push: stamp-sync
  all: default
  
  pull:
  curl -u $(USER):$(PASSWD) $(URL)mobileorg.org -o mobileorg.org
  
  stamp-sync: $(STMP_FILES)
  touch stamp-sync
  
  .SUFFIXES: .dat .org .stmp
  
  .org.stmp:
  curl  -u $(USER):$(PASSWD) -T $ $(URL)
  touch $@
  
  .dat.stmp:
  curl -u $(USER):$(PASSWD) -T $ $(URL)
  touch $@
  
  clean:
  rm *.stmp
#+end_src

-- 
Rémi Vanicat




Re: [O] Org tasks from gnus

2012-04-23 Thread Rémi Vanicat
Kyle Sexton k...@mocker.org writes:

 Does anyone know a way to automatically create/link org-tasks from Gnus
 messages?  My current workflow is to just start a new capture and type
 in or paste some of the relevant info, but if org could link to the
 message that would be ideal.

I've the following recipe in my org-capture-template:

 (m mailnote entry (file+headline ~/org/notes.org Notes)
  ** From: %:from Subject: %:subject\n   %a :kill-buffer t)

So when I do `C-c r m` it create a note with a link to the relevant gnus
message. Look at http://orgmode.org/manual/Template-expansion.html for
other %:something.
-- 
Rémi Vanicat




Re: [O] why was makefile changed to produce this?

2011-10-19 Thread Rémi Vanicat
Olaf Meeuwissen olaf.meeuwis...@avasys.jp writes:

 Nick Dokos nicholas.do...@hp.com writes:


[...]


 $ dpkg -S makeinfo
 texinfo: /usr/bin/makeinfo
 octave3.2-common: /usr/share/octave/3.2.4/m/help/__makeinfo__.m
 emacs23-common: /usr/share/emacs/23.1/lisp/textmodes/makeinfo.elc
 texinfo: /usr/share/man/man1/makeinfo.1.gz

 This only works for installed packages, though, as it searches the files
 below /var/lib/dpkg/info, IIRC.
 BTW, dpkg forwards that request to dpkg-query.


you might want to use apt-files

$ apt-file search makeinfo ~
emacs23-common: /usr/share/emacs/23.3/lisp/textmodes/makeinfo.elc
emacs23-el: /usr/share/emacs/23.3/lisp/textmodes/makeinfo.el.gz

[...]

if updated regularly apt-file's database will contain every files in
every package in debian.

-- 
Rémi Vanicat




Re: [O] MobileOrg: Push more than the current week?

2011-07-04 Thread Rémi Vanicat
Tassilo Horn tass...@member.fsf.org writes:

 Hi all,

 is there a way to push more than the current week using M-x
 org-mobile-push RET?

This should do it (Monday is a bad day to test it...)

#+begin_src emacs-lisp
  (defun rv-org-mobile-push ()
(interactive)
(let (org-agenda-start-on-weekday
   (string-to-number (format-time-string %w)))
  (org-mobile-push)))
#+end_src


[...]


-- 
Rémi Vanicat




[O] [PATCH] Don't call calendar-absolute-from-gregorian in org-diary-class

2011-07-03 Thread Rémi Vanicat
calendar-absolute-from-gregorian return a number of day. But the
result is used as if it was a (year month day) list.
---
 lisp/org-agenda.el |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 2bec518..66af554 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4879,10 +4879,8 @@ be skipped.
 
 This function is here only for backward compatibility and it is deprecated,
 please use `org-class' instead.
-  (let* ((date1 (calendar-absolute-from-gregorian
-(org-order-calendar-date-args m1 d1 y1)))
-(date2 (calendar-absolute-from-gregorian
-(org-order-calendar-date-args m2 d2 y2)))
+  (let* ((date1 (org-order-calendar-date-args m1 d1 y1))
+(date2 (org-order-calendar-date-args m2 d2 y2))
 (d (calendar-absolute-from-gregorian date)))
 (org-class
  (nth 2 date1) (car date1) (nth 1 date1)
-- 
1.7.5.4






Re: [O] [FEATURE] mobile-org on android don't show the hours of the event

2011-06-07 Thread Rémi Vanicat
Carsten Dominik carsten.domi...@gmail.com writes:

 Hi Remi,

 On Apr 3, 2011, at 1:45 PM, Rémi Vanicat wrote:

 Hello list,
 
 When looking at the agenda on my phone, I can't see the hours of the
 events I'm looking at. It seem the information is available (it's in the
 agenda.org that is used by android's mobile-org to show, but I can't
 understand how to make my android phone)
 
 There is a patch to org-mobile.el that make the times visible on my
 phone. I don't know how it will shine on others phone (I've no iphone to
 test it), and even if the choice to hide this is seen as a feature for
 some. 
 

 Could you please show an example?  Show us an entry in the Org file,
 what it looks like on an iphone (if possible) and what it looks like
 on your Android.  

The entry in tho org-file is:

#+begin_src org-mode
 10:15-11:15 Seconde 1 I15
 :PROPERTIES:
 :ID:   95e9b4c0-d4cc-4fb0-a451-f9d566700d48
  :END:
 %%(org-diary-class 01 09 2010 11 06 2011 1 51 52 08 09 16 17)
#+end_src


The entry in the generated agenda.org is:
#+begin_src org-mode
***  Seconde 1 I15beforecours:  10:15-11:15/before
   %%(org-diary-class 01 09 2010 11 06 2011 1 51 52 08 09 16 17)
   :PROPERTIES:
   :ORIGINAL_ID: 95e9b4c0-d4cc-4fb0-a451-f9d566700d48
   :END:
#+end_src

On my android, in the Agenda View it appear as

Seconde 1 I15

It appear correctly as 

10:15-11:15 Seconde 1 I15

in the view of cours.org 

 Only then we can judge if this is an issue
 with MobileOrg for Android, or with Org-mode itself.

 - Carsten

 From 0ce98d4f5606cade97edfc4165bf1119e1fcb1ff Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= vani...@debian.org
 Date: Sun, 3 Apr 2011 11:36:02 +0200
 Subject: [PATCH] Show the time in org-mobile agenda.
 
 ---
 lisp/org-mobile.el |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)
 
 diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
 index 83462f0..af3c8b1 100644
 --- a/lisp/org-mobile.el
 +++ b/lisp/org-mobile.el
 @@ -597,7 +597,7 @@ The table of checksums is written to the file 
 mobile-checksums.
 
 (defvar org-mobile-creating-agendas nil)
 (defun org-mobile-write-agenda-for-mobile (file)
 -  (let ((all (buffer-string)) in-date id pl prefix line app short m sexp)
 +  (let ((all (buffer-string)) in-date id pl prefix line app short m sexp 
 time)
 (with-temp-file file
   (org-mode)
   (insert #+READONLY\n)
 @@ -630,6 +630,7 @@ The table of checksums is written to the file 
 mobile-checksums.
(get-text-property (point) 'org-marker)))
(setq sexp (member (get-text-property (point) 'type)
   '(diary sexp)))
 +  (setq time (get-text-property (point) 'time))
(if (setq pl (text-property-any (point) (point-at-eol) 'org-heading 
 t))
(progn
  (setq prefix (org-trim (buffer-substring
 @@ -638,6 +639,8 @@ The table of checksums is written to the file 
 mobile-checksums.
pl
(point-at-eol
  (delete-region (point-at-bol) (point-at-eol))
 +(when time
 +  (insert time  ))
  (insert line before prefix /before)
  (beginning-of-line 1))
  (and (looking-at [ \t]+) (replace-match )))
 -- 
 1.7.4.1
 
 
 -- 
 Rémi Vanicat

 - Carsten




-- 
Rémi Vanicat



Re: [O] Org Contacts, Gnus and Yasnippet Not Playing Nicely

2011-05-24 Thread Rémi Vanicat
Ian Barton li...@manor-farm.org writes:

 On 24/05/11 11:21, Tassilo Horn wrote:
 Ian Bartonli...@manor-farm.org  writes:

 Hi Ian,

 I am trying to set up Org Contacts and gnus. Org Contacts suggests
 that pressing +Tab  in the To: field in a message buffer should
 offer a list of tags from my contacts file. However, I just get a Tab.


[...]


 Thanks Tassilo. I am using Emacs 23.2.1. `C-h k TAB' shows:

 TAB (translated from tab) runs the command yas/expand, which is an

[...]


For those (like me) that stay with old Emacs 23, this will fix it:

#+begin_src emacs-lisp
  (defun set-yas/fallback-behavior ()
(setq yas/fallback-behavior '(apply completion-at-point)))
  
  (add-hook 'message-mode-hook 'set-yas/fallback-behavior)
#+end_src


-- 
Rémi Vanicat




[O] [FEATURE] mobile-org on android don't show the hours of the event

2011-04-03 Thread Rémi Vanicat
Hello list,

When looking at the agenda on my phone, I can't see the hours of the
events I'm looking at. It seem the information is available (it's in the
agenda.org that is used by android's mobile-org to show, but I can't
understand how to make my android phone)

There is a patch to org-mobile.el that make the times visible on my
phone. I don't know how it will shine on others phone (I've no iphone to
test it), and even if the choice to hide this is seen as a feature for
some. 

From 0ce98d4f5606cade97edfc4165bf1119e1fcb1ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= vani...@debian.org
Date: Sun, 3 Apr 2011 11:36:02 +0200
Subject: [PATCH] Show the time in org-mobile agenda.

---
 lisp/org-mobile.el |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 83462f0..af3c8b1 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -597,7 +597,7 @@ The table of checksums is written to the file mobile-checksums.
 
 (defvar org-mobile-creating-agendas nil)
 (defun org-mobile-write-agenda-for-mobile (file)
-  (let ((all (buffer-string)) in-date id pl prefix line app short m sexp)
+  (let ((all (buffer-string)) in-date id pl prefix line app short m sexp time)
 (with-temp-file file
   (org-mode)
   (insert #+READONLY\n)
@@ -630,6 +630,7 @@ The table of checksums is written to the file mobile-checksums.
 		  (get-text-property (point) 'org-marker)))
 	  (setq sexp (member (get-text-property (point) 'type)
 			 '(diary sexp)))
+	  (setq time (get-text-property (point) 'time))
 	  (if (setq pl (text-property-any (point) (point-at-eol) 'org-heading t))
 	  (progn
 		(setq prefix (org-trim (buffer-substring
@@ -638,6 +639,8 @@ The table of checksums is written to the file mobile-checksums.
   pl
   (point-at-eol
 		(delete-region (point-at-bol) (point-at-eol))
+		(when time
+		  (insert time  ))
 		(insert line before prefix /before)
 		(beginning-of-line 1))
 	(and (looking-at [ \t]+) (replace-match )))
-- 
1.7.4.1


-- 
Rémi Vanicat


[Orgmode] Re: Diary in ical export

2011-02-02 Thread Rémi Vanicat
Bill Purcell will...@whpiv.net writes:

 Does anyone export Diary dates when exporting to ics from within
 org-mode? I thought this would be handled with  (setq
 org-agenda-include-diary t) but that doesn't do it form me.

I do export diary-style sexp date: not all diary date are exportable,
for more information look at the  icalendar.el.


this :
%%(diary-anniversary 12 20 2010) My Son's  %d%s Birthday.

don't seen to be exported,
but this:
%%(diary-anniversary 12 20 2010) My Son's  %d%s Birthday.
is exported

-- 
Rémi Vanicat


___
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] Add explicit time zone to datetime exported to ical.

2010-12-22 Thread Rémi Vanicat
When exporting to ical, using localtime  is incompatible with some
software, using explicit universal time may failed with daylight
saving time, so we need another possibility, that is localtime with
explicit timezone.
---
 lisp/org-icalendar.el |   30 +-
 1 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/lisp/org-icalendar.el b/lisp/org-icalendar.el
index d4034fe..1dfd3ed 100644
--- a/lisp/org-icalendar.el
+++ b/lisp/org-icalendar.el
@@ -194,12 +194,25 @@ When nil of the empty string, use the abbreviation 
retrieved from Emacs.
  (const :tag Unspecified nil)
  (string :tag Time zone)))
 
-(defcustom org-icalendar-use-UTC-date-time ()
-  Non-nil force the use of the universal time for iCalendar DATE-TIME.
-The iCalendar DATE-TIME can be expressed with local time or universal Time,
-universal time could be more compatible with some external tools.
+(defcustom org-icalendar-date-time-format :%Y%m%dT%H%M%S
+  format-string for exporting icalendar DATE-TIME.
+See `format-time-string' for a full documentation. The only
+difference is that `org-icalendar-timezone' is used for %Z
+
+Interesting value are:
+ - \:%Y%m%dT%H%M%S\ for local time
+ - \;TZID=%Z:%Y%m%dT%H%M%S\ for local time with explicit timezone
+ - \:%Y%m%dT%H%M%SZ\ for time expressed in Universal Time
+
   :group 'org-export-icalendar
-  :type 'boolean)
+  :type '(choice
+ (const :tag Local time :%Y%m%dT%H%M%S)
+ (const :tag Explicit local time ;TZID=%Z:%Y%m%dT%H%M%S)
+ (const :tag Universal time :%Y%m%dT%H%M%SZ)
+ (string :tag Explicit format)))
+
+(defun org-icalendar-use-UTC-date-timep () 
+  (char-equal (elt org-icalendar-date-time-format (1- (length 
org-icalendar-date-time-format))) ?Z))
 
 ;;; iCalendar export
 
@@ -641,12 +654,11 @@ a time), or the day by one (if it does not contain a 
time).
(setq h (+ 2 h)))
(setq d (1+ d
(setq time (encode-time s mi h d m y)))
-  (setq fmt (if have-time (if org-icalendar-use-UTC-date-time 
- :%Y%m%dT%H%M%SZ
- :%Y%m%dT%H%M%S)
+  (setq fmt (if have-time 
+   (replace-regexp-in-string %Z org-icalendar-timezone 
org-icalendar-date-time-format)
;VALUE=DATE:%Y%m%d))
   (concat keyword (format-time-string fmt time 
- (and org-icalendar-use-UTC-date-time 
+ (and 
(org-icalendar-use-UTC-date-timep)
   have-time))
 
 (provide 'org-icalendar)
-- 
1.7.2.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: Request for suggestions: multiple revision control systems/repositories + org

2010-12-19 Thread Rémi Vanicat
Robert P. Goldman rpgold...@sift.info writes:

 That is what I had done originally, but I thought mobile org required that 
 all the org files be in the same directory. Was I wrong about that?


I've org files in several directories, and in `org-agenda-files’, and
with a relatively recent org-mode files org-mobile just work. It is
`org-mobile-push’ and `org-mobile-pull’ that put a copy of all this in
`org-mobile-directory’.

-- 
Rémi Vanicat


___
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: Including current time in agenda

2010-12-06 Thread Rémi Vanicat
Suvayu Ali fatkasuvayu+li...@gmail.com writes:


 (defun jd:org-current-time ()
  Return current-time if date is today.
  (when (equal date (calendar-current-date))
(format-time-string %H:%M Current time (current-time

 And use %%(jd:org-current-time) in an entry.

 Wow, I overlooked this possibility.  Great.

 That is exactly the information I want to have, but this only inserts an
 entry in today's agenda without any timestamps.

you need to put the %%(jd:org-current-time) at the beginning of line,
with no space before it whatsoever.
-- 
Rémi Vanicat


___
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] Exporting org-diary-class to icalendar

2010-12-06 Thread Rémi Vanicat
Hello,

For those who want to use the org-diary-class diary sexp, and who want
to export it to ical (for google calendar consumption for example) Here
is a code that will do it. Beware that my timezone is hardwired in it
(search for Europe/Paris).

For now it doesn't take into account the skipped weeks, my first
implementation seemed to failed for an unknown reason.


--8---cut here---start-8---
(defun icalendar--convert-org-diary-class-to-ical (nonmarker entry-main)
  Convert `org-diary-class' diary entry to icalendar format.
NONMARKER is a regular expression matching the start of non-marking
entries.  ENTRY-MAIN is the first line of the diary entry.
  (if (string-match (concat nonmarker
%%(org-diary-class 
\\([0-9]+ [0-9]+ [0-9]+\\)  ;date start
\\([0-9]+ [0-9]+ [0-9]+\\)  ;date start
\\([0-9]+\\)  ;DAYNAME
\\([ 0-9]*\\)) 
\\(
\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?
\\(-\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?
\\)?
\\s-*\\(.*\\) ?$)
entry-main)
  (let* ((start (match-string 1 entry-main))
 (end   (match-string 2 entry-main))
 (dayname (read (match-string 3 entry-main)))
 (skip-week (match-string 4 entry-main))
 (remain-week ())
 (startisostring (icalendar--datestring-to-isodate start))
 (endisostring (icalendar--datestring-to-isodate end))
 (starttimestring (icalendar--diarytime-to-isotime
   (when (match-beginning 6)
 (match-string 6 entry-main))
   (when (match-beginning 7)
 (match-string 7 entry-main
 (endtimestring (icalendar--diarytime-to-isotime
 (when (match-beginning 9)
   (match-string 9 entry-main))
 (when (match-beginning 10)
   (match-string 10 entry-main
 (summary (icalendar--convert-string-for-export
   (match-string 11 entry-main
(icalendar--dmsg org-diary-class %s entry-main)

(setq skip-week (read (concat ( skip-week 
(when skip-week
  (setq remain-week (number-sequence 1 52))
  (mapc (lambda (el) (setq remain-week (delete el remain-week)))
skip-week))

(when starttimestring
  (unless endtimestring
(let ((time
   (read (icalendar--rris ^T0? 
  starttimestring
  (setq endtimestring (format T%06d
  (+ 1 time))
(list (concat \nDTSTART;TZID=Europe/Paris;
  (if starttimestring VALUE=DATE-TIME:
  VALUE=DATE:)
  startisostring
  (or starttimestring )
  \nDTEND;TZID=Europe/Paris;
  (if endtimestring VALUE=DATE-TIME:
  VALUE=DATE:)
  startisostring
  (or endtimestring )
  \nRRULE:FREQ=DAILY;INTERVAL=1
  ;BYDAY=
  (nth dayname '(SU MO TU WE TH FR SA))
  ;UNTIL=
  endisostring)
  summary))
  ;; no match
  nil))

(defadvice icalendar--convert-to-ical (around ical-for-org (nonmarker 
entry-main))
  (let ((res (icalendar--convert-org-diary-class-to-ical nonmarker entry-main)))
(if res
(setq ad-return-value res)
ad-do-it)))

(ad-activate 'icalendar--convert-to-ical)
--8---cut here---end---8---


-- 
Rémi Vanicat


___
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: MobileOrg Android 0.4.5

2010-11-23 Thread Rémi Vanicat
Hello,

Since  I upgrade to the 0.4.5 version of MobileOrg for android, I've
some new bugs with it: wen entering a sub item with no todo part, it
will fail. Something like the following example is enough.

* Notes
** Le petit cours d’autodéfense intellectuelle   :ATTACH:
   
[[~/org/data/qs/h4wq80kne0/Chroniques_de_Normand_Baillargeon.pdf][Chroniques]]
   :PROPERTIES:
   :Attachments: Chroniques_de_Normand_Baillargeon.pdf
   :ID:   qsh4wq80kne0
   :END:
** Sophisme
   - Ad hominem ::
 attaquer la personne qui argue plutôt que l'argument.
   - Argument d'autorité ::
 Argument mettant de l'avant des conséquences défavorables ­
 mettre de la pression sur qui doit prendre une décision en
 rappelant les conséquences terribles pour lui d'une certaine
 décision .
   - Appel à l'ignorance ::
 l'absence de preuve ou de témoignage n'est pas la preuve ou le
 témoignage que ce qui est recherché n'existe pas.



-- 
Rémi Vanicat


___
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: [PROPOSAL] Quick and easy installation instructions

2010-09-26 Thread Rémi Vanicat
Richard Riley rile...@gmail.com writes:

 You have no idea how pleased I am to hear you say that ... I sometimes
 wondered if I should go back to notepad ;) When asking the #emacs irc it
 seemed I was the only one in the world that constantly had issues. Of
 course mentioning Debian immediately saw me get the oh debian cold
 shoulder ... ;) LOL.

On Debian you should use update-info-dir ( as in
$ update-info-dir /path/to/infos
to generate the dir file. (This may work on others distribution too, I
don't know if it is a Debian specific tools)
[...]


-- 
Rémi Vanicat


___
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: Adding entries to Google calendar

2010-09-10 Thread Rémi Vanicat
Eric S Fraga ucec...@ucl.ac.uk writes:


 I haven't found a way to push an ics file to google; c

There exists Gcaldeamon (http://gcaldaemon.sourceforge.net/), but the
version as a bug that need a patch
(https://sourceforge.net/projects/gcaldaemon/forums/forum/643348/topic/3367835)
But there are still some problems with this.

I'm now trying to make it work, but it's not of release quality yet.
-- 
Rémi Vanicat


___
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] Allow iCalendar to use UTC for exported date-time.

2010-09-10 Thread Rémi Vanicat
Define a new variable org-icalendar-use-UTC-date-time that when
non-nil make icalendar exporter to use UTC date-time for better
compatibility with some other software (as GCALDaemon).
---
 lisp/org-icalendar.el |   16 ++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/lisp/org-icalendar.el b/lisp/org-icalendar.el
index c374e2e..1e3c798 100644
--- a/lisp/org-icalendar.el
+++ b/lisp/org-icalendar.el
@@ -194,6 +194,13 @@ When nil of the empty string, use the abbreviation 
retrieved from Emacs.
  (const :tag Unspecified nil)
  (string :tag Time zone)))
 
+(defcustom org-icalendar-use-UTC-date-time ()
+  Non-nil force the use of the universal time for iCalendar DATE-TIME.
+The iCalendar DATE-TIME can be expressed with local time or universal Time,
+universal time could be more compatible with some external tools.
+  :group 'org-export-icalendar
+  :type 'boolean)
+
 ;;; iCalendar export
 
 ;;;###autoload
@@ -634,8 +641,13 @@ a time), or the day by one (if it does not contain a 
time).
(setq h (+ 2 h)))
(setq d (1+ d
(setq time (encode-time s mi h d m y)))
-  (setq fmt (if have-time :%Y%m%dT%H%M%S ;VALUE=DATE:%Y%m%d))
-  (concat keyword (format-time-string fmt time)
+  (setq fmt (if have-time (if org-icalendar-use-UTC-date-time 
+ :%Y%m%dT%H%M%SZ
+ :%Y%m%dT%H%M%S)
+   ;VALUE=DATE:%Y%m%d))
+  (concat keyword (format-time-string fmt time 
+ (and org-icalendar-use-UTC-date-time 
+  have-time))
 
 (provide 'org-icalendar)
 
-- 
1.7.1



___
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: ical export - google calendar woes

2010-09-10 Thread Rémi Vanicat
Neal Thomison neal.thomis...@verizon.net writes:

 All,

 I'm experiencing one of those the last 10% of the problem takes 90% of
 the time moments.

 I'm doing a combined ical export over all of my .org files, which works
 fine. I then copy the resulting .ics file off to my web server to which
 I've pointed a Google calendar (an add by url calendar) which also
 works, after a fashion. The irritation is that no matter what I try and
 do, Google insists on seeing the calendar timezone as GMT, hence, all of
 my appointments are appearing 4 hours early (my TZ is EST5EDT but EST or
 America/Indianapolis or America/Indiana/Indianapolis all don't work
 either).

The patch I just send here
(http://article.gmane.org/gmane.emacs.orgmode/30207) should solve this
issue.


-- 
Rémi Vanicat


___
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: ical export - google calendar woes

2010-09-10 Thread Rémi Vanicat
Rémi Vanicat vani...@debian.org writes:


[...]

 The patch I just send here
 (http://article.gmane.org/gmane.emacs.orgmode/30207) should solve this
 issue.

Mmm sending mail too early

With this patch you have to set org-icalendar-use-UTC-date-time to t
for it to work.
-- 
Rémi Vanicat


___
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: [google] updated awk script for google to org conversion

2010-07-12 Thread Rémi Vanicat
Sven Bretfeld sven.bretf...@gmx.ch writes:


[...]


 2. Running the above script with cron, makes Emacs continually ask if
googlecalendar.org should really be edited, because the file had
changed on disk. So I put the whole thing into an Emacs function:


you could use auto-revert-mode:

  Toggle reverting buffer when file on disk changes.

  With arg, turn Auto Revert mode on if and only if arg is positive.
  This is a minor mode that affects only the current buffer.
  Use `global-auto-revert-mode' to automatically revert all buffers.
  Use `auto-revert-tail-mode' if you know that the file will only grow
  without being changed in the part that is already in the buffer.


[...]


-- 
Rémi Vanicat


___
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: Hide timestamps for several days time range in agenda

2010-07-12 Thread Rémi Vanicat
Julien Barnier jul...@no-log.org writes:

 Hi,

 I'm currently trying to use the agenda a bit more, but there is one thing I
 didn't manage :

 If i've got a several days timerange entry, such as the following :

 *** 2010-07-22 jeu.--2010-07-23 ven. Paris


[...]


 My question is : how do I hide the timestamps in these entries ? What I'd like
 to obtain would be simply :

What appear on the agenda is the title of entry, that is what is on ***
line. Just put the timestamp on another line: 

*** Paris
  2010-07-22 jeu.--2010-07-23 ven. 


___
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: Non-breaking space

2010-04-29 Thread Rémi Vanicat
Nicolas Girard nicolas.gir...@nerim.net writes:

 Hi,

 How can I typeset, for instance, 100 €, in such a way that, once
 exported in LaTeX, it gives: 100~€ (with a non-breaking space) ?

You can use the utf-8 non breaking space (on my keyboard it's
compose space space or alt-gr shift space or C-x 8 space)
-- 
Rémi Vanicat



___
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: Linking Mail ?

2010-04-29 Thread Rémi Vanicat
David Frascone d...@frascone.com writes:

 On Thu, Apr 29, 2010 at 9:08 AM, Matt Lundin m...@imapmail.org wrote:

 David Frascone d...@frascone.com writes:

  I finally got gnus working with my gmail account.  (I didn't want to
  try my work account first, because too many failed logins will lock it,
  and I have to call IT . . . Pain in the . . )
  But, in a nutshell, it is simply WAY too slow.

 Could you explain what was slow? I find Gnus to be as fast as any mail
 reader I've used, but it all depends on how one sets it up and whether
 one uses other processes to fetch mail:

 http://www.emacswiki.org/emacs/GnusSpeed


 It's slow because I use nnimap :)

A good solution for gnus+imap is
http://sachachua.com/wp/2008/05/geek-how-to-use-offlineimap-and-the-dovecot-mail-server-to-read-your-gmail-in-emacs-efficiently/
 

Of course, it's way to much complicated, but it work.

-- 
Rémi Vanicat



___
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: Support (or not) for Emacs 21, and XEmacs

2010-04-16 Thread Rémi Vanicat
Sebastian Rose sebastian_r...@gmx.de writes:

 * One git question:

 When I pulled, I got the message, that there is a new branch. But that
 branch did not show up in the list `git branch' gives me.

use git branch -r (or git branch -a) to list remote (or all branch)

 Then I did:
 sh$ git checkout origin/remove-compatibility-code

better to create a locale branch tracking the remote one with:
git checkout -b remove-compatibility-code origin/remove-compatibility-code 

Then git pull will work as expected.

[...]
 While this is all fine, and I'm on `remove-compatibility-code' now: will
 that branch be updated when I pull the next time?

Not with you described config.
-- 
Rémi Vanicat



___
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: Where ends a subtree?

2010-03-28 Thread Rémi Vanicat
Franz Heuser spamcatcherhe...@web.de writes:

 Hi,

 I wonder where an subtree ends. My work flow is as follow:

When a headline of same level or lower level began

 * headline
   some text... 

 Know I notice a ToDo entry that is link to the text. So i type

 ** ToDo something useful
notes about the ToDo

   ... more about the headline.

Org mode believe that ... more about the headline is inside
** ToDo something useful
I know no way to change this: you must put every text that is only in
* headline and not in the ** ToDo subtree before any subtree


   
 My problem is, that '... more about the headline' is hidden, when the
 ToDo entry is folded. It belongs syntactically to ToDo, but semantically
 to the headline. 

 Is there an end Tag or something like that? Where i can say: Here Ends
 the ToDo entry, what comes now belong to the last headline?

 Any Idea? Or a hint, how i can use org-mode another, better way? 

Add your todo at the end of the headline? 
put a ** rest of the headline subtree after the todo ?


-- 
Rémi Vanicat



___
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: Where ends a subtree?

2010-03-28 Thread Rémi Vanicat
Carsten Dominik carsten.domi...@gmail.com writes:

 Is it just me who cannot make out what either of these posters is
 trying to say?

I believe I understand what Franz Heuser wanted. I've no idea what Adam's
response really mean.


 - Carsten

 On Mar 27, 2010, at 7:32 PM, Adam wrote:

 On Saturday 27 March 2010 05:27 am, Franz Heuser wrote:
 Hi,


[...]


-- 
Rémi Vanicat



___
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] using tramp when tangling

2010-03-17 Thread Rémi Vanicat
Maurizio Vitale m...@cuma.i-did-not-set--mail-host-address--so-tickle-me 
writes:

 I'd find useful to use tramp syntax in the :tangle specification.
 In my case it would be to specify sudo when tangling config files that
 are supposed to go to areas not writable by the user running Emacs. 
 Something like:

 #+begin_src sh :tangle /sudo::/etc/my_config_file
 ...
 #+end_src

 other people might be interested in remote access to tangle targets.

 Is there a way to achieve the above?

 If I try to tangle the above, I get something along the lines that
 tramp cannot append to file. Would it be possible to have org-babel to
 (optionally) tangle to a buffer and then save to file in one go?

It's a bug of append-file. We could not use it: (code by Alexey Voinov,
stolen from magit):

--8---cut here---start-8---
diff --git a/contrib/babel/lisp/org-babel-tangle.el 
b/contrib/babel/lisp/org-babel-tangle.el
index dd76195..c4ea0d8 100644
--- a/contrib/babel/lisp/org-babel-tangle.el
+++ b/contrib/babel/lisp/org-babel-tangle.el
@@ -127,7 +127,12 @@ exported source code blocks by language.
 (insert (concat she-bang \n))
 (setq she-banged (cons file-name she-banged)))
   (org-babel-spec-to-string spec)
-  (append-to-file nil nil file-name))
+ (let ((content (buffer-string)))
+   (with-temp-buffer
+ (insert-file-contents file-name)
+ (goto-char (point-max))
+ (insert content)
+ (write-region nil nil ignore-file
 ;; update counter
 (setq block-counter (+ 1 block-counter))
 (add-to-list 'path-collector file-name)
--8---cut here---end---8---


-- 
Rémi Vanicat



___
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: [OT] Emacs for email?

2009-12-02 Thread Rémi Vanicat
Eric S Fraga ucec...@ucl.ac.uk writes:

[...]

 The summary is 5 actions when dealing with new email:

 * Delete: just get rid of it (or archive it)
 * Delegate: get someone else to deal with it
 * Respond: if it takes just a few minutes, do it right now
 * Defer: put it on a todo list, archive it, and deal with it later
 * Do: handle whatever the email actually needs you to do

 The aim is to not have to go back to your inbox to see what you have
 to deal with -- that's what org-mode (or whatever) is for.  Too much
 time is wasted trawling through huge inboxes looking for actions to
 respond to which means you're using an inbox as a todo list.  This is
 not effective.


To come back to the initial discussion, note that gnus is well adapted
for this: by default, a read mail do not show-up anymore, making
everything automatically archived. 

[...]

-- 
Rémi Vanicat



___
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: [OT] Emacs for email?

2009-12-02 Thread Rémi Vanicat
David Neu da...@davidneu.com writes:

[...]

 Anyone have any experience using Gnus with Gmail via IMAP?


I've a somewhat complicated setup for this.

It's server three purpose
- I want a copy of my mail locally for speed and backup
- I want my mail on gmail to been accessible from everywhere
- I want both to be synchronized


So I use offlineimap to have a local maildir that is a mirror of Gmail's
imap view of my mail. But gnus support of maildir is terrible, and I
want gnus because I want only one software for mail and news, and I'm
used to gnus.

So I use a local imap server (dovecot) to read my mail So:

gmail --- offlineimap --- maildir --- dovecot --- gnus

It is complicated, but I can read my mail from any computer, using
gnus+IMAP if it's one of my computer, and gmail webmail for the rest. 


-- 
Rémi Vanicat



___
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: [OT] Emacs for email?

2009-12-02 Thread Rémi Vanicat
Russell Adams rlad...@adamsinfoserv.com writes:

 On Tue, Dec 01, 2009 at 08:56:08PM -0600, Russell Adams wrote:
  - Mutt automatically changes my email address depending on the
recipient or folder according to a series of roles

 Not to reply to myself, but one item I've found lacking in other
 mailreaders and one of my primary reasons for using mutt is the
 concept of roles.

 Do any of the emacs readers support that effectively from someones
 direct experience?

I'm not sure what a role is, but with gnus, you can change you email
address depending on the folder (group in gnus speak) or the topic
(topic are a hierarchical organization of group). For this you use
posting-style.

-- 
Rémi Vanicat



___
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: Cut the lines in the end

2009-09-14 Thread Rémi Vanicat
Adrien Poupin adrien.pou...@gmail.com writes:

 Hi everybody,

 I just discovered org-mode and really enjoy it. And I would like to use it
 especially for my writing tasks. To do that I need the end of lines to break
 in the end.

You want long line to not be truncated by org mode: you have to set
org-startup-truncated to nil, by example adding

(setq org-startup-truncated nil) somewhere in you .emacs

Note that tables look terrible when wrapped.

You might also want to set word-wrap to t if you don't want word to be
cut in their middle, but line to be only cut between word (when possible
of course)

-- 
Rémi Vanicat



___
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