Re: contact management in emacs

2021-03-07 Thread Alan Schmitt
Hello,

On 2021-03-08 01:13, Jean Louis  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


signature.asc
Description: PGP signature


Re: org-in-org

2021-03-07 Thread Greg Minshall
Charles,

thanks.

ah, i apologize -- i missed the elisp content of your earlier message.
yes, that, at least for this simple case, does exactly what i was
looking for!

i guess when i used the term "recursive execute function" (i tend to
confuse "execute" and "export"), i was thinking of something like: when
i export an org file, and it runs into an org-in-org block to export,
then your code runs on that block.  the recursive part is that, when
your code is runninng on the org-in-org block, and runs into an
"org-in-org-in-org" block (that is also marked to export), it runs on
*that*.  ad, but not normally infinitum.

again, thanks, and i'm sorry for missing your elisp code.

cheers, Greg



Re: Bug: Entries with 0 minutes logged triggers clocking overlap [9.5 (nil @ /home/eddie/.emacs.d/.local/straight/build-26.3/org-mode/)]

2021-03-07 Thread Nick Savage

Hi Eddie,

Are you culling the 0 minute entries because they are not useful for you 
and throw errors, or do you wish they could be included as part of your 
workflow but they don't work properly?


Thanks,
Nick


On 3/5/21 8:48 PM, Eddie Drury wrote:

Hi,

Not uncommonly I will clock into a task that takes very little time, 
so that 0 minutes is logged against it, before logging in to the next 
task.


When I run agenda mode with show-clocking errors, it will mark these 
two tasks as a clocking overlap, when in fact this was not the case.


Currently to resolve this, every week I have to cull all clocking 
entries that are for 0 minutes.


I feel better behaviour would be, in this situation to not trigger the 
clocking overlap.


Thanks very much for reviewing this, and for org mode in general. This 
is a life changing software for me.


Regards,

- Eddie Drury





Emacs  : GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 
3.24.14)

 of 2020-03-26, modified by Debian
Package: Org mode version 9.5 (nil @ 
/home/eddie/.emacs.d/.local/straight/build-26.3/org-mode/)


current state:
==
(setq
 org-duration-format 'h:mm
 org-footnote-auto-label 'plain
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer

                     doom-modeline-set-org-src-modeline)
 org-fontify-whole-heading-line t
 org-link-shell-confirm-function 'yes-or-no-p
 org-mode-local-vars-hook '(eldoc-mode)
 org-babel-after-execute-hook '(org-redisplay-inline-images)
 org-insert-heading-respect-content t
 org-after-refile-insert-hook '(save-buffer)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-refile-targets '((nil :maxlevel . 3) (org-agenda-files :maxlevel 
. 4))
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function

 org-enforce-todo-dependencies t
 org-time-stamp-rounding-minutes '(0 1)
 org-odt-format-headline-function 
'org-odt-format-headline-default-function

 org-special-ctrl-a/e t
 org-imenu-depth 8
 org-agenda-files '("~/orgnotes/transfer/transfer.org 
" "~/orgnotes/casenotes.org ")

 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-reveal-start-hook '(org-decrypt-entry)
 org-export-with-section-numbers nil
 org-modules '(ol-bibtex)
 org-startup-folded t
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-mode-hook '(er/add-org-mode-expansions my/org-mode-hook 
org-clock-load

                 +lookup--init-org-mode-handlers-h
                 (closure (t) ( _)
                  (add-hook (quote before-save-hook) (quote 
org-encrypt-entries) nil t))

                 #[0 "\300\301\302\303\304$\207"
                   [add-hook change-major-mode-hook org-show-all 
append local] 5]

                 #[0 "\300\301\302\303\304$\207"
                   [add-hook change-major-mode-hook 
org-babel-show-result-all append local]

                   5]
                 org-babel-result-hide-spec org-babel-hide-all-hashes
                 #[0 "\301\211 \207" [imenu-create-index-function 
org-imenu-get-tree] 2]
                 doom-disable-show-paren-mode-h 
doom-disable-show-trailing-whitespace-h
                 +org-enable-auto-reformat-tables-h 
+org-enable-auto-update-cookies-h
                 +org-make-last-point-visible-h evil-org-mode 
toc-org-enable
                 embrace-org-mode-hook org-eldoc-load 
