emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* contact management in emacs
@ 2021-02-27 11:08 Alan Schmitt
  2021-02-27 11:31 ` Martin Steffen
                   ` (4 more replies)
  0 siblings, 5 replies; 30+ messages in thread
From: Alan Schmitt @ 2021-02-27 11:08 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]

Hello,

This may be slightly off-topic for the list, but as I’m considering
org-contacts for my question, I hope it will be of interest here.

I would like to migrate my contact management to emacs, as I’m already
using it for email. My requirements are the following ones:
- address completion in emacs email clients (I currently use notmuch)
- support for multiple email addresses and custom fields
- creation of org links to contacts
- export to vcard format for synchronization to my mobile phone (using
vdirsyncer)
- keep the data under version control

I have looked at two tools, which almost seem fit for the job.
- ebdb does most of this, with the exception of vcard export (it seems
to be worked on, https://github.com/girzel/ebdb/issues/60), and I’m not
sure using version control on an sqlite file is a good idea.
- org-contacts also seem to have all the required features, including
vcard export (and if not sufficient there is
https://github.com/novoid/org-contacts2vcard). I was worried it was
unmaintained when looking at the copyright line, but I see in
https://code.orgmode.org/bzg/org-mode/commits/master/contrib/lisp/org-contacts.el
that there are recent commits to the file.

Do you manage your contacts in emacs? And if so, what tools or workflow
do you recommend?

Best,

Alan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 528 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-27 11:08 Alan Schmitt
@ 2021-02-27 11:31 ` Martin Steffen
  2021-02-27 13:20   ` andrés ramírez
  2021-02-27 17:00   ` Dr. Arne Babenhauserheide
  2021-02-27 16:53 ` Bob Newell
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 30+ messages in thread
From: Martin Steffen @ 2021-02-27 11:31 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode




I use bbdb (big-brother data base). I use it since a looong time
already, and amassed 15000 or so contracts. It does what I want, it's
text-based, so versioning is not a problem.

I think it can do vcard export (though when I used vcards is a long
time ago, I can't remember if that was smooth, I think it was with one
of my first smart phone, and I wanted to quick fill up the phone book
there with my ``emacs-managed'' contact data base.).

One can add used defined fields (where one can ``match'' all contacts
for some criterion, and send then ``bulk'' email.

Org is also bbdb-aware, insofar one can do those links: instead of
[[file:xxxx][yyy]] one can use [[bbdb:somecriterion]].

I don't know if it matches your needs, but I can't say bad things about
that bbdb-thing.

Martin




^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-27 11:31 ` Martin Steffen
@ 2021-02-27 13:20   ` andrés ramírez
  2021-02-27 14:40     ` Eric S Fraga
  2021-02-27 17:00   ` Dr. Arne Babenhauserheide
  1 sibling, 1 reply; 30+ messages in thread
From: andrés ramírez @ 2021-02-27 13:20 UTC (permalink / raw)
  To: Martin Steffen; +Cc: Alan Schmitt, emacs-orgmode

Hi. Martin and  Alan.

>>>>> "Martin" == Martin Steffen <msteffen@ifi.uio.no> writes:


[...]


    Martin> Org is also bbdb-aware, insofar one can do those links: instead of [[file:xxxx][yyy]]
    Martin> one can use [[bbdb:somecriterion]].

bbdb anniversaries could also appear  on agenda:
--8<---------------cut here---------------start------------->8---
10 days-agenda (W08-W09):
Wednesday  24 February 2021
Thursday   25 February 2021
Friday     26 February 2021
Saturday   27 February 2021
Sunday     28 February 2021
Monday      1 March 2021 W09
Tuesday     2 March 2021
Wednesday   3 March 2021
  bbdb:       [[bbdb:Pedro ][Pedro  61st custom anniversary]]
Thursday    4 March 2021
Friday      5 March 2021
--8<---------------cut here---------------end--------------->8---

Andrés Ramírez


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-27 13:20   ` andrés ramírez
@ 2021-02-27 14:40     ` Eric S Fraga
  2021-02-27 15:12       ` andrés ramírez
  2021-02-27 15:14       ` Martin Steffen
  0 siblings, 2 replies; 30+ messages in thread
From: Eric S Fraga @ 2021-02-27 14:40 UTC (permalink / raw)
  To: andrés ramírez; +Cc: emacs-orgmode

On Saturday, 27 Feb 2021 at 13:20, andrés ramírez wrote:
> bbdb anniversaries could also appear  on agenda:

How do you get these to appear?  Or is the "could" a wish?
thank you, eric
-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.4-231-gf46925


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-27 14:40     ` Eric S Fraga
@ 2021-02-27 15:12       ` andrés ramírez
  2021-02-28 10:21         ` Eric S Fraga
  2021-02-27 15:14       ` Martin Steffen
  1 sibling, 1 reply; 30+ messages in thread
From: andrés ramírez @ 2021-02-27 15:12 UTC (permalink / raw)
  To: andrés ramírez, emacs-orgmode

Hi. Eric.

>>>>> "Eric" == Eric S Fraga <e.fraga@ucl.ac.uk> writes:


[...]


    Eric> How do you get these to appear?  Or is the "could" a wish?

This is my setup:
--8<---------------cut here---------------start------------->8---
(setq org-agenda-files (directory-files "~/docs/org/deft/" t ".*agenda\.org$"))
--8<---------------cut here---------------end--------------->8---

~/docs/org/deft/bbdb-anniversary-trick.agenda.org:
--8<---------------cut here---------------start------------->8---
* anniversary [isodate] 
  :PROPERTIES:
  :CATEGORY: bbdb
  :END:
%%(when (fboundp 'my/org-bbdb-anniversaries) (my/org-bbdb-anniversaries))
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
(defun my/org-bbdb-anniversaries ()
"It does not work on emacs-23"
  (when (/= 23 emacs-major-version)
    (org-bbdb-anniversaries)
    )
  )
  --8<---------------cut here---------------end--------------->8---

the bbdb record should have the field anniversary:
--8<---------------cut here---------------start------------->8---
        anniversary: 1960-03-03 custom
--8<---------------cut here---------------end--------------->8---

Best Regards


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-27 14:40     ` Eric S Fraga
  2021-02-27 15:12       ` andrés ramírez
@ 2021-02-27 15:14       ` Martin Steffen
  1 sibling, 0 replies; 30+ messages in thread
From: Martin Steffen @ 2021-02-27 15:14 UTC (permalink / raw)
  To: andrés ramírez; +Cc: emacs-orgmode

>>>>> "Eric" == Eric S Fraga <e.fraga@ucl.ac.uk> writes:

    Eric> How do you get these to appear?  Or is the "could" a wish?

It's ``automatic''. The entry of the person needs a field "anniversary",
if that's filled with a date in yyyy-mm-dd format, it's included
(perhaps one has to set a variable like ``show-bbdb-anniversaries''
and/or load a corresponding elisp-addition.)


Martin




    Eric> thank you, eric -- : Eric S Fraga via Emacs 28.0.50, Org
    Eric> release_9.4.4-231-gf46925



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-27 11:08 Alan Schmitt
  2021-02-27 11:31 ` Martin Steffen
@ 2021-02-27 16:53 ` Bob Newell
  2021-02-28  9:06 ` Russell Adams
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 30+ messages in thread
From: Bob Newell @ 2021-02-27 16:53 UTC (permalink / raw)
  To: emacs-orgmode

I've used BBDB for years, and have tried org-contact, but it
didn't seem to scale to the now rather large size of my BBDB
database.

I've looked at migrating to EBDB but as I have many custom
functions I haven't yet made the move.

BBDB can do amazing things. I've mentioned some of them
before. Of course org links are supported, and in conjunction
with the 'gnorb' package, Gnus email can be associated with
BBDB entries in interesting ways.

I use BBDB to easily maintain a slew of mailing lists. I also
have custom functions to set the input language mode for those
with whom I correspond in non-English languages. I even use
BBDB to initiate phone calls when I'm on my desktop computer.

I hadn't thought to put BBDB under version control but that
would be very easy.

However you don't need to get fancy right away. All the basics
are there. Like many things Emacs, it does take time to get
things set up the way you wish, but that time is well repaid
down the road a little.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-27 11:31 ` Martin Steffen
  2021-02-27 13:20   ` andrés ramírez
@ 2021-02-27 17:00   ` Dr. Arne Babenhauserheide
  1 sibling, 0 replies; 30+ messages in thread
From: Dr. Arne Babenhauserheide @ 2021-02-27 17:00 UTC (permalink / raw)
  To: Martin Steffen; +Cc: Alan Schmitt, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]


Martin Steffen <msteffen@ifi.uio.no> writes:

> I use bbdb (big-brother data base). I use it since a looong time
> already, and amassed 15000 or so contracts. It does what I want, it's
> text-based, so versioning is not a problem.

And it is fast; lookup feels instantaneous — different from many other
address-manager solutions.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: content management in emacs
       [not found] <mailman.47.1614445226.20994.emacs-orgmode@gnu.org>
@ 2021-02-27 18:57 ` Ian Garmaise
  2021-02-27 19:16   ` Martin Steffen
                     ` (3 more replies)
  2021-02-27 20:52 ` contact " dalanicolai
  1 sibling, 4 replies; 30+ messages in thread
From: Ian Garmaise @ 2021-02-27 18:57 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1804 bytes --]

Hi Bob,

How do you send mail to mailing lists with BBDB?  Do you use a templating
tool?  Also, how do you start a phone call?

Ian



Message: 28
> Date: Sat, 27 Feb 2021 06:53:57 -1000
> From: Bob Newell <bobnewell@bobnewell.net>
> To: "emacs-orgmode" <emacs-orgmode@gnu.org>
> Subject: Re: contact management in emacs
> Message-ID: <s6jv9ad1mfu.fsf@emailmessageidheader.nil>
> Content-Type: text/plain
>
> I've used BBDB for years, and have tried org-contact, but it
> didn't seem to scale to the now rather large size of my BBDB
> database.
>
> I've looked at migrating to EBDB but as I have many custom
> functions I haven't yet made the move.
>
> BBDB can do amazing things. I've mentioned some of them
> before. Of course org links are supported, and in conjunction
> with the 'gnorb' package, Gnus email can be associated with
> BBDB entries in interesting ways.
>
> I use BBDB to easily maintain a slew of mailing lists. I also
> have custom functions to set the input language mode for those
> with whom I correspond in non-English languages. I even use
> BBDB to initiate phone calls when I'm on my desktop computer.
>
> I hadn't thought to put BBDB under version control but that
> would be very easy.
>
> However you don't need to get fancy right away. All the basics
> are there. Like many things Emacs, it does take time to get
> things set up the way you wish, but that time is well repaid
> down the road a little.
>
> --
> Bob Newell
> Honolulu, Hawai`i
>
> - Via GNU/Linux/Emacs/Gnus/BBDB
>
>
>
> End of Emacs-orgmode Digest, Vol 180, Issue 30
> **********************************************
>


-- 
=====
Ian Garmaise
Consultant
Phorix Solutions Group
ian.g@phorixsol.com
Toronto cell: 416.432.2251
NYC: 917.512.9535

https://www.linkedin.com/in/igarmaise/

http://www.PhorixSol.com

[-- Attachment #2: Type: text/html, Size: 3207 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: content management in emacs
  2021-02-27 18:57 ` content management in emacs Ian Garmaise
@ 2021-02-27 19:16   ` Martin Steffen
  2021-02-27 20:11     ` Juan Manuel Macías
  2021-03-01  5:17     ` Bob Newell
  2021-02-28 10:39   ` Eric S Fraga
                     ` (2 subsequent siblings)
  3 siblings, 2 replies; 30+ messages in thread
From: Martin Steffen @ 2021-02-27 19:16 UTC (permalink / raw)
  To: Ian Garmaise; +Cc: emacs-orgmode

>>>>> "Ian" == Ian Garmaise <ian.g@phorixsol.com> writes:

    Ian> Hi Bob,

    Ian> How do you send mail to mailing lists with BBDB?  Do you use a

I am not sure about the question. If I send to an email list, it's an
address in BBDB. So I ``invoke'' BBDB (M-x bbdb) and give it the name of
the entry (say org-mode). That's analogous to send to a person: If you
remember the name (or part of the name), you find the entry, send then
compose an email ("m") on the entry.

Tab-completion may help.

If the question is: how do I send an email to all members of my chess
club or drinking buddies? If you have added some field to persons of
that circle (like "bridgeclub" or "drinkingbuddy", then you invoke bbdb
with that match, and then there is a possibility to send an email to
/all/ members of a matching list.


For phoning, I am not sure. I think there is (or was) a functionality to
initiate a call (probably with skype or ekiga or some such) but I never
used that.

Basically, for phoning, for me it's more like a rolodex, but a fast and
big one

Martin




    Ian> templating tool?  Also, how do you start a phone call?

    Ian> Ian

    Ian>  Message: 28 Date: Sat, 27 Feb 2021 06:53:57 -1000 From: Bob
    Ian> Newell <bobnewell@bobnewell.net> To: "emacs-orgmode"
    Ian> <emacs-orgmode@gnu.org> Subject: Re: contact management in
    Ian> emacs Message-ID: <s6jv9ad1mfu.fsf@emailmessageidheader.nil>
    Ian> Content-Type: text/plain

    Ian>  I've used BBDB for years, and have tried org-contact, but it
    Ian> didn't seem to scale to the now rather large size of my BBDB
    Ian> database.

    Ian>  I've looked at migrating to EBDB but as I have many custom
    Ian> functions I haven't yet made the move.

    Ian>  BBDB can do amazing things. I've mentioned some of them
    Ian> before. Of course org links are supported, and in conjunction
    Ian> with the 'gnorb' package, Gnus email can be associated with
    Ian> BBDB entries in interesting ways.

    Ian>  I use BBDB to easily maintain a slew of mailing lists. I also
    Ian> have custom functions to set the input language mode for those
    Ian> with whom I correspond in non-English languages. I even use
    Ian> BBDB to initiate phone calls when I'm on my desktop computer.

    Ian>  I hadn't thought to put BBDB under version control but that
    Ian> would be very easy.

    Ian>  However you don't need to get fancy right away. All the basics
    Ian> are there. Like many things Emacs, it does take time to get
    Ian> things set up the way you wish, but that time is well repaid
    Ian> down the road a little.

    Ian>  -- Bob Newell Honolulu, Hawai`i

    Ian>  - Via GNU/Linux/Emacs/Gnus/BBDB

    Ian>  End of Emacs-orgmode Digest, Vol 180, Issue 30
    Ian> **********************************************

    Ian> -- ===== Ian Garmaise Consultant Phorix Solutions Group
    Ian> ian.g@phorixsol.com Toronto cell: 416.432.2251 NYC:
    Ian> 917.512.9535

    Ian> https://www.linkedin.com/in/igarmaise/

    Ian> http://www.PhorixSol.com



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: content management in emacs
  2021-02-27 19:16   ` Martin Steffen
@ 2021-02-27 20:11     ` Juan Manuel Macías
  2021-03-01  5:17     ` Bob Newell
  1 sibling, 0 replies; 30+ messages in thread
From: Juan Manuel Macías @ 2021-02-27 20:11 UTC (permalink / raw)
  To: Martin Steffen; +Cc: orgmode

Martin Steffen <msteffen@ifi.uio.no> writes:

> I am not sure about the question. If I send to an email list, it's an
> address in BBDB. So I ``invoke'' BBDB (M-x bbdb) and give it the name of
> the entry (say org-mode). That's analogous to send to a person: If you
> remember the name (or part of the name), you find the entry, send then
> compose an email ("m") on the entry.

There is also helm-bbdb, wich is very useful
(https://github.com/emacs-helm/helm-bbdb). For Gnus I have defined this:

#+begin_src emacs-lisp
(require 'helm-bbdb)

(setq message-completion-alist '(("^\\(Newsgroups\\|Followup-To\\|Posted-To\\|Gcc\\):" . message-expand-group)
                                 ("^\\(Resent-\\)?\\(To\\|B?Cc\\):" . helm-bbdb-expand-name)
                                 ("^\\(Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):" . helm-bbdb-expand-name)
                                 ("^\\(Disposition-Notification-To\\|Return-Receipt-To\\):"
                                  . helm-bbdb-expand-name)))
#+end_src

And to insert an address at point (for example, in Org, in the `mail_to'
property):

#+begin_src emacs-lisp
(defun my-insert-mail-address-helm-bbdb (_candidate)
  (save-window-excursion
    (helm-bbdb--view-person-action-1 (helm-bbdb--marked-contacts))
    (call-interactively 'bbdb-mail-address)
    (kill-buffer))
  (yank))

(add-to-list 'helm-bbdb-actions '("Insert mail address" . my-insert-mail-address-helm-bbdb))
#+end_src

Regards,

Juan Manuel


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
       [not found] <mailman.47.1614445226.20994.emacs-orgmode@gnu.org>
  2021-02-27 18:57 ` content management in emacs Ian Garmaise
@ 2021-02-27 20:52 ` dalanicolai
  2021-03-07 22:51   ` Jean Louis
  1 sibling, 1 reply; 30+ messages in thread
From: dalanicolai @ 2021-02-27 20:52 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 43245 bytes --]

I think all packages fulfill your requirements. So I would say it depends
on how many contacts you are managing. I have some experience with
org-contacts, and I find it very convenient and straightforward. It is also
very convenient to just use org-mode, i.e. a plain text file, for your
contacts. Every contact is a headline and you can add any kind of property
or tag etc. you want. Also anniversaries get added to the Agenda. You can
very easily jump to the right contact, using imenu or swoop/swiper (I use
`SPC j i ` in Spacemacs. So if you have less than say 300 contacts (I have
really no clue about the number of contacts that will still work smoothly),
then depending on how die-hard you are, I would recommend to start with
org-contacs. You can use org-vcard to import contacts, and org-vcard claims
to support exports too but I did not test that yet.
Anyway, I think you won't loose much time with setting up org-contacts and
from then you can slowly check out and study the other options.

I do not use Emacs for email yet, but org-contacts claims to support most
of Emacs its mail-readers.

If you enjoy tweaking your setup and study a little more then maybe
directly use BBDB or EBDB. EBDB's goal is to be a modern BBDB and I guess
the main developer does a very nice job. I have no experience with these
databases, because I think they are overkill (currently) for my usecase.

Daniel Nicolai

On Sat, 27 Feb 2021 at 18:03, <emacs-orgmode-request@gnu.org> wrote:

> Send Emacs-orgmode mailing list submissions to
>         emacs-orgmode@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.gnu.org/mailman/listinfo/emacs-orgmode
> or, via email, send a message with subject or body 'help' to
>         emacs-orgmode-request@gnu.org
>
> You can reach the person managing the list at
>         emacs-orgmode-owner@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Emacs-orgmode digest..."
>
>
> Today's Topics:
>
>    1. Re: Turning off all indentation in 9.4.4 (TRS-80)
>    2. Re: Tips on maintaining history in Org Mode (TRS-80)
>    3. Re: Set archive location relative to property (TRS-80)
>    4. [PATCH] ~org-font-lock-add-priority-faces~: ensure priority
>       cookies are in a headline (Sébastien Miquel)
>    5. Re: Tips on maintaining history in Org Mode (Samuel Wales)
>    6. Re: Tips on maintaining history in Org Mode (David Masterson)
>    7. Re: Tips on maintaining history in Org Mode (David Masterson)
>    8. Re: Tips on maintaining history in Org Mode (David Masterson)
>    9. Re: Tips on maintaining history in Org Mode (Tim Cross)
>   10. [bug] org-yank in stars corrupts outline (Samuel Wales)
>   11. Re: [bug] org-yank in stars corrupts outline (Samuel Wales)
>   12. Re: Tips on maintaining history in Org Mode (David Masterson)
>   13. Re: Tips on maintaining history in Org Mode (Samuel Wales)
>   14. Re: Tips on maintaining history in Org Mode (Ihor Radchenko)
>   15. Re: Tips on maintaining history in Org Mode (Ihor Radchenko)
>   16. Re: Tips on maintaining history in Org Mode (Ihor Radchenko)
>   17. contact management in emacs (Alan Schmitt)
>   18. Simple org-publish configuration example in manual does not
>       work (dalanicolai)
>   19. Re: contact management in emacs (Martin Steffen)
>   20. Re: [bug] org-yank in stars corrupts outline (Maxim Nikulin)
>   21. Re: [PATCH] org-mac-link: Disable Evernote capture by default
>       (Aaron Jensen)
>   22. Re: Babel: Programmatically evaluate a heading and subtrees?
>       (ian martins)
>   23. Re: contact management in emacs (andrés ramírez)
>   24. ob-reticulate: R+Python interface from Babel (Jack Kamm)
>   25. Re: contact management in emacs (Eric S Fraga)
>   26. Re: contact management in emacs (andrés ramírez)
>   27. Re: contact management in emacs (Martin Steffen)
>   28. Re: contact management in emacs (Bob Newell)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 26 Feb 2021 14:12:09 -0500
> From: TRS-80 <lists.trs-80@isnotmyreal.name>
> To: emacs-orgmode@gnu.org
> Subject: Re: Turning off all indentation in 9.4.4
> Message-ID: <83f49a373d71c4b786bda1ad6323ca87@isnotmyreal.name>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> On 2021-02-26 01:20, Kyle Meyer wrote:
> > TRS-80 writes:
> >
> >> On 2021-02-24 15:58, TRS-80 wrote:
> >>> On 2021-02-16 23:30, Kyle Meyer wrote:
> > [...]
> >>>> So, if I'm reading your preferences correctly, it sounds like you
> >>>> want
> >>>> just the first suggestion in the above snippet, leaving
> >>>> org-adapt-indentation at its default value:
> >>>>
> >>>>   (add-hook 'org-mode-hook (lambda () (electric-indent-local-mode
> >>>> -1)))
> >>>
> >>> OK, I just did eval-expression (M-:) with (electric-indent-local-mode
> >>> -1) in an Orgmode buffer.  After very brief testing, it does indeed
> >>> seem to return the desired behavior.  So thanks a lot for that tip!
> > [...]
> >> OK, so after that yesterday, I went ahead and added
> >> (electric-indent-local-mode -1) to my org-mode hook.  Then today upon
> >> re-starting Emacs, I am back to not working.
> >>
> >> By not working I mean:  Pressing enter goes to column 0 as it should,
> >> however then pressing <TAB> does nothing.  Where previously it would
> >> jump to same level as indented above.
> >>
> >> My settings are:
> >>
> >> - electric-indent-local-mode nil (local in each Orgmode buffer, set
> >> via
> >> hook)
> >>
> >> - org-adapt-indentation 'headline-data
> >
> > I'm just repeating my suggestion from above, but perhaps you want to
> > leave org-adapt-indentation at its default value of t?
>
> Apologies, I had skipped right over that bit!
>
> Doing as you say appears (after very brief test just now) to have given
> me back all the expected behavior:
>
> - RET goes to column zero
>
> - TAB goes to indentation level
>
> - Logbook entries are indented as they should be
>
> However in the course of doing this, it reminded me of what I was trying
> to do in the first place, which I thought I could accomplish with some
> of the new functionality (headline-data in particular).
>
> In my mind at least, the headline data belongs "with" the headline.  So
> all drawers like LOGBOOK and PROPERTIES (and their respective entries,
> of course) should all be indented to same level as headline.
>
> Now, I used to think the same way about the body text, but I changed my
> mind a year or two (maybe more) ago, as I realized that was just wasting
> too mych space.
>
> So, my reading of this new(?) headline-data setting, was that it seemed
> to be exactly what I had been looking for!  But perhaps I misunderstood?
>
> Cheers,
> TRS-80
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 26 Feb 2021 14:24:14 -0500
> From: TRS-80 <lists.trs-80@isnotmyreal.name>
> To: emacs-orgmode@gnu.org
> Subject: Re: Tips on maintaining history in Org Mode
> Message-ID: <45e4dc6434becb1552adc7df544db01a@isnotmyreal.name>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> On 2021-02-26 01:22, David Masterson wrote:
> > There are many ways of maintaining history in a group of Org files:
> > 1. Archive within a file
> > 2. Archive to a separate (archive) file
> > 3. Special TODO types for history
> > 4. Special TAG types for history
> > 5. etc.
> >
> > My question is, if you have meetings/phone calls as TODOs, what is the
> > preferred way to handle when they move into history so that, *much*
> > later, you can easily produce a list of all of the meetings/phone calls
> > with dates and times of them?  The issue (I think) is, when you mark
> > the
> > TODO as DONE, you lose the info of what the TODO was originally.
> >
> > Suggestions
>
> I agree with what others already said about logging state changes with
> timestamps.  I do the same and find this an extremely handy place to
> put "metadata about the task, or reason that it changed" and keep it
> separate/hidden from the main body of the task (which in my mind
> should only contain info about the subject of the headline / task
> itself).
>
> However when you say "history" I suspect you mean "archive" and this
> is something I have been thinking about a long time as well.  Because
> I think the current way that Orgmode handles this is a bit naive /
> simplistic.  Well, at least there is the option to create your own
> archival function, which I suspect I will do at some point.  In fact I
> have been thinking about the best way to do that for some time
> already.
>
> Cheers,
> TRS-80
>
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 26 Feb 2021 14:30:56 -0500
> From: TRS-80 <lists.trs-80@isnotmyreal.name>
> To: emacs-orgmode@gnu.org
> Subject: Re: Set archive location relative to property
> Message-ID: <565b3cb59087b33087676d8059a7e39d@isnotmyreal.name>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> On 2021-02-25 15:49, Florian Lindner wrote:
> > Am 25.02.21 um 21:22 schrieb Florian Lindner:
> >> is this possible with org-mode? Given a tree:
> >>
> >> * Name
> >> :PROPERTIES:
> >> :ARCHIVE:  ???
> >> :END:
> >> ** Archive    :ARCHIVE:
> >> ** Some node
> >>
> >> Upon archiving "Some node" (or any direct or indirect sub-node of
> >> Projectname) I want to end it up under "** Archive". The archive
> >> location should always be relative to the node where the property
> >> ARCHIVE is set.
> >>
> >> The documentation org-archive-location does not suggest that is
> >> possible.
> >
> > An alternative idea would be a setting for the ARCHIVE property that
> > searches the tree upward until it finds a node with an :ARCHIVE: tag
> > and use that as archive location. Maybe indicated by a setting of
> > "::%a".
> >
> > What do you think?
>
> I could be wrong, but my feeling (in either case) is something like
> that would probably require writing a custom archive function.
> Luckily, Orgmode allows you to do that.
>
> Cheers,
> TRS-80
>
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 26 Feb 2021 20:58:35 +0100
> From: Sébastien Miquel <sebastien.miquel@posteo.eu>
> To: emacs-orgmode@gnu.org
> Cc: Ihor Radchenko <yantar92@gmail.com>
> Subject: [PATCH] ~org-font-lock-add-priority-faces~: ensure priority
>         cookies are in a headline
> Message-ID: <a9f0fc01-2f32-8831-ac8b-0f0fe9e00a4d@posteo.eu>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Priority cookies are always in a headline.
>
> The attached patch speeds up fontification of a 1k lines buffer by 0.1
> second.
>
> Note that the variable org-priority-regexp can't be modified since
> it is used in the agenda and in org-get-priority.
>
> Regards,
>
> --
> Sébastien Miquel
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: 0001-org.el-org-font-lock-add-priority-faces-Speed-up-reg.patch
> Type: text/x-patch
> Size: 967 bytes
> Desc: not available
> URL: <
> https://lists.gnu.org/archive/html/emacs-orgmode/attachments/20210226/9ca34244/attachment.bin
> >
>
> ------------------------------
>
> Message: 5
> Date: Fri, 26 Feb 2021 14:34:43 -0700
> From: Samuel Wales <samologist@gmail.com>
> To: David Masterson <dsmasterson92630@outlook.com>
> Cc: emacs-orgmode@gnu.org
> Subject: Re: Tips on maintaining history in Org Mode
> Message-ID:
>         <
> CAJcAo8uAc04c2v4xMhm8PWbp5v3wk3Jz13bDJDkdLFDnVs5kUw@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> org does indeed have a lot of related features, maybe too many even.
> here is some of what i do.
>
> - if i doneify, it means i will likely not need to search for it.
> archived to a file.
>   [currently the archiver is so slow i can't use it]
>   CLOSED: [2012-11-08 Thu 19:40]
> - state logging for repeaters in logbook
> - your question: notes to keep around like this
>   ***** LOG [2021-02-26 Fri 14:18] talked to bill gates; he uses linux now
>   these get sorted at bottom by timestamp using user-defined
>   this is the main thing
> - bare inactive free form as needed
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
>
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>
>
>
> ------------------------------
>
> Message: 6
> Date: Fri, 26 Feb 2021 14:51:30 -0800
> From: David Masterson <dsmasterson92630@outlook.com>
> To: Ihor Radchenko <yantar92@gmail.com>
> Cc: emacs-orgmode@gnu.org
> Subject: Re: Tips on maintaining history in Org Mode
> Message-ID:
>         <
> SJ0PR03MB5455FD17CD8FA3853983D5509B9D9@SJ0PR03MB5455.namprd03.prod.outlook.com
> >
>
> Content-Type: text/plain
>
> Ihor Radchenko <yantar92@gmail.com> writes:
>
> > David Masterson <dsmasterson92630@outlook.com> writes:
> >> My question is, if you have meetings/phone calls as TODOs, what is the
> >> preferred way to handle when they move into history so that, *much*
> >> later, you can easily produce a list of all of the meetings/phone calls
> >> with dates and times of them?  The issue (I think) is, when you mark the
> >> TODO as DONE, you lose the info of what the TODO was originally.
> >
> > See Org manual :: 5.3 Progress Logging
>
> Interesting, but then how do you get the list?  I mean is there an
> agenda to use?
> --
> David Masterson
>
>
>
> ------------------------------
>
> Message: 7
> Date: Fri, 26 Feb 2021 14:55:16 -0800
> From: David Masterson <dsmasterson92630@outlook.com>
> To: Tim Cross <theophilusx@gmail.com>
> Cc: emacs-orgmode@gnu.org
> Subject: Re: Tips on maintaining history in Org Mode
> Message-ID:
>         <
> SJ0PR03MB5455A0B7779A6D32EDB6EC099B9D9@SJ0PR03MB5455.namprd03.prod.outlook.com
> >
>
> Content-Type: text/plain
>
> Tim Cross <theophilusx@gmail.com> writes:
>
> > David Masterson <dsmasterson92630@outlook.com> writes:
> >
> >> There are many ways of maintaining history in a group of Org files:
> >> 1. Archive within a file
> >> 2. Archive to a separate (archive) file
> >> 3. Special TODO types for history
> >> 4. Special TAG types for history
> >> 5. etc.
> >>
> >> My question is, if you have meetings/phone calls as TODOs, what is the
> >> preferred way to handle when they move into history so that, *much*
> >> later, you can easily produce a list of all of the meetings/phone calls
> >> with dates and times of them?  The issue (I think) is, when you mark the
> >> TODO as DONE, you lose the info of what the TODO was originally.
> >
> > A lot will depend on your requirements.
> >
> > For me, my TODOs are setup so that they record a date stamp for when
> > they were added and whenever they change state e.g. started, done,
> > delegated etc.
>
> So, you use progress logging.
>
> > For non-TODO items, I will often put an inactive timestamp in the
> > heading title.
>
> Do your headings become busy?
>
> What would you use to then make a list of all meetings you had last year?
>
> --
> David Masterson
>
>
>
> ------------------------------
>
> Message: 8
> Date: Fri, 26 Feb 2021 15:00:02 -0800
> From: David Masterson <dsmasterson92630@outlook.com>
> To: emacs-orgmode@gnu.org
> Subject: Re: Tips on maintaining history in Org Mode
> Message-ID:
>         <
> SJ0PR03MB54554F09F1784A4DE894233D9B9D9@SJ0PR03MB5455.namprd03.prod.outlook.com
> >
>
> Content-Type: text/plain
>
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
> > My approach is simple.  For TODO items, I archive to separate file when
> > done.  That file is easily searchable, e.g. using C-c /.
>
> Ah! org-occur! That's something forgot about and looks useful.
>
> > I keep both the original file and the archive file under revision
> > control, just in case.
>
> I do that, too.
>
> >> The issue (I think) is, when you mark the TODO as DONE, you lose the
> >> info of what the TODO was originally.
> >
> > What info is lost?  In fact, if you log state changes, all the
> > information is there.
>
> I see how that workss now with org-occur.
>
> > By the way, if you have recurring items, one package that you might find
> > useful is org-recur which is on ELPA.
>
> Thanks
>
> --
> David Masterson
>
>
>
> ------------------------------
>
> Message: 9
> Date: Sat, 27 Feb 2021 09:59:50 +1100
> From: Tim Cross <theophilusx@gmail.com>
> To: David Masterson <dsmasterson92630@outlook.com>
> Cc: emacs-orgmode@gnu.org
> Subject: Re: Tips on maintaining history in Org Mode
> Message-ID: <87wnuu9zrf.fsf@gmail.com>
> Content-Type: text/plain
>
>
> David Masterson <dsmasterson92630@outlook.com> writes:
>
> > Tim Cross <theophilusx@gmail.com> writes:
> >
> >> David Masterson <dsmasterson92630@outlook.com> writes:
> >>
> >> For me, my TODOs are setup so that they record a date stamp for when
> >> they were added and whenever they change state e.g. started, done,
> >> delegated etc.
> >
> > So, you use progress logging.
>
> Yes.
>
> >
> >> For non-TODO items, I will often put an inactive timestamp in the
> >> heading title.
> >
> > Do your headings become busy?
> >
>
> Some would feel they are 'busy'. I always put the timestamp at the
> beginning of the heading, so there is a regular pattern (not much
> different from the leading heading stars) and I've just got use to it,
> so I don't really see it now.
>
> > What would you use to then make a list of all meetings you had last year?
>
> For me, archiving is about data I'm unlikely to need again, but just in
> case I do, it is in the archive. I rarely look at my archives. However,
> when I do archive, I will usually archive into a 'year' file. So, to
> find all the meetings held in 2015, I would open that archive file and
> search for entries with the tag MEETING (I also have a tag for PHONE).
>
> --
> Tim Cross
>
>
>
> ------------------------------
>
> Message: 10
> Date: Fri, 26 Feb 2021 17:52:37 -0700
> From: Samuel Wales <samologist@gmail.com>
> To: emacs-orgmode@gnu.org
> Subject: [bug] org-yank in stars corrupts outline
> Message-ID:
>         <CAJcAo8uF=
> JrtYWfe2HCPpgXcbD5kbGT78wtn67zXB8V_-SGWpg@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> it is neither raw yank behavior nor org syntax
>
> in recent maint
>
> i have org-yank-adjusted-subtrees t
>
> * org-yank is funny
> *** kill this line (with newline) then try yanking at ^ places (remove
> the ^ first)
> the fault lies in the stars
> insertion above and arbitrary demotion
> *** x
> asdfnaksdj fnkadsn fkjans df
> ^a^sdkfjnaksdfn kajsndfk ajdnsf
> askdjfkasjdn fkajfdns
> *^*^* y
> *** [[https://go^ogle.com]]
>
>
>
> ------------------------------
>
> Message: 11
> Date: Fri, 26 Feb 2021 17:54:36 -0700
> From: Samuel Wales <samologist@gmail.com>
> To: emacs-orgmode@gnu.org
> Subject: Re: [bug] org-yank in stars corrupts outline
> Message-ID:
>         <CAJcAo8vKRwzP_TAOwxCttC6o82O0g2OwOg_V+ep2E4=
> E3BxFxA@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> *** kill any header (with newline) then try yanking in various places
> in the stars of any indented header that has things above it.  you
> should get multiple demotions that do not conform to outline.
>
> On 2/26/21, Samuel Wales <samologist@gmail.com> wrote:
> > it is neither raw yank behavior nor org syntax
> >
> > in recent maint
> >
> > i have org-yank-adjusted-subtrees t
> >
> > * org-yank is funny
> > *** kill this line (with newline) then try yanking at ^ places (remove
> > the ^ first)
> > the fault lies in the stars
> > insertion above and arbitrary demotion
> > *** x
> > asdfnaksdj fnkadsn fkjans df
> > ^a^sdkfjnaksdfn kajsndfk ajdnsf
> > askdjfkasjdn fkajfdns
> > *^*^* y
> > *** [[https://go^ogle.com]]
> >
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
>
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>
>
>
> ------------------------------
>
> Message: 12
> Date: Fri, 26 Feb 2021 19:17:34 -0800
> From: David Masterson <dsmasterson92630@outlook.com>
> To: Tim Cross <theophilusx@gmail.com>
> Cc: emacs-orgmode@gnu.org
> Subject: Re: Tips on maintaining history in Org Mode
> Message-ID:
>         <
> SJ0PR03MB5455951AD10B7FDB57BD87E39B9C9@SJ0PR03MB5455.namprd03.prod.outlook.com
> >
>
> Content-Type: text/plain
>
> Tim Cross <theophilusx@gmail.com> writes:
>
> > David Masterson <dsmasterson92630@outlook.com> writes:
> >
> >> What would you use to then make a list of all meetings you had last
> year?
> >
> > For me, archiving is about data I'm unlikely to need again, but just in
> > case I do, it is in the archive. I rarely look at my archives. However,
> > when I do archive, I will usually archive into a 'year' file. So, to
> > find all the meetings held in 2015, I would open that archive file and
> > search for entries with the tag MEETING (I also have a tag for PHONE).
>
> Got it.  Thanks.
> --
> David Masterson
>
>
>
> ------------------------------
>
> Message: 13
> Date: Fri, 26 Feb 2021 21:21:54 -0700
> From: Samuel Wales <samologist@gmail.com>
> To: David Masterson <dsmasterson92630@outlook.com>
> Cc: Tim Cross <theophilusx@gmail.com>, emacs-orgmode@gnu.org
> Subject: Re: Tips on maintaining history in Org Mode
> Message-ID:
>         <CAJcAo8tK7QiKLeBWe9+duQmntr2EER3pGXOJJy_Cx7vDu=
> djpg@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> note that there is an issue when you try to name your archive files
> using years like computer-2000.org_archive.  it can take seconds to
> find-file big files so it is understandable to want to name files like
> that.
>
> however, if you change the name of an archive file, it will not be
> found by org when you tell it to do certain things with archive files.
> some code in org derives the basename to search from the basename of
> the original file like computer,org.
>
> in principle, maybe org could allow year suffixes/prefixes or it could
> search all archive files in dirs that have org files.
>
> perhaps also changing org-archive-file-header-format to allow a format
> thingie for a timestamp would allow you to take parts of an archive
> file and move them into one per year without having to put the date in
> each archived entry.
>
>
> On 2/26/21, David Masterson <dsmasterson92630@outlook.com> wrote:
> > Tim Cross <theophilusx@gmail.com> writes:
> >
> >> David Masterson <dsmasterson92630@outlook.com> writes:
> >>
> >>> What would you use to then make a list of all meetings you had last
> >>> year?
> >>
> >> For me, archiving is about data I'm unlikely to need again, but just in
> >> case I do, it is in the archive. I rarely look at my archives. However,
> >> when I do archive, I will usually archive into a 'year' file. So, to
> >> find all the meetings held in 2015, I would open that archive file and
> >> search for entries with the tag MEETING (I also have a tag for PHONE).
> >
> > Got it.  Thanks.
> > --
> > David Masterson
> >
> >
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
>
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>
>
>
> ------------------------------
>
> Message: 14
> Date: Sat, 27 Feb 2021 14:28:13 +0800
> From: Ihor Radchenko <yantar92@gmail.com>
> To: David Masterson <dsmasterson92630@outlook.com>
> Cc: emacs-orgmode@gnu.org
> Subject: Re: Tips on maintaining history in Org Mode
> Message-ID: <87czwmc9du.fsf@localhost>
> Content-Type: text/plain
>
> David Masterson <dsmasterson92630@outlook.com> writes:
>
> > Interesting, but then how do you get the list?  I mean is there an
> > agenda to use?
>
> Generally yes, you can use agenda. Or you can use sparse tree (more
> manual).
> For agenda, if you customise org-log-done, you can use
> org-agenda-log-mode ("v l" or "v L" in an agenda buffer). You can add
> archived items as well with "v a" or/and "v A".
>
> Just org-agenda-log-mode will show everything, not just calls. Narrowing
> to calls only will depend on how you define a todo, which is a call.
>
> If you use something like PHONE or CALL todo keywords, it might be
> slightly tricky. You will need to customise org-todo-keywords, so that
> your CALL->DONE changes are recorded (see the org-todo-keywords
> docstring). You will also need to filter displayed items in agenda by
> regexp involving the keyword you use to define the call.
>
> An easier way could be marking your calls with a tag. Then, you can
> filter your org-agenda-log by that tag to show only calls.
>
> Hope it helps.
>
> Best,
> Ihor
>
>
>
>
> ------------------------------
>
> Message: 15
> Date: Sat, 27 Feb 2021 14:38:47 +0800
> From: Ihor Radchenko <yantar92@gmail.com>
> To: Samuel Wales <samologist@gmail.com>, David Masterson
>         <dsmasterson92630@outlook.com>
> Cc: Tim Cross <theophilusx@gmail.com>, emacs-orgmode@gnu.org
> Subject: Re: Tips on maintaining history in Org Mode
> Message-ID: <87a6rqc8w8.fsf@localhost>
> Content-Type: text/plain
>
> Samuel Wales <samologist@gmail.com> writes:
>
> > perhaps also changing org-archive-file-header-format to allow a format
> > thingie for a timestamp would allow you to take parts of an archive
> > file and move them into one per year without having to put the date in
> > each archived entry.
>
> FYI: I have implemented automatic per-year archiving, which is correctly
> handled by other org commands in my personal config:
> https://github.com/yantar92/emacs-config/blob/master/config.org#archiving
>
> Best,
> Ihor
>
>
>
>
> ------------------------------
>
> Message: 16
> Date: Sat, 27 Feb 2021 14:42:03 +0800
> From: Ihor Radchenko <yantar92@gmail.com>
> To: Samuel Wales <samologist@gmail.com>, David Masterson
>         <dsmasterson92630@outlook.com>
> Cc: emacs-orgmode@gnu.org
> Subject: Re: Tips on maintaining history in Org Mode
> Message-ID: <877dmuc8qs.fsf@localhost>
> Content-Type: text/plain
>
> Samuel Wales <samologist@gmail.com> writes:
> >   [currently the archiver is so slow i can't use it]
>
> Are your existing archives very big (few Mbs)? If so, you may try to
> speed up the archiving using feature/org-fold branch [1]. If that is not
> enough, I recommend splitting archives on yearly basis [2] or disabling
> font-lock in archive files.
>
> Best,
> Ihor
>
> [1] https://github.com/yantar92/org
> [2]
> https://github.com/yantar92/emacs-config/blob/master/config.org#archiving
>
>
>
>
> ------------------------------
>
> Message: 17
> Date: Sat, 27 Feb 2021 12:08:04 +0100
> From: Alan Schmitt <alan.schmitt@polytechnique.org>
> To: "emacs-orgmode" <emacs-orgmode@gnu.org>
> Subject: contact management in emacs
> Message-ID: <87lfb9bwff.fsf@m4x.org>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,
>
> This may be slightly off-topic for the list, but as I’m considering
> org-contacts for my question, I hope it will be of interest here.
>
> I would like to migrate my contact management to emacs, as I’m already
> using it for email. My requirements are the following ones:
> - address completion in emacs email clients (I currently use notmuch)
> - support for multiple email addresses and custom fields
> - creation of org links to contacts
> - export to vcard format for synchronization to my mobile phone (using
> vdirsyncer)
> - keep the data under version control
>
> I have looked at two tools, which almost seem fit for the job.
> - ebdb does most of this, with the exception of vcard export (it seems
> to be worked on, https://github.com/girzel/ebdb/issues/60), and I’m not
> sure using version control on an sqlite file is a good idea.
> - org-contacts also seem to have all the required features, including
> vcard export (and if not sufficient there is
> https://github.com/novoid/org-contacts2vcard). I was worried it was
> unmaintained when looking at the copyright line, but I see in
>
> https://code.orgmode.org/bzg/org-mode/commits/master/contrib/lisp/org-contacts.el
> that there are recent commits to the file.
>
> Do you manage your contacts in emacs? And if so, what tools or workflow
> do you recommend?
>
> Best,
>
> Alan
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 528 bytes
> Desc: not available
> URL: <
> https://lists.gnu.org/archive/html/emacs-orgmode/attachments/20210227/1b6fa02c/attachment.sig
> >
>
> ------------------------------
>
> Message: 18
> Date: Sat, 27 Feb 2021 12:08:38 +0100
> From: dalanicolai <dalanicolai@gmail.com>
> To: emacs-orgmode@gnu.org
> Subject: Simple org-publish configuration example in manual does not
>         work
> Message-ID:
>         <CACJP=3k2jL1z0d-uALFGoutffFF2o=
> 7-L39zUns6si0KAhZ-_g@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello, sorry for sending this email directly, but currently sending mail
> from Emacs does not work correctly.
>
>
> I was trying out the org-publishing functionality, but I found that
> the first example in the documentation given at
> https://orgmode.org/manual/Simple-example.html#Simple-example
> does not work. When I try to publish the project it errors with the
> following message
>
> org-publish-file: No publishing function chosen
>
> So I figured that I should add a :publishing-function and I remembered
> reading earlier in the documnetation,
> i.e. at
> https://orgmode.org/manual/Publishing-action.html#Publishing-action
> org-html-publish-to-html
> <https://orgmode.org/manual/Publishing-action.html#Publishing-actionorg-html-publish-to-html>
> that org uses the default publishing-function
>
> org-publish-org-to-html
>
> But when trying to publish using that function then Emacs errors with
> the message
>
> org-publish-file: Symbol’s function definition is void:
> org-publish-org-to-html
>
> I have found the following error report from 17 Mar 2013, reporting
> exactly the same error (and a reply with the solution)
> https://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg01221.html
>
> It would be great if these two small point in the manual, which is
> otherwise great, could
> get updated.
>
> 1. add the required :publishing-function keyword to the documentation (with
> the correct function value)
> 2. change the name of the default function from org-publish-org-to-html ->
> *org-html-publish-to-html*
>
> Thank you!
>
> Best regards,
> Daniel Nicolai
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://lists.gnu.org/archive/html/emacs-orgmode/attachments/20210227/02a12cbf/attachment.html
> >
>
> ------------------------------
>
> Message: 19
> Date: Sat, 27 Feb 2021 12:31:05 +0100
> From: Martin Steffen <msteffen@ifi.uio.no>
> To: Alan Schmitt <alan.schmitt@polytechnique.org>
> Cc: emacs-orgmode <emacs-orgmode@gnu.org>
> Subject: Re: contact management in emacs
> Message-ID: <867dmteohy.fsf@login.ifi.uio.no>
> Content-Type: text/plain
>
>
>
>
> I use bbdb (big-brother data base). I use it since a looong time
> already, and amassed 15000 or so contracts. It does what I want, it's
> text-based, so versioning is not a problem.
>
> I think it can do vcard export (though when I used vcards is a long
> time ago, I can't remember if that was smooth, I think it was with one
> of my first smart phone, and I wanted to quick fill up the phone book
> there with my ``emacs-managed'' contact data base.).
>
> One can add used defined fields (where one can ``match'' all contacts
> for some criterion, and send then ``bulk'' email.
>
> Org is also bbdb-aware, insofar one can do those links: instead of
> [[file:xxxx][yyy]] one can use [[bbdb:somecriterion]].
>
> I don't know if it matches your needs, but I can't say bad things about
> that bbdb-thing.
>
> Martin
>
>
>
>
>
> ------------------------------
>
> Message: 20
> Date: Sat, 27 Feb 2021 18:55:54 +0700
> From: Maxim Nikulin <manikulin@gmail.com>
> To: emacs-orgmode@gnu.org
> Subject: Re: [bug] org-yank in stars corrupts outline
> Message-ID: <s1dc0b$udf$1@ciao.gmane.io>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> On 27/02/2021 07:52, Samuel Wales wrote:
> >
> > i have org-yank-adjusted-subtrees t
> >
> > * org-yank is funny
> > *** kill this line (with newline) then try yanking at ^ places (remove
> > the ^ first)
> > the fault lies in the stars
> > insertion above and arbitrary demotion
> > *** x
> > asdfnaksdj fnkadsn fkjans df
> > ^a^sdkfjnaksdfn kajsndfk ajdnsf
> > askdjfkasjdn fkajfdns
> > *^*^* y
> > *** [[https://go^ogle.com]]
>
> from [[help:org-yank]]
>
> > If it passes the test, and if the
> > cursor is at the beginning of a line or after the stars of a currently
> > empty headline, then the yank is handled specially.  How exactly depends
> > on the value of the following variables.
>
> In my opinion, your "^" marks do not satisfy the specified criteria.
>
> Personally I use [[help:org-paste-subtree]] C-c C-x C-y directly. It has
> a minor issue however. First time after emacs start it refuses to yank
> subtree from X clipboard (prepared externally). Regular paste with undo
> C-y C-/ is enough to convince the function that there is a subtree in
> the clipboard. Next time it works without such dance.
>
>
>
>
>
> ------------------------------
>
> Message: 21
> Date: Sat, 27 Feb 2021 07:14:52 -0600
> From: Aaron Jensen <aaronjensen@gmail.com>
> To: emacs-orgmode@gnu.org
> Subject: Re: [PATCH] org-mac-link: Disable Evernote capture by default
> Message-ID:
>         <CAHyO48x1rFo_CA_Ha3nZLNeWozurB=+
> 7pS1xOdc3p45nyF-y3Q@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> On Wed, Feb 17, 2021 at 9:55 AM Aaron Jensen <aaronjensen@gmail.com>
> wrote:
> >
> > The two `shell-command-to-string` invocations during eval are
> > extremely slow. Users of Evernote should `org-mac-grab-Evernote-app-p`
> > and `org-mac-evernote-path` explicitly.
>
> Hi all,
>
> Any chance of getting this merged in? It's a pretty nasty one for mac
> users.
>
> Thanks,
>
> Aaron
>
>
>
> ------------------------------
>
> Message: 22
> Date: Sat, 27 Feb 2021 08:18:45 -0500
> From: ian martins <ianxm@jhu.edu>
> To: Nathan Neff <nathan.neff@gmail.com>
> Cc: emacs-orgmode <emacs-orgmode@gnu.org>
> Subject: Re: Babel: Programmatically evaluate a heading and subtrees?
> Message-ID:
>         <CAC=rjb4iJPkXjOVAi83jjBrc=
> 4TjEZhr_KrEnYvF_K0GSapHOw@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Can you use noweb? In the example below, if you run the top code block
> babel will run the two that follow.
>
> A drawback is that you have to redefine variables, but it might be a
> benefit, since the individual blocks could be set with test data and
> the "main driver" could point to real data.
> -------
>
> #+begin_src elisp :results output :noweb yes :var data=data1
>   <<fun1>>
>   <<fun2>>
> #+end_src
>
> #+RESULTS:
> : called fun1: some data
> : called fun2
>
> #+name: data1
> some data
>
> #+name: fun1
> #+begin_src elisp :var data=data1
> (princ (format "called fun1: %s" data))
> #+end_src
>
> #+name: fun2
> #+begin_src elisp
> (princ "called fun2")
> #+end_src
>
> On Sat, Feb 20, 2021 at 2:11 PM Nathan Neff <nathan.neff@gmail.com> wrote:
> >
> > Hello all,
> >
> > I have some code like this:
> >
> > * Heading 1
> >
> > # code block name:FOO
> >
> > ** Subheading 1
> >
> > # code block
> >
> > ** Subheading 2
> >
> > # code block
> >
> > I find that I often want to evaluate the code in Heading 1 and its
> subheadings.
> >
> > Currently, I navigate to Heading 1 and then use org-babel-execute-subtree
> >
> > I see that there's a function called org-babel-goto-named-src-block, so
> I think
> > I could write a small function to jump to FOO in Heading 1 and then run
> execute subtree
> > and then jump back to my previous location in Emacs.
> >
> > Is there a more programmatic or built-in way?  For example:
> > org-babel-execute-block-and-subheadings FOO
> >
> > Thanks,
> > --Nate
>
>
>
> ------------------------------
>
> Message: 23
> Date: Sat, 27 Feb 2021 13:20:23 +0000
> From: andrés ramírez <rrandresf@gmail.com>
> To: Martin Steffen <msteffen@ifi.uio.no>
> Cc: Alan Schmitt <alan.schmitt@polytechnique.org>, emacs-orgmode
>         <emacs-orgmode@gnu.org>
> Subject: Re: contact management in emacs
> Message-ID: <868s79hcko.fsf@gmail.com>
> Content-Type: text/plain; charset=utf-8
>
> Hi. Martin and  Alan.
>
> >>>>> "Martin" == Martin Steffen <msteffen@ifi.uio.no> writes:
>
>
> [...]
>
>
>     Martin> Org is also bbdb-aware, insofar one can do those links:
> instead of [[file:xxxx][yyy]]
>     Martin> one can use [[bbdb:somecriterion]].
>
> bbdb anniversaries could also appear  on agenda:
> --8<---------------cut here---------------start------------->8---
> 10 days-agenda (W08-W09):
> Wednesday  24 February 2021
> Thursday   25 February 2021
> Friday     26 February 2021
> Saturday   27 February 2021
> Sunday     28 February 2021
> Monday      1 March 2021 W09
> Tuesday     2 March 2021
> Wednesday   3 March 2021
>   bbdb:       [[bbdb:Pedro ][Pedro  61st custom anniversary]]
> Thursday    4 March 2021
> Friday      5 March 2021
> --8<---------------cut here---------------end--------------->8---
>
> Andrés Ramírez
>
>
>
> ------------------------------
>
> Message: 24
> Date: Sat, 27 Feb 2021 06:15:29 -0800
> From: Jack Kamm <jackkamm@gmail.com>
> To: emacs-orgmode@gnu.org
> Subject: ob-reticulate: R+Python interface from Babel
> Message-ID: <87y2f94mwu.fsf@gmail.com>
> Content-Type: text/plain
>
> Hi all,
>
> ob-reticulate is now available on MELPA.
>
> You can find more information here:
> https://github.com/jackkamm/ob-reticulate
>
> Cheers,
> Jack
>
>
>
> ------------------------------
>
> Message: 25
> Date: Sat, 27 Feb 2021 14:40:32 +0000
> From: Eric S Fraga <e.fraga@ucl.ac.uk>
> To: andrés ramírez <rrandresf@gmail.com>
> Cc: emacs-orgmode <emacs-orgmode@gnu.org>
> Subject: Re: contact management in emacs
> Message-ID: <87lfb9y3of.fsf@ucl.ac.uk>
> Content-Type: text/plain; charset=utf-8
>
> On Saturday, 27 Feb 2021 at 13:20, andrés ramírez wrote:
> > bbdb anniversaries could also appear  on agenda:
>
> How do you get these to appear?  Or is the "could" a wish?
> thank you, eric
> --
> : Eric S Fraga via Emacs 28.0.50, Org release_9.4.4-231-gf46925
>
>
>
> ------------------------------
>
> Message: 26
> Date: Sat, 27 Feb 2021 15:12:00 +0000
> From: andrés ramírez <rrandresf@gmail.com>
> To: andrés ramírez <rrandresf@gmail.com>, emacs-orgmode
>         <emacs-orgmode@gnu.org>
> Subject: Re: contact management in emacs
> Message-ID: <868s79zgsf.fsf@gmail.com>
> Content-Type: text/plain
>
> Hi. Eric.
>
> >>>>> "Eric" == Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
>
> [...]
>
>
>     Eric> How do you get these to appear?  Or is the "could" a wish?
>
> This is my setup:
> --8<---------------cut here---------------start------------->8---
> (setq org-agenda-files (directory-files "~/docs/org/deft/" t
> ".*agenda\.org$"))
> --8<---------------cut here---------------end--------------->8---
>
> ~/docs/org/deft/bbdb-anniversary-trick.agenda.org:
> --8<---------------cut here---------------start------------->8---
> * anniversary [isodate]
>   :PROPERTIES:
>   :CATEGORY: bbdb
>   :END:
> %%(when (fboundp 'my/org-bbdb-anniversaries) (my/org-bbdb-anniversaries))
> --8<---------------cut here---------------end--------------->8---
>
> --8<---------------cut here---------------start------------->8---
> (defun my/org-bbdb-anniversaries ()
> "It does not work on emacs-23"
>   (when (/= 23 emacs-major-version)
>     (org-bbdb-anniversaries)
>     )
>   )
>   --8<---------------cut here---------------end--------------->8---
>
> the bbdb record should have the field anniversary:
> --8<---------------cut here---------------start------------->8---
>         anniversary: 1960-03-03 custom
> --8<---------------cut here---------------end--------------->8---
>
> Best Regards
>
>
>
> ------------------------------
>
> Message: 27
> Date: Sat, 27 Feb 2021 16:14:19 +0100
> From: Martin Steffen <msteffen@ifi.uio.no>
> To: andrés ramírez <rrandresf@gmail.com>
> Cc: emacs-orgmode <emacs-orgmode@gnu.org>
> Subject: Re: contact management in emacs
> Message-ID: <8635xhee5w.fsf@login.ifi.uio.no>
> Content-Type: text/plain
>
> >>>>> "Eric" == Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
>     Eric> How do you get these to appear?  Or is the "could" a wish?
>
> It's ``automatic''. The entry of the person needs a field "anniversary",
> if that's filled with a date in yyyy-mm-dd format, it's included
> (perhaps one has to set a variable like ``show-bbdb-anniversaries''
> and/or load a corresponding elisp-addition.)
>
>
> Martin
>
>
>
>
>     Eric> thank you, eric -- : Eric S Fraga via Emacs 28.0.50, Org
>     Eric> release_9.4.4-231-gf46925
>
>
>
>
> ------------------------------
>
> Message: 28
> Date: Sat, 27 Feb 2021 06:53:57 -1000
> From: Bob Newell <bobnewell@bobnewell.net>
> To: "emacs-orgmode" <emacs-orgmode@gnu.org>
> Subject: Re: contact management in emacs
> Message-ID: <s6jv9ad1mfu.fsf@emailmessageidheader.nil>
> Content-Type: text/plain
>
> I've used BBDB for years, and have tried org-contact, but it
> didn't seem to scale to the now rather large size of my BBDB
> database.
>
> I've looked at migrating to EBDB but as I have many custom
> functions I haven't yet made the move.
>
> BBDB can do amazing things. I've mentioned some of them
> before. Of course org links are supported, and in conjunction
> with the 'gnorb' package, Gnus email can be associated with
> BBDB entries in interesting ways.
>
> I use BBDB to easily maintain a slew of mailing lists. I also
> have custom functions to set the input language mode for those
> with whom I correspond in non-English languages. I even use
> BBDB to initiate phone calls when I'm on my desktop computer.
>
> I hadn't thought to put BBDB under version control but that
> would be very easy.
>
> However you don't need to get fancy right away. All the basics
> are there. Like many things Emacs, it does take time to get
> things set up the way you wish, but that time is well repaid
> down the road a little.
>
> --
> Bob Newell
> Honolulu, Hawai`i
>
> - Via GNU/Linux/Emacs/Gnus/BBDB
>
>
>
> End of Emacs-orgmode Digest, Vol 180, Issue 30
> **********************************************
>

[-- Attachment #2: Type: text/html, Size: 59355 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-27 11:08 Alan Schmitt
  2021-02-27 11:31 ` Martin Steffen
  2021-02-27 16:53 ` Bob Newell
@ 2021-02-28  9:06 ` Russell Adams
  2021-02-28 11:09   ` Alan Schmitt
                     ` (2 more replies)
  2021-03-07 22:13 ` Jean Louis
  2022-09-09 16:11 ` Sébastien Rey-Coyrehourcq
  4 siblings, 3 replies; 30+ messages in thread
From: Russell Adams @ 2021-02-28  9:06 UTC (permalink / raw)
  To: emacs-orgmode

On Sat, Feb 27, 2021 at 12:08:04PM +0100, Alan Schmitt wrote:
> Hello,
>
> This may be slightly off-topic for the list, but as I’m considering
> org-contacts for my question, I hope it will be of interest here.
>
> I would like to migrate my contact management to emacs, as I’m already
> using it for email. My requirements are the following ones:
> - address completion in emacs email clients (I currently use notmuch)
> - support for multiple email addresses and custom fields
> - creation of org links to contacts
> - export to vcard format for synchronization to my mobile phone (using
> vdirsyncer)
> - keep the data under version control
>
> I have looked at two tools, which almost seem fit for the job.
> - ebdb does most of this, with the exception of vcard export (it seems
> to be worked on, https://github.com/girzel/ebdb/issues/60), and I’m not
> sure using version control on an sqlite file is a good idea.
> - org-contacts also seem to have all the required features, including
> vcard export (and if not sufficient there is
> https://github.com/novoid/org-contacts2vcard). I was worried it was
> unmaintained when looking at the copyright line, but I see in
> https://code.orgmode.org/bzg/org-mode/commits/master/contrib/lisp/org-contacts.el
> that there are recent commits to the file.
>
> Do you manage your contacts in emacs? And if so, what tools or workflow
> do you recommend?

The only reason I don't use BBDB is I want to use Org to allow me to
maintain notes about contacts (ie: CRM). Yes, I get that I could have
a CRM file and link in BBDB contacts, but that feels like adding
layers.

The stumbling point for me has been exporting to my mobile phone. I'm
fine with a one way sync from my BBDB/Org solution to the phone, but
I feel like I never found a good option.

Please share what you find works for you.



------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-27 15:12       ` andrés ramírez
@ 2021-02-28 10:21         ` Eric S Fraga
  0 siblings, 0 replies; 30+ messages in thread
From: Eric S Fraga @ 2021-02-28 10:21 UTC (permalink / raw)
  To: andrés ramírez; +Cc: emacs-orgmode

On Saturday, 27 Feb 2021 at 15:12, andrés ramírez wrote:
> This is my setup:

Thank you for this.  Works perfectly!

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.4-231-gf46925


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: content management in emacs
  2021-02-27 18:57 ` content management in emacs Ian Garmaise
  2021-02-27 19:16   ` Martin Steffen
@ 2021-02-28 10:39   ` Eric S Fraga
  2021-03-07 22:31   ` Jean Louis
  2021-03-07 22:38   ` Jean Louis
  3 siblings, 0 replies; 30+ messages in thread
From: Eric S Fraga @ 2021-02-28 10:39 UTC (permalink / raw)
  To: Ian Garmaise; +Cc: emacs-orgmode

On Saturday, 27 Feb 2021 at 13:57, Ian Garmaise wrote:
> How do you send mail to mailing lists with BBDB?  

If the mailing list has a specific address, just create an entry in bbdb
for that list.  If the mailing list is a collection of individuals in
your bbdb, you can add a mail-alias entry to each member of the mailing
list with the name for that list.

I use the latter all the time for small research and study groups at
work.
-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.4-231-gf46925


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-28  9:06 ` Russell Adams
@ 2021-02-28 11:09   ` Alan Schmitt
  2021-03-03 14:40   ` TRS-80
  2021-03-07 22:57   ` Jean Louis
  2 siblings, 0 replies; 30+ messages in thread
From: Alan Schmitt @ 2021-02-28 11:09 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]

Hello,

Thanks a lot for all the replies. I migrated from bbdb to ebdb a long
time ago, and I may go back following your suggestions.

Thanks again,

Alan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 528 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: content management in emacs
  2021-02-27 19:16   ` Martin Steffen
  2021-02-27 20:11     ` Juan Manuel Macías
@ 2021-03-01  5:17     ` Bob Newell
  1 sibling, 0 replies; 30+ messages in thread
From: Bob Newell @ 2021-03-01  5:17 UTC (permalink / raw)
  To: Martin Steffen; +Cc: emacs-orgmode


Martin Steffen <msteffen@ifi.uio.no> writes:
> For phoning, I am not sure. I think there is (or was) a functionality to
> initiate a call (probably with skype or ekiga or some such) but I never
> used that.

There is bbdb-dial, and I have it set up to call a function
which places a call through Google Hangouts. Of course Google
is deleting that feature so I will have to figure out how to
make it use Google Voice.

Admittedly it's an unnecessary feature but I just have fun
making calls with Emacs instead of fishing around for my cell
phone.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-28  9:06 ` Russell Adams
  2021-02-28 11:09   ` Alan Schmitt
@ 2021-03-03 14:40   ` TRS-80
  2021-03-07 22:57   ` Jean Louis
  2 siblings, 0 replies; 30+ messages in thread
From: TRS-80 @ 2021-03-03 14:40 UTC (permalink / raw)
  To: emacs-orgmode

On 2021-02-28 04:06, Russell Adams wrote:
> The stumbling point for me has been exporting to my mobile
> phone. I'm fine with a one way sync from my BBDB/Org solution to the
> phone, but I feel like I never found a good option.
> 
> Please share what you find works for you.

I never got further than reading about it, but I have done quite a lot
of that.  And it always seems like this is the stumbling block.
Especially two way sync (as I probably most often add new contacts
into my phone, when I am out and about).

OTOH, my PinePhone has just recently shipped, so perhaps having an
actual GNU/Linux phone (instead of Android) may suddenly obviate the
need for all these complicated workarounds...  I suppose I will be
interested in what sort of format the Contacts "app" will be storing
them on the PinePhone.  In fact, I think I will search for (or make) a
thread about that at Pine64 forums...

Cheers,
TRS-80


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-27 11:08 Alan Schmitt
                   ` (2 preceding siblings ...)
  2021-02-28  9:06 ` Russell Adams
@ 2021-03-07 22:13 ` Jean Louis
  2021-03-08  7:49   ` Alan Schmitt
  2022-09-09 16:11 ` Sébastien Rey-Coyrehourcq
  4 siblings, 1 reply; 30+ messages in thread
From: Jean Louis @ 2021-03-07 22:13 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

* Alan Schmitt <alan.schmitt@polytechnique.org> [2021-02-27 14:09]:
> Hello,
> 
> This may be slightly off-topic for the list, but as I’m considering
> org-contacts for my question, I hope it will be of interest here.
> 
> I would like to migrate my contact management to emacs, as I’m already
> using it for email. My requirements are the following ones:
> - address completion in emacs email clients (I currently use
> notmuch)

Your question I consider very important.

I am using heavily contact management with Emacs and PostgreSQL
database. Connection between Emacs and the database is provided by the
module `emacs-libpq`: https://github.com/anse1/emacs-libpq Currently I
manage over 220,000 contacts and more than 10,000 groups that I have
named "accounts" in the database, following the long term CRM
conventions.

Address completion is simple, I press the key and query for contacts,
insert name with email address nicely formatted.

> - support for multiple email addresses and custom fields

I have made for myself such a system that I may designate Cc: Bcc:
fields or tell that all email addresses of certain person will be
used. That header format is automatically created on the fly when
composing emails. Some email attachments are sent by using external
program `mutt` on the command line. And I am using multiple
identities. Contact may have single identity or may be under account
that has assigned identity or under multiple accounts with assigned
identities. 

> - creation of org links to contacts

As there is display of a contact or profile, and I keep also Org
profiles of a contact, thus I can also create simple link to the
contact. Link creation is also easy, query for contact, insert link. 

> - export to vcard format for synchronization to my mobile phone (using
> vdirsyncer)

I have made my own exporter to vcards, so all contacts are managed by
using PostgreSQL database through Emacs. By pressing `A` I am entering
the contact into the address book. Program is meant to have multiple
address books, for example private address book could be for device
nr. 1 and business address book for device nr. 2. This way all my
devices are synchronized from my central computer. No need for remote
insecure cloud databases.

> - keep the data under version control

Any editing may be under the database backed version control. For
example in this function here below:

(defun hlink-change-type ()
  (interactive)
  (let ((id (tabulated-list-get-id)))
    (when id
      (let ((new-type (hlink-types)))
	(when new-type
	  ;; version control begins here
	  (hyperscope-vc "hlinks" "hlinks_hlinktypes" id) 
	  (rcd-db-update-entry "hlinks" "hlinks_hlinktypes" "integer" id new-type *hs*)
	  (hyperscope-refresh id))))))

Simple function `hyperscope-vc` keeps care of the version control.

(defun hyperscope-vc (table column id &optional description)
  "Simple version system."
  (let* ((value (rcd-db-get-entry table column id *hs*))
	 (value (format "%s" value))
	 (value (sql-escape-string value))
	 (description (if description (sql-escape-string description) "NULL"))
	 (sql (format "INSERT into vc (vc_table, 
                                      vc_column, 
                                      vc_tableid, 
                                      vc_value, 
                                      vc_description) values ('%s', '%s', %s, %s, %s)
                         RETURNING vc_id"
		      table column id value description))
	 (id (rcd-sql sql *hs*)))
    (if id id nil)))

Version control is thus not automatic, it has to be chosen by myself
which databases or which editing would be under version control. The
above function first obtains all values from the database and then
inserts them into the table `vc` in the database. I could then browse
the table and return back the values if I wish so. Once in the
function, I do not think about it any more.

> Do you manage your contacts in emacs? And if so, what tools or workflow
> do you recommend?

I am recommending that you start using PostgreSQL database. I can
guide you. My software is not so finished for public, but I can guide
you personally and you will get stable system that lasts for years.

First thing would be to setup the PostgreSQL module for Emacs from
sources. If you are able to do that, I can guide you to get the rest
of functionality.

Jean



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: content management in emacs
  2021-02-27 18:57 ` content management in emacs Ian Garmaise
  2021-02-27 19:16   ` Martin Steffen
  2021-02-28 10:39   ` Eric S Fraga
@ 2021-03-07 22:31   ` Jean Louis
  2021-03-07 22:38   ` Jean Louis
  3 siblings, 0 replies; 30+ messages in thread
From: Jean Louis @ 2021-03-07 22:31 UTC (permalink / raw)
  To: Ian Garmaise; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 765 bytes --]

* Ian Garmaise <ian.g@phorixsol.com> [2021-02-27 21:59]:
> Hi Bob,
> 
> How do you send mail to mailing lists with BBDB?  Do you use a templating
> tool?  Also, how do you start a phone call?

Phone call may be started by using Android/Replicant/LineageOS devices
and Termux tools' https://termux.com command: `termux-telephony-call`

I am adding some of functions I am using, but cannot help in polishing
the package for you. If you need some more functions from here, I will
send you.

You can then send termux command `termux-telephony-call` and initiate
the call on Android/Replicant/LineageOS devices.

For sending SMS I am heavily using KDEConnect, but you may use termux
to send SMS by loading older library (ask me), or by using ShellMS
application.

Jean


[-- Attachment #2: termux.el --]
[-- Type: text/plain, Size: 10601 bytes --]

;;; termux.el --- Termux functions. -*- lexical-binding: t; -*-

;; Copyright (C) 2016-2021 by Jean Louis

;; Author: Jean Louis <bugs@gnu.support>
;; Version: 0.1
;; Package-Requires: (rcd-utilities rcd-cf rcd-db-init rcd-db time-date)
;; Keywords: 
;; URL: https://gnu.support/gnu-emacs/packages/termux-el.html

;; This file is not part of GNU Emacs.

;; This program is free software: you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation, either version 3 of the
;; License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:

;; These are the Termux utilities for GNU Emacs Lisp
;;
;; RCD is acronym for Reach, Connect, Deliver, my personal
;; principle and formula for Wealth.

;;; Change Log:

;;; Code:

(require 'rcd-db-init)
(require 'rcd-db)
(require 'rcd-utilities)
(require 'subr-x)
(require 'time-date)

(defcustom termux-ip "192.168.43.1" "IP Address of Replicant system" :type 'string :group 'Termux)
(setq termux-ip "192.168.42.129")
;;(setq termux-ip "192.168.43.1")
(defvar termux-ssh-command "ssh")
(defvar termux-ssh-port "8022")
(defvar termux-bin-directory "/data/data/com.termux/files/usr/bin/")

;;;; END OF SETUP

(defun termux/send-command (command)
  "Sends command to connected Replicant device and returns the output string"
  (let* ((command (concat termux-ssh-command " -p " termux-ssh-port " " termux-ip " \"" command "\""))
	 (output (shell-command-to-string command))
	 (output (string-trim output)))
    output))

(defun termux/error (error)
  "Messages error"
  (message error))

(defun termux/escape-double-quotes (s)
  "Escapes double quotes"
  (replace-regexp-in-string "\"" "\\\\\"" s))

(defun termux/escape-single-quotes (s)
  "Escapes single quotes"
  (replace-regexp-in-string "'" "\'" s))

(defun termux/escape-quotes (s)
  "Escapes double and single quotes"
  (let* ((s (termux/escape-double-quotes s)))
    ;;(s (termux/escape-single-quotes s)))
    s))

(defun termux/commands ()
  "Returns the list of all available termux commands and run the command if available."
  (interactive)
  (let* ((command (concat "cd " termux-bin-directory " && ls termux*"))
	 (commands (termux/send-command command))
	 (commands (split-string commands "\n"))
	 (commands (append commands '("insert-location")))
	 (command (completing-read "Termux commands: " commands))
	 (command (intern (concat "termux/" command))))
    (if (functionp command)
	(funcall command)
      (message (concat "Command " (symbol-name command) " does not exist")))))

(defun termux/termux-location ()
  (let* ((command "termux-location")
	 (result (termux/send-command command))
	 (parsed (json-parse-string result)))
    (if (gethash "longitude" parsed)
	(let* ((latitude (number-to-string (gethash "latitude" parsed)))
	       (longitude (number-to-string (gethash "longitude" parsed)))
	       (location (concat latitude "," longitude)))
	  location)
      (termux/error "Could not get location"))))

(defun termux/termux-location-insert ()
  "Inserts current location in the buffer"
  (interactive)
  (let ((location (termux/termux-location)))
    (insert location)))

(defun termux/termux-clipboard-get ()
  "Returns the Replicant clipboard value"
  (let* ((command "termux-clipboard-get")
	 (result (termux/send-command command)))
    result))

(defun termux/termux-clipboard-get-insert ()
  "Inserts the Replicant clipboard value"
  (interactive)
  (let ((clipboard (termux/termux-clipboard-get)))
    (insert clipboard)))

(defun termux/termux-clipboard-set (value)
  "Sets the Replicant clipboard value"
  (interactive "MSet clipboard to: ")
  (let* ((value (termux/escape-double-quotes value))
	 (command (concat "termux-clipboard-set \"" value "\"")))
    (termux/send-command command)))

(defun termux/termux-wifi-enable (boolean) ;; TODO
  "Enable or disable Wi-Fi on Replicant"
  (interactive "MEnable Wi-Fi (T for true, F or else for false): ")
  (let* ((boolean (if (string-match  "t" (downcase boolean)) "true" "false"))
	 (command (concat "termux-wifi-enable \"" boolean "\"")))
    (termux/send-command command)))

(defun termux/termux-tts-speak (text)
  "Speaks by using termux"
  (interactive "MText to speak: ")
  (let* ((text (termux/escape-quotes text))
	 (command (concat "termux-tts-speak \"" text "\"")))
    (termux/send-command command)))

(defun termux/termux-vibrate ()
  "Vibrate Replicant device"
  (interactive)
  (let* ((command "termux-vibrate"))
    (termux/send-command command)))

;; (defun termux-sms-send (number text)
;;   "Sends SMS message by using termux"
;;   (interactive "MNumber: \nMText: ")
;;   (let* ((text (termux/escape-double-quotes text))
;; 	 (command (concat "termux-sms-send -n \"" number "\" \"" text "\"")))
;;     (termux/send-command command)))

(defun termux-sms-send (number text)
  "Send SMS message by using ShellMS application"
  (let* ((text (termux/escape-quotes text))
	 (command (format "am startservice --user 0 -n com.android.shellms/.sendSMS -e contact %s -e msg \\\"%s\\\"" number text)))
    (termux/send-command command)))

;; (termux-sms-send "+123" sms)
;; (termux-sms-send "+123" "Hello")
;; (termux-sms-send "+123" "Hello thank you, but I do not have this number registered, what is your name?")

(defun termux-import-sms-list ()
  (interactive)
  (let* ((command "termux-sms-list -t inbox -l 500")
	 (list (termux/send-command command))
	 (list (json-parse-string list))
	 (remainder-file (concat (getenv "TMPDIR") "SMS-import-" (rcd-timestamp) ".el"))
	 (_ (data-to-file list remainder-file))
	 (how-many (length list)))
    (dotimes (n how-many)
      (let ((sms (elt list n)))
	(cf-sms-insert sms)))))

;; (termux-import-sms-list)

(defun cf-sms-handle (sms)
  "Returns list after reading the `sms' hash"
  (let* ((type (gethash "type" sms))
	 (status (cf-sms-status type))
	 (number (gethash "number" sms))
	 (date-received (gethash "received" sms))
	 (body (gethash "body" sms)))
    (list status number date-received body)))

(defun cf-sms-status (status)
  (cond ((string= status "inbox") 2)
	(t (error (concat "Cannot find SMS type: " status)))))

(defun cf-sms-insert (sms)
  "Inserts the SMS hash into the database"
  (let ((exists (cf-sms-imported-exists sms)))
    (if exists (message-any sms)
      (let* ((sms (cf-sms-handle sms))
	     (status (elt sms 0))
	     (number (elt sms 1))
	     (date-received (elt sms 2))
	     (date-received (cf-sms-repair-date date-received))
	     (body (elt sms 3))
	     (body (sql-escape-string body))
	     (id (cf-contact-by-phone-1 number))
	     (sql (format "INSERT INTO sms (sms_datecreated, sms_contacts, sms_smsstatus, sms_body, sms_phone) VALUES ('%s', %s, %s, %s, '%s') RETURNING sms_id" date-received id status body number)))
	(if id (rcd-sql-first sql *cf*)
	  (message (format "SMS not entered: %s" (prin1-to-string sms))))))))

(defun cf-sms-imported-exists (sms)
  (let* ((sms (cf-sms-handle sms))
	 (status (elt sms 0))
	 (number (elt sms 1))
	 (date-received (elt sms 2))
	 (date-received (cf-sms-repair-date date-received))
	 (body (elt sms 3))
	 (body (sql-escape-string body))
	 (id (cf-contact-by-phone-1 number))
	 (sql (format "SELECT * FROM sms WHERE sms_datecreated = '%s' AND sms_contacts = %s AND sms_smsstatus = %s AND sms_body = %s AND sms_phone = '%s'" date-received id status body number)))
    (if id
	(let ((ids (rcd-sql-list sql *cf*)))
	  (if ids ids nil))
    (message (format "SMS did not find ID: %s" (prin1-to-string sms))))))

(defun cf-sms-repair-date (date)
  "Repairs the date give by `termux-sms-list' function"
  (let* ((time (decoded-time-add (parse-time-string date) '(nil nil nil nil nil nil nil nil nil)))
	 (year (decoded-time-year time))
	 (month (decoded-time-month time))
	 (day (decoded-time-day time))
	 (hour (decoded-time-hour time))
	 (minute (decoded-time-minute time))
	 (second (decoded-time-second time))
	 (date-time (format "%04.f-%02.f-%02.f %02.f:%02.f:%02.f" year month day hour minute second)))
    date-time))

;; (defun termux-sms-list ()
;;   (interactive)
;;   (let* ((command "termux-sms-list -t inbox -l 500")
;; 	 (list (termux/send-command command))
;; 	 (list (json-parse-string list))
;; 	 (how-many (length list)))
;;     (dotimes (n how-many)
;;       (let ((sms (elt list n)))
;; 	(cf-sms-insert sms)))))

(defun rcd-kdeconnect-send-sms (number message)
  (let* ((status (shell-command
		  (mapconcat 'identity
			     (list "kdeconnect-cli" "-d"
				   ;; "73fc592ea61a3a70" ;; Airtel
				   "c47e5d958b455603" ;; MTN
				   "--destination" number
				   "--send-sms" (shell-quote-argument message))
			     " "))))
    status))

(defvar rcd-prefixes-uganda-airtel-mobile '(700 701 702 703 704 705 706
						710 711 712 713 714 715 716 717 718 719
						750 751 752 753 754 755 756 757 758 759))

(defvar rcd-prefixes-uganda-mtn-mobile '(770 771 772 773 774 775 776 777 778 779
					     780 781 782 783 784 785 786 787 788 789))

(defun rcd-sql-phone-national-prefix-or (country-prefix prefixes)
  (let* ((country-prefix (if (numberp country-prefix)
			     (number-to-string country-prefix)
			   country-prefix))
	 (prefixes (mapcar (lambda (n) (single-quote (concat country-prefix (number-to-string n)))) prefixes))
	 (prefixes (string-join prefixes ", ")))
    prefixes))

(defun rcd-sql-phone-recent-people-by-mobile-prefix (prefixes &optional how-many)
  (let* ((how-many (or how-many 200))
	 (sql (format "SELECT people_id, get_full_contacts_name(people_id) FROM people WHERE (substring(people_officephone, 2, 6) IN (%s) OR substring(people_mobilephone, 2, 6) IN (%s) OR substring(people_homephone, 2, 6) IN (%s) OR substring(people_otherphone, 2, 6) IN (%s) OR substring(people_fax, 2, 6) IN (%s)) ORDER BY people_id DESC LIMIT %s" prefixes prefixes prefixes prefixes prefixes how-many)))
    sql))

(defun cf-tabulated-people-recent-by-airtel-mobile ()
  (interactive)
  (let* ((prefixes (rcd-sql-phone-national-prefix-or 256 rcd-prefixes-uganda-airtel-mobile))
	 (sql (rcd-sql-phone-recent-people-by-mobile-prefix prefixes)))
    (rcd-db-sql-report-two "Recent people with UG Airtel numbers" sql [("ID" 8) ("Person" 80)] "people" nil)))

(provide 'termux)
;;; termux.el ends here

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: content management in emacs
  2021-02-27 18:57 ` content management in emacs Ian Garmaise
                     ` (2 preceding siblings ...)
  2021-03-07 22:31   ` Jean Louis
@ 2021-03-07 22:38   ` Jean Louis
  3 siblings, 0 replies; 30+ messages in thread
From: Jean Louis @ 2021-03-07 22:38 UTC (permalink / raw)
  To: Ian Garmaise; +Cc: emacs-orgmode

* Ian Garmaise <ian.g@phorixsol.com> [2021-02-27 21:59]:
> Hi Bob,
> 
> How do you send mail to mailing lists with BBDB?

I have complete mailing list system in Emacs that uses the
database. Sending to a list without recording who received which email
is leading sooner or later to nonsensical situations that ruin
relations with people. When somebody wish to setup email, and has
patience, I will help with installation until it starts working and
until the user becomes able to create and send first email series.

One has to track which person received which email at what time.

Imagine the timeline of people being entered into any kind of a
database, in January there are 30 people, they need to receive maybe
2-3 emails named A, B, and C each week, but in February there are
other 22 people who need to receive 2-3 emails A, B, C and the first
30 people from January have to receieve emails D, E, F, G in
February.

I am including here the dump of the `emails` table in the database and
if other tables are required, I will send it.

The `mailings` table below is tracking which person received which
email at what time. Only by defining the periods between emails and
tracking emails in the database one can make a series of follow-up
emails that are logical and useful in sales or relation building.

We sell for hundreds of thousands of dollars by using this
system. There is no need for remote databases or keeping contact lists
on remote servers.

Emails are dispatched to the local computer's queue, and then
forwarded to remote SMTP server. Currently I am using `msmtp` to
forward bulk emails.

Jean

--
-- PostgreSQL database dump
--

-- Dumped from database version 13.0
-- Dumped by pg_dump version 13.0

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

SET default_tablespace = '';

SET default_table_access_method = heap;

--
-- Name: emails; Type: TABLE; Schema: public; Owner: maddox
--

CREATE TABLE public.emails (
    emails_id integer NOT NULL,
    emails_datecreated timestamp without time zone DEFAULT now(),
    emails_datemodified timestamp without time zone,
    emails_date timestamp with time zone,
    emails_time time without time zone,
    emails_account integer,
    emails_contact integer,
    emails_opportunity integer,
    emails_assignedto integer,
    emails_subject text NOT NULL,
    emails_body text,
    emails_sent boolean DEFAULT true,
    emails_templates integer NOT NULL,
    emails_mailinglist integer,
    emails_priority integer DEFAULT 1000 NOT NULL,
    emails_emailtypes integer DEFAULT 1 NOT NULL,
    emails_delay text DEFAULT 7 NOT NULL,
    emails_intervals integer DEFAULT 2 NOT NULL,
    emails_languages integer DEFAULT 1 NOT NULL,
    emails_periodic boolean DEFAULT false,
    emails_blastnow boolean DEFAULT false NOT NULL,
    emails_blastonce boolean DEFAULT false NOT NULL,
    emails_maxdate timestamp with time zone,
    emails_maxtime text,
    emails_timezones integer,
    emails_weekdays integer,
    emails_includecountries integer,
    emails_excludecountries integer,
    emails_pages integer,
    emails_emailformats integer DEFAULT 1 NOT NULL,
    emails_marks integer,
    emails_city text,
    emails_countries integer,
    emails_excludemarks integer
);


ALTER TABLE public.emails OWNER TO maddox;

--
-- Name: TABLE emails; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON TABLE public.emails IS 'E-mails';


--
-- Name: COLUMN emails.emails_id; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_id IS 'ID';


--
-- Name: COLUMN emails.emails_datecreated; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_datecreated IS 'Date created';


--
-- Name: COLUMN emails.emails_datemodified; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_datemodified IS 'Date modified';


--
-- Name: COLUMN emails.emails_date; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_date IS 'Date';


--
-- Name: COLUMN emails.emails_time; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_time IS 'Time';


--
-- Name: COLUMN emails.emails_account; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_account IS 'Account';


--
-- Name: COLUMN emails.emails_contact; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_contact IS 'Contact';


--
-- Name: COLUMN emails.emails_opportunity; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_opportunity IS 'Opportunity';


--
-- Name: COLUMN emails.emails_assignedto; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_assignedto IS 'Assigned to';


--
-- Name: COLUMN emails.emails_subject; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_subject IS 'Subject';


--
-- Name: COLUMN emails.emails_body; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_body IS 'Body';


--
-- Name: COLUMN emails.emails_sent; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_sent IS 'Sent';


--
-- Name: COLUMN emails.emails_templates; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_templates IS 'Template';


--
-- Name: COLUMN emails.emails_mailinglist; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_mailinglist IS 'Mailing List';


--
-- Name: COLUMN emails.emails_priority; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_priority IS 'Priority';


--
-- Name: COLUMN emails.emails_emailtypes; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_emailtypes IS 'Type';


--
-- Name: COLUMN emails.emails_delay; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_delay IS 'Delay';


--
-- Name: COLUMN emails.emails_intervals; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_intervals IS 'Interval';


--
-- Name: COLUMN emails.emails_languages; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_languages IS 'Language';


--
-- Name: COLUMN emails.emails_periodic; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_periodic IS 'Periodic';


--
-- Name: COLUMN emails.emails_blastnow; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_blastnow IS 'Blast now';


--
-- Name: COLUMN emails.emails_blastonce; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_blastonce IS 'Blast once';


--
-- Name: COLUMN emails.emails_maxdate; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_maxdate IS 'Max date';


--
-- Name: COLUMN emails.emails_maxtime; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_maxtime IS 'Max time';


--
-- Name: COLUMN emails.emails_timezones; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_timezones IS 'Time zone';


--
-- Name: COLUMN emails.emails_weekdays; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_weekdays IS 'Weekday';


--
-- Name: COLUMN emails.emails_includecountries; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_includecountries IS 'Include countries';


--
-- Name: COLUMN emails.emails_excludecountries; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_excludecountries IS 'Exclude countries';


--
-- Name: COLUMN emails.emails_pages; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_pages IS 'Page to send';


--
-- Name: COLUMN emails.emails_emailformats; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_emailformats IS 'Format';


--
-- Name: COLUMN emails.emails_marks; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_marks IS 'Marked by';


--
-- Name: COLUMN emails.emails_city; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_city IS 'City';


--
-- Name: COLUMN emails.emails_countries; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_countries IS 'Country';


--
-- Name: COLUMN emails.emails_excludemarks; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.emails.emails_excludemarks IS 'Exclude marked as';


--
-- Name: emails_emails_id_seq; Type: SEQUENCE; Schema: public; Owner: maddox
--

CREATE SEQUENCE public.emails_emails_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.emails_emails_id_seq OWNER TO maddox;

--
-- Name: emails_emails_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: maddox
--

ALTER SEQUENCE public.emails_emails_id_seq OWNED BY public.emails.emails_id;


--
-- Name: emails emails_id; Type: DEFAULT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails ALTER COLUMN emails_id SET DEFAULT nextval('public.emails_emails_id_seq'::regclass);


--
-- Name: emails emails_pkey; Type: CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_pkey PRIMARY KEY (emails_id);


--
-- Name: emails emails_emails_account_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_account_fkey FOREIGN KEY (emails_account) REFERENCES public.accounts(accounts_id);


--
-- Name: emails emails_emails_assignedto_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_assignedto_fkey FOREIGN KEY (emails_assignedto) REFERENCES public.people(people_id);


--
-- Name: emails emails_emails_contact_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_contact_fkey FOREIGN KEY (emails_contact) REFERENCES public.people(people_id);


--
-- Name: emails emails_emails_countries_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_countries_fkey FOREIGN KEY (emails_countries) REFERENCES public.countries(countries_id);


--
-- Name: emails emails_emails_emailformats_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_emailformats_fkey FOREIGN KEY (emails_emailformats) REFERENCES public.emailformats(emailformats_id);


--
-- Name: emails emails_emails_emailtypes_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_emailtypes_fkey FOREIGN KEY (emails_emailtypes) REFERENCES public.emailtypes(emailtypes_id);


--
-- Name: emails emails_emails_excludecountries_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_excludecountries_fkey FOREIGN KEY (emails_excludecountries) REFERENCES public.countrylists(countrylists_id);


--
-- Name: emails emails_emails_excludemarks_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_excludemarks_fkey FOREIGN KEY (emails_excludemarks) REFERENCES public.marks(marks_id);


--
-- Name: emails emails_emails_includecountries_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_includecountries_fkey FOREIGN KEY (emails_includecountries) REFERENCES public.countrylists(countrylists_id);


--
-- Name: emails emails_emails_intervals_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_intervals_fkey FOREIGN KEY (emails_intervals) REFERENCES public.intervals(intervals_id);


--
-- Name: emails emails_emails_languages_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_languages_fkey FOREIGN KEY (emails_languages) REFERENCES public.languages(languages_id);


--
-- Name: emails emails_emails_mailinglist_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_mailinglist_fkey FOREIGN KEY (emails_mailinglist) REFERENCES public.accounts(accounts_id);


--
-- Name: emails emails_emails_marks_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_marks_fkey FOREIGN KEY (emails_marks) REFERENCES public.marks(marks_id);


--
-- Name: emails emails_emails_opportunity_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_opportunity_fkey FOREIGN KEY (emails_opportunity) REFERENCES public.opportunities(opportunities_id);


--
-- Name: emails emails_emails_pages_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_pages_fkey FOREIGN KEY (emails_pages) REFERENCES public.pages(pages_id);


--
-- Name: emails emails_emails_templates_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_templates_fkey FOREIGN KEY (emails_templates) REFERENCES public.templates(templates_id);


--
-- Name: emails emails_emails_timezones_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_timezones_fkey FOREIGN KEY (emails_timezones) REFERENCES public.timezones(timezones_id);


--
-- Name: emails emails_emails_weekdays_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.emails
    ADD CONSTRAINT emails_emails_weekdays_fkey FOREIGN KEY (emails_weekdays) REFERENCES public.weekdays(weekdays_id);


--
-- PostgreSQL database dump complete
--

--
-- PostgreSQL database dump
--

-- Dumped from database version 13.0
-- Dumped by pg_dump version 13.0

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

SET default_tablespace = '';

SET default_table_access_method = heap;

--
-- Name: mailings; Type: TABLE; Schema: public; Owner: maddox
--

CREATE TABLE public.mailings (
    mailings_id integer NOT NULL,
    mailings_datecreated timestamp without time zone DEFAULT now() NOT NULL,
    mailings_usercreated text DEFAULT "current_user"() NOT NULL,
    mailings_contacts integer NOT NULL,
    mailings_mailingtypes integer DEFAULT 1 NOT NULL,
    mailings_fromcompany integer NOT NULL,
    mailings_subject text NOT NULL,
    mailings_description text,
    mailings_emails integer,
    mailings_mailingstatuses integer
);


ALTER TABLE public.mailings OWNER TO maddox;

--
-- Name: TABLE mailings; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON TABLE public.mailings IS 'Mailings';


--
-- Name: COLUMN mailings.mailings_id; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.mailings.mailings_id IS 'ID';


--
-- Name: COLUMN mailings.mailings_datecreated; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.mailings.mailings_datecreated IS 'Date created';


--
-- Name: COLUMN mailings.mailings_usercreated; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.mailings.mailings_usercreated IS 'User created';


--
-- Name: COLUMN mailings.mailings_contacts; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.mailings.mailings_contacts IS 'Contact';


--
-- Name: COLUMN mailings.mailings_mailingtypes; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.mailings.mailings_mailingtypes IS 'Mailing Type';


--
-- Name: COLUMN mailings.mailings_fromcompany; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.mailings.mailings_fromcompany IS 'Sender';


--
-- Name: COLUMN mailings.mailings_subject; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.mailings.mailings_subject IS 'Subject';


--
-- Name: COLUMN mailings.mailings_description; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.mailings.mailings_description IS 'Description';


--
-- Name: COLUMN mailings.mailings_emails; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.mailings.mailings_emails IS 'E-mail ID';


--
-- Name: COLUMN mailings.mailings_mailingstatuses; Type: COMMENT; Schema: public; Owner: maddox
--

COMMENT ON COLUMN public.mailings.mailings_mailingstatuses IS 'Status';


--
-- Name: mailings_mailings_id_seq; Type: SEQUENCE; Schema: public; Owner: maddox
--

CREATE SEQUENCE public.mailings_mailings_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.mailings_mailings_id_seq OWNER TO maddox;

--
-- Name: mailings_mailings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: maddox
--

ALTER SEQUENCE public.mailings_mailings_id_seq OWNED BY public.mailings.mailings_id;


--
-- Name: mailings mailings_id; Type: DEFAULT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.mailings ALTER COLUMN mailings_id SET DEFAULT nextval('public.mailings_mailings_id_seq'::regclass);


--
-- Name: mailings mailings_pkey; Type: CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.mailings
    ADD CONSTRAINT mailings_pkey PRIMARY KEY (mailings_id);


--
-- Name: mailings mailings_mailings_contacts_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.mailings
    ADD CONSTRAINT mailings_mailings_contacts_fkey FOREIGN KEY (mailings_contacts) REFERENCES public.people(people_id);


--
-- Name: mailings mailings_mailings_emails_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.mailings
    ADD CONSTRAINT mailings_mailings_emails_fkey FOREIGN KEY (mailings_emails) REFERENCES public.emails(emails_id);


--
-- Name: mailings mailings_mailings_fromcompany_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.mailings
    ADD CONSTRAINT mailings_mailings_fromcompany_fkey FOREIGN KEY (mailings_fromcompany) REFERENCES public.accounts(accounts_id);


--
-- Name: mailings mailings_mailings_mailingstatuses_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.mailings
    ADD CONSTRAINT mailings_mailings_mailingstatuses_fkey FOREIGN KEY (mailings_mailingstatuses) REFERENCES public.mailingstatuses(mailingstatuses_id);


--
-- Name: mailings mailings_mailings_mailingtypes_fkey; Type: FK CONSTRAINT; Schema: public; Owner: maddox
--

ALTER TABLE ONLY public.mailings
    ADD CONSTRAINT mailings_mailings_mailingtypes_fkey FOREIGN KEY (mailings_mailingtypes) REFERENCES public.mailingtypes(mailingtypes_id);


--
-- Name: TABLE mailings; Type: ACL; Schema: public; Owner: maddox
--

GRANT ALL ON TABLE public.mailings TO PUBLIC;


--
-- PostgreSQL database dump complete
--



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-27 20:52 ` contact " dalanicolai
@ 2021-03-07 22:51   ` Jean Louis
  0 siblings, 0 replies; 30+ messages in thread
From: Jean Louis @ 2021-03-07 22:51 UTC (permalink / raw)
  To: dalanicolai; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2684 bytes --]

* dalanicolai <dalanicolai@gmail.com> [2021-02-27 23:53]:
> I think all packages fulfill your requirements. So I would say it depends
> on how many contacts you are managing. I have some experience with
> org-contacts, and I find it very convenient and straightforward. It is also
> very convenient to just use org-mode, i.e. a plain text file, for your
> contacts.

That may be convenient for friends or family, but is not a good idea
if such a contact database is to enlarge due to marketing actions.

People who collect leads and manage relations with many other people
must have straight way to manage contacts, and similar to well known
CRM systems such as SugarCRM or others. In fact contact management
could be managed by external program and database accessed through
Emacs. Though I do both with Emacs. And I like to access database from
shell as I do not use only Emacs as editor. As the database is
liberated from editor it allows access through any software or
programming language.

> Every contact is a headline and you can add any kind of property
> or tag etc. you want. Also anniversaries get added to the Agenda. You can
> very easily jump to the right contact, using imenu or swoop/swiper (I use
> `SPC j i ` in Spacemacs. So if you have less than say 300 contacts (I have
> really no clue about the number of contacts that will still work smoothly),
> then depending on how die-hard you are, I would recommend to start with
> org-contacs.

More important is how fast are contacts coming into the database. If
there are just 100 per year, then that will work well.

But marketing action of 23 hours have provided me like 1700 contacts,
so there would be no way that I ever keep up with text or hand
work. That requires automated insertion of contacts into the database,
and I use local database. Online lead capture is sent PGP encrypted by
email and emails are automatically processed and leads entered into
the local database. Placing contacts online is insecure IMHO, no
matter what is advertised about it.

> You can use org-vcard to import contacts, and org-vcard claims to
> support exports too but I did not test that yet.  Anyway, I think
> you won't loose much time with setting up org-contacts and from then
> you can slowly check out and study the other options.

I am attaching `rcd-vcard.el` that uses PostgreSQL database and my
schemas to export vCards that work nicely with
Android/LineageOS/Replicant devices. Package alone will not
work. Functions may be useful for some people to modify them as they
wish. If somebody wish to really install my system, I will be helpful
in private chat or email and guide person until it becomes functional.

Jean

[-- Attachment #2: rcd-vcard.el --]
[-- Type: text/plain, Size: 9384 bytes --]

;;; rcd-vcard.el --- RCD vCard functions  -*- lexical-binding: t; -*-

;; Copyright (C) 2016-2021 by Jean Louis

;; Author: Jean Louis <bugs@gnu.support>
;; Version: 0.1
;; Package-Requires: (rcd-utilities rcd-db-init rcd-db rcd-cf)
;; Keywords: 
;; URL: https://gnu.support/gnu-emacs/packages/rcd-vcard.html

;; This file is not part of GNU Emacs.

;; This program is free software: you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation, either version 3 of the
;; License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:

;; These are the RCD vCard functions
;;
;; RCD is acronym for Reach, Connect, Deliver, my personal
;; principle and formula for Wealth.

;;; Change Log:

;;; Code:

(require 'rcd-utilities)
(require 'rcd-db-init)
(require 'rcd-db)
(require 'rcd-cf)

(defvar *rcd-vcard-version* "2.1")
(defvar *rcd-vcard-output* "~/tmp/rcd-vcards/")

(defun rcd-vcard-jabber (xmpp)
  (if (rcd-string-not-empty-p xmpp)
      (format "X-JABBER:%s\nX-JABBER;WORK:%s\n" xmpp xmpp)
    ""))

(defun rcd-vcard-tel (tel &optional type)
  (if (rcd-string-not-empty-p tel)
      (let* ((type (or type "CELL"))
	     (type (upcase type)))
	(format "TEL;%s:%s\n" type tel))
    ""))

(defun rcd-vcard-address (address1 city1 zip1 state1 country1 address2 city2 zip2 state2 country2)
  (with-output-to-string
    (princ "ADR;DOM;HOME;:")
    (princ city1)
    (princ ";")
    (princ country1)
    (princ "\n"))) ;; TODO

(defun rcd-vcard-phones (office mobile home other fax &optional other-2 other-3 other-4)
  (with-output-to-string
    (when office
      (princ (rcd-vcard-tel office "WORK")))
    (when mobile
      (princ (rcd-vcard-tel mobile "CELL")))
    (when home
      (princ (rcd-vcard-tel home "HOME")))
    (when other
      (princ (rcd-vcard-tel other "OTHER")))
    (when fax
      (princ (rcd-vcard-tel fax "FAX")))
    (when other-2
      (princ (rcd-vcard-tel other-2 "OTHER")))
    (when other-3
      (princ (rcd-vcard-tel other-3 "OTHER")))
    (when other-3
      (princ (rcd-vcard-tel other-3 "OTHER")))))

(defun rcd-vcard-title (title)
  (if (rcd-string-not-empty-p title)
      (format "TITLE:%s\n" title)
    ""))

(defun rcd-vcard-organization (org &optional unit)
  (if (rcd-string-not-empty-p org)
      (let ((unit (or unit "")))
	(format "ORG:%s;%s\n" org unit))
    ""))

;; (defun rcd-vcard-note (note)
;;   (if (rcd-string-not-empty-p note)
;;       (format "NOTE:ENCODING=BASE64;:%s\n" (base64-encode-string note))
;;     ""))

(defun rcd-vcard-note (id note)
  (with-output-to-string
    ;;     (princ (format "NOTE;ENCODING=BIT8;:Contact ID %s; " id))
    (princ (format "NOTE:Contact ID %s" id))
    (if (rcd-string-not-empty-p note)
	(princ (format "%s\n" "")) ;; place note instead of ""
      "")))

(defun rcd-vcard-begin ()
  (format "BEGIN:VCARD\nVERSION:%s\n" *rcd-vcard-version*))

(defun rcd-vcard-end ()
  (format "END:VCARD\n"))

(defun rcd-vcard-email (email &optional type)
  (if (rcd-string-not-empty-p email)
      (let* ((type (or type "HOME"))
	     (type (upcase type)))
	(format "EMAIL;%s:%s\n" type email))
  ""))

(defun rcd-vcard-url (url)
  (if (rcd-string-not-empty-p url)
      (format "URL:%s\n" url)
    ""))

(defun rcd-vcard-birthday (bday)
  (if (rcd-string-not-empty-p bday)
      (format "BDAY:%s\n" bday)
    ""))

(defun rcd-vcard-formatted-name (fn)
  (if (rcd-string-not-empty-p fn)
      (format "FN:%s\n" fn)
    ""))

(defun rcd-vcard-name (last &optional first middle prefix suffix)
  (if (rcd-string-not-empty-p last)
      (let ((first (or first ""))
	    (middle (or middle ""))
	    (prefix (or prefix ""))
	    (suffix (or suffix "")))
	(format "N;CHARSET=UTF-8:%s;%s;%s;%s;%s;\n" last first middle prefix suffix))
    ""))

(defun cf-contact-geo-location (id)
  (let* ((sql (format "SELECT locations_latitude, locations_longitude FROM locations WHERE locations_contacts = %s" id))
	 (geo (car (rcd-sql-list sql *cf*)))
	 (latitude (car geo))
	 (longitude (cadr geo)))
    (if geo
	(format "geo:%s,%s" latitude longitude)
      nil)))

(defun rcd-cf-contact-vcard-list (id)
  (let* ((hash (rcd-db-table-id-hash-values "people" id *cf*))
	 (prefix (gethash 'people_prefix hash))
	 (first (gethash 'people_firstname hash))
	 (middle (gethash 'people_middlenames hash))
	 (last (gethash 'people_lastname hash))
	 (suffix (gethash 'people_suffix hash))
	 (account (gethash 'people_account1 hash))
	 (company (gethash 'people_account2 hash))
	 (member (gethash 'people_account3 hash))
	 (title (gethash 'people_title hash))
	 (department (gethash 'people_department hash))
	 (birthday (gethash 'people_birthdate hash))
	 (office (gethash 'people_officephone hash))
	 (mobile (gethash 'people_mobilephone hash))
	 (home (gethash 'people_homephone hash))
	 (other (gethash 'people_otherphone hash))
	 (fax (gethash 'people_fax hash))
	 (email1 (gethash 'people_email1 hash))
	 (email2 (gethash 'people_email2 hash))
	 (email3 (gethash 'people_email3 hash))
	 (website (gethash 'people_website1 hash))
	 (blog (gethash 'people_website2 hash))
	 (address1 (gethash 'people_address1 hash))
	 (city1 (gethash 'people_city1 hash))
	 (zip1 (gethash 'people_zip1 hash))
	 (state1 (gethash 'people_state1 hash))
	 (country1 (gethash 'people_country1 hash))
	 (address2 (gethash 'people_address2 hash))
	 (city2 (gethash 'people_city2 hash))
	 (zip2 (gethash 'people_zip2 hash))
	 (state2 (gethash 'people_state2 hash))
	 (country2 (gethash 'people_country2 hash))
	 (note (gethash 'people_description hash))
	 (geo (cf-contact-geo-location id))
	 (geo (if geo (upcase geo) ""))
	 (contact (list prefix first middle last suffix account company member title department birthday office mobile home other fax email1 email2 email3 website blog address1 city1 zip1 state1 country1 address2 city2 zip2 state2 country2 note geo)))
    (mapcar 'string-blank-nil contact)))

(defun rcd-cf-contact-vcard (id)
  (let* ((contact (rcd-cf-contact-vcard-list id))
	 (full-name (cf-get-full-name id))
	 (vcard (rcd-vcard-begin))
	 (prefix (elt contact 0))
	 (first (elt contact 1))
	 (middle (elt contact 2))
	 (last (elt contact 3))
	 (suffix (elt contact 4))
	 (n (rcd-vcard-name last first middle prefix suffix))
	 (vcard (concat vcard n))
	 (fn (concat prefix " " first " " middle " " last " " suffix))
	 (fn (replace-regexp-in-string " +" " " fn))
	 (fn (rcd-vcard-formatted-name fn))
	 (vcard (concat vcard fn))
	 (account (elt contact 5))
	 (company (elt contact 6))
	 (member (elt contact 7))
	 (title (elt contact 8))
	 (department (elt contact 9))
	 (org (rcd-vcard-organization company department))
	 (vcard (concat vcard org))
	 (account-org (rcd-vcard-organization account "Account"))
	 (vcard (concat vcard account-org))
	 (member-org (rcd-vcard-organization member "Member"))
	 (vcard (concat vcard member-org))
	 (vcard (concat vcard (rcd-vcard-title title)))
	 (birthday (elt contact 10))
	 (vcard (concat vcard (rcd-vcard-birthday birthday)))
	 (office (elt contact 11))
	 (mobile (elt contact 12))
	 (home (elt contact 13))
	 (other (elt contact 14))
	 (fax (elt contact 15))
	 (phones (rcd-vcard-phones office mobile home other fax))
	 (vcard (concat vcard phones))
	 (email1 (elt contact 16))
	 (email2 (elt contact 17))
	 (email3 (elt contact 18))
	 (vcard (concat vcard (rcd-vcard-email email1)))
	 (vcard (concat vcard (rcd-vcard-email email2)))
	 (vcard (concat vcard (rcd-vcard-email email3)))
	 (website (elt contact 19))
	 (vcard (concat vcard (rcd-vcard-url website)))
	 (blog (elt contact 20))
	 (vcard (concat vcard (rcd-vcard-url blog)))
	 (address1 (elt contact 21))
	 (city1 (elt contact 22))
	 (zip1 (elt contact 23))
	 (state1 (elt contact 24))
	 (country1 (elt contact 25))
	 (address2 (elt contact 26))
	 (city2 (elt contact 27))
	 (zip2 (elt contact 28))
	 (state2 (elt contact 29))
	 (country2 (elt contact 30))
	 (address (rcd-vcard-address address1 city1 zip1 state1 country1 address2 city2 zip2 state2 country2))
	 (vcard (concat vcard address))
	 (note (elt contact 31))
	 (note (rcd-vcard-note id note))
	 (vcard (concat vcard note))
	 (geo (elt contact 32))
	 (geo (if geo (concat geo "\n") ""))
	 (vcard (concat vcard geo))
	 ;;(vcard (concat vcard note))
	 (vcard (concat vcard (rcd-vcard-end))))
    vcard))

(defun rcd-vcard-mobile-1 ()
  "Exports all vCards for mobile phone #1"
  (interactive)
  (make-directory *rcd-vcard-output* t)
  (let* ((ids (rcd-sql "SELECT addressbookentries_people FROM addressbookentries" *cf*)))
    (string-to-file-force
     (with-output-to-string
       (dolist (id ids)
	 (princ (rcd-cf-contact-vcard id))))
     (concat *rcd-vcard-output* "rcd-people.vcf"))))

(defun cf-contact-vcard-export (id)
  "Export vCard for contact ID"
  (let ((vcard (rcd-cf-contact-vcard id))
	(file (format "%s%08d.vcf" *rcd-vcard-output* id)))
    (string-to-file-force vcard file)
    (message (concat "vCard exported to: " file))))

(provide 'rcd-vcard)
;;; rcd-vcard.el ends here

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-28  9:06 ` Russell Adams
  2021-02-28 11:09   ` Alan Schmitt
  2021-03-03 14:40   ` TRS-80
@ 2021-03-07 22:57   ` Jean Louis
  2021-03-08 20:06     ` John Kitchin
  2 siblings, 1 reply; 30+ messages in thread
From: Jean Louis @ 2021-03-07 22:57 UTC (permalink / raw)
  To: emacs-orgmode

* Russell Adams <RLAdams@AdamsInfoServ.Com> [2021-02-28 12:07]:
> The only reason I don't use BBDB is I want to use Org to allow me to
> maintain notes about contacts (ie: CRM). Yes, I get that I could have
> a CRM file and link in BBDB contacts, but that feels like adding
> layers.

I have replaced using Org file as the central system with the `people`
database as the central system. This may sound confusing. Instead of
using exclusively Org file, I am using the database and addint notes
to people in the database. A note can have any major or minor mode,
thus it could be text or Org file or markdown file, enriched mode or
restructured text, asciidoc, or similar.

My workflow is to find the person first, then press N to see notes, or
M-n to create a new note. Concepts I am explaining may serve some
people to create their own workflows.

Using database for that allows easily collaboration in real time with
other team members and inclusion or insertion of new contacts during
marketing activities without interruption. Org files are not suitable
for such collaborative updates.

> The stumbling point for me has been exporting to my mobile phone. I'm
> fine with a one way sync from my BBDB/Org solution to the phone, but
> I feel like I never found a good option.

bbdb-vcard package is here:
https://melpa.org/packages/bbdb-vcard-20201016.1902.tar

Jean


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-03-07 22:13 ` Jean Louis
@ 2021-03-08  7:49   ` Alan Schmitt
  2021-03-08  8:12     ` Jose E. Marchesi
  0 siblings, 1 reply; 30+ messages in thread
From: Alan Schmitt @ 2021-03-08  7:49 UTC (permalink / raw)
  To: Jean Louis; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

Hello,

On 2021-03-08 01:13, Jean Louis <bugs@gnu.support> writes:

> I am recommending that you start using PostgreSQL database. I can
> guide you. My software is not so finished for public, but I can guide
> you personally and you will get stable system that lasts for years.

Thank you for the suggestion, but for the moment I think I will
experiment with text-based solutions.

Best,

Alan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 528 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-03-08  7:49   ` Alan Schmitt
@ 2021-03-08  8:12     ` Jose E. Marchesi
  2021-03-10  8:32       ` Jean Louis
  0 siblings, 1 reply; 30+ messages in thread
From: Jose E. Marchesi @ 2021-03-08  8:12 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode, Jean Louis


>> I am recommending that you start using PostgreSQL database. I can
>> guide you. My software is not so finished for public, but I can guide
>> you personally and you will get stable system that lasts for years.
>
> Thank you for the suggestion, but for the moment I think I will
> experiment with text-based solutions.

I use a recfile [1] to manage contacts.

[1] http://www.gnu.org/s/recutils


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-03-07 22:57   ` Jean Louis
@ 2021-03-08 20:06     ` John Kitchin
  2021-03-10  8:32       ` Jean Louis
  0 siblings, 1 reply; 30+ messages in thread
From: John Kitchin @ 2021-03-08 20:06 UTC (permalink / raw)
  To: Jean Louis; +Cc: emacs-orgmode

This question is going to go a little off the original topic. I wonder
how far you can push your model of replacing the org-file with a
database. It looks like it would be easy to extend to something like a
shared bibliography.

How far could you push it for something like a shared set of documents,
e.g. a shared notebook on a project? How feasible would it be to access
tables or src blocks in these if they were in a database? or to build an
agenda from entries in the database?



Jean Louis <bugs@gnu.support> writes:

> * Russell Adams <RLAdams@AdamsInfoServ.Com> [2021-02-28 12:07]:
>> The only reason I don't use BBDB is I want to use Org to allow me to
>> maintain notes about contacts (ie: CRM). Yes, I get that I could have
>> a CRM file and link in BBDB contacts, but that feels like adding
>> layers.
>
> I have replaced using Org file as the central system with the `people`
> database as the central system. This may sound confusing. Instead of
> using exclusively Org file, I am using the database and addint notes
> to people in the database. A note can have any major or minor mode,
> thus it could be text or Org file or markdown file, enriched mode or
> restructured text, asciidoc, or similar.
>
> My workflow is to find the person first, then press N to see notes, or
> M-n to create a new note. Concepts I am explaining may serve some
> people to create their own workflows.
>
> Using database for that allows easily collaboration in real time with
> other team members and inclusion or insertion of new contacts during
> marketing activities without interruption. Org files are not suitable
> for such collaborative updates.
>
>> The stumbling point for me has been exporting to my mobile phone. I'm
>> fine with a one way sync from my BBDB/Org solution to the phone, but
>> I feel like I never found a good option.
>
> bbdb-vcard package is here:
> https://melpa.org/packages/bbdb-vcard-20201016.1902.tar
>
> Jean


--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-03-08 20:06     ` John Kitchin
@ 2021-03-10  8:32       ` Jean Louis
  0 siblings, 0 replies; 30+ messages in thread
From: Jean Louis @ 2021-03-10  8:32 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode

* John Kitchin <jkitchin@andrew.cmu.edu> [2021-03-08 23:06]:
> This question is going to go a little off the original topic. I wonder
> how far you can push your model of replacing the org-file with a
> database.

Those functions which I use most often I can fully replace with the
database work. The visual stuff is handled by tabulated-list-mode, so
I cannot currently see the contents of a simple heading unless I press
a key. But I am sure that database based Org style editing is possible
in general.

What I mean is that one could have an Org file displayed but
internally all of its structures could be translated on the fly into
the database. This would allow collaboration with many users and
finely based version control of each elements of the structure.

I think that automatic update and version control of each contents of
a heading could be saved to database, or it could be saved to database
by using key or by switching from one heading to other heading.

If user switches to other heading, would that other heading be edited
by other user in the same time, that other heading could be
automatically updated.

I was making simple functions to move Org headings into the database,
and functions to move database entries into Org files on the fly.

IMHO, what Org does is either intentionally or not intentionally, or
mixed-wise related to Doug Engelbart's work. 

TECHNOLOGY TEMPLATE PROJECT OHS Framework 
https://www.dougengelbart.org/content/view/110/460/

> This question is going to go a little off the original topic. I wonder
> how far you can push your model of replacing the org-file with a
> database.

After that introduction, and I hope you understand what I wrote (as I
am not sure if I have expressed myself well enough), then I can answer
how far it may be pushed. I have defined in my software Hyperscope
that each node can have different type. All nodes have its ID
numbers. So now I could say that nodes have various finely grained
types such as:

- Subtree (This could be considered either heading or title in Org
  editing), it contains other nodes. 

- headings or subtrees within subtree are similar to sub-headings in
  Org editing

- I can define Org Babel-like nodes, for example now I have SQL
  output, I can enter SQL SELECT and get the report. That type of node
  definition is alternative to Org Babel. I did not work much on it,
  but it is not hard to define. As soon as the node type is defined,
  inside of the node type there could be defined, even inside of the
  database, on how to run or execute that code block. Right now I am
  hardcoding that.

- then I can go finely grained, I could say: this node is
  paragraph. But I need not do that.

- then I could go more finely grained, I could say this node is a list
  of items, but I could also say this node is one item within a list.

- I could say this is one line as node, or this is one sentence as
  node.

- I could say this is one word within a sentence.

That means I can defined "Elementary objects" as defined here:
https://www.dougengelbart.org/content/view/110/460/#2a1a

Objects are basic content packets of an arbitrary, user and developer
extensible nature. Types of elementary objects could contain text,
graphics, equations, tables, spreadsheets, canned-images, video,
sound, code elements, etc.

Now you can imagine that those paragraphs could be reused in various
Org files, reusing such paragraphs becomes trivial. There is no copy
and paste any more, just one time definition where some paragraph
shall be inserted:

- edit subtree of nodes
- decide where to insert some other existing node
- insert it and forget about it

This then allows editing of the subtree (Org equivalent) node A or
node B, and each time that paragraph is edited it is also changed in
the other subtree. Copying subtrees so that they do not synchronize is
naturally possible.

Finely grained definition of nodes allows for finely grained
referencing to those nodes what is currently not possible with Org
mode. I have researched that option.

Review this page: https://www.dougengelbart.org/content/view/110/460/
and you will see how each paragraph is finely referenced on that
page. Specific referencing enhances educational capabilities in
specialization on specific subject. It saves times, efforts, also a
lot of money.

Imagine group of 20 miners and their 3 administrators who are supposed
to work on a lead mine, they did finish their general education, but
now they are faced with specialized subject of "lead mining". Having a
very precise set of references to lead mining saves money, as
education of miners and administrators is paid in their salaries, if
they are reading irrelevant instructions or if they are offered whole
books to read and find references themselves, that would spend 20
times plus 3 times more money for their time to gain that special
knowledge. Having a finely grained set of references that has to be
read by those specific people specializes those people to the specific
subject of knowledge quickly and efficiently, they can get only
information that relates to galena as mineral, melting, refining,
collecting of galena and processing of it.

Fine referencing thus helps in research and education and other
subjects.

To index bodies of knowledge is not so hard with computerized
information. Once index is made, such index contains the subject, for
example "galena". By using larger index, one can then form and curate
a subtree or heading of nodes and use that heading for education to
specialize miners in a specific subject.

Indexing and converting to Org file is possible, then if one does not
work with database, one can still select those headings that relate to
specific subject with Emacs functions and then copy and paste those
specific headings into a new file.

But what if any node is changed either in the new file or the main
index? They are not automatically synchronized. Database backed
editing allows automatic synchronization. Or nodes may be made
separate by duplicating them.

It also allows instead of creating a new subtree, to create just a
result based on query and exclude/include some other lines and create
new Org file with those entries for later research. Org file can be
converted to PDF and distributed to people.

> It looks like it would be easy to extend to something like a shared
> bibliography.

I wish I could understand better what you mean with shared
bibliography. Explain me better.

As side notes to bibliography subject, in the table of nodes I have
included some basic bibliographic entries, but not all, I have not
been thinking enough of that. I do use it for finely grained personal
bibliographic collection of hyperlinks and hyperdocuments and now I
have more than 20000 items, mostly PDF files with references to
articles inside of PDF file, their titles and similar. It is like
index of indexes. Subtrees or all system can be converted to Org files
on the fly and saved if necessary, but there is much work to make it
more detailed and nice, well hyperlinked.

Table `hlinks' should be maybe called hyperdocuments, but I chose this
name for now, has the following structure:

 hlinks_id               
 hlinks_datecreated      
 hlinks_datemodified     
 hlinks_usercreated      
 hlinks_usermodified     
 hlinks_hlinkstatuses    
 hlinks_date             
 hlinks_expiration       
 hlinks_curator          
 hlinks_hlinktypes       
 hlinks_mimetypes        
 hlinks_name             
 hlinks_link             
 hlinks_arguments        
 hlinks_description      
 hlinks_text             
 hlinks_tags             
 hlinks_parent           
 hlinks_author           
 hlinks_hlinkpermissions 
 hlinks_revision         
 hlinks_numberofpages    
 hlinks_language         
 hlinks_filesize         
 hlinks_timelength       
 hlinks_width            
 hlinks_height           
 hlinks_hash             
 hlinks_signature        p
 hlinks_pages            
 hlinks_accounts         
 hlinks_people           
 hlinks_businesses       
 hlinks_opportunities    
 hlinks_priorities       
 hlinks_authorname       
 hlinks_properties       
 hlinks_elisphash        
 hlinks_publisher        
 hlinks_groups           
 hlinks_groupassigned    
 hlinks_assignedperson   
 hlinks_rank             
 hlinks_active           
 hlinks_actionstatuses   
 hlinks_globalpriority   
 hlinks_relatedfile      

The nature of the database is collaborative. Adding new users and
allowing users finely grained access is possible. Users could edit
either all tables and fields, or just some tables and fields. Those
features are handled by the database and configuration, not by users'
run program (as otherwise user could circumvent it).

Users could access the database from any distant location and edit
nodes. Output could be Org file or any other output, but using Org
file as output is beneficial as Org itself has many various other
export formats.

This type of work is not well suitable for collaborative real time
online editing. However, it is suitable for concurrent non-real time
editing of any items.

For example, user A could designate new scheduled time, but user B
could change the scheduled time to something else. All changes can be
inside of the database backed version control to see who changed what
at which time. It is suitable for collaborative business or
organization work. Marketing, sales, communications, notes, anything
is possible when collaboration takes place.

Example workflow could be:

- manager views Org file of customer Joe

- assign customer Joe to salesman Jane

- salesman Jane calls customer and makes notes on customer Joe

- manager is notified of note visualized in Org file, it seem like
  customer Joe was handled in past better by salesman Juan

- manager schedules call to customer Joe by Juan at Tuesday 10 o'clock

- Juan calls customer at 10:30 Tuesday and closes the sale, invoice is
  generated

- all parties, manager, salesmen Jane and Juan can view what has taken
  place, visualization can take place as Org file

By using the package `crdt' from
https://code.librehq.com/qhong/crdt.el.git one can involve online
real-time collaboration of a single item. This works right now with
Org mode.

Each node of the database system could be edited with `crdt-mode'
enabled if one requires real time online collaboration.

> How far could you push it for something like a shared set of documents,
> e.g. a shared notebook on a project?

Each node is considered elementary object. There are no files. But
each node can be exported into a file.

As it is database backed, it is already shared notebook. Each subtree
can be considered Org file or Mixed-Object documents as defined by
Engelbart institute.

> How feasible would it be to access tables or src blocks in these if
> they were in a database?

Just as easy:

- concurrent updates, additions and deletions are possible with the
  automated database backed version control (no thinking).

- real time online collaborative editing is possible with `crdt'
  package for single entries

- editing any entry, any node in the database can be done by any
  mode, not just Org mode. If I define the type of the node to be Org
  type, then editing switches to Org mode and I can edit the tables by
  using Org mode. When saved, table is saved in the database, but can
  be if user wish and want, be also each time saved into the file as
  full Org or single node.

- src blocks I mostly constuct from SQL select statements, so they
  contain SQL, and I have implemented node with SQL, so I just put SQL
  statement there, it provides the report just as Org babel. It is not
  hard to implement any language and get literate programming
  functions.

Similar node based editing is provided by Leo editor, also inspired by
Org and other similar systems.

Leo programmable editor
http://leoeditor.com/

> or to build an agenda from entries in the database?

It is simple to provide agenda from entries in the database then from
entries in multiple Org files.

- each elementary object can have assigned "ACTION" at my side. Each
  assignement of ACTION is recorded with date/time/username, each
  COMPLETED designation is also recorded, each removal of designation
  is also recorded. One can know in future which items were actionable
  in past and which items were completed in past or maybe completed
  and then again assigned as actionable. This is currently not a
  feature in Org file. One could know that by editing Org file with
  file system version control. Single user without file system version
  control cannot know if some headings had TODO in past and now they
  do not have it.

- each item may be or may be not assigned to specific person. All
  people are in the database. So choice of people comes from the
  database itself. Assignment to specific person is recorded with
  date/time/username and deletion of assignment is recorded,
  modification is recorded automatically. This way it is possible to
  see which task was assigned to whom.

- agenda thus may be managed centralized for many people, or by people
  decentralized. Tasks may sent to assigned person with keys like "s
  a", either one task, or all tasks at once. Reminders can be
  programmed with various communication lines, including automated
  phone calls, SMS, emails, faxes, letters or visual reminders on
  computer, or printouts for dispatch.

- that allows collaborative based agenda, it is possible to list items
  assigned to person Joe, or person Jane, Joe may insert his own
  items, Jane may insert her own items, both Joe and Jane could see
  each other items, or finely grained permissions could be defined
  (database backed). Manager who is neither Joe or Jane could see all
  the items, regardless where users are located in the world. Access
  to the database could be through Org extensions, or through software
  I am making, or through other software from various
  devices. Software is independent of the database entries.

Special table collects information such as  SCHEDULED,  DEADLINE,
CLOCK-IN, CLOCK-OUT, ACTION, COMPLETED, ACTION-REMOVED. This table
may add different other timestamps by their types. So each node can
receive any of those timestamps.

It is then trivial to add new timestamp or find the difference between
CLOCK-IN, CLOCK-OUT, to list items by SCHEDULED or DEADLINES, or past
DEADLINES.

Your questions gave me to thinking that I should make some basic
functions:

- when editing Org mode, to easily insert database entry from
  Hyperscope system so that the entry can be edited in a file itself,
  and automatically updated in the database when file is saved, or
  special command invoked, or user switched to other heading

- inserting of such item from database entry would make Org
  properties, such as HOSTNAME, DATABASE used, (username, passwords
  could be externally saved), TABLE, COLUMN in the table and TABLE
  ID.

- then an extension function to Org would need to check if there is
  some database entry like that, so that saving of the file or
  invocation of that function finds the entry and updates it to the
  remote database. Database could be local or remote.

- if another user on other part of the world wish to insert or edit
  that Org entry, that user would get the updated version

With above extensions, user would still be editing file, it could be
saved file, file on the disk, but the database entries would be
updated either from the database or to the database in the
background and without interruptions to user.

Multiple users could then edit the Org files, which would get updated
on each new opening of a file or the invocation of a function.

This then limits entries to Org mode, while my entries are now in any
mode. I have enriched mode notes or Org type notes in the database, or
markdown nodes, or anything. When markdown note is viewed,
markdown-mode is invoked, when Org type node is viewed in Emacs, then
Org mode is invoked in read only mode.

The list of defined nodes that I have now available are:

Possible completions are:
1 File 	10 Directory 	11 Launch Program
12 Media 	13 Info Node 	14 PDF
15 HyperScope ID 	16 PDF Query 	17 Org Heading
18 Org 	19 PDF by Page Nr. 	2 WWW
20 DJVU 	21 Video 	22 Message-ID
23 WRS Page Annotation 	24 Directory Action ➜ 	25 Shell Command
26 Self 	27 Action 	
29 FOLLOW-UP 	3 MPV play video at exact time 	30 aMule
31 Task 	32 Password 	33 PostgreSQL
34 Markdown 	35 Paraset 	36 Enriched
37 txt2tags 	38 EPUB 	4 Local File
5 Set ➜ 	6 YouTube Video at exact time 	7 YouTube Video
8 Emacs Lisp 	9 Note

There are no limits to what a node can look like. Each node can be a
note in itself, even if it is a file, there can be note for the file,
number 28. I have deleted not to confuse people. Password is maybe
encrypted in the database, directory action has similar meaning like
in Hyperbole package where file ~/tmp/.hyperscope may contain this:

(hyperscope-directory-action 35243)

and the node ID 35243 decides which directory actions relate to
directory ~/tmp and then window splits with options from the database
such as maybe to read some notes related to directory, or remove all
docview directories or to remove all GIF files in ~/tmp - the idea
comes from Hyperbole package that has similar feature.

People in the database may be assigned specific subtrees or Org files
or nodes, so by finding person one can find the notes, tasks,
assignments, related to people.

At export to Org file, those nodes that are not compatible to Org file
such as Markdown, txt2tags, video, would be exported as separate file
and such file would be hyperlinked from the main Org file similar to
what is defined here:
https://www.dougengelbart.org/content/view/110/460/#2a1b

Complete exported package could then be dispatched onto DVD rom, USB
stick, sent by email or uploaded. Org file can be used in similar
fashion as MIME to define on higher level collection of various
documents.

As my goal is not to provide all features to users, but to use
Hyperscope, that is why my development goes slow and is not yet
available to public. I would need to verify many functions before it
becomes public software. But for individuals interested, I am willing
to help one on one to create the database and provide systems I am
using. 

Jean


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-03-08  8:12     ` Jose E. Marchesi
@ 2021-03-10  8:32       ` Jean Louis
  0 siblings, 0 replies; 30+ messages in thread
From: Jean Louis @ 2021-03-10  8:32 UTC (permalink / raw)
  To: Jose E. Marchesi; +Cc: Alan Schmitt, emacs-orgmode

* Jose E. Marchesi <jemarch@gnu.org> [2021-03-08 11:12]:
> 
> >> I am recommending that you start using PostgreSQL database. I can
> >> guide you. My software is not so finished for public, but I can guide
> >> you personally and you will get stable system that lasts for years.
> >
> > Thank you for the suggestion, but for the moment I think I will
> > experiment with text-based solutions.
> 
> I use a recfile [1] to manage contacts.

Please send some samples of how it looks like.



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2021-02-27 11:08 Alan Schmitt
                   ` (3 preceding siblings ...)
  2021-03-07 22:13 ` Jean Louis
@ 2022-09-09 16:11 ` Sébastien Rey-Coyrehourcq
  2022-09-10  5:46   ` Ihor Radchenko
  4 siblings, 1 reply; 30+ messages in thread
From: Sébastien Rey-Coyrehourcq @ 2022-09-09 16:11 UTC (permalink / raw)
  To: Alan Schmitt, emacs-orgmode

Hi,

After some search today on the web, like Alan i try to compare all 
possibility to manage my contact + mail using emacs, mu4e, and org.

Since Alan Schmitt message, i think many people jump into the great 
*org-roam* wagon to manage notes, bibliography, links, everything...

I'm into this *crazy* wagon, trying now to manage contact, with this 
workflow :

- one file/node by contact,
- stored into the org-roam specific folder "/myorgroamfolder/contact/ 
with this encrypted org pattern to protect files "*.org.gpg"
- using into mu4e

There are some post exploring part of this use case on the web, but i 
first focus to *org-contacts*, because it's well integrated with mu4e 
auto-completion :

Moving from org-contrib to https://repo.or.cz/org-contacts.git , 
accessible with melpa,  the documentation is mostly into the source-code 
actually, i found few example on the web .

What property field are correct :MOBILE:, :PHONE:, :BIRTHDAY: , and ?

I found some information about configuration in Terencio Agozzino 
dotfiles (https://github.com/rememberYou/.emacs.d) but when i try to 
adapt to this use case,
that don't work, probably because i misunderstand something, about 
properties name, or localization into the .org.gpg files.

I config like that (org-contacts-file (file-expand-wildcards 
"~/my-org-roam-folder/contact/*.org.gpg))

It's slow because everything need to be unencrypted before (this is 
another problem ...) but something i don't understand is how matching 
work :
calling "M-x org-contacts", i try multiple patterns, so i'm interested 
by a working org/org-roam contact example.

I found some alternatives to test next week :

- org-vcard (on github) compatible with org-contacts, focusing on 
import/export of vcard files
- mu4e-contacts (on gitlab) using helm / mu4e, inspired by org-contacts
- org-ql query ?

Best,

Sebastien R.C



Le 27/02/2021 à 12:08, Alan Schmitt a écrit :
> Hello,
>
> This may be slightly off-topic for the list, but as I’m considering
> org-contacts for my question, I hope it will be of interest here.
>
> I would like to migrate my contact management to emacs, as I’m already
> using it for email. My requirements are the following ones:
> - address completion in emacs email clients (I currently use notmuch)
> - support for multiple email addresses and custom fields
> - creation of org links to contacts
> - export to vcard format for synchronization to my mobile phone (using
> vdirsyncer)
> - keep the data under version control
>
> I have looked at two tools, which almost seem fit for the job.
> - ebdb does most of this, with the exception of vcard export (it seems
> to be worked on, https://github.com/girzel/ebdb/issues/60), and I’m not
> sure using version control on an sqlite file is a good idea.
> - org-contacts also seem to have all the required features, including
> vcard export (and if not sufficient there is
> https://github.com/novoid/org-contacts2vcard). I was worried it was
> unmaintained when looking at the copyright line, but I see in
> https://code.orgmode.org/bzg/org-mode/commits/master/contrib/lisp/org-contacts.el
> that there are recent commits to the file.
>
> Do you manage your contacts in emacs? And if so, what tools or workflow
> do you recommend?
>
> Best,
>
> Alan


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: contact management in emacs
  2022-09-09 16:11 ` Sébastien Rey-Coyrehourcq
@ 2022-09-10  5:46   ` Ihor Radchenko
  0 siblings, 0 replies; 30+ messages in thread
From: Ihor Radchenko @ 2022-09-10  5:46 UTC (permalink / raw)
  To: sebastien.rey-coyrehourcq; +Cc: Alan Schmitt, emacs-orgmode

Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr>
writes:

> Moving from org-contrib to https://repo.or.cz/org-contacts.git , 
> accessible with melpa,  the documentation is mostly into the source-code 
> actually, i found few example on the web .
>
> What property field are correct :MOBILE:, :PHONE:, :BIRTHDAY: , and ?

First, remember that org-contacts is built on top of generic Org
search.

org-contacts.el considers Org headline to be a contact record when it
contains any of
org-contacts-email-property
org-contacts-alias-property
org-contacts-tel-property
org-contacts-address-property
org-contacts-birthday-property

properties.

All the variables can be changed to your preference.

> I config like that (org-contacts-file (file-expand-wildcards 
> "~/my-org-roam-folder/contact/*.org.gpg))
>
> It's slow because everything need to be unencrypted before (this is 
> another problem ...) but something i don't understand is how matching 
> work :
> calling "M-x org-contacts", i try multiple patterns, so i'm interested 
> by a working org/org-roam contact example.

M-x org-contacts does a simple regexp matching across contacts.

If you want integration with org-roam, you may probably want a custom
org-roam matches equivalent to org-contacts-matcher.

There is also M-x org-contacts-completing-read

For the slowness of opening the contacts, you may consider doing
M-x profiler-start .. M-x profiler-report to see what exactly is being
slow.

> I found some alternatives to test next week :
>
> - org-vcard (on github) compatible with org-contacts, focusing on 
> import/export of vcard files
> - mu4e-contacts (on gitlab) using helm / mu4e, inspired by org-contacts
> - org-ql query ?

org-ql may be an option though it works best for a single large Org
file. You may have better luck using org-roam built-in search. I think
that the most straightforward way to integrate with org-roam would be
adding a "contact" tag to your contact records and then using the
standard org-roam search.

Hope it helps.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2022-09-10  6:08 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.47.1614445226.20994.emacs-orgmode@gnu.org>
2021-02-27 18:57 ` content management in emacs Ian Garmaise
2021-02-27 19:16   ` Martin Steffen
2021-02-27 20:11     ` Juan Manuel Macías
2021-03-01  5:17     ` Bob Newell
2021-02-28 10:39   ` Eric S Fraga
2021-03-07 22:31   ` Jean Louis
2021-03-07 22:38   ` Jean Louis
2021-02-27 20:52 ` contact " dalanicolai
2021-03-07 22:51   ` Jean Louis
2021-02-27 11:08 Alan Schmitt
2021-02-27 11:31 ` Martin Steffen
2021-02-27 13:20   ` andrés ramírez
2021-02-27 14:40     ` Eric S Fraga
2021-02-27 15:12       ` andrés ramírez
2021-02-28 10:21         ` Eric S Fraga
2021-02-27 15:14       ` Martin Steffen
2021-02-27 17:00   ` Dr. Arne Babenhauserheide
2021-02-27 16:53 ` Bob Newell
2021-02-28  9:06 ` Russell Adams
2021-02-28 11:09   ` Alan Schmitt
2021-03-03 14:40   ` TRS-80
2021-03-07 22:57   ` Jean Louis
2021-03-08 20:06     ` John Kitchin
2021-03-10  8:32       ` Jean Louis
2021-03-07 22:13 ` Jean Louis
2021-03-08  7:49   ` Alan Schmitt
2021-03-08  8:12     ` Jose E. Marchesi
2021-03-10  8:32       ` Jean Louis
2022-09-09 16:11 ` Sébastien Rey-Coyrehourcq
2022-09-10  5:46   ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).