Re: Improving org-contacts performance (and state of development in general)

2020-09-07 Thread Julien Danjou
On Sun, Sep 06 2020, Bastien wrote:

Hi everyone,

> I'm copying Julien, the original author of org-contacts.el, to check
> if he plans to maintain org-contacts.el further and if he's okay for
> someone to take over.

I don't plan to do anything, feel free to take over!

Cheers,
-- 
Julien Danjou
# Free Software hacker
# https://julien.danjou.info



Re: [O] [contacts] No completion in Gnus

2011-10-05 Thread Julien Danjou
On Wed, Oct 05 2011, Jason Dunsmore wrote:

 Is there anything else I'm missing?

Are you using Emacs 24?

-- 
Julien Danjou


pgpIQEexbS42M.pgp
Description: PGP signature


Re: [O] [dev] Reduce warnings on org-contacs compilation

2011-06-27 Thread Julien Danjou
On Mon, Jun 27 2011, Michael Markert wrote:

 I noticed two easily fixable compile warnings. The first one tackles the
 wl code and the second includes cl on compilation.

Thanks, merged!

-- 
Julien Danjou
❱ http://julien.danjou.info


pgploAdywfnK8.pgp
Description: PGP signature


Re: [O] [patch] Do not run flyspell checks on org keywords

2011-06-01 Thread Julien Danjou
On Tue, May 24 2011, Sébastien Delafond wrote:

 Here is a small patch that prevents flyspelle from checking all the Org
 keywords. This is especially useful when using a dictionary other than
 english.

Pushed.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp9F0twLEmqi.pgp
Description: PGP signature


Re: [O] Some remarks on org-contacts

2011-06-01 Thread Julien Danjou
On Wed, Jun 01 2011, Sven Bretfeld wrote:

 - The buffers displaying the contacts file(s) get the changed mark
   whenever something is done with org-contacts. Even if only a name was
   searched and no changes have happened at all. Is it a bug or some
   feature that I don't understand?

I don't see this behaviour, so I don't think it's related to
org-contacts directly. One of the only thing it changes is the last mail
seen from a user, when used with Gnus. But a search does not do any
modification.

 - The last-read-mail property is a good idea, but it has the
   disadvantage of changing the file. People using Dropbox or other
   synchronization tools have a problem here, because they have to
   remember to manually save the file before they start to work on
   another computer. There should be an auto-save-hook or something
   similar. 

Sounds dangerous, but you can do it yourself anyhow.

 - What I deem most important: For quite a few contacts most people will
   use to have more than one email address. Org-contacts stores all
   addresses under the same property with no preference on one of them
   (unlike BBDB which uses the first entry as a default for completion).
   It is annoying to hit tab 3 to 4 times before the To-header is
   complete. It would perhaps be best to have only one address in the
   EMAIL property and to store alternate addresses in another property
   (SECONDARY_EMAIL). The SECONDARY_EMAIL could be called by a special
   function that could be set to a key different from TAB (maybe C-u
   TAB). Maybe it is even possible to expand to the default address by
   hitting TAB once, and to give a list of the other addresses by hitting
   TAB once again.

The Emacs completion code is not that nice. But using only the first
address in EMAIL is doable.

 - What can you do with ICONS? Arte they only for chatting? It would be
   nice to have a small window automatically opening below an Article
   buffer in Gnus that displays information about the author including
   his/her image.

This properties has been set to be used in `org-contacts' search.
Problem is the format in `org-contacts' is not changeable because the
way it is written in org.el itself. I've tried to enhance that (there's
a branch in the org repository about that) but it's really too much
work to me right now, so I abandonned for now that part.

 - Email, phone numbers and postal address should be displayed in the
   Agenda buffer when a name is searched by org-contacts. Maybe it would
   be possible to display different information by hitting certain keys:
   m: mobile-phone, e: email, b: birthday, a: all etc. At the
   moment one has to switch on follow-mode to display the information. I
   deem this not very beautiful. For my taste, the look-and-feel of an
   org-file with lots of property lines is not an aesthetic pleasure. A
   tabular output (including a picture of the person) would be much
   nicer.

That is what was planning, as I stated just above. But this is far from
doable right now and would require a major rewrite of some part of Org
to be done correctly.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpHnzWXpmFkT.pgp
Description: PGP signature


Re: [O] org-contacts: error on message startup

