Re: Sugesstion for a more fexible org-bbdb-anniversary-description

2020-05-23 Thread Bastien
Hi Dieter,

Dieter Faulbaum  writes:

> I think it would be nice if this function would have some (customizable)
> variables.

thanks for the suggestion.

Org's interface is in english.  Org supports partial localization for
the exporter (see `org-export-dictionary') and for clock tables.  The
reason we support i18n for the clock tables is that they are often
meant to be part of documents shared with others (e.g. colleagues.)

We can safely assume bbdb anniversaries are for the user only, so Org
will not provide i18n here.

We could imagine an option to let the user refine the UI here but I
don't think that's a good idea because those strings are meant to be
further used as formatting strings, so this would require too much
explanations to the users.

Best,

-- 
 Bastien



Sugesstion for a more fexible org-bbdb-anniversary-description

2020-03-30 Thread Dieter Faulbaum


I think it would be nice if this function would have some (customizable)
variables.

Here (in Germany) e.g. I like this:

(defun org-bbdb-anniversary-description (agenda-date anniv-date)
  (let ((delta (- (calendar-absolute-from-gregorian anniv-date)
  (calendar-absolute-from-gregorian agenda-date
(cond
 ((= delta 0) "\\&")
 ((= delta 1) " (morgen)\\&")
 ((< delta org-bbdb-general-anniversary-description-after)
  (format " (in %d Tagen)\\&" delta))
 ((pcase-let ((`(,month ,day ,year) anniv-date))
(format " (am %d.%d.)\\&" day month)))
 )
)
  )

And I think others would have other preferences.

Just an idea.
I'm sorry but I can't program lisp good enough to implement my idea
(without the shown hack).