Re: [O] No dot in datepicker dialog

2013-04-24 Thread Bastien
Hi Michael,

Michael Brand michael.ch.br...@gmail.com writes:

 Yes, this is how it worked and I was used to before too, very
 convenient.

This is how it works again.

Thanks for insisting on this!

-- 
 Bastien



Re: [O] No dot in datepicker dialog

2013-04-24 Thread Carsten Dominik

On 24.4.2013, at 10:06, Bastien b...@gnu.org wrote:

 Hi Michael,
 
 Michael Brand michael.ch.br...@gmail.com writes:
 
 Yes, this is how it worked and I was used to before too, very
 convenient.
 
 This is how it works again.

How about testing for 

   (= (point) (1+ (length prompt)))

instead of

   (= (char-before) 32)

?

- Carsten



Re: [O] No dot in datepicker dialog

2013-04-24 Thread Bastien
Carsten Dominik carsten.domi...@gmail.com writes:

 On 24.4.2013, at 10:06, Bastien b...@gnu.org wrote:

 Hi Michael,
 
 Michael Brand michael.ch.br...@gmail.com writes:
 
 Yes, this is how it worked and I was used to before too, very
 convenient.
 
 This is how it works again.

 How about testing for 

(= (point) (1+ (length prompt)))

 instead of

(= (char-before) 32)

 ?

 - Carsten

Yep, as you wish -- I though it was somehow nice to still be able to
quickly jump at todays date by inserting a space then hitting .,
even in the middle of the inserted text... but clearly a dubious
trick.

Let me know if you want me to do the change,

-- 
 Bastien



Re: [O] No dot in datepicker dialog

2013-04-24 Thread Michael Brand
On Wed, Apr 24, 2013 at 10:31 AM, Bastien b...@gnu.org wrote:
 Carsten Dominik carsten.domi...@gmail.com writes:
 [...]
 How about testing for

(= (point) (1+ (length prompt)))

 instead of

(= (char-before) 32)

 ?

 - Carsten

 Yep, as you wish -- I though it was somehow nice to still be able to
 quickly jump at todays date by inserting a space then hitting .,
 even in the middle of the inserted text... but clearly a dubious
 trick.

 Let me know if you want me to do the change,

(= (point) (1+ (length prompt))) would be a regression of 3 1 . 1 2 ..

On the other side the current (= (char-before) ?.) does still not echo
the . at the beginning which I found convenient but don't insist if
there is a reason for not to echo.

Michael



Re: [O] No dot in datepicker dialog

2013-04-24 Thread Bastien
Michael Brand michael.ch.br...@gmail.com writes:

 On the other side the current (= (char-before) ?.) does still not echo
 the . at the beginning which I found convenient but don't insist if
 there is a reason for not to echo.

I have no strong opinion on this, but I think it's better if . does
one single thing at the time.

-- 
 Bastien



Re: [O] No dot in datepicker dialog

2013-04-24 Thread Michael Brand
On Wed, Apr 24, 2013 at 10:43 AM, Michael Brand
michael.ch.br...@gmail.com wrote:
 (= (point) (1+ (length prompt))) would be a regression of 3 1 . 1 2 ..

Sorry, it is not a regression when reloading lisp properly and not
only with eval-buffer of org.el. Would be ok for me if not echoing .
at the beginning is intended.

Michael



Re: [O] No dot in datepicker dialog

2013-04-24 Thread Carsten Dominik

On 24.4.2013, at 10:31, Bastien b...@gnu.org wrote:

 Carsten Dominik carsten.domi...@gmail.com writes:
 
 On 24.4.2013, at 10:06, Bastien b...@gnu.org wrote:
 
 Hi Michael,
 
 Michael Brand michael.ch.br...@gmail.com writes:
 
 Yes, this is how it worked and I was used to before too, very
 convenient.
 
 This is how it works again.
 
 How about testing for 
 
   (= (point) (1+ (length prompt)))
 
 instead of
 
   (= (char-before) 32)
 
 ?
 
 - Carsten
 
 Yep, as you wish -- I though it was somehow nice to still be able to
 quickly jump at todays date by inserting a space then hitting .,
 even in the middle of the inserted text... but clearly a dubious
 trick.
 
 Let me know if you want me to do the change,

I think only doing this at the beginning of the prompt is better,
anywhere else it is too magic.  Maybe we can have a command like C-c . which 
will work everywhere?

- Carsten


 
 -- 
 Bastien




Re: [O] No dot in datepicker dialog

2013-04-24 Thread Michael Brand
Hi Bastien