2011-05-26 Thread Julien Danjou
On Wed, May 25 2011, Sven Bretfeld wrote:

 Debugger entered--Lisp error: (void-variable completion-at-point-functions)
   add-to-list(completion-at-point-functions 
 org-contacts-message-complete-function)
   (lambda nil (add-to-list (quote completion-at-point-functions) (quote 
 org-contacts-message-complete-function)))()
   run-hooks(text-mode-hook message-mode-hook)
   apply(run-hooks (text-mode-hook message-mode-hook))
   run-mode-hooks(message-mode-hook)
   message-mode()
   message-pop-to-buffer(*mail* nil)
   message-mail()
   gnus-group-mail(nil)
   call-interactively(gnus-group-mail nil nil)

 Have I missed a point in the setup? I just added (require 'org-contacts)
 and threw out all bbdb related code from .emacs and .gnus.el. Is there
 anything else to do?

I've pushed a fix so you won't get the error in Emacs  23.3. But you
won't get the completion neither. That would require writing a different
completion function, which I don't plan to do soon.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp3A3Vll3ZUS.pgp
Description: PGP signature


Re: [O] org-contacts: error on message startup

2011-05-26 Thread Julien Danjou
On Thu, May 26 2011, Sven Bretfeld wrote:

 It is definitely not there in 23.1, the emacs-snapshot package which
 AFAIK is the orebokech version that seems not to have been updated since
 quite a while. I have checked the sources of minibuffer.el and it does
 not define completion-at-point-functions. 

orebokech version is dead.

 This is a pity since Emacs Snapshot is the most actual you can get on
 Ubuntu without adding foreign repos or compiling. 

emacs-snapshot in Ubuntu is a joke.

 I have tried to use Emacs 24 from the emacs.naquadah.org repository
 which, however, does not contain a Natty section. With the Maverick
 packages org-contacts works.

The Maverick ones should work flawlessly on Natty anyhow, as you
discovered.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpz7mChjEtZe.pgp
Description: PGP signature


Re: [O] Completing with anything

2011-05-24 Thread Julien Danjou
On Tue, May 24 2011, Stefan Monnier wrote:

 I've now added a :exit-function property that
 completion-at-point-functions can return which is a function that gets
 called when completion is finished.  It operates outside of the
 completion-table, so has access to the buffer text and can do things
 like abbrev-expand.

 It gets a status argument which tells it whether the completion is
 `exact' (basically, it's valid according to the completion-table, but
 there may be further completions available), `sole' (it's the only
 completion), and `finished' (not only it's the sole completion, but the
 user is not expected to want to change it).  `sole' is used by cycling,
 so the :exit-function can call abbrev-expand when the status is
 `finished' and it won't interfere with cycling (which simply won't
 benefit from abbrev-expansion).

That sounds really tremendous Stefan! Just what was needed.

Thanks a lot.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpSrPZ76Mjx7.pgp
Description: PGP signature


Re: [O] org-contacts and birthdays without year

2011-05-17 Thread Julien Danjou
On Tue, May 17 2011, Le Wang wrote:

 It seems that an EMAIL property indicates the current heading is a
 contact.  How can I store contacts that I don't have an e-mail for?

You change that rule. It's a defcustom, simply set it to be there's an
EMAIL or a BIRTHDAY.

 Is it possible to specify birthdays without year?  I often want to jot
 down someone's birthday so I'm not surprised next year, but don't want
 to ask them how old they are.  :)

Not really :(

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpovxQlnteg0.pgp
Description: PGP signature


Re: [O] Adjust org-contacts-wl functions to used standards

2011-05-12 Thread Julien Danjou
On Thu, May 12 2011, Michael Markert wrote:

 I missed a nasty bit: `org-contacts-wl-get-name-email' was not updated
 and contained another bug.
 :(

Michael,

This does not apply as it is and your previous set of patches does not
seems to have made it. I never received it. Is it me or?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpsN5u0yBuJp.pgp
Description: PGP signature


Re: [O] Completing with anything

2011-05-04 Thread Julien Danjou
On Wed, May 04 2011, Stefan Monnier wrote:

 So at least cycling-completion seems fundamentally incompatible with
 this idea of abbrev-expansion-after-completion, at least if you want to
 allow arbitrarily complex abbrevs like skeletons.

Indeed, this is a real problem.

 Could you give me an idea of what kind of abbrevs the code should try
 to accommodate?

IIUC, your nic/nicolas example perfectly fits in. This is what I tried
to achieve in message-mode (using org-contacts as the database).

Maybe what's needed is a different completion type, which would be a
built on top of both completion and abbrev. It would try to complete
based on an abbrev list until there's no possible doubt about the alias
the users wants, and finally would do the expand-abbrev operation.

At least, that sounds like a completion mode we would need in
message-mode case.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpqaO08ZXoM6.pgp
Description: PGP signature


Re: [O] Completing with anything

2011-05-03 Thread Julien Danjou
On Sun, Mar 27 2011, Michael Markert wrote:

 Attached code handles both capturing from summary and message
 buffer.

I've added this file into contrib, beside org-contacts.el

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpYWL7yrdunj.pgp
Description: PGP signature


Re: [O] Completing with anything

2011-04-12 Thread Julien Danjou
On Tue, Apr 12 2011, Stefan Monnier wrote:

 Hmm... good point, doing it in completion-choices is not reliable, tho
 using as completion table something like:

 (lambda (string pred action)
   (let ((res (complete-with-action action completion-choices string pred)))
 (if (and (eq action nil)
  (assq (if (eq res t) string res) expansion-alist))
 (cdr (assq (if (eq res t) string res) expansion-alist))
   res)))

 should work OK for prefix completion, but that means using the expansion
 by hand rather than via expand-abbrev, which may not be an option.

Yeah. That does not looks like a simple/good option.
As it stands, I guess the bbdb solution to return a function doing the
replacement rather than trying to return a list and conform with the
(current) way of doing completion is really simpler, unfortunately. :(

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp0LZN7uU1rU.pgp
Description: PGP signature


Re: [O] Re: Completing with anything

2011-04-11 Thread Julien Danjou
On Sun, Apr 10 2011, Stefan Monnier wrote:

 So now, I wonder: wouldn't it be a good idea to add a call to
 `expand-abbrev' just after `completion-at-point' is being called?

 After completing an abbrev name, yes, but otherwise I don't think so.
 I.e. why don't you add such a call to
 org-contacts-message-complete-function?

Because this one return (list start end completion-choies), and does not
do anything else. I can't do it myself using the current completion
mechanism, IIUC.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpMKDSiwOF0L.pgp
Description: PGP signature


Re: [O] Re: Completing with anything

2011-04-11 Thread Julien Danjou
On Sat, Apr 09 2011, Michael Markert wrote:

 No, but if it's necessary (or helping) I'll do so.

Well, since org-contacts is part of contrib I think it's not necessary,
so I'll merge it as it is unless Bastien says I'm wrong.

Thanks.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp2pZCu47Ffu.pgp
Description: PGP signature


Re: [O] Re: Completing with anything

2011-04-09 Thread Julien Danjou
On Sun, Mar 27 2011, Michael Markert wrote:

 Attached code handles both capturing from summary and message
 buffer.

I'd like to merge this, but I have to ask: did you signed the copyright
assignement papers?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpS5hlzc8pzM.pgp
Description: PGP signature


Re: [O] Re: Completing with anything

2011-04-09 Thread Julien Danjou
On Mon, Mar 21 2011, Julien Danjou wrote:

 I see, that makes sense. I think that completion is not what I want to
 use as Tassilo suggested. I've been that way just because this is what
 is used in `message.el'. Maybe it requires a change too to turn towards
 an `abbrev' use. :)

Actually, it does not require any change, but there is an issue I'm not
sure how to resolve.

On tab, message-mode calls `completion-at-point-function', which calls
first my `org-contacts-message-complete-function' and then
`message-completion-function'.

If you type someone's nickname, `org-contacts-message-complete-function'
will not return any match. So I hacked it to return only the nickname,
like 'jtab' would return 'jd'.

Then, using the abbrev table, I manage to make jd expand to my
name+email but I have to press space. If I press tab, the completion
kicks in, and re-complete 'jd' to 'jd', and `expand-abbrev' is never
called. I need to press 'space', which is not very handy.

It seems that completion and abbrev are (too much) orthogonal: you
cannot easily complete an item from the abbrev table using completion.

So now, I wonder: wouldn't it be a good idea to add a call to
`expand-abbrev' just after `completion-at-point' is being called?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpf6CXn8xuGL.pgp
Description: PGP signature


Re: [O] Re: Completing with anything

2011-03-25 Thread Julien Danjou
On Thu, Mar 24 2011, Cian wrote:

 Can you separate out the gnus specific code at some point. If I ever
 get any time (two small children and a day job, so big if) I'd like to
 integrate it into Wanderlust. But currently the code assumes that
 you're using gnus.

Sure, I'll add that to my todo list.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpkJD0trazLk.pgp
Description: PGP signature


Re: [O] Re: Completing with anything

2011-03-23 Thread Julien Danjou
On Tue, Mar 22 2011, Eric S Fraga wrote:

 How do you invoke it?  I am currently struggling with the interactions
 between .mailrc (emacs mail aliases, expanding as abbrevs) and bbdb
 (expanding with TAB).  This is partly why I haven't even considered
 using org-contacts yet...

I promise you'll soon have both features in org-contacts. ;)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpGe2Rb746pd.pgp
Description: PGP signature


Re: [O] [Patch] For the Manual: using org-crypt

2011-03-23 Thread Julien Danjou
On Fri, Mar 18 2011, Ian Barton wrote:

 Apologies in advance this isn't a real patch:) This is the entry for the
 manual describing org-crypt.el. I was going to put it in
 http://orgmode.org/manual/Miscellaneous.html#Miscellaneous However, since I
 am not a Tex user, I rapidly came to the conclusion that if I tried to patch
 org.texi, I would probably do more harm than good.

 I have also pushed a short Tutorial to Worg about using encryption with org
 files.

It seems nobody answered you: I think that if you do not try to provide
this in form of a patch it will be forgotten.
Or could somebody help integrating this into a patch to org.texi maybe?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpdKppigIth9.pgp
Description: PGP signature


Re: [O] Re: Completing with anything

2011-03-23 Thread Julien Danjou
On Wed, Mar 23 2011, Eric S Fraga wrote:

 Will you provide a means to capturing email addresses from emails
 directly into an org-contacts db, as bbdb does with : and ; (the
 latter for annotation of the entry)?  That would be necessary for any
 move away from bbdb, IMO.

This is already provided.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpHtGiC0glqQ.pgp
Description: PGP signature


Re: [O] Re: Completing with anything

2011-03-22 Thread Julien Danjou
On Tue, Mar 22 2011, Tassilo Horn wrote:

 So Julien, maybe you want a `try-expand-org-contact' function, and add
 that to `hippie-expand-try-functions-list', and bind `hippie-expand' to
 some key.

I want to integrate into message-mode. So I don't want to bind any key,
nor rebind TAB. :)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpwGcV8qLyTq.pgp
Description: PGP signature


[O] Re: Completing with anything

2011-03-21 Thread Julien Danjou
On Fri, Mar 18 2011, Stefan Monnier wrote:

 There's a misunderstanding: AFAIK the patch sent by Tassilo does not
 make the completion-at-point-function return a function that performs
 completion but does properly return completion data (i.e. region start,
 region end, and completion table), part of which happens to be
 represented by a function.
 I.e. this is not one of the discouraged cases.

You're right, indeed!

But I do not see anywhere the fact that the completion collection can be
a function.

I only found the sentence:

It would be consistent and clean for completion functions to allow
lambda expressions (lists that are functions) as well as function
symbols as COLLECTION, but this is impossible.

in (elisp) Programmed Completion.

Not sure it's really related to completion-at-point-functions, but well,
it's not making things clearer for me anyhow.

 - Make completing code allows to replace the region being completed with
   somethig that does not match at all.

 AFAIK that's already the case, tho it depends on lots of factors, such
 as what you mean by completing code.

I meant the code in minibuffer.el

To be clear, the things that disturbs me is that this simple test case
does not work as I would like it to:

#+begin_src emacs-lisp
(defun jd:completion-at-point-test ()
(list (point-at-bol) (point) '(Steve John)))
(add-to-list 'completion-at-point-functions 'jd:completion-at-point-test)
#+end_src

If you run that code into a buffer, and then type in this same buffer:

L

And try to complete that L with M-x completion-at-point, it will say
No match.

But if you do:
#+begin_src emacs-lisp
(defun jd:completion-at-point-test ()
(list (point-at-bol) (point) '(Lionel Steve John)))
(add-to-list 'completion-at-point-functions 'jd:completion-at-point-test)
#+end_src

And try to complete a L, it will complete to Lionel. Just because
completion-at-point is trying to be smarter than my function,
re-guessing which items from the collection are good candidates.
Something my function already does (well, not in this example, but in
real life).

This is why I'm (kindly) finger pointing the completing code in
minibuffer.el, but I might be wrong (and hope to be! :-)).

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpWdiximC2g7.pgp
Description: PGP signature


[O] Re: Completing with anything

2011-03-21 Thread Julien Danjou
On Mon, Mar 21 2011, Tassilo Horn wrote:

 Sorry, but I totally missed the point of the example. :-)

Damn it! I tried hard. :-)

 Isn't completion of L to Lionel at the beginning of a line exactly
 what your completion function should enable?

No. To give a even more concrete application of my example: I'd like
org-contacts to give completion for email addresses or nicknames. If you
have a contact entry like:
- Name: Emmett Brown
- Nickname: doc
- Email address: gigaw...@delorean.com

What I'd like to do is that if the user enters:

 docTAB

is that it can be completed to
   Emmett Brown gigaw...@delorean.com

But if I return such an item in COLLECTION, it just gets ignored because
Emmett Brown gigaw...@delorean.com does not match doc.

This was the point of my example in the my previous email. To just prove
that completion-at-point is being too much picky about which collection
item are valid candidate for completion. I'd like it to just trust what
my function returns. :-)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpoBHZzqTxXG.pgp
Description: PGP signature


Re: [O] [PATCH] Wash output of org-encrypt-entry, take 3

2011-03-21 Thread Julien Danjou
On Fri, Mar 18 2011, Óscar Fuentes wrote:

 The first line (Version:...) can change from machine to machine and over
 time (as gpg is updated with a new version.) This is problematic when
 the file is stored under version control, because as you decrypt and
 encrypt an entry that line will change and create differences among the
 file on the workspace and the file stored on VC.

This is true only if you modify the content of the entry, so I'm not
sure there's a real harm done here.

 Second, the empty line just wastes space and it is plain ugly once we
 remove the first one with the Version text.

This line is required by the protocol.

 Finally, on some systems (mostly Windows) depending on how your Emacs
 and gpg are configured, ^M characters may appear at the end of every
 line of gpg output once it is inserted on the Emacs buffer. This happens
 when the buffer uses Unix line-endings but gpg uses DOS line-endings.

I do not feel the right place and/or way to fix and encoding bug.

 +(defun org-crypt-wash-encrypted-string (str)
 +  Remove superfluos and annoying text from the encrypted string.
 +  (with-temp-buffer
 +(insert str)
 +(goto-char (point-min))
 +(while (re-search-forward ^Version:.*$\\|\^M\\|^\n nil t)
 +  (replace-match ))
 +(buffer-string)))
 +

Ultimately, maybe simpler with `string-match'.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpN9ZtwttqKb.pgp
Description: PGP signature


[O] Re: Completing with anything

2011-03-21 Thread Julien Danjou
On Mon, Mar 21 2011, Stefan Monnier wrote:

 That sentence is obsolete.  Sorry 'bout that.  A collection can be
 any function, including a lambda expression.

Should I open a bug about that to keep track of it?
(asking in case you're already working on a fix or not)

 completion-at-point-function is meant to provide just the possible
 completion candidates for the kind of object being completed.
 Which ones of these will be actually considered will then depend on the
 actual text in the buffer and the completion-styles in use.

I see, that makes sense. I think that completion is not what I want to
use as Tassilo suggested. I've been that way just because this is what
is used in `message.el'. Maybe it requires a change too to turn towards
an `abbrev' use. :)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpsOwDbOtuVG.pgp
Description: PGP signature


Re: [O] Re: Problem with agenda and diary

2011-03-18 Thread Julien Danjou
On Thu, Mar 17 2011, Nick Dokos wrote:

 I can reproduce it just by setting org-agenda-include-diary to t
 (Org-mode version 7.5 (release_7.5.60.g706a.dirty))

Well, I can't. :(

 x is the St.Patrick's Day entry: #( Diary: St. Patrick's Day 0 2
 (org-category #5=diary tags nil org-highest-priority 65
 org-lowest-priority 67 time-of-day nil duration nil effort nil
 effort-minutes nil txt #4=#(St. Patrick's Day 0 17 (org-heading t)) time
 #1= extra #1# dotime time org-heading t type #3=diary date #2=(3 17
 2011) face org-todo) 2 14 (org-category #5# tags nil org-highest-priority 65
 org-lowest-priority 67 time-of-day nil duration nil effort nil
 effort-minutes nil txt #4# time #1# extra #1# dotime time org-heading t type
 #3# date #2# face org-agenda-diary) 14 31 (org-heading t org-category #5#
 tags nil org-highest-priority 65 org-lowest-priority 67 time-of-day nil
 duration nil effort nil effort-minutes nil txt #4# time #1# extra #1# dotime
 time type #3# date #2# face org-agenda-diary))

 re is the empty string so indeed it is not nil: 

Well, I do not see how re can be  since:
(setq re (get-text-property 0 'org-todo-regexp x))

And x has no 'org-todo-regexp property.

Since you seems familiar with the debugger, could you try to see what's
happening?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp4FlLfRJf4f.pgp
Description: PGP signature


Re: [O] Re: Problem with agenda and diary

2011-03-18 Thread Julien Danjou
On Thu, Mar 17 2011, Dan Griswold wrote:

 Mine is somewhat fixed. The first time I try org-agenda-list I get:

   org-format-agenda-item: Args out of range: -1, 0

 but if I try it a second time, right away, it works.

This is a silly mistake I made yesterday, it's fixed, sorry for the
noice.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp7OeNY7vrt5.pgp
Description: PGP signature


Re: [O] Re: Problem with agenda and diary

2011-03-18 Thread Julien Danjou
On Fri, Mar 18 2011, Nick Dokos wrote:

 That was of course before you took out the concat in 9216453a388 - after
 that change, there is no problem: it was doing (concat nil) == 

What's weird is that that concat has not been introduced by my recent
patches. It clearly seems wrong, but I don't see why no bug was
triggered before.

Anyhow, if everything is ok now, that's perfect. :)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp9qEYKi0YUN.pgp
Description: PGP signature


Re: [O] Re: Problem with agenda and diary

2011-03-18 Thread Julien Danjou
Julien Danjou jul...@danjou.info wrote:

 On Fri, Mar 18 2011, Nick Dokos wrote:
 
  That was of course before you took out the concat in 9216453a388 - after
  that change, there is no problem: it was doing (concat nil) == 
 
 What's weird is that that concat has not been introduced by my recent
 patches. It clearly seems wrong, but I don't see why no bug was
 triggered before.
 

Neither do I. I thought the concat was concatenating two things before
you took out the prefix-length property, but I took another look and it
was doing exactly the same thing before and after that change: what you
took out was the second part of the setq. By all accounts, it should have
triggered the error long ago. So it is a minor mystery.

 Anyhow, if everything is ok now, that's perfect. :)
 

Yup :)

Nick



[O] Completing with anything (was: [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org)

2011-03-18 Thread Julien Danjou
On Sat, Feb 12 2011, Stefan Monnier wrote:

 For more complex cases, there is also the issue of what to do when some
 parts of the completion are case-sensitive and other parts aren't
 (e.g. completion of case-sensitive envvars in case-insensitive file
 names), although this is less important for  completion-at-point than
 for minibuffer completion since you don't have to return a table that
 covers the completion of the whole field (composed of file names and
 env-vars, for example), and instead you can just limit the completion to
 the particular subfield.

There's still something wrong to me in the solution provided by Tassilo.
It works fine, but it is returning a function to bypass the usual
completion code completion code. Ignoring case, like doing smarter
completion (e.g. where the typed prefix does not match the returned
choices at all) is something that is very useful.

Therefore I wonder if we should either:
- Edit `completion-at-point-functions' docstring to remove the word
  discouraged in that sentence:
  or a function of no argument to perform completion (discouraged),;
- Make completing code allows to replace the region being completed with
  somethig that does not match at all.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpI0D7AZ3ScR.pgp
Description: PGP signature


Re: [O] Re: Problem with agenda and diary

2011-03-18 Thread Julien Danjou
On Fri, Mar 18 2011, Bastien wrote:

 I have the same problem, and the funky part is that it happens only with
 Julien's email address -- as Julien is also hacking Gnus, I suspect some
 backdoor he introduced in gnus-summary-wide-reply ;)