+literate-enable-recompile-h)

 org-clock-persist 'history
 org-export-with-smart-quotes t
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME 
CONTENTS)"]

 org-outline-path-complete-in-steps nil
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-agenda-finalize-hook '(+org-exclude-agenda-buffers-from-workspace-h
                            +org-defer-mode-in-agenda-buffers-h)
 org-startup-indented t
 org-reverse-note-order t
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 
"\n\n(fn ENTRY)"]

 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-agenda-deadline-faces '((1.001 . error) (1.0 . org-warning)
                             (0.5 . org-upcoming-deadline)
                             (0.0 . org-upcoming-distant-deadline))
 org-crypt-key nil
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(+org-yas-expand-maybe-h +org-indent-maybe-h
                      org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand
                      +org-cycle-only-current-subtree-h 
+org-clear-babel-results-h)

 org-hide-leading-stars t
 org-export-initial-scope 'subtree
 org-load-hook '(+org-init-org-directory-h +org-init-appearance-h 
+org-init-agenda-h
                 +org-init-attachments-h +org-init-babel-h 

Re: contact management in emacs

2021-03-07 Thread Jean Louis
* Russell Adams  [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



Re: contact management in emacs

2021-03-07 Thread Jean Louis
* dalanicolai  [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
;;; rcd-vcard.el --- RCD vCard functions  -*- lexical-binding: t; -*-

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

;; Author: Jean Louis 
;; 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 .

;;; 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  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  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 

Re: content management in emacs

2021-03-07 Thread Jean Louis
* Ian Garmaise  [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; 

Re: content management in emacs

2021-03-07 Thread Jean Louis
* Ian Garmaise  [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

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

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

;; Author: Jean Louis 
;; 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 .

;;; 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 "\"")))
 

Re: org-in-org

2021-03-07 Thread Berry, Charles



> On Mar 7, 2021, at 8:14 AM, Greg Minshall  wrote:
> 
> Charles,
> 
> thanks.  any thing you'd like to add to the R-via-ESS/org-mode
> repository, that would be great.
> 
> in general, afaik, the contents of org-in-org buffers export okay.  at
> least plain ones.  would could like to have the embedded code blocks go
> through some pretty-printer, but currently i don't see that as an issue.
> 
> as i mentioned to Jeremie, an issue is getting the org-in-org block to
> do its export.  i don't know if creating a recursive "execute" function
> for org source blocks -- which would cause them (modulo :eval, :exports,
> etc.) to evaluate their source blocks -- might be useful.
> 

Sorry, I do not know what a  `recursive "execute" function' would be/do in this 
context.

---

You said to Jeremie:
 
"during export of the *outer* org document, it could cause
the inner org block(s) to be executed and their results revealed."

AFAICS, the document below does exactly that upon export and can be exported 
using a command line idiom with proper attention to init-file issues (and let 
binding `org-confirm-babel-evaluate' to nil if you want to run in batch mode). 

As an example, html export will create a document that displays a ` block with the R src block named `readdata-code' and 
the `#+RESULTS: readdata-code' block in it. 

--8<---cut here---start->8---
#+begin_src emacs-lisp :exports results :results none
  (org-babel-map-executables nil 
(let ((org-confirm-babel-evaluate nil))
  (org-edit-src-code)
  (org-babel-execute-buffer)
  (org-edit-src-exit)))
#+end_src


#+NAME: readdata-code
#+BEGIN_SRC org
  ,#+NAME: readdata-code
  ,#+BEGIN_SRC R :results output

  read.csv(text="a,b,c\n1,2,3\n4,5,6",header=T) -> mydata1

  summary(mydata1)
  ,#+END_SRC

#+END_SRC
--8<---cut here---end--->8---


If that isn't what is needed, maybe you can provide the desired output when 
exporting the above sans the emacs-lisp src block.


Best,
Chuck





Re: contact management in emacs

2021-03-07 Thread Jean Louis
* Alan Schmitt  [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  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




Re: Org as a book publisher

2021-03-07 Thread Juan Manuel Macías
Hi Bob, thank you for your comment.

Bob Newell  writes:

> Aloha,
>
> Thank you for your interesting and useful post.
>
> I must really look into your examples and process. I have
> published quite a number of books with LaTeX but my process
> has been to write in org-mode, then export, and do all the
> design and typesetting directly in LaTeX. I end up with a good
> result but I would really rather work more in org-mode.
>
> Layouts require a lot of fine-tuning, particularly complex
> layouts with multiple columns. If some or most of that could
> be accomplished in org-mode, it would be a great benefit.

Multiple column layout, for example, can be achieved from Org with a
special block (and loading the multicol package). For example:

#+LaTeX_Header: \usepackage{multicol}
#+ATTR_LaTeX: :options {2}
#+begin_multicols
...
#+end_multicols

As I mentioned in a previous message, I have to organize and clean all
the code in those two books of my samples, and upload it to GitLab, in
case it could be useful to someone...

Best regards,

Juan Manuel 



Re: Org as a book publisher

2021-03-07 Thread Juan Manuel Macías
Hi Arne,

Thank you very much for sharing the code of your book. It seems very
interesting, I have to take a closer look at it. I want to upload to
GitLab all the code of those two books of my samples, but I need to
rearrange it before, as most of that code is in Spanish :-)

But, broadly speaking, my workflow (especially in these books that are
so long) consists of using Org Publish and compiling everything at the
end with the latexmk script. Each part of the book (chapters, or letters
in the case of the dictionary) are Org documents. And then I have
another Org document which works as a master document (which is the one
I compile in the end with latexmk; the rest of the documents are
exported to * .tex using org-publish, and I automate all that process
through a function in Elisp). I have also another Org document just for
the preamble and my LaTeX code (which is tangled to a tex file), another
document only with the Elisp code involved in the process of the books
(export filters) and, finally, a .setup file. I also add a * .xdy file,
since I use xindy for the index, instead of makeindex. The xdy file is
in Common Lisp, and unfortunately I don't have much knowledge of CL,
but I manage for a few adjustments.

Of course, some Emacs packages are very useful to me too, like the
excellent Org-Ref, Magit or Projectile.

Best regards,

Juan Manuel 

"Dr. Arne Babenhauserheide"  writes:

> Hi Juan,
>
> I’ve been going that route for a few years now, and I setup an autotools
> pipeline with all the little tweaks and hacks I needed to make
> everything work well together.
>
> I’m using LaTeX (pdflatex), scribus, calibre and imagemagick to publish
> a roleplaying book with charactersheet, 
>
> Maybe some of it can help you. The entrypoints are the Makefile, the
> setup, and the configure.ac (for the hacks):
> https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/Makefile.am
> https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/basesetup.tex
> https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/ews30setup.tex
> https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/ews30setup.el
> https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/configure.ac
>
> The main document is
> https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/ews.org
>
> I also have some derived documents that use the included tables as data.
> Most complex example:
> https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/chargen.org.in
>
>
> Best wishes,
> Arne



Re: Org as a book publisher

2021-03-07 Thread Dr. Arne Babenhauserheide
Hi Juan,

I’ve been going that route for a few years now, and I setup an autotools
pipeline with all the little tweaks and hacks I needed to make
everything work well together.

I’m using LaTeX (pdflatex), scribus, calibre and imagemagick to publish
a roleplaying book with charactersheet, 

Maybe some of it can help you. The entrypoints are the Makefile, the
setup, and the configure.ac (for the hacks):
https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/Makefile.am
https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/basesetup.tex
https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/ews30setup.tex
https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/ews30setup.el
https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/configure.ac

The main document is
https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/ews.org

I also have some derived documents that use the included tables as data.
Most complex example:
https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/chargen.org.in


Best wishes,
Arne

> Hi,
>
> I would like to share here two samples of one of the most intense uses
> that I give Org Mode: for typesetting, layout and editorial design. In
> other words, I use Org (and Org-Publish) where publishers today use DTP
> proprietary software like InDesign or QuarkXpress (a type of software,
> on the other hand, that was never intended to compose books but rather
> magazines, posters, brochures and so on). The samples are from a book
> on classical philology, recently published here in Spain, and from a
> fairly extensive dictionary, still work in progress:
>
> https://imgur.com/gallery/yxAVkrY
>
> Naturally, what acts in the background here is TeX and LaTeX
> (specifically Lua(La)TeX), so what I really do is use Org and
> Org-Publish as a sort of high-level interface for LaTeX. But I don't
> mean to avoid LaTeX: in fact, I've been working with LaTeX for a long
> time. I like LaTeX and behind these jobs there is a lot of LaTeX code.
> But Org gives me a much more light and productive workflow, allowing me
> to work at two levels.
>
> The main advantages that I see for this workflow with Org/Org-Publish
> are:
>
> 1. Lightness: LaTeX is too verbose.
> 2. Control of the composition process at various points. One of the
>qualities of LuaTeX is the possibility to control TeX primitives
>through scripts in Lua, and to act at various points in the pre- or
>post-process. But I have realized that with the happy fusion of Elisp
>and Org we can be much more precise and "surgical" ;-). Here,
>Org/LaTeX is much more powerful than LuaLaTeX.
> 3. Org's synaptic and org-anizational ability to control and manage the
>entire process of the creation of a book, from when the originals are
>received until everything is prepared to send to the printer.
> 4. An unique origin. The book can be produced on paper from a single
>source, but you can also export, from that source consistently, to
>other formats (HTML or Epub).
>
> Best regards,
>
> Juan Manuel 


-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken


signature.asc
Description: PGP signature


[PATCH] org-compat.el (org-mode-flyspell-verify): Do not spell check code in headline

2021-03-07 Thread Sébastien Miquel

Hi,

Currently code and verbatim snippets, and LaTeX fragments are spell
checked by `flyspell` if they're in a headline.

The attached patch fixes that.

--
Sébastien Miquel
>From b4291ce0ea455af499e75d3c9313183a0e8f46ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= 
Date: Sun, 7 Mar 2021 17:06:34 +0100
Subject: [PATCH] org-compat.el (org-mode-flyspell-verify): Do not check code
 in headline

* lisp/org-compat.el (org-mode-flyspell-verify): Do not spell check
code, verbatim and LaTeX fragments in headline title.
---
 lisp/org-compat.el | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 8cbf33137..3d45bed7f 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -1025,8 +1025,7 @@ ELEMENT is the element at point."
 (defun org-mode-flyspell-verify ()
   "Function used for `flyspell-generic-check-word-predicate'."
   (if (org-at-heading-p)
-  ;; At a headline or an inlinetask, check title only.  This is
-  ;; faster than relying on `org-element-at-point'.
+  ;; At a headline or an inlinetask, check title only.
   (and (save-excursion (beginning-of-line)
 			   (and (let ((case-fold-search t))
   (not (looking-at-p "\\*+ END[ \t]*$")))
@@ -1035,7 +1034,9 @@ ELEMENT is the element at point."
 	   (match-beginning 4)
 	   (>= (point) (match-beginning 4))
 	   (or (not (match-beginning 5))
-	   (< (point) (match-beginning 5
+	   (< (point) (match-beginning 5)))
+   ;; Ignore checks in code, verbatim and others.
+   (org--flyspell-object-check-p (org-element-at-point)))
 (let* ((element (org-element-at-point))
 	   (post-affiliated (org-element-property :post-affiliated element)))
   (cond
-- 
2.30.1



Re: org-in-org

2021-03-07 Thread Greg Minshall
Charles,

thanks.  any thing you'd like to add to the R-via-ESS/org-mode
repository, that would be great.

in general, afaik, the contents of org-in-org buffers export okay.  at
least plain ones.  would could like to have the embedded code blocks go
through some pretty-printer, but currently i don't see that as an issue.

as i mentioned to Jeremie, an issue is getting the org-in-org block to
do its export.  i don't know if creating a recursive "execute" function
for org source blocks -- which would cause them (modulo :eval, :exports,
etc.) to evaluate their source blocks -- might be useful.

cheers, Greg



Re: org-in-org

2021-03-07 Thread Greg Minshall
Jeremie,

thanks for this.

> A possible solution might be this one
> #+NAME: readdata-code
> #+BEGIN_SRC org
>   ,#+NAME: readdata-code
>   ,#+BEGIN_SRC R :results value silent
> 
>   read.data("datafile1.csv",sep=3D",",header=3DT)->mydata1
> 
> 
>   ,#+END_SRC
> #+END_SRC

iiuc, this will embed the org-in-org block ("readdata-code") in the
outer org document.  and, if i open the org-in-org block, and C-c C-c to
execute it, the results will likewise be available in the outer org
document, and can be exported, etc.

this is very useful, and is the first part of what i *think* i am hoping
to find.

the second part is a way, from the outer org document, or, hopefully,
from an e-lisp batch file, to be able to cause the inner org document to
have its code blocks executed, with the results left in place.  so,
that, e.g., during export of the *outer* org document, it could cause
the inner org block(s) to be executed and their results revealed.

> credit goes to https://raw.githubusercontent.com/vikasrawal/orgpaper/master=
> /orgpapers.org

fwiw, a more recent version exists:

https://github.com/vikasrawal/orgpaper/blob/master/orgpapers.org

though i haven't in depth compared the two.

cheers, Greg



Re: Org as a book publisher

2021-03-07 Thread Juan Manuel Macías
Hi Diego,

Thank you very much for your comments.

Diego Zamboni  writes:

> I think with Org and a setup like you describe, we are one step closer
> to separating content (what) from form (how) in a document. This was
> one of the original goals of LaTeX, but of course in a LaTeX document
> much of the "how" is still visible through the "what". With Org the
> separation becomes clearer, by hiding the LaTeX structures (almost)
> completely, and by allowing to produce multiple formats from the same
> source document.

I Totally agree. Leslie Lamport originally created LaTeX (as far as I
know) as a simplified way of handling TeX for his own documents, since
the other format of TeX, plainTeX, was quite spartan. Then LaTeX has
grown incredibly thanks to its extensibility qualities: a small kernel
(unlike ConTeXt, which is more monolithic) and a ecosystem of macro
packages. If we make an analogy with the old days of mechanical
printing, I always say that TeX is the typographer, the one who gets his
hands dirty with ink, while LaTeX wears a tie and is in the editorial
design department. TeX works on the merely physical plane, and he is
only interested in how each element on the page is positioned in
relation to other elements. Here the minimum indivisible element would
be the letter, which to TeX's eyes is a box with certain dimensions.
LaTeX lives more on a semantic plane: for LaTeX there is no lines or
letters or paragraphs, but rather headings, heading levels, lists,
quotes, verses, chapters, tables, equations, tables of contents... But,
as you say, in LaTeX you can still see too many gears. With Org we can
work on a lighter and cleaner document. And with a single source for
multiple formats!

Before moving to Org, I applied this `philosophy' to the markdown/pandoc
tandem. But since I migrated to Emacs/Org a few years ago, it's almost
like having superpowers :-D

Best regards,

Juan Manuel 




Re: Org as a book publisher

2021-03-07 Thread Juan Manuel Macías
Hi Quintus:

Thank you very much for your comments.

M. ‘quintus’ Gülker  writes:

> [...] Many people seem to use org rather than direct LaTeX because they
> dislike LaTeX's syntax or find LaTeX too complex, which I never really
> understood. But you make some great points for why this combination is
> useful other than for that reason.

I think Org does a good job with what it offers out of the box for
`simple' documents, when the user also does not have a special interest
in LaTeX code and typographic `refinement'. But as the document becomes
more and more complex, there is a duty to study LaTeX and learn to write
code in LaTeX (even in pure TeX, if things get too demanding); and also
to study the documentation of the packages involved, because the great
power of LaTeX lies in its rich and extensive package ecosystem (two or
three new packages always appear every week!). If Org was a complete
translation of everything that each LaTeX package is capable of, then
Org would become as (needlessly) complex as LaTeX. The good thing about
Org is that it provides us with the tools needed to work with our LaTeX
code in the background. A simple example that comes to me now are the
lists, which in LaTeX can be managed in a very clean way with packages
like enumitem. In an Org document it would then be enough to put before
a list `#+ATTR_LaTeX: :options [enumitem options]' (or to write a
replacement macro), but of course the user have to read the enumitem
documentation...

(By the way, it seems that a fellow 'co-lister' is working on an Org to
Context exporter: https://github.com/Jason-S-Ross/ox-context/)

> For those who still use pdfLaTeX rather than LuaLaTeX (probably due to
> Microtype) there is not even an equivalent available.

Well, Microtype can already be used in LuaLaTeX. Except for a few minor
limitations, protrusion and expansion properties work well. In fact I
recently wrote a custom table of protrusion values for a font, and
microtype reads them perfectly in LuaLaTeX. In general nowadays the
migration from pdfTeX to LuaTeX is quite smooth, and it is worth it, for
various reasons: for example, there are a few cool new packages that
take advantage of LuaTeX. And there is also the LuaTeX ability to use
otf fonts and manage opentypes features. XeTeX can do that too, but
with LuaTeX we can even define new otf features on the fly, in Lua, for
a document (like kerning, contextual substitution, etc.) and apply them
to a certain font, without need to edit that font with a dedicated
software (fontforge).

But yeah, for pre-/post-process control I prefer Elisp/Org a thousand
times over Lua :-) Recently I needed to modify certain combining
diacritical marks only in the italics, and with Org it's a delight to do
that (writing a filter for org-export-filter-italic-functions)

> [...] May I ask what tooling you use to go from org to Epub?

Ox-epub works reasonably well, in my short experience: I'm afraid I
haven't explored the Epub output much, partly because this is a format
that I do not like, and I have used it for editorial requirements only.
And, in fact, it is a very limited format for certain types of books.

Best regards,

Juan Manuel 



Re: org-in-org

2021-03-07 Thread Greg Minshall
Erik,

> I am not sure if this would be useful to your efforts, but I have an "R in
> org-mode" tutorial on github:

> https://github.com/erikriverson/org-mode-R-tutorial

thanks.  that gives me a model to look at in terms of structure and
content.

Greg



Re: Org as a book publisher

2021-03-07 Thread Colin Baxter
> Vikas Rawal  writes:

> A few years ago, I had produced this book entirely on orgmode:
> https://cup.columbia.edu/book/ending-malnutrition/9789382381648. The
> source files of the book are here:
> https://github.com/vikasrawal/endingmalnutrition.

> This was some years back, and there has been some change in the
> org mode syntax since then and the files would need some fixing
> before they could be compiled with the current versions of
> orgmode.

That's the problem with org-mode. I have LaTeX and TeX files from 30+
years ago and they still compile.



Re: Org as a book publisher

2021-03-07 Thread Vikas Rawal
A few years ago, I had produced this book entirely on orgmode: 
https://cup.columbia.edu/book/ending-malnutrition/9789382381648. The source 
files of the book are here: https://github.com/vikasrawal/endingmalnutrition.

This was some years back, and there has been some change in the org mode syntax 
since then and the files would need some fixing before they could be compiled 
with the current versions of orgmode.

Vikas


On Sun, Mar 07, 2021 at 01:08:20PM +0100, Diego Zamboni wrote:
> Hi Juan Manuel,
>
> Thanks for sharing this - the output looks very nice.
>
> I think with Org and a setup like you describe, we are one step closer to
> separating content (what) from form (how) in a document. This was one of
> the original goals of LaTeX, but of course in a LaTeX document much of the
> "how" is still visible through the "what". With Org the separation becomes
> clearer, by hiding the LaTeX structures (almost) completely, and by
> allowing to produce multiple formats from the same source document.
>
> I have done something similar with my books, which I publish through
> Leanpub. I keep the source of each book in Org, and from there the exporter
> takes care of producing the Leanpub markup and format, which in turn takes
> care of converting it to PDF, ePub or other formats.
>
> Best,
> --Diego
>
>
>
> On Sat, Mar 6, 2021 at 8:35 PM Juan Manuel Macías 
> wrote:
>
> > Hi,
> >
> > I would like to share here two samples of one of the most intense uses
> > that I give Org Mode: for typesetting, layout and editorial design. In
> > other words, I use Org (and Org-Publish) where publishers today use DTP
> > proprietary software like InDesign or QuarkXpress (a type of software,
> > on the other hand, that was never intended to compose books but rather
> > magazines, posters, brochures and so on). The samples are from a book
> > on classical philology, recently published here in Spain, and from a
> > fairly extensive dictionary, still work in progress:
> >
> > https://imgur.com/gallery/yxAVkrY
> >
> > Naturally, what acts in the background here is TeX and LaTeX
> > (specifically Lua(La)TeX), so what I really do is use Org and
> > Org-Publish as a sort of high-level interface for LaTeX. But I don't
> > mean to avoid LaTeX: in fact, I've been working with LaTeX for a long
> > time. I like LaTeX and behind these jobs there is a lot of LaTeX code.
> > But Org gives me a much more light and productive workflow, allowing me
> > to work at two levels.
> >
> > The main advantages that I see for this workflow with Org/Org-Publish
> > are:
> >
> > 1. Lightness: LaTeX is too verbose.
> > 2. Control of the composition process at various points. One of the
> >qualities of LuaTeX is the possibility to control TeX primitives
> >through scripts in Lua, and to act at various points in the pre- or
> >post-process. But I have realized that with the happy fusion of Elisp
> >and Org we can be much more precise and "surgical" ;-). Here,
> >Org/LaTeX is much more powerful than LuaLaTeX.
> > 3. Org's synaptic and org-anizational ability to control and manage the
> >entire process of the creation of a book, from when the originals are
> >received until everything is prepared to send to the printer.
> > 4. An unique origin. The book can be produced on paper from a single
> >source, but you can also export, from that source consistently, to
> >other formats (HTML or Epub).
> >
> > Best regards,
> >
> > Juan Manuel
> >
> >



Re: Org as a book publisher

2021-03-07 Thread Diego Zamboni
Hi Juan Manuel,

Thanks for sharing this - the output looks very nice.

I think with Org and a setup like you describe, we are one step closer to
separating content (what) from form (how) in a document. This was one of
the original goals of LaTeX, but of course in a LaTeX document much of the
"how" is still visible through the "what". With Org the separation becomes
clearer, by hiding the LaTeX structures (almost) completely, and by
allowing to produce multiple formats from the same source document.

I have done something similar with my books, which I publish through
Leanpub. I keep the source of each book in Org, and from there the exporter
takes care of producing the Leanpub markup and format, which in turn takes
care of converting it to PDF, ePub or other formats.

Best,
--Diego



On Sat, Mar 6, 2021 at 8:35 PM Juan Manuel Macías 
wrote:

> Hi,
>
> I would like to share here two samples of one of the most intense uses
> that I give Org Mode: for typesetting, layout and editorial design. In
> other words, I use Org (and Org-Publish) where publishers today use DTP
> proprietary software like InDesign or QuarkXpress (a type of software,
> on the other hand, that was never intended to compose books but rather
> magazines, posters, brochures and so on). The samples are from a book
> on classical philology, recently published here in Spain, and from a
> fairly extensive dictionary, still work in progress:
>
> https://imgur.com/gallery/yxAVkrY
>
> Naturally, what acts in the background here is TeX and LaTeX
> (specifically Lua(La)TeX), so what I really do is use Org and
> Org-Publish as a sort of high-level interface for LaTeX. But I don't
> mean to avoid LaTeX: in fact, I've been working with LaTeX for a long
> time. I like LaTeX and behind these jobs there is a lot of LaTeX code.
> But Org gives me a much more light and productive workflow, allowing me
> to work at two levels.
>
> The main advantages that I see for this workflow with Org/Org-Publish
> are:
>
> 1. Lightness: LaTeX is too verbose.
> 2. Control of the composition process at various points. One of the
>qualities of LuaTeX is the possibility to control TeX primitives
>through scripts in Lua, and to act at various points in the pre- or
>post-process. But I have realized that with the happy fusion of Elisp
>and Org we can be much more precise and "surgical" ;-). Here,
>Org/LaTeX is much more powerful than LuaLaTeX.
> 3. Org's synaptic and org-anizational ability to control and manage the
>entire process of the creation of a book, from when the originals are
>received until everything is prepared to send to the printer.
> 4. An unique origin. The book can be produced on paper from a single
>source, but you can also export, from that source consistently, to
>other formats (HTML or Epub).
>
> Best regards,
>
> Juan Manuel
>
>


Bug: ox-rss encodes Fußnoten in German with which is illegal for xml [9.4.4 ( @ /home/arne/.guix-profile/share/emacs/site-lisp/)]

2021-03-07 Thread Dr. Arne Babenhauserheide


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


To reproduce:

Create an org-mode file with
#+LANGUAGE: de

Create a footnote.

Export as RSS.

The created xml is malformed, because  is only legal for html,
not for xml. As far as I can tell, this is caused by calling

(org-export-data-with-backend headline 'html info)

in 

(defun org-rss-headline (headline contents info)
  "Transcode HEADLINE element into RSS format.
CONTENTS is the headline contents.  INFO is a plist used as a
communication channel."
  (if (> (org-export-get-relative-level headline info) 1)
  (org-export-data-with-backend headline 'html info)

This then uses the html-version of Footnotes, while it *should* use the
default.

See org-export-dictionary ("Footnotes" ("de" :html vs. :default)).


Example:
#+begin_src org
,#+LANGUAGE: de
,* Foo
  :PROPERTIES:
  :ID:   1fc24c32-0d07-49a5-a96b-d3860f5ec61b
  :PUBDATE:  <2021-03-07 So 12:42>
  :END:

note[fn:1]

,* Footnotes
  :PROPERTIES:
  :ID:   6431ba45-818f-4e58-b16e-bbc9f4e49509
  :PUBDATE:  <2021-03-07 So 12:42>
  :END:

[fn:1] bar 
#+end_src

M-x org-rss-export-as-rss

The exported buffer:

#+begin_src xml

http://purl.org/rss/1.0/modules/content/;
 xmlns:wfw="http://wellformedweb.org/CommentAPI/;
 xmlns:dc="http://purl.org/dc/elements/1.1/;
 xmlns:atom="http://www.w3.org/2005/Atom;
 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/;
 xmlns:slash="http://purl.org/rss/1.0/modules/slash/;
 xmlns:georss="http://www.georss.org/georss;
 xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#;
 xmlns:media="http://search.yahoo.com/mrss/;>
  
  
  
  
  de
  Sun, 07 Mar 2021 12:42:58 +0100
  Sun, 07 Mar 2021 12:42:58 +0100
  Emacs 27.1 Org-mode 9.4.4
  arne_...@web.de (Dr. Arne Babenhauserheide)
  
https://orgmode.org/img/org-mode-unicorn-logo.png


  

  
Foo
./foot.html#org80b3da5
arne_...@web.de (Dr. Arne Babenhauserheide)
./foot.html#org80b3da5
Sun, 07 Mar 2021 12:42:00 +0100


  
  
Funoten: 


  1 
  bar 
  



  

#+end_src

Best wishes,
Arne

Emacs  : GNU Emacs 27.1 (build 1, x86_64-unknown-linux-gnu, GTK+ Version 
3.24.24, cairo version 1.16.0)
Package: Org mode version 9.4.4 ( @ 
/home/arne/.guix-profile/share/emacs/site-lisp/)
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken


signature.asc
Description: PGP signature


Re: Org as a book publisher

2021-03-07 Thread M . ‘quintus’ Gülker
Am 06. März 2021 um 20:34 Uhr +0100 schrieb Juan Manuel Macías:
> I would like to share here two samples of one of the most intense
> uses that I give Org Mode: for typesetting, layout and editorial
> design. [...] The samples are from a book on classical philology,
> recently published here in Spain [...]. Naturally, what acts in the
> background here is TeX and LaTeX (specifically Lua(La)TeX), so what
> I really do is use Org and Org-Publish as a sort of high-level
> interface for LaTeX. But I don't mean to avoid LaTeX: in fact, I've
> been working with LaTeX for a long time. I like LaTeX and behind
> these jobs there is a lot of LaTeX code. But Org gives me a much
> more light and productive workflow, allowing me to work at two
> levels.

Thank you very much for sharing. This is an interesting insight. Many
people seem to use org rather than direct LaTeX because they dislike
LaTeX's syntax or find LaTeX too complex, which I never really
understood. But you make some great points for why this combination is
useful other than for that reason.

> 2. Control of the composition process at various points. One of the
>qualities of LuaTeX is the possibility to control TeX primitives
>through scripts in Lua, and to act at various points in the pre- or
>post-process. But I have realized that with the happy fusion of Elisp
>and Org we can be much more precise and "surgical" ;-). Here,
>Org/LaTeX is much more powerful than LuaLaTeX.

For those who still use pdfLaTeX rather than LuaLaTeX (probably due to
Microtype) there is not even an equivalent available.

> 4. An unique origin. The book can be produced on paper from a single
>source, but you can also export, from that source consistently, to
>other formats (HTML or Epub).

This is actually a strong argument. Even though I enjoy writing LaTeX
code, this one is a tough nut to crack with pure LaTeX, where I
achieved the best results with LaTeXML, but it was still lots of work.
May I ask what tooling you use to go from org to Epub?

  -quintus

-- 
Dipl.-Jur. M. Gülker | https://mg.guelker.eu |For security:
Passau, Germany  | kont...@guelker.eu| () Avoid HTML e-mail
European Union   | PGP: see homepage | /\ http://asciiribbon.org



Re: Org agenda to Android calendar without Google Calendar in the middle

2021-03-07 Thread Peter Hardy


‪‪jamshar...@zoho.com‬‬ writes:

> The org manual page about syncing my agenda to my phone seems to rely pretty 
> heavily on an
> online Google Calendar as an intermediary (including org-caldav, if I'm 
> understanding the readme
> correctly.) This means the "normal" way to sync org with Android may simply 
> not work for me.
>
> Ideally, I'd prefer to use a local web server that I control. How would I do 
> that? (Or, is it
> impossible? Which might be the case if the Android calendar will sync only to 
> Google and nowhere
> else.)

org-caldav does *not* rely on Google Calendar. The documentation does
talk about it a lot, probably because that's a major use case and the
authentication is a little more tricky. But any caldav server will work
fine.

I personally use org-caldav to sync to calendars hosted on a private
Nextcloud installation. But others such as radicale should be fine as
well.

An alternative Android app that you might like to look at is
Orgzly. I've used it a little, syncing my org files to my phone over
webdav and having Orgzly send a daily notification of tasks due that
day. It seems to work well for my meagre needs.

--
Pete