On Wed, Apr 24, 2013 at 10:51 AM, Bastien b...@gnu.org wrote:
 I have no strong opinion on this, but I think it's better if . does
 one single thing at the time.

Then I don't mind.

And oh, by the way, thank you for taking care of the regression of 3
1 . 1 2 . now solved.

Michael



Re: [O] No dot in datepicker dialog

2013-04-24 Thread Bastien
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com writes:

 I think only doing this at the beginning of the prompt is better,
 anywhere else it is too magic.  

Okay, I implemented this by checking if we are at the start of the
prompt with `looking-back'.  Using prompt here would raise a
compiler warning -- we would need to use org-prompt instead of prompt
and to (defvar org-prompt) ... a bit too much IMO.

 Maybe we can have a command like C-c . which will work everywhere?

I've done this too.

-- 
 Bastien



Re: [O] No dot in datepicker dialog

2013-04-24 Thread Carsten Dominik

On 24.4.2013, at 11:38, Bastien b...@gnu.org wrote:

 Hi Carsten,
 
 Carsten Dominik carsten.domi...@gmail.com writes:
 
 I think only doing this at the beginning of the prompt is better,
 anywhere else it is too magic.  
 
 Okay, I implemented this by checking if we are at the start of the
 prompt with `looking-back'.  Using prompt here would raise a
 compiler warning -- we would need to use org-prompt instead of prompt
 and to (defvar org-prompt) ... a bit too much IMO.


Yes, this is better.

 
 Maybe we can have a command like C-c . which will work everywhere?
 
 I've done this too.

Thank you.

- Carsten

 
 -- 
 Bastien




Re: [O] No dot in datepicker dialog

2013-04-23 Thread Michael Brand
On Thu, Apr 4, 2013 at 3:18 PM, Karl Voit devn...@karl-voit.at wrote:
 [...]
 AFAIR I was able to use . (to jump to $today) *and*
 type 31.12. (without C-q . or similar) before.

 So in my opinion, it is not interfering at all: It can be solved by
 interpreting . (as goto-today) *only* if nothing else has been
 written into the minibuffer.

 This way, . jumps to today *and* the user is able to enter
 31.12. in the minibuffer in order to jump to the last day of
 December.
 [...]

and

On Thu, Apr 4, 2013 at 4:19 PM, Gregor Zattler telegr...@gmx.net wrote:
 [...]
 Or: would it help to restrict the special meaning of `.' as a
 reference for `today' only for the first character of the date
 picker input?
 [...]

Yes, this is how it worked and I was used to before too, very convenient.

And regarding the _echo_ of .: I find the current behavior of not
echoing the . confusing, as if it would be ignored when typed after
3 1. There and also when . is typed in the first place to jump to
today it was echoed in the prompt which I appreciated as a visual
feedback for what has actually been typed.

In other words:
- C-c . . _echoed_ and did what
  C-c . C-q . _echoes_ and does now (goto today)
- C-c . 3 1 . 1 2 . echoed and did what
  C-c . 3 1 C-q . 1 2 C-q . echoes and does now (goto Dec 31)
Reduced to these simple use cases applied on an existing past/future
timestamp the changes in Org seem strange.

Michael



Re: [O] No dot in datepicker dialog

2013-04-04 Thread Bastien
Hi Karl,

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

 A couple of weeks ago[1] the datepicking dialog got modified such
 that a dot . jumps to the current day. Handy for most Org-mode
 users I guess.

. is also the character used in M-x calendar RET to jump to today's
date.

 However, this interferes with another feature I used quite often: I
 was able to enter 31.12. to quickly select 31st of December, for
 example.

 Please notice that (at least) in German speaking countries, it is
 common to use 31.12. and not 12/31 or similar.

 So in current Org-mode (git), I can not enter the character .
 because it does not end up with a dot in the bottom line.

 Is there a way to customize this behavior?

You can insert a dot with C-q . in the calendar.

You can also customize the local map:

;; Unbind . in Org's calendar:
(define-key org-read-date-minibuffer-local-map (kbd .) nil)