Not at all, that's the direct effect of a header called
Mail-Followup-To, which I put in my e-mails and which indicates that
there's no need to Cc me since I'm subscribed to the list. This avoids
receiving the emails twice when people answer.

Kids, look at the `message-subscribed-*' variables to configure this at
home.

:)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpveUgeuiU8q.pgp
Description: PGP signature


Re: [O] Bug: Column view fails to display ITEM row [7.5 (release_7.5.87.gb227)]

2011-03-18 Thread Julien Danjou
On Fri, Mar 18 2011, Christian Egli wrote:

 I ran a git bisect to find the guilty commit and it turns out that there
 is a problem with commit c84d77a7a035a142bf114c5e6758c32a20f3fd68.

Ah, good catch. I tried to be smart, but turn out it was a bad idea.

I just pushed a fix. Thanks for the report and the bisect!

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpTfwwU3RSd4.pgp
Description: PGP signature


Re: [O] Trying to replace PasswordSafe with org-crypt

2011-03-17 Thread Julien Danjou
On Thu, Mar 17 2011, Óscar Fuentes wrote:

 It would nice to get rid of that noise, if possible.

It's kinda handy to have them to match the text. I don't think it's a
real problem. They are very standard.

 Second:

 Version: GnuPG v1.4.10 (GNU/Linux)

 That changes from system to system (GNU/Linux, MinGW32) and gpg version,
 which is not good when the file is versioned.

Same here. This is part of the standard output of GPG. This is not
something org-crypt add for itself.

 Third, the encryped text changes from invocation to invocation. That
 means that the sequence

 org-decrypt-entry
 wait for a while
 org-encrypt-entry

 alters the cyphertext. Again, this is annoying when the file is under
 version control.

This has been fixed in git recently by me, and should be fixed in Org =
7.5.

 Finally, is there a way to force symmetric encryption?

If you do not set any key, it's symmetric. But I think there's no
property to force symmetric on specific entry. I could add such a think
I guess, if you need it.

 I'm using the org 7.4 that comes with Emacs 24.0.50 (development
 sources) on Linux and Windows.

Go update! :)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpr9LcTgUBc4.pgp
Description: PGP signature


Re: [O] [Bug?] org-crypt warning and --daemon

2011-03-17 Thread Julien Danjou
On Thu, Mar 17 2011, Bastien wrote:

 (Btw, I also wonder if it really makes sense to have auto-save-default
 turned on in daemon mode.)

I don't see why it would not?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpTKunFMukca.pgp
Description: PGP signature


Re: [O] Re: Problem with agenda and diary

2011-03-17 Thread Julien Danjou
On Thu, Mar 17 2011, Tassilo Horn wrote:

 Yes, I can confirm that.  Here's parts of the backtrace:

 Debugger entered--Lisp error: (wrong-type-argument integerp nil)
   org-agenda-highlight-todo(#(  Diary:  St. Patrick's Day 0 2 
 (org-category diary tags nil org-highest-priority 65 org-lowest-priority 67 
 time-of-day nil duration nil effort nil effort-minutes nil txt #(St. 
 Patrick's Day 0 17 (fontified nil org-heading t)) time  extra  dotime 
 time fontified nil org-heading t type diary date (3 17 2011) face org-todo) 
 2 14 (org-category diary tags nil org-highest-priority 65 
 org-lowest-priority 67 time-of-day nil duration nil effort nil effort-minutes 
 nil txt #(St. Patrick's Day 0 17 (fontified nil org-heading t)) time  
 extra  dotime time fontified nil org-heading t type diary date (3 17 
 2011) face org-agenda-diary) 14 31 (org-heading t fontified nil org-category 
 diary tags nil org-highest-priority 65 org-lowest-priority 67 time-of-day 
 nil duration nil effort nil effort-minutes nil txt #(St. Patrick's Day 0 17 
 (fontified nil org-heading t)) time  extra  dotime time type diary date 
 (3 17 2011) face org-agenda-diary)))
   [...]
   org-agenda-list(nil)
   call-interactively(org-agenda-list)
   byte-code(\306\307 \232\203

It may has been introduced by one of my latest commit. Could you load
org-agenda.el (not compiled) and give me the full backtrace (in
private)?

Thanks.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpB8sPXQbBjy.pgp
Description: PGP signature


Re: [O] Re: Problem with agenda and diary

2011-03-17 Thread Julien Danjou
On Thu, Mar 17 2011, Tassilo Horn wrote:

 Sure, here it is.  There' nothing private in it, so we can stay on
 list.

There's something I really do not understand in this bt.

 Debugger entered--Lisp error: (wrong-type-argument integerp nil)
   substring(#(  Diary:  St. Patrick's Day 0 2 (org-category
   diary tags nil org-highest-priority 65 org-lowest-priority 67
   time-of-day nil duration nil effort nil effort-minutes nil txt
   #(St. Patrick's Day 0 17 (fontified nil org-heading t)) time 
   extra  dotime time fontified nil org-heading t type diary date
   (3 17 2011) face org-todo) 2 14 (org-category diary tags nil
   org-highest-priority 65 org-lowest-priority 67 time-of-day nil
   duration nil effort nil effort-minutes nil txt #(St. Patrick's Day
   0 17 (fontified nil org-heading t)) time  extra  dotime time
   fontified nil org-heading t type diary date (3 17 2011) face
   org-agenda-diary) 14 31 (org-heading t fontified nil org-category
   diary tags nil org-highest-priority 65 org-lowest-priority 67
   time-of-day nil duration nil effort nil effort-minutes nil txt
   #(St. Patrick's Day 0 17 (fontified nil org-heading t)) time 
   extra  dotime time type diary date (3 17 2011) face
   org-agenda-diary)) nil)

This is (substring x (match-end 3))
So the string `x' is well, the entry about St. Patrick.

   (concat (substring x 0 (match-end 1)) (format
   org-agenda-todo-keyword-format (match-string 2 x)) (org-add-props
   #(  0 1 (done-face org-agenda-done undone-face org-warning face
   org-todo date (3 17 2011) type diary todo-state #(STARTED 0 7
   (fontified nil org-category uni)) priority 1002 org-hd-marker
   #marker at 11277 in uni.org org-marker #marker at 11332 in
   uni.org help-echo mouse-2 or RET jump to org file
   ~/repos/org/uni.org org-complex-heading-regexp ^\\(\\*+\\)[
   
 ]+\\(?:\\(TODO\\|STARTED\\|DELEGATED\\|IDEA\\|DONE\\|CANCELLED\\))?\\(?:[
   ]*\\(\\[#.\\]\\)\\)?[   ]*\\(.*?\\)\\(?:[
   ]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[]*$ org-todo-regexp
   (TODO\\|STARTED\\|DELEGATED\\|IDEA\\|DONE\\|CANCELLED\\)\\
   org-not-done-regexp (TODO\\|STARTED\\|DELEGATED\\|IDEA\\)\\
   mouse-face highlight dotime time extra  time  txt #(St.
   Patrick's Day 0 17 (fontified nil org-heading t)) effort-minutes
   nil effort nil duration nil time-of-day nil org-lowest-priority 67
   org-highest-priority 65 tags nil ...)) (text-properties-at 0 x))
   (substring x (match-end 3)))

Where the this is coming from ?
The code is:

#+begin_src emacs-lisp
(setq x (concat (substring x 0 (match-end 1))
(format org-agenda-todo-keyword-format
(match-string 2 x))
  (org-add-props   (text-properties-at 0 x))
  (substring x (match-end 3)
#+end_src

How the   used as first arg of `org-add-props' can have so much
properties, like a todo-state set to STARTED and even a org-marker set
to a position in the uni.org file set? It's an empty string for Emacs's
sake.

What's even more troubling is that this code is executed only if `re' is
not nil:

#+begin_src emacs-lisp
(setq re (get-text-property 0 'org-todo-regexp x))
(when (and re
…))
#+end_src

How `re' cannot be nil since there's no org-todo-regexp in `x' (the
entry about St. Patrick.

Tassilo, if you can reproduce the backtrace, could you take a look at
the value of `re', `x' and `pl'? Maybe it can help, I'm a bit lost right
now.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp9IKWhVRGcX.pgp
Description: PGP signature


Re: [O] problems with crypt/reveal (org-mobile related?)

2011-03-15 Thread Julien Danjou
On Tue, Mar 15 2011, Richard Riley wrote:

 How now to reveal the embedded pgp message? org-reveal doesnt see this
 pgp part as encrypted.

M-x org-decrypt-entry
?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgphkgUUZCIol.pgp
Description: PGP signature


Re: [O] org-crypt Error: org-crypt-use-before-save-magic

2011-03-14 Thread Julien Danjou
On Mon, Mar 14 2011, Ian Barton wrote:

 I notice that org-crypt isn't documented in the manual and there is an 
 old message from Carsten asking for someone to document it. If I can get 
 it working I'll promise to document it:) Also I'll write something about 
 using ssh agent with org an Emacs, a topic that has cuased me some head 
 scratching recently.

By any chance, aren't you loading your Emacs' org-crypt version rather
than the git one? This could happen if the load-path is set later.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpCXHZRRBiLs.pgp
Description: PGP signature


Re: [O] Org expert mode?

2011-03-10 Thread Julien Danjou
On Thu, Mar 10 2011, Bastien wrote:

 I'm myself not convinced: it's a good thing that Org doesn't need an
 Expert mode so far, it means newbies are not confused by the UI, and
 experts are not frustrated by it either.  But I expect neat features 
 can emerge from the discussion.

I agree that it would be a terrible bad idea to add any sort of expert
mode.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpmVl7Im82IH.pgp
Description: PGP signature


Re: [O] [Org-contacts] 3 2 1 go?

2011-03-09 Thread Julien Danjou
On Tue, Mar 08 2011, Michael Käufl wrote:

 Q1) links to contacts
 Is there a common way to create links to contacts?

I'd say just the same way as for any Org entry. 

 F1) csv export
 When writing bulk letters with LaTeX, all I need is a file with the
 recipients addresses in some predefined order.  So it would be nice to
 have some export option where I can choose the properties and contacts
 I'd like to export and get a csv file.

I think it's more an Org problem than an org-contacts one. :)

 F2) pgp keys
 I just started using gnus so I'm not quite familiar with it.  According
 to [1] BBDB can be used to map recipients to pgp keys.  So it would be
 great if org-contacts can support this in any way.  I have no plans to
 use this at the moment, so no need to hurry.

I'm not sure that's something you really need: Gnus GPG support just
pick the key one address is for. You do not need to do a manual mapping.
Unless you really want to, but that'd be weird.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp7BytCUqHWd.pgp
Description: PGP signature


Re: [O] [Org-contacts] 3 2 1 go?

2011-03-08 Thread Julien Danjou
On Tue, Mar 08 2011, Andrea Crotti wrote:

 That's also very nice thanks.
 Well the only thing that I would really love to have is a real working
 synchronization mechanism, and a real address book with all the
 interesting fields for everyone.

Well, do not count on me for that. I use git, it does the job. :)

 The fields I can also set them myself but maybe would be nice to define
 some standard fields which can be set and are automatically recognized.

Well, I had some but they are defcustom anyway, so there's no standard.
I do not want to put too much obligation on the format used, because
Org-mode is about organizing stuff the way you want.

For example, some people might want to cut the address part in
(STREET,ZIPCODE,CITY,COUNTRY) whereas I think it's a burden, I just put
a LOCATION property with all the address in it. In the end, it does not
matter for org-contacts.

 The once that is done, it would be easier to write some code to
 synchronize org-contacts to AddressBook/gmail contacts/vcf and even more
 important my android phone.

Sure that'd be cool. But I don't have such a phone unfortunately, so
can't help. :)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpNQMJwkIIZ0.pgp
Description: PGP signature


Re: [O] org-crypt.el security problem (From: Milan Zamazal)

2011-03-07 Thread Julien Danjou
On Sun, Mar 06 2011, Bastien wrote:

 What I can also suggest is to never show the encrypted block in the Org
 buffer.

 I agree this would be better.

 This is what I do in my configuration: on Org file loading, I decrypt
 all entries. Therefore I never see the GPG block. When I save,
 everything is encrypted, written, and then re-decrypted.

 Can you share your config?

NO WAY!

But here it is:

#+begin_src emacs-listp
(org-crypt-use-before-save-magic)
(defun jd:org-decrypt-everything-silently ()
  (let ((m (buffer-modified-p)))
(org-decrypt-entries)
(unless m
  (set-buffer-modified-p nil
(add-hook 'org-mode-hook 'jd:org-decrypt-everything-silently)
(add-hook 'org-mode-hook (lambda ()
   (add-hook 'after-save-hook 
'jd:org-decrypt-everything-silently)))
#+end_src

- Loading org-mode on a file decrypt everything;
- Saving encrypt everything (org-crypt-use-before-save-magic adds this);
- After-saving we re-decrypt.

Using this method with auto-save-hook should be possible.

 I see: auto-save-hook would encrypt, write to ~/.#file# then decrypt the
 original buffer back again -- yes?

Yup.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpBtB6nbXOtp.pgp
Description: PGP signature


Re: [O] [Org-contacts] 3 2 1 go?

2011-03-07 Thread Julien Danjou
On Sat, Mar 05 2011, Andrea Crotti wrote:

 Because I would really like to have a complete address book support from
 the command-line/Emacs to get rid of the stupid osx AddressBook.app, but
 it doesn't look that the purpose is this, right?

You can set any properties anyway. Org-contacts just use some of them.

For example I use LOCATION as a property to store my contacts' home
addresses, which I usually set using C-c M-L provided by
org-google-maps[1].

Just say out loud what you'd like to do, I'll try to answer or write
code. :)

[1]  http://julien.danjou.info/google-maps-el.html

-- 
Julien Danjou
❱ http://julien.danjou.info


pgplOUN0uz6hq.pgp
Description: PGP signature


Re: [O] [Org-contacts] 3 2 1 go?

2011-03-07 Thread Julien Danjou
On Mon, Mar 07 2011, Andrea Crotti wrote:

 One thing I haven't found in fact is how to support multiple emails, is
 that too hard to do?

If you mean in org-contacts, just use space as a separator for each mail
address.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpKlEqNSkF1t.pgp
Description: PGP signature


Re: [O] org-crypt.el security problem (From: Milan Zamazal)

2011-03-06 Thread Julien Danjou
On Sun, Mar 06 2011, Bastien wrote:

 I've seen org-encrypt-string but I don't see we could use it for the 
 problem at hand.  

Just saying that if you don't use it, youe re-encryption on auto-save
will ask the user for its passphrase if he is not using any agent.

 Also, the purpose is to encrypt the auto-saved buffer and *not* the
 visited buffer -- which I don't know how to do.  

Add org-encrypt-entries to auto-save-hook and org-decrypt-entries-which
were-not-decryped to after-auto-save-hook… which does not seems to
exist. :)


What I can also suggest is to never show the encrypted block in the Org
buffer.

This is what I do in my configuration: on Org file loading, I decrypt
all entries. Therefore I never see the GPG block. When I save,
everything is encrypted, written, and then re-decrypted.

Using org-crypt this way, it would be easy to fix auto-save-hook. With
the current way on letting the user decrypt heading by heading, it does
not seems that easy. :)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpzJddNTYznR.pgp
Description: PGP signature


Re: [O] Re: Automatic Org-mode mailing list signature -- Was: Let's stick to one list for now

2011-03-04 Thread Julien Danjou
On Thu, Mar 03 2011, Nick Dokos wrote:

 There are a few times when I've needed to go to the listinfo page
 and I've followed the link from the banner. I'm sure there are other
 ways of doing that though, so it's a /small/ objection :-)

Yes, look at the mail headers:

List-Id: General discussions about Org-mode. emacs-orgmode.gnu.org
List-Unsubscribe: http://lists.gnu.org/mailman/listinfo/emacs-orgmode, 
mailto:emacs-orgmode-requ...@gnu.org?subject=unsubscribe
List-Archive: http://lists.gnu.org/archive/html/emacs-orgmode
List-Post: mailto:emacs-orgmode@gnu.org
List-Help: mailto:emacs-orgmode-requ...@gnu.org?subject=help
List-Subscribe: http://lists.gnu.org/mailman/listinfo/emacs-orgmode, 
mailto:emacs-orgmode-requ...@gnu.org?subject=subscribe

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp9BbNt0rKx1.pgp
Description: PGP signature


Re: [O] org-crypt.el security problem (From: Milan Zamazal)

2011-03-04 Thread Julien Danjou
On Fri, Mar 04 2011, Peter Jones wrote:

 Hopefully there's an autosave hook where you can encrypt the headings
 and save to disk using a temporary buffer without having to alter the
 current buffer and interrupt the user by encrypting a heading that is
 being edited.

I've recently added caching of encrypted text, so that org-crypt will
not recrypt the text once again if it has not been modified, but reuse
the previous crypting value.

That could be used to automagically re-encrypt all text before
auto-saving.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp2P8cEXyrk3.pgp
Description: PGP signature


Re: [O] Re: Automatic Org-mode mailing list signature -- Was: Let's stick to one list for now

2011-03-03 Thread Julien Danjou
On Thu, Mar 03 2011, Bastien wrote:

 I'm thinking of removing the banner completely.  I don't think it is
 really useful, and having it as a signature is indeed confusing.

 Would people object?

I agree and won't object.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpILMLbiJmRI.pgp
Description: PGP signature
-- 
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] Splitting mailing list

2011-02-28 Thread Julien Danjou
On Mon, Feb 28 2011, Alan L Tyree wrote:

 The development list wouldn't be very interesting without the intense
 interaction that it now has with users. The org list seems unique in
 this, at least for the lists that I have sometimes monitored. 

No, really, it's not that unique. And many project still works correctly
with several mailing list.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpLPcbhcnlBI.pgp
Description: PGP signature
___
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: [O] Let's stick to one list for now

2011-02-28 Thread Julien Danjou
On Mon, Feb 28 2011, Bastien wrote:

The point is that there's no gain in telling people to add [DEV] since
they will forget (I will), and there is _no_ lose by splitting a list. I
already splitted user list in some project and nothing bad happened. :)

 Julien, I guess your life would be easier if you get push access to the
 Org repo and an account on the patchwork -- so that you can test patches
 and improve them if needed.

 Would that be okay for you?

Well, access to the patchwork will at least allow me to contrate and
work on dev things that have a patch, for sure.

 This decision is not carved in stone -- but I'm about to release Org 7.5
 and I don't want to undertake a mailing list split in the middle of this
 process.

I understand that.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpvCiEAc3CrP.pgp
Description: PGP signature
___
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: [O] Re: [Orgmode] Splitting mailing list

2011-02-28 Thread Julien Danjou
On Mon, Feb 28 2011, Bastien wrote:
 I changed the [Orgmode] tag to [O].  

Couldn't you just drop it?

Seriously, this [O] is useless and ridiculous.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpcuBCMMMZGw.pgp
Description: PGP signature
___
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: [O] Re: [Orgmode] Splitting mailing list

2011-02-28 Thread Julien Danjou
On Mon, Feb 28 2011, Bastien wrote:

 No, it's useful to people who filter emails through the subject line.

It would be better to teach these people this is not a good practice
rather than polluting the subject lines for everybody…

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpZrRQKSf1VX.pgp
Description: PGP signature
___
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] Splitting mailing list

2011-02-27 Thread Julien Danjou
Hi,

There's really a lot of trafic here, and it's more and more diffcult to
me to follow development related threads in all the usage realted
threads.

How about splitting the mailing list in a user and a development list?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpy1t4BXGuu1.pgp
Description: PGP signature
___
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] Splitting mailing list

2011-02-27 Thread Julien Danjou
On Sun, Feb 27 2011, Bastien wrote:

 I am in favor of using a [DEV] tag and stick to one single list.

This is not something automatic, so this is not something everyone will
do. I won't think about it most of time and will forget, so…

 The path from users to developers (and to core Org developers) is
 a continuum, keeping this continuum on one list is a good thing.

Your own vision of Org is probably that, so you'd subscribe to both
list. I personally do not have enough time to care about users problems
nor their features complaints for now, so spending time with
developement subject only and not having to filter out usage related
thread would make me gain an amount of time that I could spend on
hacking Org.

This is not something I'd propose on a low trafic list, but the number
of mails here is getting bigger and bigger, and it's hard for me as a
developer (and not as a maintainer like you) to just follow the stream
of subject I am interested into (i.e. developement of Org).

If some developers (like you) have more time to follow users subjects,
nothing stop you to read both lists.

At this point of trafic rate, not splitting is mostly killing people
like me. :)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpPL1jLfLJcY.pgp
Description: PGP signature
___
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: Splitting mailing list

2011-02-27 Thread Julien Danjou
On Sun, Feb 27 2011, Chris Thompson wrote:

 It appears that a solid majority of the posts in the current mailing list are
 Babel-related, and this is a very distinct subset of functionality that could
 easily and cleanly be split into its own list. Plus, it makes sense... not 
 every
 Org user uses Babel.

Not sure splitting by feature is going to be a good first choice for
spliting.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp8L5E6x21UW.pgp
Description: PGP signature
___
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] org-macs: store evaluated version of pom

2011-02-26 Thread Julien Danjou
On Sat, Feb 26 2011, Bastien wrote:

 * lisp/org-macs.el (org-with-point-at): Store evaluated version of pom. This
 fixes a potential bug when using (org-with-point-at (func) …), where (func)
 would be evaluated multiple times

 I'm not sure I understand this patch.

 Can you show an actual use of org-with-point-at as the one you describe?

 Maybe that's related to some code your are working on?

Yes it is. This patch just fix one problem. Without it, what is set
with pom is evaluated multiple times:

(org-with-point-at (function-that-return-some-marker)
  (do-stuff))

(function-that-return-some-marker) will be called several times, which
can causes a lot of problem, as you imagine just by reading the current
code.