;; Bind @ to `calendar-goto-today':
(define-key org-read-date-minibuffer-local-map
(kbd @)
(lambda () (interactive) (org-eval-in-calendar 
'(calendar-goto-today

HTH,

-- 
 Bastien



Re: [O] No dot in datepicker dialog

2013-04-04 Thread Karl Voit
* Bastien b...@altern.org wrote:
 Hi Karl,

Hi Bastien!

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

 A couple of weeks ago[1] the datepicking dialog got modified such
 that a dot . jumps to the current day. Handy for most Org-mode
 users I guess.

 . is also the character used in M-x calendar RET to jump to today's
 date.

Ack. However, AFAIR I was able to use . (to jump to $today) *and*
type 31.12. (without C-q . or similar) before.

So in my opinion, it is not interfering at all: It can be solved by
interpreting . (as goto-today) *only* if nothing else has been
written into the minibuffer.

This way, . jumps to today *and* the user is able to enter
31.12. in the minibuffer in order to jump to the last day of
December.

 You can insert a dot with C-q . in the calendar.

Thanks! This workaround solves my issue for now.

 You can also customize the local map:

Thanks for the pointer! Copied to my Emacs notes section :-)

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] No dot in datepicker dialog

2013-04-04 Thread Gregor Zattler
Hi Bastien,
* Bastien b...@altern.org [04. Apr. 2013]:
 Karl Voit devn...@karl-voit.at writes:
 A couple of weeks ago[1] the datepicking dialog got modified such
 that a dot . jumps to the current day. Handy for most Org-mode
 users I guess.
 
 . is also the character used in M-x calendar RET to jump to today's
 date.
 However, this interferes with another feature I used quite often: I
 was able to enter 31.12. to quickly select 31st of December, for
 example.

 Please notice that (at least) in German speaking countries, it is
 common to use 31.12. and not 12/31 or similar.

 So in current Org-mode (git), I can not enter the character .
 because it does not end up with a dot in the bottom line.

I think here two different usages collide:

1) user of org-mode controls the date picker via keystrokes
2) enter dates (and times) via cut/paste from other sources
   (which were not created with the org-mode date picker in mind)
   and let the date picker parse them

I for instance heavily rely on the second usage scenario.

While I see that the usage of `.' for jump-to-today is
long-standing tradition in Emacs calendar (first usage scenario),
it's also a very common character to separate date fields in many
countries (see
http://en.wikipedia.org/wiki/Date_format_by_country) (important
for second usage scenario).

Therefore if we give `.' a special meaning in the date picker it
is no longer possible to paste dates e.g. from emails if these
happen to use `.' as date field separator.


 Is there a way to customize this behavior?
 
 You can insert a dot with C-q . in the calendar.

This won't work with pasted text snippets containing dates.

 You can also customize the local map:
 
 ;; Unbind . in Org's calendar:
 (define-key org-read-date-minibuffer-local-map (kbd .) nil)
 
 ;; Bind @ to `calendar-goto-today':
 (define-key org-read-date-minibuffer-local-map
 (kbd @)
 (lambda () (interactive) (org-eval-in-calendar 
 '(calendar-goto-today

Using a character which usually is not used in sentences which
refer to dates and times would help both usage scenarios.  While
I can't find an example ATM, I remember to have seen combined
date-time representations like 2013-03-04@12:30.  

Characters typically not used in date/time representations
are (to my little knowledge):

`§', `$', `%', `', `=', `#', `\', `_', `´', ``'

these are normally not used in normal sentences which contain
date/time information (as opposed to e.g. `,', `:', `;') and most
of them are typically present on keyboards (perhaps not the `§'
which is part of German keyboards, which says a lot about German
culture I guess).  These characters are also not mentioned with
special meaning in the org manual on this topic ((org)Top  Dates
and Times  Creating timestamps  The date/time prompt).

Wouldn't it be better to have one of these as a *default* setting
for calendar-goto-today?


Or: would it help to restrict the special meaning of `.' as a
reference for `today' only for the first character of the date
picker input?  This would correspond with the usage advise
Generally, the information should start at the beginning of the
string in the org-mode manual and at the same time with the
long-standing meaning of `.' for `today' for Emacs calendar
users while still allowing to paste date/time information from
sources outside the Emacs/org-mode universe.



Sorry for my lousy command of the English language and thanks for
considering this anyway, Gregor  




[O] No dot in datepicker dialog

2013-03-26 Thread Karl Voit
Hi!

A couple of weeks ago[1] the datepicking dialog got modified such
that a dot . jumps to the current day. Handy for most Org-mode
users I guess.

However, this interferes with another feature I used quite often: I
was able to enter 31.12. to quickly select 31st of December, for
example.

Please notice that (at least) in German speaking countries, it is
common to use 31.12. and not 12/31 or similar.

So in current Org-mode (git), I can not enter the character .
because it does not end up with a dot in the bottom line.

Is there a way to customize this behavior?

  1. I can do a bisect if needed.
-- 
Karl Voit