This patch evalute the function, store it to `pom' and use this variable
instead.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpRQy35eQkWq.pgp
Description: PGP signature
___
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] org-macs: store evaluated version of pom

2011-02-25 Thread Julien Danjou
* lisp/org-macs.el (org-with-point-at): Store evaluated version of pom. This
fixes a potential bug when using (org-with-point-at (func) …), where (func)
would be evaluated multiple times, therefore might return different results
if a marker was returned and different each time.

Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org-macs.el |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 9c161e3..2090ca7 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -134,11 +134,12 @@ We use a macro so that the test can happen at compilation 
time.
 
 (defmacro org-with-point-at (pom rest body)
   Move to buffer and point of point-or-marker POM for the duration of BODY.
-  `(save-excursion
- (if (markerp ,pom) (set-buffer (marker-buffer ,pom)))
+  `(let ((pom ,pom))
  (save-excursion
-   (goto-char (or ,pom (point)))
-   ,@body)))
+   (if (markerp pom) (set-buffer (marker-buffer pom)))
+   (save-excursion
+(goto-char (or pom (point)))
+,@body
 (put 'org-with-point-at 'lisp-indent-function 1)
 
 (defmacro org-no-warnings (rest body)
-- 
1.7.4.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


Re: [Orgmode] Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-23 Thread Julien Danjou
On Fri, Feb 11 2011, Darlan Cavalcante Moreira wrote:

 This is awesome. I always wanted to move from bbdb to org for my contacts.
 Any chance this will work with other Emacs mail clients, such as
 Wanderlust?

I use Gnus, so there's no chance I'll work on that. But I'm willing to
accept well written patches, of course.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpyiU8z3PDx5.pgp
Description: PGP signature
___
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] Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-23 Thread Julien Danjou
On Sat, Feb 12 2011, Bastien wrote:

 I'm willing to add this to contrib/lisp/ - would that be okay for you?

Since I plan to continue working and improving it soon, it seems like it
would be too much work getting it update for now since I couldn't commit
directly. So maybe it's best to wait a bit, and I'll ask for its
inclusion later?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpIIOD1IR0eq.pgp
Description: PGP signature
___
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] Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-23 Thread Julien Danjou
On Sat, Feb 12 2011, John Hendy wrote:

 I know people have responded re. the A/a+tab when trying to use for email...
 but did anyone solve the pure 'M-x org-contacts N/name' issue? Are they the
 same? I just want proper case insensitivity and don't use it for email.

Case insensitivity works correctly with M-x org-contacts AFAIK.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpwLp0JlOv6K.pgp
Description: PGP signature
___
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: Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-23 Thread Julien Danjou
On Sat, Feb 12 2011, Matt Lundin wrote:

 I tried org-contacts with my rather large agenda files, but because it
 uses org-scan-tags instead of regexp searches, queries are slow. E.g.,
 org-contacts-filter takes approximately 15-20 seconds.

Yeah, it's hard to use if you contacts are accross large agenda files.
It's slow. Using the anniversary code is currently impossible if you do
not use a single small contact file.

I plan to improve that later.

 Also, the function org-contacts uses a tags/property search and then a
 skip function. Would it perhaps be quicker to use org-search-view to
 match against two regexps (the name and the contacts email property)?

Maybe. Anyhow I've a lot of ideas for that. Considers the current
version as a quick hack. :)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpd5Xms4y0Ul.pgp
Description: PGP signature
___
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: Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-21 Thread Julien Danjou
On Sat, Feb 12 2011, Tassilo Horn wrote:

 @Julien: Here's a patch for org-contacts.el which uses Stefan's
 suggestion to fix the completion in the case-insensitive case.

Patch merged, and soon to be pushed.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp0SQsXh2iGF.pgp
Description: PGP signature
___
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: [Accepted] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-02-10 Thread Julien Danjou
On Thu, Feb 10 2011, Carsten Dominik wrote:

 I am not sure if I know exactly what the remaining problem is.
 Could someone summarize this - I'd be happy to take a look and see if I can 
 fix it.

The problem is that org-agenda-list, when called use as span either:
 (or span org-agenda-current-span org-agenda-span)

Or, when defining a custom agenda view, and calling it, the Agenda
buffer is reused. Therefore, if your agenda view locally bind
org-agenda-span to 'day, whereas org-agenda-current-span was previously
set to 'week, it does not work.

This is why I've added a kill-local-variable in custom agenda view,
which seems quite a good thing. Bastien says it does not work with
emacs -q, but I don't why unfortunately. Bastien?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpnQaxzd7YaH.pgp
Description: PGP signature
___
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: [Accepted] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-02-10 Thread Julien Danjou
On Thu, Feb 10 2011, Carsten Dominik wrote:

 No, I believe you did kill-all-local-variables, which is a very bad
 idea.  Org uses local variables to remember settings when refreshing.
 And apparently this call was executed in an innocent org
 buffer, reverting its major mode to fundamental mode. :)

That explains everything! My bad!

 But maybe you can just delocalize that one variable instead,
 using kill-local-variable?

It's a possibility, but I think it's more logical to reset every local
variable.

I think this call should be used in the appropriate buffer, the agenda
one, then. I'll try to send a patch later, but if you have time please
do so. :)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpADO4tI50lk.pgp
Description: PGP signature
___
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] Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-10 Thread Julien Danjou
On Thu, Feb 10 2011, John Hendy wrote:
 Is anyone else having that issue?

 (custom-set-variables
 '(org-contacts-files '(/home/jwhendy/org/contact-example.org)))

will work better.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp8Zq9JpFsiw.pgp
Description: PGP signature
___
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: Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-10 Thread Julien Danjou
On Thu, Feb 10 2011, Dan Griswold wrote:

 This is pretty neat. I would like to use this eventually, as bbdb
 exhibits some strange behaviors occasionally, and the data is kind of
 locked into bbdb's own peculiar format.

 What I would need to see before I could make org-contacts part of my
 workings system is an analogue to bbdb/gnus-split-method, that is, an
 org-contacts function that would hook into nnimap-split-rule so incoming
 messages could be deposited into folders based on a specific property,
 for example, gnus-private.

Yeah, this has been already asked. I don't know this mechanism well, but
I'll try to study it and implement such a thing.
It shouldn't be too hard.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpKLEQg4Rmm9.pgp
Description: PGP signature
___
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: Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-10 Thread Julien Danjou
On Thu, Feb 10 2011, Dan Davison wrote:

 Hi Julien,

 I'm using it (with gnus). Looks great and seems to work very nicely so
 far.

 One little thing: I don't seem to be getting case-insensitive
 completion, despite having org-contacts-completion-ignore-case set to t.

Your the second one to report that to me, but it does work for me with
Emacs 24 at least.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpV1ZZLhiVQf.pgp
Description: PGP signature
___
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: Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-10 Thread Julien Danjou
On Thu, Feb 10 2011, Tassilo Horn wrote:

 I'm also using Emacs 24, and for me it doesn't work.

Ok. Anyway I've just double checked, and it worst than that.

Typing 'a' complete to 'aA' (instead of 'Anne mailaddress') and then
does nothing since aA is not valid.

I'm not sure completion-at-point-functions is correctly usable in this
same dondition as message/bbdb completion was. The latter used to return
a function which is marked as decouraged in
`completion-at-point-functions' docstring. So org-contacts does not use
it. OTOH, returning a (START END COLLECTION) triplet is not very usable
since if you return a collection that start with a different character
set than (buffer-substring start end), it does not work.

(Cc'ing emacs-devel, in case someone has an advice on that.)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpthYbUUMptR.pgp
Description: PGP signature
___
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] Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-09 Thread Julien Danjou
Hi,

Following my short presentation at the Paris OrgCamp, I've now written a
page and officially released org-contacts. It is a contact manager based
on Org, that can possibly replace BBDB for certain usage.

   http://julien.danjou.info/org-contacts.html

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpLeBYyndtfp.pgp
Description: PGP signature
___
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] Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-09 Thread Julien Danjou
On Wed, Feb 09 2011, John Hendy wrote:

 From skimming the website and org-contacts.el, is the main advantage that it
 can search multiple files as well as integrate with gnus? I don't use gnus
 (can't access personal email via pop/imap from behind work firewall) and so
 that feature isn't wholly attractive. It looks like I could use the remember
 template as well for my current method. Is there something else that you
 would put forth as the primary benefits of this system? I'm quite interested
 in it.

Not yet. I'm working with Bastien to integrate a set of patches so the
`org-contacts' function will print contacts in a better way.

They will probably be more at the time come, we'll see.

 A few other questions:
 -- can you add additional fields? It looks like I could keep repeating the
 pattern in your .el like so:
 ,-
 |(defcustom org-contacts-SOME-NAME-property SOME-NAME
 |  Name of the property for contact email address.
 |  :type 'string
 |  :group 'org-contacts)
 `-

You add what you want. Org-contacts does not care at all. It just use
some fields like EMAIL for Gnus completion, so it has to know it. Other
fields are up to your choices.

 -- I will often need to look up a contact at work and reproduce it in an
 email. It would be nice to standardize the order of the properties and then
 have a way to export the whole contact into the kill-ring for pasting into
 email format. Do you think something like that could be integrated? For
 example 'M-x export-selected-contact' would take the highlighted area and
 create:

 ,-
 | Name
 | Title
 | Company
 | Email
 | Phone
 `-

 And perhaps one could define the fields for export (I wouldn't, for example,
 hardly ever need to export the address and my notes about the
 contact).

That would be easy. Maybe a vcard export even?

 Just my thoughts! I was very excited to see this in my inbox and look
 around. I'm assuming with the right fields, my current system would already
 be in the right syntax to integrate with this, so I'm interested to hear
 your answers to the above.

I think so, yes. Org-contacts let you be free about how you manage your
contacts, so it should adapt to your current organization.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpJQXIL0d0HX.pgp
Description: PGP signature
___
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: Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-09 Thread Julien Danjou
On Wed, Feb 09 2011, Sébastien Vauban wrote:

 From skimming on the available docs, would I be right to state that the only
 missing *features set* (vs bbdb) is the *scanning done on the incoming mails*:
 detecting a new email address, asking to add it, eventually as the primary
 one, detecting the Organization field and storing it, parsing the X-Face and
 storing it, etc.?

 Would such features be added in the future?  Or do we have to choose for the
 simplicity of the new format, eventually losing some minor features?

Snarffing info from known contacts and adding other mail addresses
email, faces, etc is planned.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpIN6v5gs085.pgp
Description: PGP signature
___
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] crypt entries and journal

2011-02-08 Thread Julien Danjou
On Mon, Feb 07 2011, Richard Riley wrote:

 I would like them to. Best way?

Decrypt them on file loading.

(defun jd:org-decrypt-entires-silently ()
  (let ((m (buffer-modified-p)))
(org-decrypt-entries)
(unless m
  (set-buffer-modified-p nil
(add-hook 'org-mode-hook 'jd:org-decrypt-entires-silently)

I think that's something that could be added to org-crypt. I'll make a
patch later.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpDKaMvDcFRM.pgp
Description: PGP signature
___
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] org-crypt: cache encrypted text

2011-02-07 Thread Julien Danjou
* lisp/org-crypt.el (org-encrypt-string): New function.
(org-encrypt-entry): Use org-encrypt-string to encrypt, so we use cached
crypted values.
(org-decrypt-entry): Store crypted text in decrypted text.

Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org-crypt.el |   26 --
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el
index 7c28d70..291c540 100644
--- a/lisp/org-crypt.el
+++ b/lisp/org-crypt.el
@@ -103,6 +103,15 @@ This setting can also be overridden in the CRYPTKEY 
property.
 (and (boundp 'epa-file-encrypt-to) epa-file-encrypt-to)
 (message No crypt key set, using symmetric encryption.
 
+(defun org-encrypt-string (str crypt-key)
+  Return STR encrypted with CRYPT-KEY.
+  ;; Text and key have to be identical, otherwise we re-crypt.
+  (if (and (string= crypt-key (get-text-property 0 'org-crypt-key str))
+  (string= (sha1 str) (get-text-property 0 'org-crypt-checksum str)))
+  (get-text-property 0 'org-crypt-text str)
+(let ((epg-context (epg-make-context nil t t)))
+  (epg-encrypt-string epg-context str (epg-list-keys epg-context 
crypt-key)
+
 (defun org-encrypt-entry ()
   Encrypt the content of the current headline.
   (interactive)
@@ -122,10 +131,7 @@ This setting can also be overridden in the CRYPTKEY 
property.
   (org-back-over-empty-lines)
   (setq end (point)
 encrypted-text
-(epg-encrypt-string
- epg-context
- (buffer-substring-no-properties beg end)
- (epg-list-keys epg-context crypt-key)))
+   (org-encrypt-string (buffer-substring beg end) crypt-key))
   (delete-region beg end)
   (insert encrypted-text)
   (when folded
@@ -152,16 +158,24 @@ This setting can also be overridden in the CRYPTKEY 
property.
(forward-line)
(point)))
 (epg-context (epg-make-context nil t t))
+(encrypted-text (buffer-substring-no-properties (point) end))
 (decrypted-text
  (decode-coding-string
   (epg-decrypt-string
epg-context
-   (buffer-substring-no-properties (point) end))
+   encrypted-text)
   'utf-8)))
;; Delete region starting just before point, because the
;; outline property starts at the \n of the heading.
(delete-region (1- (point)) end)
-   (insert \n decrypted-text)
+   ;; Store a checksum of the decrypted and the encrypted
+   ;; text value. This allow to reuse the same encrypted text
+   ;; if the text does not change, and therefore avoid a
+   ;; re-encryption process.
+   (insert \n (propertize decrypted-text
+'org-crypt-checksum (sha1 decrypted-text)
+'org-crypt-key (org-crypt-key-for-heading)
+'org-crypt-text encrypted-text))
(when heading-was-invisible-p
  (goto-char heading-point)
  (org-flag-subtree t))
-- 
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: [Accepted] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-02-07 Thread Julien Danjou
On Sat, Feb 05 2011, Matt Lundin wrote:

 This results in only a day view because org-agenda-current-span is still
 'day.

Here's a proposal fix.

I could have setq org-agenda-current-span to nil as a work around, but
it seems more logical to just kill all the local variables. That is, a
custom agenda view would not keep any of the local variable of the
previous agenda, which seems logical to me.

From b48fc7c395dffea60df20c23b26e362ac0354b01 Mon Sep 17 00:00:00 2001
From: Julien Danjou jul...@danjou.info
Date: Mon, 7 Feb 2011 12:36:42 +0100
Subject: [PATCH] org-agenda: kill local variables in agenda view

* org-agenda.el (org-agenda): Kill all local variables. This
assures we are not keeping buffer variable from an old agenda view
when switching to a new custom agenda.

Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org-agenda.el |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index d146f83..9a3d953 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -2161,6 +2161,8 @@ Pressing `' twice means to restrict to the current subtree or region
   (put 'org-agenda-redo-command 'org-lprops nil)
   ;; Remember where this call originated
   (setq org-agenda-last-dispatch-buffer (current-buffer))
+  ;; Remove all local variables
+  (kill-all-local-variables)
   (unless keys
 	(setq ans (org-agenda-get-restriction-and-command prefix-descriptions)
 	  keys (car ans)
-- 
1.7.2.3


-- 
Julien Danjou
❱ http://julien.danjou.info


pgp5f0MLiuj3S.pgp
Description: PGP signature
___
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: [Accepted] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-02-05 Thread Julien Danjou
On Sat, Feb 05 2011, Matt Lundin wrote:

 This patch breaks custom commands --- i.e., if one binds org-agenda-span
 in a custom command, it seems to be overridden by the span of whatever
 agenda command one last called (i.e., org-agenda-current-span).

 Steps to replicate:

 1. (setq org-agenda-span 'day)

 2. M-x org-agenda-list

 3. Check the value of org-agenda-current-span = day

 4. Call the following custom command:

 (setq org-agenda-custom-commands
   '((c Calendar agenda 
((org-agenda-span 'week)
 (org-agenda-start-on-weekday 0)   
 (org-agenda-time-grid nil)
 (org-agenda-entry-types '(:timestamp :sexp))
 (org-agenda-prefix-format  %-12:t )
 (org-deadline-warning-days 0)
 (org-agenda-include-all-todo nil)
 (org-agenda-repeating-timestamp-show-all t)
 

 This results in only a day view because org-agenda-current-span is still
 'day.

Yes, this has already been reported, I just did not had the time to find
a proper fix.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgppDM5P7afRW.pgp
Description: PGP signature
___
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] face: make org-special-keyword inherit

2011-02-02 Thread Julien Danjou
* org-faces.el (org-special-keyword): Make it inherited from 
font-lock-keyword-face.

Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org-faces.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-faces.el b/lisp/org-faces.el
index aeadb9b..c237a0e 100644
--- a/lisp/org-faces.el
+++ b/lisp/org-faces.el
@@ -137,7 +137,7 @@ color of the frame.
   :group 'org-faces)
 
 (defface org-special-keyword ;; originally copied from font-lock-string-face
-  (org-compatible-face nil
+  (org-compatible-face 'font-lock-keyword-face
 'class color) (min-colors 16) (background light)) (:foreground 
RosyBrown))
   (((class color) (min-colors 16) (background dark)) (:foreground 
LightSalmon))
   (t (:italic t
-- 
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] [PATCH] face: make org-link inherit from link

2011-02-02 Thread Julien Danjou
* org-faces.el (org-link): Make org-link inherits from link face.

Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org-faces.el |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/org-faces.el b/lisp/org-faces.el
index bd509ae..aeadb9b 100644
--- a/lisp/org-faces.el
+++ b/lisp/org-faces.el
@@ -247,9 +247,10 @@ column view defines special faces for each outline level.  
See the file
   :group 'org-faces)
 
 (defface org-link
-  'class color) (background light)) (:foreground Purple :underline t))
-(((class color) (background dark)) (:foreground Cyan :underline t))
-(t (:underline t)))
+  (org-compatible-face 'link
+'class color) (background light)) (:foreground Purple :underline t))
+  (((class color) (background dark)) (:foreground Cyan :underline t))
+  (t (:underline t
   Face for links.
   :group 'org-faces)
 
-- 
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


Re: [Orgmode] Encrypting org-mode files

2011-01-31 Thread Julien Danjou
On Sat, Jan 29 2011, Eric S Fraga wrote:

 Any suggestions?

% head -1 .gnupg/gpg.conf
use-agent

% cat .gnupg/gpg-agent.conf
default-cache-ttl 28800
max-cache-ttl 43200

That's all I got.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpjZRbaHbeWa.pgp
Description: PGP signature
___
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: UTF-8 characters in #+LINK does not work [7.4]

2011-01-31 Thread Julien Danjou
On Sat, Jan 29 2011, Matt Lundin wrote:

 The regexp in org-link-expand-abbrev does not allow for accented
 characters in the link abbreviation. I am not sure whether this is an
 intended limitation or a bug. :)

I don't see any reason. Patch attached.

From 1ec1e178aaa6a9935819a873ae492be7a2ddb2f6 Mon Sep 17 00:00:00 2001
From: Julien Danjou jul...@danjou.info
Date: Mon, 31 Jan 2011 21:19:07 +0100
Subject: [PATCH] Allow more char type in link abbrev

* org.el (org-link-expand-abbrev): Allow any type of character
in link expand.

Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 808c9ed..044d2ac 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8185,7 +8185,7 @@ call CMD.
 
 (defun org-link-expand-abbrev (link)
   Apply replacements as defined in `org-link-abbrev-alist.
-  (if (string-match ^\\([a-zA-Z][-_a-zA-Z0-9]*\\)\\(::?\\(.*\\)\\)?$ link)
+  (if (string-match ^\\([^:]*\\)\\(::?\\(.*\\)\\)?$ link)
   (let* ((key (match-string 1 link))
 	 (as (or (assoc key org-link-abbrev-alist-local)
 		 (assoc key org-link-abbrev-alist)))
-- 
1.7.2.3


-- 
Julien Danjou
❱ http://julien.danjou.info


pgptmY2jBcnhs.pgp
Description: PGP signature
___
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: [CLOSED ?] Agenda view switches back to week with g [7.4]

2011-01-29 Thread Julien Danjou
On Fri, Jan 28 2011, Michael Brand wrote:

 On Wed, Jan 26, 2011 at 18:19, Michael Brand michael.ch.br...@gmail.com 
 wrote:
 This is still an issue for custom agenda views. With the today's
 release_7.4-246-g9658a99 and the test config
 (setq org-agenda-custom-commands '((x test ((agenda)
 I observe:
 - `C-c a a' like expected:
  1) `d g' stays on view day
  2) `w f d g' stays on view day and also stays on the day of the next week
 - `C-c a x' is expected by me to do the same as above but it does:
  1) `d g' switches back to view week
  2) `w f d g' switches back to view week and changes back to current week

 Michael

 In the meantime I did the git bisect for the issue part 1) which is `d
 g' switching back from view day to view week:
 --
 $ git describe
 release_7.3-168-gc3b2977
 $ git bisect good
 [...]
 $ git describe
 release_7.3-169-g0d0edd6
 $ git bisect bad
 0d0edd6d21ade8e8617c51e3594ea4e87040e05f is first bad commit
 commit 0d0edd6d21ade8e8617c51e3594ea4e87040e05f
 Author: Julien Danjou jul...@danjou.info
 Date:   Fri Dec 3 16:50:50 2010 +

 org-agenda: rework ndays and span handling
 [...]
 --

I think that should be fixed by patch 543 which has been forgotten.
Maybe you could try it:

  http://patchwork.newartisans.com/patch/543/

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpHO5kuW8o1B.pgp
Description: PGP signature
___
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: [CLOSED ?] Agenda view switches back to week with g [7.4]

2011-01-29 Thread Julien Danjou
On Sat, Jan 29 2011, Michael Brand wrote:

  1) `d g' stays on view day

That's expected. If you want to reset the span, you can press 'v space'.

  2) `w f d g' stays on view day and also stays on the day of the
 next week

That's normal, g refresh the agenda, it does not reset the current span.
Press 'v space' to reset it.

 - `C-c a x' is expected by me to do the same as above but it does:
  1) `d g' switches back to view week
  2) `w f d g' switches back to view week and changes back to current week

There's probably something missing in custom agenda view, I'll take a
look.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpfIlTeHDaA2.pgp
Description: PGP signature
___
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: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-28 Thread Julien Danjou
On Mon, Jan 17 2011, Julien Danjou wrote:

This patch has not been installed, and it should be since the problem is
still here.

 I've followed but not sure I understood what the bug is. But from my
 various tries, I found a bug: when pressing 'j', the current span is
 discarded.

 Attached is a patch that should fix that, even for future use of
 `org-agenda-list' with the span unspecified. :)


 From 9dd2fe6650b858a4083ebc083bb8d10a0d6ac7f2 Mon Sep 17 00:00:00 2001
 From: Julien Danjou jul...@danjou.info
 Date: Mon, 17 Jan 2011 16:05:28 +0100
 Subject: [PATCH] Fix agenda span on date jump

 * org-agenda.el (org-agenda-list): Use org-agenda-current-span as a
 possible default span if it is set.

 Signed-off-by: Julien Danjou jul...@danjou.info
 ---
  lisp/org-agenda.el |5 -
  1 files changed, 4 insertions(+), 1 deletions(-)

 diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
 index 0cd620c..0d695b5 100644
 --- a/lisp/org-agenda.el
 +++ b/lisp/org-agenda.el
 @@ -3450,7 +3450,10 @@ given in `org-agenda-start-on-weekday'.
(setq org-agenda-last-arguments (list include-all start-day span))
(org-compile-prefix-format 'agenda)
(org-set-sorting-strategy 'agenda)
 -  (let* ((span (org-agenda-ndays-to-span (or span org-agenda-ndays 
 org-agenda-span)))
 +  (let* ((span (org-agenda-ndays-to-span (or span
 +  org-agenda-current-span
 +  org-agenda-ndays
 +  org-agenda-span)))
(today (org-today))
(sd (or start-day today))
(ndays (org-agenda-span-to-ndays span sd))
 -- 
 1.7.2.3

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpAizRI5FKIP.pgp
Description: PGP signature
___
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: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-28 Thread Julien Danjou
On Fri, Jan 28 2011, Giovanni Ridolfi wrote:

 I suppose that Bastien made a mistake, since there were two patches
 with the same subject one after the other, and the newest patch
 has been accepted.

Probably. I unarchived it and set it state to 'New' again, since it
seems I have the right to do that in the interface.
I hope it's the good thing to do.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpx0fJTID8Q1.pgp
Description: PGP signature
___
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] Encrypting org-mode files

2011-01-26 Thread Julien Danjou
On Wed, Jan 26 2011, Marcelo de Moraes Serpa wrote:

 Is there a way to use full encryption and still have it integrate
 seamlessly with the org agenda?

Create a file named myfile.org.gpg, and EPA should kicks in and store it
crypted. Then just add this file to the list of org-agenda-files. EPA
will ask your passphrase to decrypt in on opening.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgplAgcEMTNFk.pgp
Description: PGP signature
___
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] org: remove org-invisible-p

2011-01-26 Thread Julien Danjou
* org.el: Remove org-invisible-p: outline-invisible-p is
available in Emacs 22 and in recent XEmacs 21. Replace in
various files.

Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org-clock.el |2 +-
 lisp/org-crypt.el |2 +-
 lisp/org-exp.el   |2 +-
 lisp/org-list.el  |2 +-
 lisp/org.el   |   59 +---
 5 files changed, 28 insertions(+), 39 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 8bb67d9..dac035f 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2481,7 +2481,7 @@ The details of what will be saved are regulated by the 
variable
  (goto-char (cdr resume-clock))
  (let ((org-clock-auto-clock-resolution nil))
(org-clock-in)
-   (if (org-invisible-p)
+   (if (outline-invisible-p)
(org-show-context))
 
 ;;;###autoload
diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el
index 1d76104..1758a81 100644
--- a/lisp/org-crypt.el
+++ b/lisp/org-crypt.el
@@ -112,7 +112,7 @@ This setting can also be overridden in the CRYPTKEY 
property.
 (let ((start-heading (point)))
   (forward-line)
   (when (not (looking-at -BEGIN PGP MESSAGE-))
-(let ((folded (org-invisible-p))
+(let ((folded (outline-invisible-p))
   (epg-context (epg-make-context nil t t))
   (crypt-key (org-crypt-key-for-heading))
   (beg (point))
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 7c814cd..e84a7c2 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -2615,7 +2615,7 @@ command.
   (goto-char (point-min))
   (while (re-search-forward org-drawer-regexp nil t)
(goto-char (match-beginning 1))
-   (or (org-invisible-p) (org-flag-drawer nil
+   (or (outline-invisible-p) (org-flag-drawer nil
 (with-current-buffer buffer (erase-buffer))
 (save-excursion
   (setq s (goto-char (point-min)))
diff --git a/lisp/org-list.el b/lisp/org-list.el
index bc8e7bd..56d00c9 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -1101,7 +1101,7 @@ item is invisible.
   (unless (or (not (org-in-item-p))
  (save-excursion
(goto-char (org-get-item-beginning))
-   (org-invisible-p)))
+   (outline-invisible-p)))
 (if (save-excursion
  (goto-char (org-get-item-beginning))
  (org-at-item-timer-p))
diff --git a/lisp/org.el b/lisp/org.el
index fcdf245..d6b9c0d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6010,7 +6010,7 @@ in special contexts.
   (save-excursion
(goto-char eos)
(outline-next-heading)
-   (if (org-invisible-p) (org-flag-heading nil
+   (if (outline-invisible-p) (org-flag-heading nil
  ((and (or (= eol eos)
   (not (string-match \\S- (buffer-substring eol eos
   (or has-children
@@ -6024,7 +6024,7 @@ in special contexts.
   (save-excursion
(goto-char eos)
(outline-next-heading)
-   (if (org-invisible-p) (org-flag-heading nil)))
+   (if (outline-invisible-p) (org-flag-heading nil)))
   (setq org-cycle-subtree-status 'children)
   (run-hook-with-args 'org-cycle-hook 'children))
  ((or children-skipped
@@ -6191,9 +6191,9 @@ This function is the default value of the hook 
`org-cycle-hook'.
  ;; Properly fold already folded siblings
  (goto-char (point-min))
  (while (re-search-forward re nil t)
-   (if (and (not (org-invisible-p))
+   (if (and (not (outline-invisible-p))
 (save-excursion
-  (goto-char (point-at-eol)) (org-invisible-p)))
+  (goto-char (point-at-eol)) (outline-invisible-p)))
(hide-entry
(org-cycle-show-empty-lines 'overview)
(org-cycle-hide-drawers 'overview)
@@ -6526,7 +6526,7 @@ the headline hierarchy above.
(progn
  (org-mark-ring-push org-goto-start-pos)
  (goto-char selected-point)
- (if (or (org-invisible-p) (org-invisible-p2))
+ (if (or (outline-invisible-p) (org-invisible-p2))
  (org-show-context 'org-goto)))
   (message Quit
 
@@ -6571,7 +6571,7 @@ or nil.
  (org-show-siblings t)
  (org-show-following-heading t))
  (goto-char org-goto-start-pos)
- (and (org-invisible-p) (org-show-context)))
+ (and (outline-invisible-p) (org-show-context)))
  (goto-char (point-min)))
(let (org-special-ctrl-a/e) (org-beginning-of-line))
(message Select location and press RET)
@@ -6786,14 +6786,14 @@ This is important for non-interactive uses of the 
command.
(cond
 ((and (org-on-heading-p) (bolp)
   (or (bobp)
-  (save-excursion (backward-char 1) (not (org-invisible-p)
+  (save-excursion (backward-char 1) (not 
(outline

[Orgmode] Re: [PATCH] org: remove org-invisible-p

2011-01-26 Thread Julien Danjou

I just found a left over in org-list.el. :)

Updated patch attached.

From bf6c65a42e04d4753c58795442a479685bb5f318 Mon Sep 17 00:00:00 2001
From: Julien Danjou jul...@danjou.info
Date: Wed, 26 Jan 2011 11:14:11 +0100
Subject: [PATCH] org: remove org-invisible-p

* org.el: Remove org-invisible-p: outline-invisible-p is
available in Emacs 22 and in recent XEmacs 21. Replace in
various files.

Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org-clock.el |2 +-
 lisp/org-crypt.el |2 +-
 lisp/org-exp.el   |2 +-
 lisp/org-list.el  |3 +-
 lisp/org.el   |   59 +---
 5 files changed, 28 insertions(+), 40 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 8bb67d9..dac035f 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2481,7 +2481,7 @@ The details of what will be saved are regulated by the variable
 	  (goto-char (cdr resume-clock))
 	  (let ((org-clock-auto-clock-resolution nil))
 		(org-clock-in)
-		(if (org-invisible-p)
+		(if (outline-invisible-p)
 		(org-show-context))
 
 ;;;###autoload
diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el
index 1d76104..1758a81 100644
--- a/lisp/org-crypt.el
+++ b/lisp/org-crypt.el
@@ -112,7 +112,7 @@ This setting can also be overridden in the CRYPTKEY property.
 (let ((start-heading (point)))
   (forward-line)
   (when (not (looking-at -BEGIN PGP MESSAGE-))
-(let ((folded (org-invisible-p))
+(let ((folded (outline-invisible-p))
   (epg-context (epg-make-context nil t t))
   (crypt-key (org-crypt-key-for-heading))
   (beg (point))
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 7c814cd..e84a7c2 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -2615,7 +2615,7 @@ command.
   (goto-char (point-min))
   (while (re-search-forward org-drawer-regexp nil t)
 	(goto-char (match-beginning 1))
-	(or (org-invisible-p) (org-flag-drawer nil
+	(or (outline-invisible-p) (org-flag-drawer nil
 (with-current-buffer buffer (erase-buffer))
 (save-excursion
   (setq s (goto-char (point-min)))
diff --git a/lisp/org-list.el b/lisp/org-list.el
index bc8e7bd..0c519fc 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -44,7 +44,6 @@
 (defvar org-ts-regexp)
 (defvar org-ts-regexp-both)
 
-(declare-function org-invisible-p org ())
 (declare-function org-on-heading-p org (optional invisible-ok))
 (declare-function outline-next-heading outline ())
 (declare-function org-back-to-heading org (optional invisible-ok))
@@ -1101,7 +1100,7 @@ item is invisible.
   (unless (or (not (org-in-item-p))
 	  (save-excursion
 		(goto-char (org-get-item-beginning))
-		(org-invisible-p)))
+		(outline-invisible-p)))
 (if (save-excursion
 	  (goto-char (org-get-item-beginning))
 	  (org-at-item-timer-p))
diff --git a/lisp/org.el b/lisp/org.el
index fcdf245..d6b9c0d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6010,7 +6010,7 @@ in special contexts.
   (save-excursion
 	(goto-char eos)
 	(outline-next-heading)
-	(if (org-invisible-p) (org-flag-heading nil
+	(if (outline-invisible-p) (org-flag-heading nil
  ((and (or (= eol eos)
 	   (not (string-match \\S- (buffer-substring eol eos
 	   (or has-children
@@ -6024,7 +6024,7 @@ in special contexts.
   (save-excursion
 	(goto-char eos)
 	(outline-next-heading)
-	(if (org-invisible-p) (org-flag-heading nil)))
+	(if (outline-invisible-p) (org-flag-heading nil)))
   (setq org-cycle-subtree-status 'children)
   (run-hook-with-args 'org-cycle-hook 'children))
  ((or children-skipped
@@ -6191,9 +6191,9 @@ This function is the default value of the hook `org-cycle-hook'.
 	  ;; Properly fold already folded siblings
 	  (goto-char (point-min))
 	  (while (re-search-forward re nil t)
-	(if (and (not (org-invisible-p))
+	(if (and (not (outline-invisible-p))
 		 (save-excursion
-		   (goto-char (point-at-eol)) (org-invisible-p)))
+		   (goto-char (point-at-eol)) (outline-invisible-p)))
 		(hide-entry
 	(org-cycle-show-empty-lines 'overview)
 	(org-cycle-hide-drawers 'overview)
@@ -6526,7 +6526,7 @@ the headline hierarchy above.
 	(progn
 	  (org-mark-ring-push org-goto-start-pos)
 	  (goto-char selected-point)
-	  (if (or (org-invisible-p) (org-invisible-p2))
+	  (if (or (outline-invisible-p) (org-invisible-p2))
 	  (org-show-context 'org-goto)))
   (message Quit
 
@@ -6571,7 +6571,7 @@ or nil.
 		  (org-show-siblings t)
 		  (org-show-following-heading t))
 	  (goto-char org-goto-start-pos)
-	  (and (org-invisible-p) (org-show-context)))
+	  (and (outline-invisible-p) (org-show-context)))
 	  (goto-char (point-min)))
 	(let (org-special-ctrl-a/e) (org-beginning-of-line))
 	(message Select location and press RET)
@@ -6786,14 +6786,14 @@ This is important for non-interactive uses of the command.
 	(cond
 	 ((and (org-on-heading-p) (bolp

[Orgmode] [PATCH] org-crypt: fix decrypt outline display bug

2011-01-26 Thread Julien Danjou
* org-crypt.el (org-decrypt-entry): Delete \n on top level heading.
This avoids a display bug showing the heading outlined where the text
is not since it does not have the outline property.
Restore subtree visibility state after decryption.

Cc: John Wiegley jo...@gnu.org
Cc: Peter Jones pjo...@pmade.com
Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org-crypt.el |   43 ++-
 1 files changed, 26 insertions(+), 17 deletions(-)

diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el
index 1758a81..7c28d70 100644
--- a/lisp/org-crypt.el
+++ b/lisp/org-crypt.el
@@ -140,23 +140,32 @@ This setting can also be overridden in the CRYPTKEY 
property.
   (unless (org-before-first-heading-p)
 (save-excursion
   (org-back-to-heading t)
-  (forward-line)
-  (when (looking-at -BEGIN PGP MESSAGE-)
-   (let* ((beg (point))
-  (end (save-excursion
- (search-forward -END PGP MESSAGE-)
- (forward-line)
- (point)))
-  (epg-context (epg-make-context nil t t))
-  (decrypted-text
-   (decode-coding-string
-(epg-decrypt-string
- epg-context
- (buffer-substring-no-properties beg end))
-'utf-8)))
- (delete-region beg end)
- (insert decrypted-text)
- nil)
+  (let ((heading-point (point))
+   (heading-was-invisible-p
+(save-excursion
+  (outline-end-of-heading)
+  (outline-invisible-p
+   (forward-line)
+   (when (looking-at -BEGIN PGP MESSAGE-)
+ (let* ((end (save-excursion
+   (search-forward -END PGP MESSAGE-)
+   (forward-line)
+   (point)))
+(epg-context (epg-make-context nil t t))
+(decrypted-text
+ (decode-coding-string
+  (epg-decrypt-string
+   epg-context
+   (buffer-substring-no-properties (point) end))
+  'utf-8)))
+   ;; Delete region starting just before point, because the
+   ;; outline property starts at the \n of the heading.
+   (delete-region (1- (point)) end)
+   (insert \n decrypted-text)
+   (when heading-was-invisible-p
+ (goto-char heading-point)
+ (org-flag-subtree t))
+   nil))
 
 (defun org-encrypt-entries ()
   Encrypt all top-level entries in the current buffer.
-- 
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] [PATCH] org-agenda: fix regexp in progress for state logging

2011-01-26 Thread Julien Danjou
* org-agenda.el (org-agenda-get-progress): Fix regexp for statep: it
must has \\ at the end of the line. This avoid matching the following
heading when there's no newline between the logged state and the next
heading.

Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org-agenda.el |   18 +-
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 3c1104e..6e8d07a 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4814,15 +4814,15 @@ be skipped.
 (setq clocked (match-string 2 rest)))
(setq clocked -)))
(save-excursion
- (setq extra nil)
- (cond
-  ((not org-agenda-log-mode-add-notes))
-  (statep
-   (and (looking-at .*\n[ \t]*\\([^-\n \t].*?\\)[ \t]*$)
-(setq extra (match-string 1
-  (clockp
-   (and (looking-at .*\n[ \t]*-[ \t]+\\([^-\n \t].*?\\)[ \t]*$)
-(setq extra (match-string 1)
+ (setq extra
+   (cond
+((not org-agenda-log-mode-add-notes) nil)
+(statep
+ (and (looking-at .*\n[ \t]*\\([^-\n \t].*?\\)[ \t]*$)
+  (match-string 1)))
+(clockp
+ (and (looking-at .*\n[ \t]*-[ \t]+\\([^-\n \t].*?\\)[ \t]*$)
+  (match-string 1)
  (if (not (re-search-backward ^\\*+  nil t))
  (setq txt org-agenda-no-heading-message)
(goto-char (match-beginning 0))
-- 
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


Re: [Orgmode] [PATCH] org-agenda: fix regexp in progress for state logging

2011-01-26 Thread Julien Danjou
On Wed, Jan 26 2011, Giovanni Ridolfi wrote:

 Julien Danjou jul...@danjou.info writes:

 Hi, Julien
 * org-agenda.el (org-agenda-get-progress): Fix regexp for statep: 
 it must has \\ at the end of the line. This avoid matching the following
   it must have ?

Yes, sorry, that's not a catz. :)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpgNOUR8m5rP.pgp
Description: PGP signature
___
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 a new text/org mime type

2011-01-23 Thread Julien Danjou
On Sun, Jan 23 2011, Štěpán Němec wrote:

 Unless I'm missing something, you forgot to also replace your other
 additions in mm-decode.el and mm-uu.el.

You are right, I think I grepped text/x-org unless of text/org.

Too tired. :)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpXOE8xT4YuH.pgp
Description: PGP signature
___
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] org-agenda: fix start/end time in timerange

2011-01-22 Thread Julien Danjou
* org-agenda.el (org-agenda-get-blocks): Fix time of start/end
of events with range. This display things like:
2011-01-22 Sat 14:00--2011-01-23 Sun 20:00
correctly, with the event starting at 14:00 and ending at 20:00.

Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org-agenda.el |   92 +++
 1 files changed, 49 insertions(+), 43 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 4f06eb0..3c1104e 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5075,55 +5075,61 @@ FRACTION is what fraction of the head-warning time has 
passed.
  (abbreviate-file-name buffer-file-name
 (regexp org-tr-regexp)
 (d0 (calendar-absolute-from-gregorian date))
-marker hdmarker ee txt d1 d2 s1 s2 timestr category todo-state tags pos
+marker hdmarker ee txt d1 d2 s1 s2 category todo-state tags pos
 head donep)
 (goto-char (point-min))
 (while (re-search-forward regexp nil t)
   (catch :skip
(org-agenda-skip)
(setq pos (point))
-   (setq timestr (match-string 0)
- s1 (match-string 1)
- s2 (match-string 2)
- d1 (time-to-days (org-time-string-to-time s1))
- d2 (time-to-days (org-time-string-to-time s2)))
-   (if (and ( (- d0 d1) -1) ( (- d2 d0) -1))
-   ;; Only allow days between the limits, because the normal
-   ;; date stamps will catch the limits.
-   (save-excursion
- (setq todo-state (org-get-todo-state))
- (setq donep (member todo-state org-done-keywords))
- (if (and donep org-agenda-skip-timestamp-if-done)
- (throw :skip t))
- (setq marker (org-agenda-new-marker (point)))
- (setq category (org-get-category))
- (if (not (re-search-backward ^\\*+  nil t))
- (setq txt org-agenda-no-heading-message)
-   (goto-char (match-beginning 0))
-   (setq hdmarker (org-agenda-new-marker (point)))
-   (setq tags (org-get-tags-at))
-   (looking-at \\*+[ \t]+\\([^\r\n]+\\))
-   (setq head (match-string 1))
-   (let ((remove-re
-  (if org-agenda-remove-timeranges-from-blocks
-  (concat
-(regexp-quote s1) .*?
-   --
-(regexp-quote s2) .*?)
-nil)))
- (setq txt (org-format-agenda-item
-(format
- (nth (if (= d1 d2) 0 1)
-  org-agenda-timerange-leaders)
- (1+ (- d0 d1)) (1+ (- d2 d1)))
-head category tags
-timestr nil remove-re
- (org-add-props txt props
-   'org-marker marker 'org-hd-marker hdmarker
-   'type block 'date date
-   'todo-state todo-state
-   'priority (org-get-priority txt) 'org-category category)
- (push txt ee)))
+   (let ((start-time (match-string 1))
+ (end-time (match-string 2)))
+ (setq s1 (match-string 1)
+   s2 (match-string 2)
+   d1 (time-to-days (org-time-string-to-time s1))
+   d2 (time-to-days (org-time-string-to-time s2)))
+ (if (and ( (- d0 d1) -1) ( (- d2 d0) -1))
+ ;; Only allow days between the limits, because the normal
+ ;; date stamps will catch the limits.
+ (save-excursion
+   (setq todo-state (org-get-todo-state))
+   (setq donep (member todo-state org-done-keywords))
+   (if (and donep org-agenda-skip-timestamp-if-done)
+   (throw :skip t))
+   (setq marker (org-agenda-new-marker (point)))
+   (setq category (org-get-category))
+   (if (not (re-search-backward ^\\*+  nil t))
+   (setq txt org-agenda-no-heading-message)
+ (goto-char (match-beginning 0))
+ (setq hdmarker (org-agenda-new-marker (point)))
+ (setq tags (org-get-tags-at))
+ (looking-at \\*+[ \t]+\\([^\r\n]+\\))
+ (setq head (match-string 1))
+ (let ((remove-re
+(if org-agenda-remove-timeranges-from-blocks
+(concat
+  (regexp-quote s1) .*?
+ --
+  (regexp-quote s2) .*?)
+  nil)))
+   (setq txt (org-format-agenda-item
+  (format
+   (nth (if (= d1 d2) 0 1)
+org-agenda-timerange-leaders)
+   (1+ (- d0 d1)) (1+ (- d2 d1

Re: [Orgmode] Re: Adding a new text/org mime type

2011-01-22 Thread Julien Danjou
 Please change it in the most sensible way.

I've changed to text/x-org.

-- 
Julien Danjou
❱ http://julien.danjou.info

___
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: Enhancing the Org/Gnus experience

2011-01-20 Thread Julien Danjou
On Wed, Jan 19 2011, Sébastien Vauban wrote:

 I had sent all the needed code to add to Gnus onto the Gnus newsgroup, see
 http://osdir.com/ml/info-gnus-english-gnu/2011-01/msg00082.html.

 But Gnus asks me to...

 #+begin_verse
 ... post a patch for these changes to the d...@gnus.org mailing list?
 #+end_verse

 This will require me to:

 - find the right place to put such a code in Gnus code base,
 - see how to deal with the =(mm-uu-configure)= function call (integrate
   somehow its effect, instead of calling it),
 - etc.

 Not that obvious (for me) to make it perfect-looking. Being quite overloaded,
 this task is still in my log, but gets delayed from day to day.

 Feel free to post anything in that direction, if you're willing to help.

Fine, I'll try to do that. I though you got already a patch against
Gnus, but it seems no, so I'll probably make one soon.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpRBBl07ta7u.pgp
Description: PGP signature
___
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: Enhancing the Org/Gnus experience

2011-01-20 Thread Julien Danjou
On Thu, Jan 20 2011, Julien Danjou wrote:

 Fine, I'll try to do that. I though you got already a patch against
 Gnus, but it seems no, so I'll probably make one soon.

Pushed in Gnus.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp93GgSuVAkg.pgp
Description: PGP signature
___
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: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-18 Thread Julien Danjou
On Tue, Jan 18 2011, Carsten Dominik wrote:

 Otherwise, if would continue to use whatever value you set with your
 latest view change and keep this until you change it again.


 So what was your issue with this part?

My issue is that I use a default value of 14 days (you know I'm weird).
If I change the current span by pressing `d', `w', `m', I've only one
way to go back to my default 14 days view: close the agenda and reopen
it.


[…]

 So there you have your command to go back to the default
 span.

Yes, but:

 If you think we do need an extra command for this, you
 could do that under the v dispatcher in the agenda.
 Maybe v SPACE?

This is exactly what I meant! :-)
I'd like to not to have to do `C-a a' once again to reset my view.

Here's a patch for that.
From f48b89a683f9ff36d164b20c1df44ca6e6aefd7e Mon Sep 17 00:00:00 2001
From: Julien Danjou jul...@danjou.info
Date: Tue, 18 Jan 2011 10:59:13 +0100
Subject: [PATCH] org-agenda: add a binding to reset the view

* org-agenda.el (org-agenda-reset-view): New function.
(org-agenda-view-mode-dispatch): Bind space to org-agenda-reset-view.

Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org-agenda.el |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 241ed30..138165f 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6157,11 +6157,12 @@ With prefix ARG, go backward that many times the current span.
 (defun org-agenda-view-mode-dispatch ()
   Call one of the view mode commands.
   (interactive)
-  (message View: [d]ay [w]eek [m]onth [y]ear [q]uit/abort
+  (message View: [d]ay [w]eek [m]onth [y]ear[space]reset[q]uit/abort
   time[G]rid [[]inactive [f]ollow [l]og [L]og-all   [E]ntryText
   [a]rch-trees   [A]rch-filesclock[R]eport   include[D]iary)
   (let ((a (read-char-exclusive)))
 (case a
+  (?  (call-interactively 'org-agenda-reset-view))
   (?d (call-interactively 'org-agenda-day-view))
   (?w (call-interactively 'org-agenda-week-view))
   (?m (call-interactively 'org-agenda-month-view))
@@ -6183,6 +6184,10 @@ With prefix ARG, go backward that many times the current span.
   (?q (message Abort))
   (otherwise (error Invalid key )
 
+(defun org-agenda-reset-view ()
+  Switch to default view for agenda.
+  (interactive)
+  (org-agenda-change-time-span (or org-agenda-ndays org-agenda-span)))
 (defun org-agenda-day-view (optional day-of-year)
   Switch to daily view for agenda.
 With argument DAY-OF-YEAR, switch to that day of the year.
-- 
1.7.2.3


-- 
Julien Danjou
❱ http://julien.danjou.info


pgpf4Fbko23Vy.pgp
Description: PGP signature
___
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] [RFC] Give org-format-agenda-item a real format

2011-01-17 Thread Julien Danjou
On Thu, Jan 13 2011, Eric S Fraga wrote:

 this sounds very appealing!  I (personally) would like to have the time
 at the far left of the screen and this would allow for that while still
 allowing me to include all the information I want.  I'll try it out soon
 and will give you feedback but probably not before next week due to
 current commitments...

Thanks Eric. I really need testing and review to push this forward.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgp0EBnUYekKt.pgp
Description: PGP signature
___
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] Encrypting org-mode files

2011-01-17 Thread Julien Danjou
On Mon, Jan 17 2011, Marcelo de Moraes Serpa wrote:

 What is the de-facto way to encrypt using org? I now I can use GnuPG,
 but I'd prefer something that integrates better and auto-decrypts when
 the agenda is triggered.

Take a look at `org-crypt' package.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpWD7BYIz7Et.pgp
Description: PGP signature
___
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: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-01-17 Thread Julien Danjou
On Mon, Jan 17 2011, Carsten Dominik wrote:

 have you been following this thread?  I think this has to do with your
 rewrite of the dagenda span stuff.  Maybe you can find out better and
 faster that I why this goes wrong?  Please read the entire thread.

I've followed but not sure I understood what the bug is. But from my
various tries, I found a bug: when pressing 'j', the current span is
discarded.

Attached is a patch that should fix that, even for future use of
`org-agenda-list' with the span unspecified. :)

From 9dd2fe6650b858a4083ebc083bb8d10a0d6ac7f2 Mon Sep 17 00:00:00 2001
From: Julien Danjou jul...@danjou.info
Date: Mon, 17 Jan 2011 16:05:28 +0100
Subject: [PATCH] Fix agenda span on date jump

* org-agenda.el (org-agenda-list): Use org-agenda-current-span as a
possible default span if it is set.

Signed-off-by: Julien Danjou jul...@danjou.info
---
 lisp/org-agenda.el |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 0cd620c..0d695b5 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3450,7 +3450,10 @@ given in `org-agenda-start-on-weekday'.
   (setq org-agenda-last-arguments (list include-all start-day span))
   (org-compile-prefix-format 'agenda)
   (org-set-sorting-strategy 'agenda)
-  (let* ((span (org-agenda-ndays-to-span (or span org-agenda-ndays org-agenda-span)))
+  (let* ((span (org-agenda-ndays-to-span (or span
+	 org-agenda-current-span
+	 org-agenda-ndays
+	 org-agenda-span)))
 	 (today (org-today))
 	 (sd (or start-day today))
 	 (ndays (org-agenda-span-to-ndays span sd))
-- 
1.7.2.3


-- 
Julien Danjou
❱ http://julien.danjou.info


pgpzMOJh3HmBL.pgp
Description: PGP signature
___
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: Enhancing the Org/Gnus experience

2011-01-17 Thread Julien Danjou
On Mon, Nov 29 2010, Sébastien Vauban wrote:

 I've signed (like 2 weeks ago) the FSF papers, and am still waiting for the
 PDF file that proves it. As soon as I get them, I send a proper patch to Larsi
 for integration into Gnus. Eventually, I'd even like to add some other stuff
 (inlined code with = markers, etc.)...

Any news on this?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpuVIh6l576r.pgp
Description: PGP signature
___
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


  1   2   >