[Orgmode] Re: [PATCH] org-export-generic, "text markup" -- and a request

2010-07-23 Thread tomas
Hi,

I tried contacting the author of org-export-generic, but don't know
whether I succeeded. Since this little patch might be useful, here it
is.

I'm in the enviable situation of transforming some docs (which I've
written in org) to mediawiki (why some people enjoy using their browser
as a doc editor escapes me, but that's for another day :)

For this, I'll have to transform the "text markup" (as I'd call that)
(what org calls "emphasis"), i.e. *foo* would become **foo**, =grumble=
would become ''grumble'' and +mumble+ would become mumble.

You get the idea.

I've come up with a little patch which "works for me". If that seems
useful for you, please accept it; I'd be willing to beat it into shape
if you give me some advice wrt which shape is desirable :-)

Some notes:

The "translation mapping" (org markup -> target markup) lives in the
org-generic-alist under the symbol :markup, like so (this would be for
doku-wiki):

   (org-set-generic-type
  "doku-wiki"
  '(:key-binding   ?K
  [... many lines elided ...]
:markup (("*" . "**%s**")
("/" . "//%s//")
("_" . "__%s__")
("=" . "''%s''")
("~" . "''%s''")
("+" . "%s"

that is, an alist mapping the (org) markup char to a (target) format
string.

I generated the patch with the -b option. Because I wrapped a
considerable chunk of code with unwind-protect, the white space noise
obscures the patch. As I don't think the patch is final, I preferred to
keep it (human) readable.

The working is fairly straightforward: it tacks the function
org-export-generic-process-markup onto the org-export-preprocess-hook
for the whole duration off org-export-generic (the unwind-protect is
there to take this function off the hook when finished). This
org-e-g-process-markup then makes a pass through the buffer (with
org-emph-re), doing its substitutions. Some fiddling was necessary since
org-emph-re matches (possibly) a bit more than strictly the marked-up
span (I think it would have been better to use zero-width assertions for
the prefix and suffix part of org-emph-re).

Patch attached.

Now the request: I tried (several times) subscribing to this list -- but
didn't succeed (I used -- or rather tried to use -- the web interface at
). So please keep
me in Cc, at least as long as I wrangle with the subscriptions.

If anyone has a hint as to what I could try to subscribe, I'd be glad.

Thanks again, and regards
-- tomás


signature.asc
Description: Digital signature
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [PATCH] org-export-generic, "text markup" -- and a request

2010-07-24 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, Jul 24, 2010 at 08:39:53AM +0200, Daniel Bausch wrote:
> Hi Tomas!
> 
> I have nothing to contribute to the real topic, but I wanted to inform you 
> that there is a software called dokuwiki - so I got a bit irritated, whether 
> you are reffering to that or to mediawiki, as you first stated.

No, that was a typo. In my special case it's actually dokuwiki (wasn't
my choice). But the patch itself isnt dependent on that.

> And (at least on the mailinglist) your patch is delivered as an empty file.

Whoops! thanks for the heads-up.

Here it is, inline (remember that I filtered out whitespace diffs -- the
indentation after patching isn't right, but the patch is more readable):

Usage is in my original mail.

- 
diff --git a/contrib/lisp/org-export-generic.el 
b/contrib/lisp/org-export-generic.el
index 1b099dd..88c6169 100644
- --- a/contrib/lisp/org-export-generic.el
+++ b/contrib/lisp/org-export-generic.el
@@ -473,6 +473,8 @@ The prefix ARG specifies how many levels of the outline 
should become
 underlined headlines.  The default is 3."
   (interactive "P")
   (setq-default org-todo-line-regexp org-todo-line-regexp)
+  (unwind-protect
+  (add-hook 'org-export-preprocess-hook 'org-export-generic-process-markup)
   (let* ((opt-plist (org-combine-plists (org-default-export-plist)
(org-infile-export-plist)))
 (region-p (org-region-active-p))
@@ -541,6 +543,8 @@ underlined headlines.  The default is 3."
  (if (equal ass "default") org-generic-export-type ass)
  org-generic-alist
 
+  (markup-table (plist-get export-plist :markup)) ; Need this early
+
 (custom-times org-display-custom-times)
 (org-generic-current-indentation '(0 . 0))
 (level 0) (old-level 0) line txt lastwastext
@@ -1021,8 +1025,23 @@ underlined headlines.  The default is 3."
(setq end (next-single-property-change beg 'org-cwidth))
(delete-region beg end)
(goto-char beg)))
- -(goto-char (point-min
+  (goto-char (point-min)))
+;; Unwind:
+(remove-hook 'org-export-preprocess-hook 
'org-export-generic-process-markup)))
 
+(defun org-export-generic-process-markup ()
+  (save-excursion
+(goto-char (point-min))
+(while (re-search-forward org-emph-re nil t)
+  (let* ((mpre (match-string 1))  ; match prefix...
+(msuf (match-string 5))  ; and suffix: leave alone
+(mchar (match-string 3)) ; org's "markup charater"
+(mtext (match-string 4)) ; the marked-up text
+(fmt (or (cdr (assoc mchar markup-table))  ; found?
+ (concat mchar "%s" mchar ; no: leave alone
+   (replace-match
+(format (concat "%s" fmt "%s") mpre mtext msuf)))
+  (backward-char
 
 (defun org-export-generic-format (export-plist prop &optional len n reverse)
   "converts a property specification to a string given types of properties
- 

Regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFMSqMBBcgs9XrR2kYRArNHAJwKtIEHDAY3F6+o7mhT9pKLreJHPQCcDM7w
fgjepSJwjsZqm3lv7903Caw=
=pbVQ
-END PGP SIGNATURE-

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [PATCH] org-export-generic, "text markup" -- and a request

2010-07-24 Thread tomas
On Sat, Jul 24, 2010 at 01:49:44PM +0200, David Maus wrote:
> 
> Hi Tomás,
> 
> Could I asked you to send the patch again as an attachment of type
> text/plain?  If you do so Org mode's patchtracker is able to pick it
> up for further review.

OK, I'll retry -- seems I made a mistake the first round. Here it
goes...

(BTW -- has anyone an idea why I can't subscribe to the list?)

Thanks
-- tomás
diff --git a/contrib/lisp/org-export-generic.el b/contrib/lisp/org-export-generic.el
index 1b099dd..88c6169 100644
--- a/contrib/lisp/org-export-generic.el
+++ b/contrib/lisp/org-export-generic.el
@@ -473,6 +473,8 @@ The prefix ARG specifies how many levels of the outline should become
 underlined headlines.  The default is 3."
   (interactive "P")
   (setq-default org-todo-line-regexp org-todo-line-regexp)
+  (unwind-protect
+  (add-hook 'org-export-preprocess-hook 'org-export-generic-process-markup)
   (let* ((opt-plist (org-combine-plists (org-default-export-plist)
 	(org-infile-export-plist)))
 	 (region-p (org-region-active-p))
@@ -541,6 +543,8 @@ underlined headlines.  The default is 3."
 		  (if (equal ass "default") org-generic-export-type ass)
 		  org-generic-alist
 
+	   (markup-table (plist-get export-plist :markup)) ; Need this early
+
 	 (custom-times org-display-custom-times)
 	 (org-generic-current-indentation '(0 . 0))
 	 (level 0) (old-level 0) line txt lastwastext
@@ -1021,8 +1025,23 @@ underlined headlines.  The default is 3."
 	(setq end (next-single-property-change beg 'org-cwidth))
 	(delete-region beg end)
 	(goto-char beg)))
-(goto-char (point-min
+  (goto-char (point-min)))
+;; Unwind:
+(remove-hook 'org-export-preprocess-hook 'org-export-generic-process-markup)))
 
+(defun org-export-generic-process-markup ()
+  (save-excursion
+(goto-char (point-min))
+(while (re-search-forward org-emph-re nil t)
+  (let* ((mpre (match-string 1))  ; match prefix...
+	 (msuf (match-string 5))  ; and suffix: leave alone
+	 (mchar (match-string 3)) ; org's "markup charater"
+	 (mtext (match-string 4)) ; the marked-up text
+	 (fmt (or (cdr (assoc mchar markup-table))  ; found?
+		  (concat mchar "%s" mchar ; no: leave alone
+	(replace-match
+	 (format (concat "%s" fmt "%s") mpre mtext msuf)))
+  (backward-char
 
 (defun org-export-generic-format (export-plist prop &optional len n reverse)
   "converts a property specification to a string given types of properties


signature.asc
Description: Digital signature
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [PATCH] org-export-generic, "text markup" -- and a request

2010-07-25 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sun, Jul 25, 2010 at 04:47:24PM +0200, David Maus wrote:
>  wrote:
> >[1  ]
> >[1.1  ]
> >On Sat, Jul 24, 2010 at 01:49:44PM +0200, David Maus wrote:
> >> 
> >> Hi Tomás,
> >> 
> >> Could I asked you to send the patch again as an attachment of type
> >> text/plain?  If you do so Org mode's patchtracker is able to pick it
> >> up for further review.
> 
> >OK, I'll retry -- seems I made a mistake the first round. Here it
> >goes...
> 
> Thanks, the patchtracker catched it[1].

Thank *you* :-)

> >(BTW -- has anyone an idea why I can't subscribe to the list?)
> 
> Uh... What does it mean, you cannot subscribe to the list?

(blush) oh, nevermind. I now found mailman's confirmation message It was
being filed in some place I didn't expect. Sorry for the noise...

Regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFMTGfcBcgs9XrR2kYRAqwpAJ43JGeulTTiMYIbtqcRNe/mbHMDkgCdHkp5
aPbx3RZlnt9i+45IN4r4YvI=
=iAC8
-END PGP SIGNATURE-

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Orgmode[PATCH] org-export-generic, "text markup" -- and a request

2010-08-02 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, Aug 02, 2010 at 06:54:44AM -0700, Wes Hardaker wrote:
> > On Fri, 23 Jul 2010 13:19:31 +0200, to...@tuxteam.de said:
> 
> t> I tried contacting the author of org-export-generic, but don't know
> t> whether I succeeded. Since this little patch might be useful, here it
> t> is.
> 
> You succeeded...  I'm just completely out of touch for the last two
> weeks and it'll continue into next week minus this very very short break
> when I actually can read mail...

Do take your time. No impatience here.

> Anyway, I haven't read the email chain yet but if others think the patch
> is fine then it may certainly be applied!

I do hate myself how I did some things (the naming could take some
discussion. For example: "text markup" is a bad name. I don't know how
to subsume "strong", "emphasized"...). Besides, I'm unsure about this
hook-adding business within the unwind-protect. Maybe others could chime
in?

Thanks, regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFMVwCWBcgs9XrR2kYRAjTDAJ9X1jRrMJXKSnDkEjvotpPe/uiMPwCfRd66
/gJuF5E2ZI96o0cvLGqPpUU=
=oO1k
-END PGP SIGNATURE-

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[O] Per-backend export options?

2015-07-06 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

it must be in the fine manual. But after wandering there without a good
idea on how to find that...

What I'm trying to do is to suppress footnotes in Beamer export, and
keep them in PDF export.

Suppressing the footnotes is easy enough:

  #+OPTIONS: f:nil [... possibly other options ...]

Can I do that in a way that the value depends on backend? I.e. f:nil
for beamer and f:t for latex/pdf?

Thanks for any hints
- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlWaQx4ACgkQBcgs9XrR2kY99ACff0BrSXEMSL7zGkx075WD/kXL
ql4AmQEH64rzQh6FFtpW3tb8Ggt2iYyR
=ANuG
-END PGP SIGNATURE-



Re: [O] Per-backend export options?

2015-07-06 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, Jul 06, 2015 at 11:32:21AM +0200, Rasmus wrote:
> Hi,
> 
>  writes:
> 
[...]

> >   #+OPTIONS: f:nil [... possibly other options ...]
> >
> > Can I do that in a way that the value depends on backend? [...]

> I'd use a macro for this.  E.g.
> 
> #+MACRO: dvipng-if-odt (eval (if (org-export-derived-backend-p 
> org-export-current-backend 'odt) "#+OPTIONS: tex:dvipng" ))

Thanks!

regards
- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlWaU1QACgkQBcgs9XrR2kYmSQCcCSzHFLx+lkegXQ/udthbmmgH
YrUAnjfNrfwMMrzduMqv9WVSnuXiGeDh
=yQU0
-END PGP SIGNATURE-



Re: [O] Per-backend export options?

2015-07-06 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, Jul 06, 2015 at 11:32:21AM +0200, Rasmus wrote:
[...]
> I'd use a macro for this.  E.g.

Works like a charm now :-)

- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlWaja4ACgkQBcgs9XrR2kaEzgCfbM0McF+Yi3sR1prWI8ix1cpu
pTIAn0PQumh5sUJmE4UBQm9OFd8Nc/CV
=z5tl
-END PGP SIGNATURE-



Re: [O] Per-backend export options?

2015-08-20 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, Aug 19, 2015 at 11:45:37PM -0400, Jay Dixit wrote:
> I do something similar to change export options between HTML and LaTeX:
> 
> (defun my-org-export-change-options (plist backend)
>   (cond
>((equal backend 'html)
> (plist-put plist :with-toc nil)
> (plist-put plist :section-numbers nil))
>((equal backend 'latex)
> (plist-put plist :with-toc t)
> (plist-put plist :section-numbers t)))
>   plist)
> (add-to-list 'org-export-filter-options-functions
> 'my-org-export-change-options)

Thanks!

this one has the charm of being a more centralized solution.

While the macro thingie does the trick for me (for now), I'll give
it a try.

Regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlXVaR0ACgkQBcgs9XrR2kaBCgCeJnYBnUtZmYI9mt7hsKLaPsuv
n50An3o03vZWGIihXhQfM8/e6WFeb5AA
=UY8i
-END PGP SIGNATURE-



[O] :cache and :results drawer don't get along?

2018-09-06 Thread tomas
Hi, Org gurus

I'm using Org 9.1.9, as it comes with Emacs 27.0.50, freshly compiled
from sources.

I'm having a hard time referencing a cached result when it's in
a drawer (I like to wrap my results in a drawer).

Before I file a bug report, I'd make sure that I am not doing
something obviously stupid.

Best with an example:

* with drawer
  No cache, with drawer:

  #+NAME: with-drawer
  #+BEGIN_SRC emacs-lisp :results drawer
  42
  #+END_SRC

  #+RESULTS: with-drawer
  :RESULTS:
  42
  :END:

  #+NAME: check-with-drawer
  #+BEGIN_SRC emacs-lisp :var thing=with-drawer
  thing
  #+END_SRC

  #+RESULTS: check-with-drawer
  : 42

  So far, so good

* drawer and cache:
  Cached results in a drawer:

  #+NAME: cached-with-drawer
  #+BEGIN_SRC emacs-lisp :results drawer :cache yes
  42
  #+END_SRC

  #+RESULTS[4ba2e4b62c57298395b2f6f8d145dcc85264d192]: cached-with-drawer
  :RESULTS:
  42
  :END:

  #+NAME: check-cached-with-drawer
  #+BEGIN_SRC emacs-lisp :var thing=cached-with-drawer
  thing
  #+END_SRC

  #+RESULTS: check-cached-with-drawer
  : nil

Note how the variable is nil. I tested also :cache yes _without_ a
drawer, and then it works as expected.

Am I doing something stupid?

Thanks for any insights
-- tomás


signature.asc
Description: Digital signature


Re: [PATCH] Treat :tangle-mode as an octal value not integer

2021-09-29 Thread tomas
On Wed, Sep 29, 2021 at 09:17:54AM -0400, Jeremy Cowgar wrote:
> On 2021-09-29 07:07, to...@tuxteam.de wrote:
> >On Wed, Sep 29, 2021 at 11:29:06AM +0200, Gyro Funch wrote:
> >
> >[...]
> >
> >>I don't know if it would ever be ambiguous, but could :tangle-mode
> >>have the ability to infer if it were integer- or octal-format based
> >>on checking against 'reasonable' permission settings in octal
> >>notation?
> >
> >To me, that sounds rather scary. But I'm a timid person :-)
> >
> 
> To keep things from breaking, what if the system were smart and
> if it sees #o prefix, it then parses as an octal, otherwise it keeps
> it's current behavior?

That was roughly my idea: come closer to the Emacs Lisp int
representation (whether only for this case or more generally).

But I'm not deep enough in Org to even venture a recommendation.

> Then add that to the docs. I understand about backwards compatibility
> and that was my greatest fear with this patch when creating it.
> 
> Was just using org-babel-tangle for configuration files and had some
> that I wanted to make 0700 and 0600. I soon learned, that didn't work
> out as planned :-)

I definitely understand your surprise. I know it the other way
around. Back then (TM), it was customary in Windows to write out
the leading zeros in the IPv4 octets, to fill them up to three
places. Something like 192.168.042.001 -- Heavens knows why.

Unix utilities interpret those with a leading zero as an octal
representation (that's how atoi() or strtol() in its default
mode work). I had hours of fun with my Windows colleagues ;-)

Cheers
 - t


signature.asc
Description: Digital signature


Re: [PATCH] Treat :tangle-mode as an octal value not integer

2021-09-29 Thread tomas
On Wed, Sep 29, 2021 at 09:48:47PM +0800, Timothy wrote:
> Hi  Jeremy,
> 
> > As an org user I would expect :tangle-mode 0660 to produce a file that
> > has user rw, group rw, other nothing. Instead, what really happens
> > currently is 0660 is treated as an integer which is actually
> > 3140. This produces unexpected file permissions.
> 
> I agree that :tangle-mode could be more user-friendly. However, I think we can
> go further. Currently, only (identity #o755 / 493) works, however I think it 
> would be
> good if it worked like chmod and accepted most of the following forms:
> ⁃ `#o755'
> ⁃ `755' (because people are used to this, as technically misleading as it may 
> be,
>   as long as we can tell “:tangle-mode 356” from “:tangle-mode (identity 
> #o544)”)
> ⁃ `rw' (equivalent to a=rw, and so #o555)
> ⁃ `a=rw,u+x' (equivalent to #o755) [hardest to support, so maybe?]

So you favour going the "full custom special parser". You're much more
involved in Org, so I think your gut feeling counts more than mine here :)

`755' is the funniest one, since, strictly speaking it doesn't correspond
to anything "out there" (note that the shell command `chmod' wants the
leading zero, or, well, it will do surprising things if you don't
provide it ;-)

But then, if it is clear that :tangle-mode is doing its own parsing,
it won't matter much.

Cheers
 - t


signature.asc
Description: Digital signature


Re: [PATCH] Treat :tangle-mode as an octal value not integer

2021-09-29 Thread tomas
On Wed, Sep 29, 2021 at 10:58:43PM +0800, Timothy wrote:
> 
>  writes:
> 
> > So you favour going the "full custom special parser". You're much more
> > involved in Org, so I think your gut feeling counts more than mine here :)
> 
> Well, I'm not sure that my feeling is representative of experienced Org users,
> my opinion basically boils down to:

Given your activity of last, I'm certain that your take has
more weight than mine :)

[...]

Beautiful :)

Thanks
 - t


signature.asc
Description: Digital signature


Re: [PATCH] Treat :tangle-mode as an octal value not integer

2021-09-29 Thread tomas
On Wed, Sep 29, 2021 at 08:18:11PM +0300, Greg Minshall wrote:
> Tomas,
> 
> in fact, i'm quite used to doing `chmod 755 foo.org`.  i do it now in
> bash, used to do it in csh, and it seems to work (as expected, afaict)
> also in sh.  all on arch linux.  (`chmod +755 foo.org` *does* seem to
> give odd results. :)

D'oh. You are right. Actually, chmod from coreutils does its own
parsing (function mode_compile, online e.g. here [1]).

Cheers

[1] https://sources.debian.org/src/coreutils/8.32-4/lib/modechange.c/#L134

 - t


signature.asc
Description: Digital signature


Re: [PATCH] Accept more :tangle-mode specification forms

2021-10-01 Thread tomas
On Fri, Oct 01, 2021 at 11:05:17AM +0100, Eric S Fraga wrote:

[...]

> > I would also tend to only support something like "#o755" and forbid
> > "755" as well as "0755", just to be more explicit and to avoid
> > misinterpretation.
> 
> Here I disagree; again, in the manual, the notation used, as an example,
> is 0755.  I see no need for the #o syntax personally.  This is
> especially true if we don't allow integer (i.e. base 10) values.  

Chiming in, I might be the culprit (in this thread) for the #o755
idea: I proposed it only because I was seeing that the argument
was being interpreted as (a decimal representation of) an int, and
thought it to be a good idea to stay compatible to Elisp notation.

Since then, the movement was rather towards consistency with the
shell and coreutils (which also makes sense, perhaps more [1]).

I wouldn't mix both :)

Cheers

[1] If you get over the wart that there is a little embedded
   domain specific language in the arg of this one specific
   keyword. I can also understand Tom Gillespie's hesitations,
   since he's trying to formalise the grammar.

 - t


signature.asc
Description: Digital signature


Re: Request to Unsubscribe

2021-10-01 Thread tomas
On Fri, Oct 01, 2021 at 12:58:04PM -0600, Jain, Rishabh wrote:
> Hi:
> 
> Hope you are doing well. I'd appreciate if you can help unsubscribe me from
> the orgmode mailing list.
> 
> Please let me know if you have any questions or concerns.

You can do it yourself. Have a look at the mail headers
of any mail you receive from this list (this works for
most mailing lists, that's why I take more time to explain
it).

Among them, you'll find one like this

  List-Unsubscribe: ,
  


(the indentation here is for clarity; actually the line is
longer, but that part above is sufficient).

This is telling you: if you want to unsubscribe from this
list, you can either

 (a) go with your browser to
 https://lists.gnu.org/mailman/options/emacs-orgmode
 and follow the instructions there (you'll have to
 enter the mail address you subscribed with, and you'll
 probably receive a confirmation mail

 OR
 (b) (my favourite): send a mail to emacs-orgmode-requ...@gnu.org
 with the Subject "unsubscribe" (without the quotes). The
 mail's content is irrelevant (maybe you have to put something
 to keep your mail program happy). Again, you'll receive a
 confirmation mail you'll have to reply to (to prove that
 the request really came from you).

HTH

Cheers
 - t


signature.asc
Description: Digital signature


Re: how to pull from the git org repo

2021-10-04 Thread tomas
On Mon, Oct 04, 2021 at 12:47:58PM +0200, Uwe Brauer wrote:
> 
> Hi
> 
> I just realized that the org repo I am pulling from is
> *   commit 52b09799cfba0a847e93c9e21883266570644245 (HEAD -> master, 
> origin/master, origin/HEAD)
> |\  Merge: 846801e 21eb69c
> | | Author: Nicolas Goaziou 
> | | Date:   Fri May 21 18:30:23 2021 +0200
> | |
> | | Merge branch 'maint'
> 
> But now 
> 
>  git pull 
> 
> Gives me:
> 
> fatal: unable to access 'https://code.orgmode.org/bzg/org-mode.git/': server 
> certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt 
> CRLfile: none

It seems that some letsencrypt root certificate has
changed from under the Intratubes. Perhaps updating
your OS will fix that (if it's Debian, updating the
ca-cacert might do the trick).

> Did the repository move, and then where to?

The error message suggests otherwise. Can you access
that URL from your browser?

Cheers
 - t


signature.asc
Description: Digital signature


Re: [PATCH] Accept more :tangle-mode specification forms

2021-10-05 Thread tomas
On Tue, Oct 05, 2021 at 10:45:59PM +0800, Timothy wrote:
> Hi  Everyone,
> 
> It feels like we’re near a patch that would be good to merge. I would very 
> much
> like to get feedback on what I proposed in my reply to Tom though (see below).

OK. Since I made some noises, I feel compelled to feed back :)

> >> That said, reducing the number of forms as Eric suggests would
> >> be a happy medium.
> >
> > Indeed, I’ve basically supported every form I could think of. I’m currently
> > inclined to cut it down to:
> > • 755
> > • “rwxrw-r–” (`ls -l’ style)
> > • chmod style with `org-babel-tangle-default-mode’ and 
> > `file-modes-symbolic-to-number’

This looks perfect to me.

> > Maybe with (if anybody says they would like this)
> > • #o755 (elisp octal)
> > • 0755 (C octal)
> > • “rwx” = user perm, bit-or’d with `org-babel-tangle-default-mode’ for the 
> > rest
> >   (i.e. `org-babel-tangle-default-mode’, but not exceeding the user perm)

I wouldn't miss those, having the above. Less is more, IMHO.

Thanks for your work, and for the way you do it. You rock!

Cheers
 - t


signature.asc
Description: Digital signature


Re: [PATCH] Accept more :tangle-mode specification forms

2021-11-19 Thread tomas
On Sat, Nov 20, 2021 at 03:31:16AM +1100, Tim Cross wrote:
> 
> Timothy  writes:
> 
> > Hi All,
> >
> > I thought I’d checked for this, but I’ve just noticed that :tangle-mode 755

[...]

> Thanks for your work on this. I am a little concerned we are making a
> rod for our back by trying to make this overly clever in order to
> provide as much convenience to the user as possible [...]

That's my feeling too. At the beginning I was a fan of the octal variant
(tradition), but I fear the interface, in its really good intent to "do-
what-i-mean" becomes unpredictable. Because different people do mean
different things.

An unpredictable interface having security implications tends to be...
interesting :)

Cheers
 - t


signature.asc
Description: PGP signature


Re: [PATCH] Accept more :tangle-mode specification forms

2021-11-20 Thread tomas
On Sat, Nov 20, 2021 at 04:08:16PM +0800, Timothy wrote:
> Hi Tom, Tim, Thomas, and Greg,

[...]

> • a shorthand for octal
> • ls-style
> • chmod-style
> I think this small collection of distinct and simple input methods isn’t 
> overly
> clever or complex, and feel that it strikes the right balance between too many
> options and too little flexibility.

That sounds good.

> [...] I’m
> thinking either “o555” or “#o555” would be a good improvement over “(identity
> #o555), but am open to other suggestions.

That's reasonable. I'd even tend to disallow decimal. In usage, it's too
exotic and the potential for someone entering "just a number" expecting
for it to be read as octal is too high. Is it worth the risk?

Timothy, I really admire your patience, and your incredibly friendly way
of doing things :)

Cheers
 - t


signature.asc
Description: PGP signature


Re: [PATCH] Accept more :tangle-mode specification forms

2021-11-20 Thread tomas
On Sat, Nov 20, 2021 at 10:50:40PM +0800, Timothy wrote:
> Hi Thomas (& co.),

[...]

> Thanks. It helps that this list is fairly friendly to begin with :)

Friendly lists are made of friendly people, and there, your contribution
is... special.

> * For example, “:tangle-mode 755” will now produce the warning:
>   “1363 is not a valid file mode octal. Did you give the decimal value 755 by
>   mistake?”. Maybe it would be worth adding “if so try o755” or similar?

Awesome :)

Thanks & cheers
 - t


signature.asc
Description: PGP signature


Org babel and Guile/Scheme: noise from... Geiser?

2021-12-01 Thread tomas
Hi,

I'm trying to take some notes and explain things (to myself, to
others). So org babel it is, yay!

This is my first (well, second: `:results value' turned up empty):

  Blah, blah blah...

  #+name: mklst/define
  #+begin_src scheme
(define-syntax mklst
  (lambda (s)
(syntax-case s ()
  ((_ e ...) #'(list e ...)
  #+end_src

  More blah...

  #+name: mklst/test/0
  #+begin_src scheme :noweb yes :results drawer output
<>
(format #t "~S\n" (mklst 'a 22 "foo"))
  #+end_src

But alas, the result has some noise:

  #+RESULTS: mklst/test/0
  :results:
  (a 22 "foo")
  While executing meta-command:
  Wrong type to apply: #t
  scheme@(guile-user)>
  :end:

(the first line is the expected result; the two following ones I don't
know where they come from, and the third is, AFAICS, noises from Geiser
chewing in the background (org babel seems to start a Geiser session).

Is that intended behaviour?

For the moment, I excise all that noise by hand, but this doesn't scale:
the computer is faster at producing noise than me removing it ;-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: format/fill of text in a cell in tables

2021-12-17 Thread tomas
On Fri, Dec 17, 2021 at 08:51:59AM +1100, Tim Cross wrote:

[on flowing text whithin table cells]

> I agree. This is actually a much harder problem to solve than it may
> appear on the surface [...]

If you want to get completely dizzy, watch the recurrent threads about
proportional fonts in emacs-user or emacs devel :-)

That's when things start getting interesting.

> If you have lots of cells needing wrapping, the table is perhaps not the
> right layout mechanism to use. While it may seem like a convenient way
> to present content, often it isn't a great way to consume it. Donald
> Knuth wrote a bit about why tables with multiple cell lines were a poor
> choice. After years of dealing with project managers who too often use
> Excel to record, present and share data, I tend to agree with his views.
> I'm also old enough to remember when the table was the 'goto' solution
> for managing layout in HTML files and what a mess that became.

Very interesting points you make. I'd like to add a couple or two ;-)

* static vs dynamic, user vs master

An admirer of Knuth myself, I tend to relativise his position: he's a
book writer in the classical sense. Lots of things happen at "compile
time", you (the reader) get to watch (in awe) the process's results.

Tables have an advantage if your approach is an explorative one, i.e. if
the process is part of the result. I don't think they are as successful
as they are for no reason (SQL, or R's data frames are about tables, after
all, so it's not only Excel). If you want your reader to take part in
the exploration process, a table might just be right.

The cell lines is again in the same pattern: once the layout is fixed,
you can tweak your appearance so you can drop the lines. The result is
astounding, but only if you know your trade damn well. Knuth does. If
things are still in flow, or if you aren't a Grandmaster, perhaps lines
do help [1]. Now sometimes, this "in flow" is part of what you want to
convey, so...

* acculturation & perception

Very interesting point you make about "project managers". This reminds
me that there's not that One Perception Ruleset. People tend to justify
nearly anything with anything (remember those arguing with grey levels
and contrast to prove that serif fonts are more readable? Or was it the
other way around?). To the project managers, tables are probably the
most readable, because they read them all the time. Especially if they
are made with Microsoft (that's the basis of the power of those corps,
after all). Human perception seems so adaptable that it's nearly scary.
So it is all part of a giant feedback loop. Difficult to spot some
bedrock in this mess. Perception is culture is perception.

The point you make about assistive technologies is hugely important. I
haven't much experience with blind people myself, but I'm convinced that
their perception of dimensionality (2D, 2D vs 3D) could be quite
different from that of sighted people. Is a table an advantage or a
disadvantage then? Does it depend on the strategic path they have
chosen? Do some feel better at 3D? 5D? [2]

* WYS ain't WYG

Lastly, Org ain't WYSIWYG (well, duh). But such things as flowed cells
are measuring it up to one, up to a point (although, at some point, I
admit to having yearned for some). A strength is a weakness is a
strength. I think it is the nature of Org to live with such conflicts.
It's an interesting place, where it lives :-)

Cheers

[1] You better go with your camera's defaults to take an everyday photo.
   If you're planning that astounding grainy B&W portrait, you're in for
   some training.
[2] I had once a prof in functional analysis: the way he drew his things
   on the blackboard gave us the impression that he really was /seeing/
   those infinite-dimensional vector spaces he constantly talked about.
   Scary :)

-- 
tomás


signature.asc
Description: PGP signature


Re: format/fill of text in a cell in tables

2021-12-17 Thread tomas
On Fri, Dec 17, 2021 at 11:11:47PM +1100, Tim Cross wrote:

[...]

> Yes, sometimes tables are extremely useful - especially wrt 2-d
> relationships I'm not against the use of tables, but do find their use
> as a formatting/layout tool limited [...]

Yes, but at the end, layout is but a thinking device as all the others
are :-)

This reminds me of people advocating "semantic backup" (e.g. use
"emphasis" instead of "italics", until one realises that you just
managed to peel off one layer of the sematic onion. The onion just got
smaller (some literature perhaps might want to play with the ambiguity
of italics?), and if you continue, you end up with no onion at all.

> Many years ago, I worked on a system which used an interesting interface
> which used 'cubes' to represent database information [...]

Sounds a bit awkward, at the same time. I guess the gains to be had from
going from 1D to 2D are significantly higher than those beyond (OTOH,
beyond 5 or 6, things get strange again, with most of the volume of
things getting stuck in thin shells).

> I have been legally blind my whole life and for 17 years [...]
> [...] I'm sort of between worlds - enough sight to prevent me really
> developing 'sightless'skills

Thanks for sharing your experience. That's the only way others can
learn.

> I know a few totally blind mathematicians and their skills are
> impressive. Quite a few of them have ended up working in fields relating
> to topology [...]

This is interesting. I always was wondering how different person's
strategies in this situation have anything in common and how they
vary wildly.

> > * WYS ain't WYG

[...]

> Yes, I can see why people like WYSWYG when editing. However, my
> experience with such systems as more often than not been extremely
> frustrating as I seem to end up constantly fighting with the system to
> get it looking right rather than focusing on the content [...]

There is a lot of potential in being "between the worlds", and Org
tries to exploit exactly that. But that's, I think, also where its
conflicts are.

You can see similar patterns in other fields. Serialization formats
which deliver abstract and concrete syntax in "one package"
(S-expressions, XML (and those others), JSON) tend to be wildly successful,
but tend to run into the same troubles time and again; trying to do
the right thing and separating abstract and concrete syntax (think
ASN.1) tend to end up in niches (OK, ASN.1 is actually successful,
but only because people get paid to do that :-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: block folding - should this work?

2021-12-24 Thread tomas
On Fri, Dec 24, 2021 at 04:21:58PM -0500, Robert Nikander wrote:
> I started reading about “blocks" in the manual. I wanted a chunk of text that 
> I could hide, so I tried this:
> 
> * Test
> Some text
> #+BEGIN 
> Hide this
> #+END
> 
> Hitting TAB on the BEGIN line does nothing. But if I add a blank line before 
> it, then hitting TAB hides and shows the block. Is that a bug? Or am I doing 
> it wrong? Seems like it should work without the blank line.
> 
> * Test
> Some text
> 
> #+BEGIN 
> Hide this
> #+END
> 
> M-x org-version => 9.5.1.

Ah. You have to decide on a concrete /kind/ of block.
So try:

  #+begin_example
  This is a small example
  with two lines
  #+end_example

(BTW. I seem to remember that Org prefers to spell those things in lower
case these days, as in my example).

There are some block kinds which Org "knows about" and treats specially,
like _example, _quote, _center, _src and so on.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Second Ctl in keychord not detected

2022-01-19 Thread tomas
On Wed, Jan 19, 2022 at 01:08:10PM +0100, Loris Bennett wrote:
> Hi,
> 
> This is not really an Org question but an Emacs or possibly tmux
> problem.  However, the problem manifests itself in an Org context.

I guess this is tmux. It behaves more or less like an oldskool terminal,
where C- is transferred as the ASCII code with bit 7 masked out.
This would mean only C-@ (mapped to ASCII 0, which might have its own...
interesting issues) through a few chars after CTRL-Z do make sense in
this context.

This "protocol" can't even express things like CTRL-. or CTRL-, -- that
luxury is reserved to more GUI-ish environments :-)

(NOTE: just a guess, I haven't direct experience with tmux).

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: About babel and header arguments

2022-04-10 Thread tomas
On Sun, Apr 10, 2022 at 11:53:51AM +0200, Henrik Frisk wrote:
> Hi,
> 
> I'm not a skilled (scheme) programmer so maybe there is something obvious
> I'm missing here. In the first example the header argument y is interpreted
> as I would expect it, but in the second it isn't:

Hm. You are expecting (12 10)?

> #+begin_src scheme :var y=10 :results value
>   (+ 10 y)
> #+end_src
> 
> #+RESULTS:
> : 10
> 
> but not this:
> 
> #+begin_src scheme :var y=10 :results output
>   ((lambda (x) (display x)) '(12 y))
> #+end_src

The quote extends to the whole (parenthesized) expression, i.e.
the y is quoted too, in there, so it's the symbol y, so that
output is correct:

> #+RESULTS:
> : (12 y)

(That's Scheme, not Babel doing it). I don't know where you
want to go to, but perhaps try:

  (list 12 y)

instead: this would make a list of whatever 12 evaluates to (this
would be 12) and y evaluates to (this would be 10).

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: About babel and header arguments

2022-04-10 Thread tomas
On Sun, Apr 10, 2022 at 04:00:31PM +0100, Neil Jerram wrote:
> Hi Henrik,
> 
> On Sun, 10 Apr 2022 at 10:56, Henrik Frisk  wrote:
> >
> > Hi,
> >
> > I'm not a skilled (scheme) programmer so maybe there is something obvious 
> > I'm missing here. In the first example the header argument y is interpreted 
> > as I would expect it, but in the second it isn't:
> >
> > #+begin_src scheme :var y=10 :results value
> >   (+ 10 y)
> > #+end_src
> >
> > #+RESULTS:
> > : 10
> 
> I'm surprised by this one - shouldn't we expect the result 20 ?

Wait a second... where is this `+' coming from?

*Oh* you mean the first one, I see now. I just skimmed over it and didn't
notice. Unfortunately, "my" geiser seems broken at the moment and I can't
double-check it. But you are right, it should be 20.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: how to transpose a table but not deleting the horizontal lines

2022-05-10 Thread tomas
On Tue, May 10, 2022 at 08:49:15AM +0200, Uwe Brauer wrote:
> 
> Hi 
> 
> >From the docstring of 
> org-table-transpose-table-at-point is
> Transpose Org table at point and eliminate hlines.
> 
> Does anybody know about a, maybe, 3rd party packages that transpose the
> table but leaves the horizontal lines intact?

Hm. They'd convert to vertical lines, then?

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Help with my first elisp

2022-05-23 Thread tomas
On Mon, May 23, 2022 at 09:46:09AM -0700, Greg Minshall wrote:
> Ypo,
> 
> > (defun salto ()
> >   (interactive)
> >   (if posicion 1

You are comparing the value of posicion to 1?

Then it should probably be "(if (= posicion 1) ...)" or
"(if (equal posicion 1) ...)" or something like that.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Fwd: Help with my first elisp

2022-05-24 Thread tomas
On Tue, May 24, 2022 at 07:32:31PM +0200, Ypo wrote:

[...]

> Thanks, Tomas. It seems the "if" part works, now I can use my elisp just
> with the spacebar :-)

Glad it worked :)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Help with my first elisp

2022-05-25 Thread tomas
On Wed, May 25, 2022 at 08:35:19AM +0200, Orm Finnendahl wrote:
> Hi,
> 
> Am Dienstag, den 24. Mai 2022 um 19:30:40 Uhr (+0200) schrieb Kepa Diez:
> > (defun focusJump ()
> >   (interactive)
> >   (if (equal posicion 1)
> >     (focusPointInter)
> >   (if (equal posicion 2)
> >   (focusPointEnd)
> >     (if  (equal posicion 3)
> >     (focusPointStart)
> 
> maybe you want to cleanup a bit:
> 
> (defun focusJump (posicion)
>   (interactive "nPosicion: ")
>   (case posicion
> (1 (focusPointInter))
> (2 (focusPointEnd))
> (3 (focusPointStart
> 
> BTW: As lisp doesn't distinguish case, it is common practice in lisp
> to seperate words in symbols with dashes like 'focus-jump,
> 'focus-pont-inter, 'focus-point-start, etc.

Just to avoid confusion: Emacs Lisp does distinguish case. Traditional
Lisp doesn't. I know you know, but people could misunderstand the above.

The rest stands: in Emacs Lisp it's customary to write variable and
function names with dashes, in good ol' Lisp tradition.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: How to properly set up reminders for paying cellphone fees in org?

2020-05-02 Thread tomas
On Sat, May 02, 2020 at 09:37:40AM +0200, Marcin Borkowski wrote:
> 
> On 2020-04-30, at 07:02, Kyle Meyer  wrote:
> 
> > And note that a utility like datefudge or libfaketime is useful for
> > testing these sorts of things out.  For example:
> >
> >   $ datefudge "2020-02-18" emacs [...]
> 
> Shameless plug: I wrote about this use-case of datefudge sime time ago:
> http://mbork.pl/2019-08-05_datefudge_and_agenda_testing
> 
> (I don't know libfaketime).

It just plays games with LD_PRELOAD to trick the application (which is
supposed to use the usual libs when asking for time, but most do that).

Infinitely more lightweight than a container or a VM. On Debian:

  tomas@trotzki:~$ apt show libfaketime
  Package: libfaketime
  [...]
  Download-Size: 31.2 kB
  APT-Sources: http://ftp.de.debian.org/debian buster/main amd64 Packages
  Description: Report faked system time to programs (preload library)
   The Fake Time Preload Library (FTPL, a.k.a. libfaketime) intercepts
   various system calls which programs use to retrieve the current date
   and time [...] FTPL allows you to specify both absolute dates (e.g.,
   2004-01-01) and relative dates (e.g., 10 days ago).

You might need a VM for an app which bypasses the "usual libraries",
but then, I don't know whether I would like to have such a thing on
my box. Probably not without a good reason :-)

Cheers
-- t


signature.asc
Description: Digital signature


Re: issue tracker?

2020-05-19 Thread tomas
On Mon, May 18, 2020 at 06:13:38PM -0500, James R Miller wrote:
> Doesn’t Gogs have a nice issue tracker functionality?

I looked up Gogs. Needs javascript *and* cookies. Wake me up when
there's a plain, straight service which works without any of them.

Cheers
-- t


signature.asc
Description: Digital signature


Re: issue tracker?

2020-05-19 Thread tomas
On Tue, May 19, 2020 at 09:05:33AM -0500, James R Miller wrote:
> (I also don’t understand the knee jerk response away from
> cookies / JavaScript).

Mine isn't a knee-jerk reaction. It's worse: it's well thought-out.
Discussing that in detail would be far off-topic for this list,
though.

> Those are just parts of the modern web... Cookies for state and persistent 
> login and JavaScript for making the web page interactive. 

There are many things which are "parts of modern X", for many
values of X, which I dislike. I tend to avoid them.

> Are you saying you’d want some sort of REST api instead and the website would 
> just be a view into that?

All well and fine (as long as it is documented). But falling
back to Plain Old HTML just works too.

Cheers
-- t


signature.asc
Description: Digital signature


Re: issue tracker?

2020-05-21 Thread tomas
On Thu, May 21, 2020 at 10:18:27AM -0400, Anthony Carrico wrote:
> On 5/21/20 3:31 AM, Kévin Le Gouguec wrote:
> > I think you've just described, in order:
> > 
> > - Debbugs (the issue tracking software),
> 
> Yes, I almost mentioned that Debian uses an email based bug tracker, as
> a point of reference. I'm not familiar with the details, but I think it
> is header based,

Kind of: the metadata are in header-like "Name: value" lines, but in the
mail body (i.e. after the separating whitespace line).

> which is a big ask for users.

Typically you don't write those by hand (you don't write your mail
or HTTP headers by hand either -- at least not usually).

For command-line junkies there is a `reportbug' utility, which at
the same time collects some system information and prepares the
mail for you. The nice part is that the generated thing is text
based and you /can/ review or change it before sending.

Best of both worlds, I'd say.

There seem to be Emacs helpers for that [1] [2] (but I can't share
any experience on them).

Cheers
[1] https://www.emacswiki.org/emacs/EmacsForDebian
[2] https://www.emacswiki.org/emacs/TinyDebian
-- t


signature.asc
Description: Digital signature


Re: Emphasis on a region

2020-06-04 Thread tomas
On Wed, Jun 03, 2020 at 12:32:25AM +0200, Berthold Lorke wrote:
> I am talking about this feature:
> https://orgmode.org/manual/Emphasis-and-Monospace.html
> 
> It currently doesn't seem to be possible to mark a whole region with,
> say, "+" to strike through a whole paragraph, especially when separating
> each sentence in a paragraph by a linebreak (i believe this is even
> encouraged, as seen here https://orgmode.org/manual/Paragraphs.html).
> 
> Is there a fix for this?  Enclosing each line with emphasis markers
> (like "+") doesn't fix it, as when exported every sentence in a
> paragraph would then have a space inbetween the strikethroughs.

Yes, see variable `org-emphasis-regexp-components': it is a list
describing how an emphasis span (bold, emphasised, strike-through
etc) is "built".

It's fifth component is the number of newlines allowed whithin such
a span. It's set, by default, to 1.

You can modify it like so

  (setf (nth 4 org-emphasis-regexp-components) 4)

to allow 4 newlines in your emphasis span. You have to reload
Org for it to take effect, so the best might be to have this
somewhere in your Emacs init just before loading Org?

Perhaps someone with a more elegant approach can chime in.

Cheers
-- t


signature.asc
Description: Digital signature


Re: Emphasis on a region

2020-06-04 Thread tomas
On Thu, Jun 04, 2020 at 12:35:51PM +0200, Russell Adams wrote:
> On Thu, Jun 04, 2020 at 10:35:28AM +0200, to...@tuxteam.de wrote:
> > Yes, see variable `org-emphasis-regexp-components': it is a list
> > describing how an emphasis span (bold, emphasised, strike-through
> > etc) is "built".
> 
> Can this be done in M-x customize?

Not, as far as I know.

Cheers
-- t


signature.asc
Description: Digital signature


Re: FWD: Org-Babel Support for Powershell

2020-06-07 Thread tomas
On Sun, Jun 07, 2020 at 01:47:45PM +0200, Russell Adams wrote:
> On Sat, Jun 06, 2020 at 11:38:38PM +, Gustav Wikström wrote:
> > #+begin_src powershell
> >   2+2
> > #+end_src
> >
> > #+RESULTS:
> > : 4
> 
> That's pretty easy. What executable should it run?
> 
> > /of topic It's safe to say the free software movement has gained a strong
> > footing [...]

> I think it's dangerously ignorant to choose to ignore 20+ years (in my career)
> of the actively user and OSS hostile actions that MS has taken. They are still
> an abusive monopoly.

Plus... they still are up to shenanigans. They just do it more quietly.

For a recent case, see their spat with the Privacy Commissioner of the City
of Berlin (sorry, German).

  https://t3n.de/news/microsoft-mahnt-berlin-wegen-ab-1281556/
  
https://www.tagesspiegel.de/berlin/warnung-vor-teams-skype-und-zoom-berlins-datenschutzbeauftragte-beugt-sich-vorlaeufig-microsoft/25841622.html

They're a corporation. They are out to make money. Other aspects
tend to stay behind. That's simple, ain't it?

Cheers
-- t


signature.asc
Description: Digital signature


Re: [join rows]

2020-06-08 Thread tomas
On Mon, Jun 08, 2020 at 01:09:21PM +0200, Uwe Brauer wrote:
> >>> "JD" == Jude DaShiell  writes:
> 
>> If what's wanted here is a horizontal join of tables paste(1) might be
> 
> I am not sure what paste(1) means here. Could you please explain?

Paste is a classical UNIX command to "join" (not really in the SQL sense,
just by sequence number) files consisting of lines. The "(1)" is the
customary way of hinting at the man section (1, aka "Executable programs
and shell commands") where the doc is to be found.

Just do "man paste" in a shell.

Cheers
-- t


signature.asc
Description: Digital signature


Re: [PATCH] may we focus on readability?

2020-06-14 Thread tomas
On Sun, Jun 14, 2020 at 11:47:31AM -0500, Mario Frasca wrote:
> I'm rewriting a complicated construction where there's an equality
> test on the length of the list of non matching elements, with a
> simpler cl-some invocation.  The replacing code is self explanatory.

Isn't `seq-some' equivalent? (in this case, at least; cl-some is
willing to take more than one sequence).

Cheers
-- t


signature.asc
Description: Digital signature


Re: [PATCH] may we focus on readability?

2020-06-14 Thread tomas
On Sun, Jun 14, 2020 at 09:28:54PM +0200, Nicolas Goaziou wrote:
> Hello,

> > [seq-some?]

> This is only tangential to your question, but, unfortunately, we cannot
> use `seq-some' as Org still supports Emacs 24.3.

Thanks

-- t


signature.asc
Description: Digital signature


Re: [patch] simplify-compact initial data extraction from plist

2020-06-27 Thread tomas
On Sat, Jun 27, 2020 at 10:18:21AM -0500, Mario Frasca wrote:
> this is a result of some help I received a few days ago in the
> #emacs irc chat room on freenode.
> 
> I was wondering why we were adding a semicolon in front of names,
> before creating symbols, and I understand this is because such
> symbols work as keys.

I assume you mean a "colon", like this `:'

Those :foo thingies have another nice property: they are self-evaluating,
like numbers. If you try, e.g. to eval foo, the evaluator tries to find
a variable named foo and the result is then that variable's value.

If you evaluate 'foo, the result is the symbol foo.

If you evaluate :foo, the result is :foo, like when you evaluate 1234,
where the result is simply 1234.

Cheers
-- t


signature.asc
Description: Digital signature


Re: org-tempo and

2020-06-29 Thread tomas
On Mon, Jun 29, 2020 at 01:15:04PM -0700, Samuel Wales wrote:
> i used to do
> 
>
> to get a quote block.
> 
> an upgrade to maint brought the org-tempo thing, which i know was a
> long discussion whose resolution i completely forgot about.
> 
> i'm ok with either old or new.  i will fix keybindings.

[...]

It's a while ago, but AFAIR I just had to enable/add tempo to the
(customizable) variable `org-modules'.

Try M-x customize org-modules

Cheers
-- tomás


signature.asc
Description: Digital signature


Re: [BUG] org-fill-paragraph [M-q] not apply on last paragraph

2020-07-06 Thread tomas
On Mon, Jul 06, 2020 at 07:40:48PM +0800, stardiviner wrote:
> 
> Nicolas Goaziou  writes:
> 
> > Hello,
> >
> > stardiviner  writes:
> >
> >> After recently (about weeks) update in Org Mode "master" branch. I found 
> >> [M-q]
> >> org-fill-paragraph command not apply on the last paragraph of region select
> >> large part of text. I don't have this problem before.
> >
> > This is very vague. Do you have an ECM demonstrating the issue?
> 
> I have long minimal-init.el config file. I will attach the init file in 
> attachments.
> 
> And here is the steps I reproduce this bug:
> 
> 1. Open an Org file which contains long un-wrapped text. Like this:
> 
>#+begin_src org
>In addition to debugging a program, VS Code supports running the program. 
> The *Debug: Run (Start Without Debugging)* /action/ is triggered with 
> =[Ctrl+F5]= and uses the currently selected launch configuration. Many of the 
> launch configuration attributes are supported in 'Run' mode. VS Code 
> maintains a debug session while the program is running, and pressing the Stop 
> button terminates the program.
>
>Tip: The Run action is always available, but not all debugger extensions 
> support 'Run'. In this case, 'Run' will be the same as 'Debug'.
>#+end_src
> 
> 2. region select two paragraphs.
> 
> 3. press [M-q] ~org-fill-paragraph~ command.
> 
> 4. The second paragraph is not filled.

FWIW, it does for me.

One thing I noticed, though, is that due to the long lines, the last one
may be partially selected. In that case, the unselected part doesn't get
the fill treatment. When I make sure /everything/ is selected, M-q does
what I expect.

Cheers
-- t


signature.asc
Description: Digital signature


Re: [BUG] org-fill-paragraph [M-q] not apply on last paragraph

2020-07-06 Thread tomas
On Mon, Jul 06, 2020 at 07:58:20PM +0800, stardiviner wrote:
> 
> to...@tuxteam.de writes:

[...]

> > FWIW, it does for me.

[...]

> I'm sure I select everything. Are you using the latest commit in "master"
> branch? If not, can you test with that?

Hm. It's Org 9.3, which came with a fairly recent Emacs off git. Perhaps
not the latest, I don't know how often the Emacs record merges Org.

How do I find out?

I'm a bit reluctant to install Org off the Emacs sources.

Cheers
-- t


signature.asc
Description: Digital signature


Re: Wring case when using org-insert-structure-template

2020-07-09 Thread tomas
On Wed, Jul 08, 2020 at 03:04:38PM +0200, Guillaume MULLER wrote:
> Hi,
> 
> Thanks for Org-mode. This is really THE software I needed! I LOVE everything 
> about it! This is the only piece of software I know of that really designed 
> by users for users, with users & efficiency in mind!
> 
> I'm using GNU Emacs 26.3, with built-in org 9.1.9.
> 
> When I try to automatically insert Structure Templates (e.g. by typing C-c 
> C-, s), I get everything inserted in lowercase (e.g. #+begin_src).
> 
> In ALL the documentation pages I read, the snippets are written in uppercase 
> (i.e. #+BEGIN_SRC, like in the main documentation for this feature: 
> https://orgmode.org/org.html#Structure-Templates). I would myself prefer to 
> have the templates inserted in uppercase, as it allows to clearly & visually 
> differentiate between my main document text and the specific instructions for 
> Org.
> 
> First question: why isn't the default as in the docs?

I think the default moved slowly to lower case. The docs
have stayed as-is. Guessing by the mailing lists, this does
confuse people from time to time.

> Second question: I couldn't find any configuration variable or function to 
> change the default behaviour. Is there a way to do so?

See the (customizable) variable `org-structure-template-alist'.

Cheers
-- t


signature.asc
Description: Digital signature


Re: Waiting for refresh to finish...

2020-07-27 Thread tomas
On Mon, Jul 27, 2020 at 06:13:20PM +0200, Joseph Vidal-Rosset wrote:
> Hello everybody,
> 
> "Waiting for refresh to finish..." is the message that I get with U command
> after package-list-packages, but the refresh is never finished and I cannot
> upgrade the packages.

Hm. Doesn't happen here. Network problem?

I'm far from an expert in that area, but perhaps more details are needed.

What is the value of your variable `package-archives'? Are the URLs mentioned
there reachable from your neck of the woods?

Cheers
-- t


signature.asc
Description: Digital signature


Re: Waiting for refresh to finish...

2020-07-27 Thread tomas
On Mon, Jul 27, 2020 at 07:13:42PM +0200, Joseph Vidal-Rosset wrote:
> Thanks  for your  help,  Tomas,  here is  the  beginning  of my  init.el
> (suggestions to improve it are of course welcome):

Caveat: as I said, I'm most probably not the right guy to answer that, but
hey.


[...]

> ;; Configure Emacs package manager. Not required anymore on Emacs > 27
> (if (version< emacs-version "27")
> (package-initialize)  )
> (require 'package)
> (setq package-archives
>   '(("melpa" . "https://melpa.org/packages/";)
> ("melpa-stable" . "https://stable.melpa.org/packages/";)
> ("org" . "https://orgmode.org/elpa/";)
>; ("gnu" . "https://elpa.gnu.org/packages/";)
>   ))

This might be the relevant tidbit. But still, we don't know what version
your Emacs is, and thus whether this code is actually relevant or not.

What is the actual value of your variable `package-archives' in your
Emacs running instance? Try doing C-h v and then enter `package-archives'.

Are those sites reachable from your place? I.e. try something like

  curl -I https://stable.melpa.org/packages/

in a shell (likewise for the other URLs). For me, they are all four.
We still don't know whether those are the ones your Emacs is trying
to reach (and the hunch with networking is just that, a hunch).

Cheers
-- t


signature.asc
Description: Digital signature


Re: Waiting for refresh to finish...

2020-07-27 Thread tomas
On Mon, Jul 27, 2020 at 08:00:07PM +0200, Joseph Vidal-Rosset wrote:
> Hi again,
> 
> Many thanks for your reply. Here are the details requested. 
> 
> Le lun.  07/27/20 juil. 2020 à  07:27:42 , to...@tuxteam.de a  envoyé ce
> message:
> > On Mon, Jul 27, 2020 at 07:13:42PM +0200, Joseph Vidal-Rosset wrote:
> >> Thanks  for your  help,  Tomas,  here is  the  beginning  of my  init.el
> >> (suggestions to improve it are of course welcome):
> >
> > Caveat: as I said, I'm most probably not the right guy to answer that, but
> > hey.
> >
> > [...]
> >
> >> ;; Configure Emacs package manager. Not required anymore on Emacs > 27
> >> (if (version< emacs-version "27")
> >> (package-initialize)  )
> >> (require 'package)
> >> (setq package-archives
> >>   '(("melpa" . "https://melpa.org/packages/";)
> >> ("melpa-stable" . "https://stable.melpa.org/packages/";)
> >> ("org" . "https://orgmode.org/elpa/";)
> >>; ("gnu" . "https://elpa.gnu.org/packages/";)
> >>))
> >
> > This might be the relevant tidbit. But still, we don't know what version
> > your Emacs is, and thus whether this code is actually relevant or not.
> 
> joseph@mx:~$ emacs --version
> GNU Emacs 26.1

OK. So this variable is being read, probably (since 26.1 < 27), but...

> > What is the actual value of your variable `package-archives' [...]

> > Emacs   running   instance?  Try   doing   C-h   v  and   then   enter
> > `package-archives'.
> 
> package-archives’s value is
> (("melpa" . "https://melpa.org/packages/";)
>  ("melpa-stable" . "https://stable.melpa.org/packages/";)
>  ("org" . "https://orgmode.org/elpa/";)
>  ("melpa" . "http://melpa.milkbox.net/packages/";))
> Original value was 
> (("gnu" . "https://elpa.gnu.org/packages/";))

[...]

...but the actual variable's value has been "augmented" by a
(second) entry for "melpa", mapping to "http://melpa.milkbox.net/packages/";.

This one fails for me trying to resolve the name (host melpa.milkbox.net
is unknown to (at least my) DNS).

> > Are those sites reachable from your place? I.e. try something like

> joseph@mx:~$  curl -I https://stable.melpa.org/packages/
> HTTP/1.1 200 OK

[...]

Yes, this one works for me, too. But the milkbox one doesn't.
Now I have no idea what "update packages" will do in such a
case (and having two entries tagged with the same name looks
suspect too).

When you do the "describe variable" thing, there is a link in the
variable description "You can [customize] this variable" (actually
there are no square brackets there, it's my way to suggest that
this text looks different. Click on this link (or just put point
on it and hit ENTER) and you'll get a customization page. Try
to remove that milkbox entry.

Cheers
-- t


signature.asc
Description: Digital signature


Re: Waiting for refresh to finish...

2020-07-27 Thread tomas
On Mon, Jul 27, 2020 at 09:06:24PM +0200, Joseph Vidal-Rosset wrote:
> Le lun.  07/27/20 juil. 2020 à  08:28:03 , to...@tuxteam.de a  envoyé ce
> message:
> >  Try to remove that milkbox entry.
> >
> > Cheers
> > -- t
> >
> 
> I dit it immediately and it works now !
> 
> Many thanks Tomas ! You really just helped me very efficiently !

Glad it helped :)

Let's hope this value stays when you restart Emacs. If it came from a
prior customization (which is likely), saving your customization (which
you probably did) will do the trick. Otherwise, some more debugging is
in order.

Cheers
-- tomás


signature.asc
Description: Digital signature


Re: Website revamp?

2020-08-03 Thread tomas
On Mon, Aug 03, 2020 at 01:11:24PM +0800, TEC wrote:
> 
> Colin Baxter  writes:
> 
> >> TEC   writes:
> >> - The site is now more mobile friendly, the navbar now has a
> >
> > Why? How many users are installing org-mode on their 'phones - smart or
> > otherwise? 
> 
> Zero, I expect :P

Emacs should run fine on PostmarketOS [1] [2]. Thus Org, too.

Cheers
[1] https://postmarketos.org/
[2] https://en.wikipedia.org/wiki/PostmarketOS
-- t


signature.asc
Description: Digital signature


Re: Computing week number

2020-08-10 Thread tomas
On Mon, Aug 10, 2020 at 09:12:27AM +0200, claude fuhrer wrote:
> Hi everybody
> 
> It seems that I don't understand how to compute the week number in emacs.

There's no such thing as "the week number in emacs". Or... there are
at least three.

Cribbed from the docs (C-h i format-time-string):

 "%U is the week number starting on Sunday, %W starting on Monday,
  %V according to ISO 8601."

The thing is there are many meaningful ways to define such a thing
as a "week number", and several of them are in current use. See,
e.g. [1] for even more fun :-)

Once you know what kind of results you want, the rest tends to be
easier.

Of course, some people pick "whatever Excel does". Don't do that ;)

Cheers

[1] https://en.wikipedia.org/wiki/Week_number#Week_numbering
 - t


signature.asc
Description: Digital signature


Re: Mass conversion of items

2020-09-01 Thread tomas
On Tue, Sep 01, 2020 at 04:09:27PM +0100, Sharon Kimble wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> I'm hoping that someone can help with this problem I have.
> 
> I have several org-mode files which have some specific formatting in
> individual items, specifically -
> 
> - --8<---cut here---start->8---
> \uuline{foo}
> - --8<---cut here---end--->8---
> 
> This gives a double-underling of 'foo' when exported to latex and built
> into a pdf file.
> 
> I'm now in the situation when the double underlining also needs to be
> italicised, and in org-mode its showing as -
> 
> - --8<---cut here---start->8---
> /\uuline{foo}/
> - --8<---cut here---end--->8---
>   
> This gives a double-underling and italicised of 'foo' when exported to
> latex and built into a pdf file.
> 
> I would like to change about 150+ 'foos' and possibly using
> 'replace-string' to do it. Also, 'foo' is lots of different words which
> includes spaces between some of them. So how can I do it please?

Hm. From your description it's unclear what exactly are you
after. A couple of questions to try to zoom into that:

 - You want to change the text in the curly braces, i.e. what
   you call 'foo' above? Is this text always different? Is it
   possible to state a rule describing how this text looks like
   and by what you want to replace it? Or is the process going
   to be manual?
 - All that stuff: is it in one file or scattered across multiple
   files?

I'm sure there are a couple of other questions I just forget now,
But we'll get there :)

Cheers
 - t


signature.asc
Description: Digital signature


Re: Mass conversion of items

2020-09-01 Thread tomas
On Tue, Sep 01, 2020 at 06:22:02PM +0100, Sharon Kimble wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> Thanks for replying Tomas.
>writes:

You're welcome :-)

[...]

> >> - --8<---cut here---start->8---
> >> \uuline{foo}
> >> - --8<---cut here---end--->8---

[...]

> >> - --8<---cut here---start->8---
> >> /\uuline{foo}/
> >> - --8<---cut here---end--->8---

[...]

> Okay, being very specific, all of '\uuline{foo}' remains, but with a
> forward slash at the beginning and end of '\uuline{foo}' to achieve this
> '/\uuline{foo}/'

Ah, got it now. Regular expressions seem to be your friends here.

I'm assuming your foo is a placeholder, and varies from instance
to instance. I'm further assuming the "foo"s don't contain a closing
curly brace (we'd have to refine things otherwise).

Try M-x (i.e. Meta-x) and then "query-replace-regexp". It asks you
first for the regular expression, which will be

  \\uuline{[^}]*}

(note the double backslash: that's because a backslash has a special
meaning in regular expressions, and you have to "escape" it with another
backslash; this regexp roughly states: "a backslash followed by uuline,
followed by an opening curly, followed by zero or more (that's the star)
characters which aren't a closing curly followed by a closing curly).

You finish that part with ENTER. Then you're asked for the replacement.
You enter

  /\&/

Which means: "a slash, followed by whatever you just matched (that's
the "\&" part, only one backslash this time) and a slash.

Make a backup of your file first :-)

Regular expressions are very powerful, but sometimes confusing. It pays
off big time to wrangle them!
 
Good luck
 - t


signature.asc
Description: Digital signature


Re: attachments and inheritance (bug?)

2020-09-06 Thread tomas
On Sun, Sep 06, 2020 at 01:52:36AM -0700, flare wrote:
> 
> I have run into this issue myself, my solution for this ended up being
> a quick hack to toggle this inheritence so that subheadings could reach
> into superheadings when referencing the same attachments.
> 
> #+BEGIN_SRC elisp
> 
> (defun org-attach-switch-inheritence ()
^^

Sorry for calling in from the peanut gallery... the conventional
term for that kind of thing seems to be "toggle", not "switch",
right?

Anyway, thanks for making Org better :-)

Cheers
 - t


signature.asc
Description: Digital signature


SPAM [emacs-orgmode@gnu.org New Sign-in to your account]

2020-09-11 Thread tomas
Hey,

I don't think anyone here will fall for this, but... just to
make sure: the referenced mail was spam, and possibly a phishing
attempt.

Be careful, folks :-)

Cheers
 - t


signature.asc
Description: Digital signature


Re: Getting Org-Crypt to work (doc bug?)

2020-09-14 Thread tomas
On Mon, Sep 14, 2020 at 10:42:57AM +0200, Gregor Zattler wrote:
> Hi David,
> * David Masterson  [2020-09-13; 17:11]:
> > Yes, gpg-agent is installed and appears to have been started in
> > background.  My O/S is Debian on a Chromebook.
> >
> > I start Emacs via 'xterm -e emacs' and just noticed (thanks to you) that
> > I'm getting a textual popup on the xterm asking for the
> > passphrase. Given that, everything works.
> >
> > So, you're saying that the textual popup is the correct mechanism for
> > getting the passphrase?
> 
> That's one possible way.  If you want to have a graphical
> dialog box, check which pinentry packages are installed:
> 
> $ dpkg -l '*pinentry*'

[...]

> as you see, at my system, there are two pinentry packages
> installed (besides the docs): pinentry-curses for terminal
> while pinentry-qt provides a graphical dialog box.  I choose
> pinentry-qt, because it had fewer dependencies and was
> smaller than the other options.
> 
> If your system lacks a graphical pinentry, install one.

Pinentry is gpg's way to ask you for your passphrase.
AFAIK there's a way for Emacs to do the pinentry thing
(in case you don't like some unrelated popup exploding
in your face).

I don't know what the current status is (there used to
be a pinentry.el).

So... lots of possibilities.

Cheers
 - t


signature.asc
Description: Digital signature


Re: Getting Org-Crypt to work (doc bug?)

2020-09-14 Thread tomas
On Mon, Sep 14, 2020 at 12:18:50PM +0100, Colin Baxter wrote:
> [...] I set the variable
> `epa-pinentry-mode' to loopback as in
> 
> #+begin_src elisp
> (setq epa-pinentry-mode 'loopback)
> #+end_src
> 
> This seems to work.

Oh, thanks -- this answers the question I only half-posed :)

BTW: the variable documentation says to use `epg-pinentry-mode'
for Emacs versions >= 27.1

Cheers
 - t


signature.asc
Description: Digital signature


Re: official orgmode parser

2020-09-15 Thread tomas
On Tue, Sep 15, 2020 at 01:15:56PM +0200, Przemysław Kamiński wrote:

[...]

> There's the org-json (or ox-json) package but for some reason I
> wasn't able to run it successfully. I guess export to S-exps would
> be best here. But yes I'll check that out.

If that's your route, perhaps the "Org element API" [1] might be
helpful. Especially `org-element-parse-buffer' gives you a Lisp
data structure which is supposed to be a parse of your Org buffer.

From there to S-expression can be trivial (e.g. `print' or `pp'),
depending on what you want to do.

Walking the structure should be nice in Lisp, too.

The topic of (non-Emacs) parsing of Org comes up regularly, and
there is a good (but AFAIK not-quite-complete) Org syntax spec
in Worg [2], but there are a couple of difficulties to be mastered
before such a thing can become really enjoyable and useful.

The loose specification of Org's format (arguably its second
or third strongest asset, the first two being its incredible
community and Emacs itself) is something which makes this
problem "interesting". People have invented lots of usages
which might be broken should Org change to a strict formal
spec. You don't want to break those people.

But yes, perhaps some day someone nails it. Perhaps it's you :)

Cheers

[1] https://orgmode.org/worg/dev/org-element-api.html
[2] https://orgmode.org/worg/dev/org-syntax.html

 - t


signature.asc
Description: Digital signature


Re: "text mode" org mode

2020-09-15 Thread tomas
On Tue, Sep 15, 2020 at 03:33:57PM +0200, Emanuel Berg via General discussions 
about Org-mode. wrote:
> Russell Adams wrote:
> 
> > I believe you can set your #+STARTUP on your file
> > to "showall".
> 
> Can I prevent hyperlinks from folding back and forth?
> 
> I mean, with [[][]] ?

Cf. the variable `org-link-descriptive' and its associated toggle
function `org-toggle-link-display' (also reachable via the menu
Org -> Links -> Descriptive ...)

There is an unproven conjecture by some mathematician from the
seventeenth century that Org contains everything. He wrote that
he had a proof, but that the margin of the book he just had at
hand was too narrow to write it down.

Therefore: buy only books with large margins, kids.

;-)

Cheers
 - t


signature.asc
Description: Digital signature


Re: basic org questions

2020-09-15 Thread tomas
On Tue, Sep 15, 2020 at 05:29:05PM +0200, Emanuel Berg via General discussions 
about Org-mode. wrote:
> 1) How do I make a region italic?
> 
> This does not fontify and does not show up as
> italic type:
> 
> /En gång i tiden var även Spanien täckt av skog.
> En gammal berättelse menar att man i norra Spanien
> kunde hoppa upp på en apas rygg och ta sig ner till
> södra Spanien utan att klättra av en enda gång. Apan,
> underförstått, kunde hoppa från gren till gren genom
> hela halvön. Flyger man över Spanien idag ser man att
> det har gått åt ett och annat träd sen dess./
> 
> /This/ works tho.

This is not /really/ documented, so handle with some
care.

In a nutshell, org's emphasis was born to handle short
spans of text. To not slow the fontifier too much, the
matching is limited to at most (i believe) two lines.

But, given a bit of deep magic [1], you can increase that
limit.

The variable `org-emphasis-regexp-components' is documented,
so one might hope that the method is magic, but somewhat
official.

I use that for /normal/ texts: they tend to want longer
emphasised spans...

Cheers

[1] 
https://emacs.stackexchange.com/questions/18101/org-mode-multi-line-emphasis-and-bold

 - t


signature.asc
Description: Digital signature


Re: basic org questions

2020-09-15 Thread tomas
On Wed, Sep 16, 2020 at 03:58:17AM +0200, Emanuel Berg via General discussions 
about Org-mode. wrote:
> Tim Cross wrote:
> 
> > #+latex_class: korma-article
> 
> user-error: Unknown LaTeX class ‘korma-article’

This might have been a typo: there is a family of LaTeX classes called
"koma" (not "korma", that's rather a family of Indian dishes ;-)

That said, I fail to find a korma-article.cls. So perhaps this wasn't
meant /literally/ by Tim, but rather a placeholder.

> > #+latex_header:  \setlength{\parindent}{0pt}
> 
> Yes, that's removed the indentation but didn't insert
> a blank line...

I think Tim is just furnishing examples, not a complete solution.

LaTeX is a world unto itself, and to fine-tune the results of your
LaTeX exporter (the PDF exporter is just a little appendix on that),
you'll have to dive a bit into that.

Or just ask around here, but best with concrete, little goals each
time.

Cheers
 - t


signature.asc
Description: Digital signature


Re: basic org questions

2020-09-15 Thread tomas
On Wed, Sep 16, 2020 at 06:11:52AM +0200, Emanuel Berg wrote:
> TEC wrote:
> 
> > #+begin_src latex
> > \setlength{\parindent}{0pt}
> > \setlength{\parskip}{\baselineskip}
> > #+end_src
> 
> I know this commands well from my LaTeX projects,
> but I'm gonna use LaTeX anyway, what's the use of
> using org-mode?

LaTeX is (as you might know already ;-) for typesetting. Org
is for organising information.

Sometimes you want to typeset a representation of that information.

Cheers
 - t


signature.asc
Description: Digital signature


Re: official orgmode parser

2020-09-16 Thread tomas
On Wed, Sep 16, 2020 at 02:09:42PM +0200, Przemysław Kamiński wrote:

[...]

> So I looked at (pp (org-element-parse-buffer)) however it does print
> out recursive stuff which other schemes have trouble parsing.
> 
> My code looks more or less like this:
> 
> (defun org-parse (f)
>   (with-temp-buffer
> (find-file f)
> (let* ((parsed (org-element-parse-buffer))
>(all (append org-element-all-elements org-element-all-objects))
>(mapped (org-element-map parsed all
>  (lambda (item)
>(strip-parent item)
>   (pp mapped

Actually I'd tend to not modify the result, but to walk
it.

See `pcase' for a powerful pattern matcher which might
help you there.

Cheers
 - t


signature.asc
Description: Digital signature


Re: Reply-All noise

2020-10-09 Thread tomas
On Fri, Oct 09, 2020 at 09:24:34PM +0200, c.bu...@posteo.jp wrote:
> Hi,
> 
> I had this discussion in several mailinglists but gave up.
> 
> But I am suprised to see this phenomenon in a emacs related (means:
> "super nerdy") mailinglist, too.
> 
> So tell me please how do you handle this "problem"? Or do I setup
> something wrong with my list account?

There is no clear-cut answer to that. For mailing lists which allow
posting by non-subscribers (this is one), reply-to-all makes more
sense to reply-to-all, since you can't be sure that everyone is
subscribed.

As for what I do, I have a mail filter (procmail) which weeds out
duplicates fairly effectively.

For this list, specifically, which is managed by Mailman, you can
tell the list manager [1] to not send you a duplicate when your
address is in the To: or Cc: header field. Note that you'll get
the copy sent to you, not the one sent via the list; if you are
filtering based on list headers, this might not be what you want.

To appreciate the whole "interesting" complexity see [2]. In a
nutshell, there's no ideal solution working for all tastes.

Cheers

[1] https://www.gnu.org/software/mailman/mailman-member/node21.html
[2] http://david.woodhou.se/reply-to-list.html

 - t


signature.asc
Description: Digital signature


Re: Reply-All noise

2020-10-09 Thread tomas
On Fri, Oct 09, 2020 at 10:10:41PM +0200, to...@tuxteam.de wrote:
> On Fri, Oct 09, 2020 at 09:24:34PM +0200, c.bu...@posteo.jp wrote:
> > Hi,

[...]

> There is no clear-cut answer to that [...]

You might also want to experiment with setting the Mail-Followup-To:
header [1] in your mails to the list (I have no experience with that,
so take with a fist of salt!).

No idea how many MUAs out there will support that -- and whether your
reply "in the middle of a thread" would break that thread for non-
subscribers.

Cheers

[1] https://cr.yp.to/proto/replyto.html

 - t




signature.asc
Description: Digital signature


Re: Reply-All noise

2020-10-10 Thread tomas
On Sat, Oct 10, 2020 at 10:53:08AM +0200, c.bu...@posteo.jp wrote:
> On 2020-10-10 15:03 Maxim Nikulin  wrote:
> > 1. Use "duplicate" sieve extension.
> > [..]
> > 
> > 2. Just add filter
> > [..]
> 
> This are workarounds but not solutions.
> 
> IMO the problem is the list user that "Answers to all".

"The problem are always the others". Way to go!

Did you read the reference I sent in reply to you? Did you take
into account that this list is open to non-subscribers?

> Why should I modify my system because another one make errors?

It's not "errors". It's the way an open mailing list works.

Entering a room and yelling "Hey, all of you stop doing things
the way you're doing it. I'm gonna tell ya how you gotta do
things now" is, to put it politely, slightly unpolite :-)

Cheers
 - t


signature.asc
Description: Digital signature


Re: Reply-All noise

2020-10-10 Thread tomas
On Sat, Oct 10, 2020 at 10:57:26AM +0200, c.bu...@posteo.jp wrote:
> There is a "Sender:" header entry I can filter on.
> 
> But I do not setup anything because I don't case the problem.

I don't unerstand this sentence.

> Btw: It is nice that all of you using Gnus and (maybe) a local
> mailserver with powerfull filtering. I don't.

FWIW, I'm using mutt (I plan to switch to gnus some day, but that's
irrelevant).

> It is kind of a religious problem. :D

Fine. You keep your religion, others keep their religions. Don't try
to force your religion on me: I might turn nasty.

> Isn't there a setting on the mailinglist site (e.g. mailman) that can
> handle problems like this?

I made myself quite a bit of work to explain to you what you can do.
Even with a link to mailman docs on how you can set your subscription
settings.

Do you read the responses you receive?

Cheers
 - t


signature.asc
Description: Digital signature


Re: Security issues in Emacs packages

2020-11-25 Thread tomas
On Wed, Nov 25, 2020 at 11:23:27AM +0300, Jean Louis wrote:

[...]

> [...] and not from Chinese distributor [...]

I think this was an unnecessary slur.

Cheers
 - t


signature.asc
Description: Digital signature


Re: Security issues in Emacs packages

2020-11-25 Thread tomas
On Wed, Nov 25, 2020 at 12:26:11PM +0300, Jean Louis wrote:
> * to...@tuxteam.de  [2020-11-25 12:08]:
> > On Wed, Nov 25, 2020 at 11:23:27AM +0300, Jean Louis wrote:
> > 
> > [...]
> > 
> > > [...] and not from Chinese distributor [...]
> > 
> > I think this was an unnecessary slur.
> 
> Why, there is legitimate mirror in China.
> 
> I did not mean nothing wrong with it. I hope nobody gets offended.

I'm not. I don't assume (even suspect) bad intention at all.
And I don't want to make a state affair of it. I just wanted
to mirror the metaphor you used ("Chinese distributor" as
"untrusted instance") which seems somewhat problematic. We
all do this, myself not the least. I'm happy whenever someone
points that out to me.

That's all :-)

Cheers
 - t


signature.asc
Description: Digital signature


Re: bug#44935: Emacs inserts hardwired org-agenda-files variable, overwriting user options

2020-11-30 Thread tomas
On Mon, Nov 30, 2020 at 01:05:15AM +0100, Christopher Dimech wrote:

[...]

> Please follow the commentary in savannah-hackers
> https://lists.nongnu.org/archive/html/savannah-hackers/2020-11/msg00085.html
> 
> I agree fully with Falcon's description.

Just from a sideline: "Falcon's description" pointing to a huge post
with many aspects, some related to here, and some not, doesn't seem
helpful to focus here. Could you state your point (as far as it is
related to the current thread's topic) in a couple of sentences?

Thanks
 - t


signature.asc
Description: Digital signature


Re: Bug: LaTeX inline maths expression \(+\) wrongly toggles strike-through face

2020-12-02 Thread tomas
On Wed, Dec 02, 2020 at 03:19:27AM +0100, Firmin Martin wrote:
> 
> Consider the following lines: 
> - $+$ foobar $+$
> - \[+\] foobar \[+\]
> - $$+$$ foobar $$+$$
> - \(+\) foobar \(+\)
> Each of them is correct LaTeX inline/display maths expressions, but only the
>   last one toggles strike-through face when it shouldn't. 
> 
> Emacs  : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 
> 3.24.20, cairo version 1.16.0)
>  of 2020-10-16
> Package: Org mode version 9.4 (9.4-53-gc97446-elpa)

That's interesting. Happens to me too -- but I don't understand why
the first thre are /not/ rendered as strike-through. The relevant
variables are

 - org-emphasis-regexp-components

in my installation:

   org-emphasis-regexp-components is a variable defined in ‘org.el’.
   Its value is
   ("-[:space:]('\"{" "-[:space:].,:!?;'\")}\\[" "[:space:]" "." 5)
   
   Documentation:
   Components used to build the regular expression for emphasis.
   This is a list with five entries.  Terminology:  In an emphasis string
   like " *strong word* ", we call the initial space PREMATCH, the final
   space POSTMATCH, the stars MARKERS, "s" and "d" are BORDER characters
   and "trong wor" is the body.  The different components in this variable
   specify what is allowed/forbidden in each part:
   
   pre  Chars allowed as prematch.  Beginning of line will be allowed 
too.
   post Chars allowed as postmatch.  End of line will be allowed too.
   border   The chars *forbidden* as border characters.
   body-regexp  A regexp like "." to match a body character.  Don’t use
non-shy groups here, and don’t allow newline here.
   newline  The maximum number of newlines allowed in an emphasis exp.

(I changed the value of newline to 5). Note `border' is just "[[:space:]]",
so I'd expect '$', '\' and '$' (for the first three examples) to be "allowed"
borders, and

 - org-emph-re

which is calculated from the above, and in my box, not suprprisingly,
is

 
"\\([-[:space:]('\"{]\\|^\\)\\(\\([*/_+]\\)\\([^[:space:]]\\|[^[:space:]].*?\\(?:
   .*?\\)\\{0,5\\}[^[:space:]]\\)\\3\\)\\([-[:space:].,:!?;'\")}\\[]\\|$\\)"

...which would confirm my expectation above. So why are the three
examples not rendered as overstrike? There seems to be more magic
involved.

This happens for other emph markers, too.

To work around in your case, Martin, you could try to add a backslash
to your `org-emphasis-regexp-component's third element, like so:

  (setf (nth 3 org-emphasis-regexp-components) "[:space:]")

and reload Org to give it the chance to rebuild org-emph-re.

(Caveat: I didn't try it).

Cheers
 - t


signature.asc
Description: Digital signature


Re: Emacs inserts hardwired org-agenda-files variable, overwriting user options

2020-12-11 Thread tomas
On Fri, Dec 11, 2020 at 05:32:39AM +0100, daniela-s...@gmx.it wrote:

[...]

> There are problems in Org-Agenda my friend [...]

I don't know whether it's your intention (I'm assuming it's not),
but your tone comes across as pretty rude.

Cheers
 - t


signature.asc
Description: Digital signature


Re: Emacs inserts hardwired org-agenda-files variable, overwriting user options

2020-12-11 Thread tomas
On Fri, Dec 11, 2020 at 02:47:27PM +0100, daniela-s...@gmx.it wrote:
> 
> Freak out how much you like but it occurs to me that there is no active
> hacking on org-agenda and adding new features.  Or it may be that there
> are no new ideas and you are getting upset about it.

No need to second-guess me. As Detlef wrote in this thread,
I meant what I wrote -- no more, no less.

Cheers
 - t


signature.asc
Description: Digital signature


Re: Emacs inserts hardwired org-agenda-files variable, overwriting user options

2020-12-11 Thread tomas
On Fri, Dec 11, 2020 at 03:54:01PM +0100, daniela-s...@gmx.it wrote:
> Two countrymen conspiring together.

Calm down. The Germans ain't after you (BTW: I may have a .de
address -- still I am not German. On the Internet, they say,
nobody knows you're a dog [1]).

Cheers

[1] https://en.wikipedia.org/wiki/On_the_Internet%2C_nobody_knows_you're_a_dog

 - t


signature.asc
Description: Digital signature


Re: Org and Hyperbole

2022-06-26 Thread tomas
On Sat, Jun 25, 2022 at 11:37:55PM -0700, Siva Swaminathan wrote:
> Hello,

> [...] I feel that some of the
> questions raised here about Hyperbole sound akin to the story of five
> blind men feeling the elephant [...]

The nice thing about that kind of situation is that it only can improve
by adding in a sixth blind man ;-)

Thank you from someone "too swamped right now to try to tackle another
whole peradigm, but still enormously curious about this thing".

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [more absurd]

2022-07-03 Thread tomas
On Sun, Jul 03, 2022 at 10:24:34PM +0200, Uwe Brauer wrote:
> >>> "BB" == Bruno Barbier  writes:
> 
> > Uwe Brauer  writes:
> >> 
> >> I am confused what is 02 supposed to mean?
> 
> > That's a leading 0 digit, that can be ignored.
> 
> >(string-to-number "02") => 2
> 
> > Alphabetical sorting will see the "0" though and sorts differently.
> 
> But 02 seems to me a wired mathematical notation to say the least. I
> wouldn't use it for sure.

Think bigger: 1024 would sort alphabetically /before/ 22. Do you
really want this?

Cheers
--  
t


signature.asc
Description: PGP signature


Re: [more absurd]

2022-07-03 Thread tomas
On Mon, Jul 04, 2022 at 07:10:27AM +0200, Uwe Brauer wrote:

[...]

> That really su... (My use case only concerned numbers from 0-10).
> 
> So it boils down to the question: why isn't 0 considered as natural numbers, 
> as, according to the Peano axioms, it is?

I don't know whether you're serious or making fun (Poe's Law and
all that), but actually, Peano's axioms couldn't care less: as
far as they are concerned, natural numbers could well start at
23 or something.

Actually it seems to be some kind of "cultural question" whether
mathematicians start counting at 0 or at 1; my observation is
that they tend to agree across one faculty at one university.
I know positively one that tends to count from 1 (HU Berlin),
another that counts from 0 (Freiburg), both in Germany.

Something for mathematical ethnologists (do those exist?) to mull
over.

I once asked a maths prof and he said foundational folks (set
theorists, math logicians -- that's the typical environment
where you'd tend to stumble upon Peano) tend to favour starting
at 0.

Historically, Peano himself seems to have been a one-counter:

  "Peano's original formulation of the axioms used 1 instead
  of 0 as the "first" natural number,[6] while the axioms in
  Formulario mathematico include zero."  as quoted in [1].

Cheers

[1] https://en.wikipedia.org/wiki/Peano_axioms
-- 
t


signature.asc
Description: PGP signature


Re: [more absurd]

2022-07-04 Thread tomas
On Mon, Jul 04, 2022 at 08:46:11AM +0200, Martin Steffen wrote:

[...]

> In some sense that's defendable (that what could call natural numbers is
> a cultural question or historical, like looking at what Peano did nor
> did not define).
> 
> On the other hand, one normally does not just deals with the numbers as
> such, one does something with it (like comparing them or calculating
> with them) [...]

Yes, since Uwe mentioned Peano, that's why I pointed out that
Peano doesn't care (you have to get to algebra, i.e. "up" in
the conventional foundational ladder) for 0 to have a special
role.

About the cultural thing... you seem to be a zero-counter (as
I am, too): there, too, I think that "our" position isn't in
any way "better" -- some theorems look better this way, some
that way; some inductions are easier to start at 1, some at
0.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [more absurd]

2022-07-04 Thread tomas
On Mon, Jul 04, 2022 at 09:42:01AM +0200, Uwe Brauer wrote:

[...]

> That is the first time I remember that on this list, questions of the
> foundation of mathematics are discussed 😉

Such things happen :)

> Back to the point, maybe I am too conservative, but I would include 0
> within the natural numbers,

If you really were, you wouldn't. Peano himself didn't ;-)

> and the example I started with, needs to
> cover that case (student marks range between 0 to 10 both included), so
> sorting should work (for me) in that case.

See? I went to school in Spain, so I know about that 0..10 scale.
But then I went to school in Germany, so I also know about the
6..1 scale. Go figure :)

> I don't see, so far any benefit for not considering 0 in that sorting
> process.

But your concrete problem isn't a sorting process at all, just a
conversion process: empty space gets translated to zero. As someone
else found out in this thread.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Links to javascript-based websites from orgmode.org: Paypal and Github

2022-07-07 Thread tomas
On Thu, Jul 07, 2022 at 11:33:39PM -0400, Richard Stallman wrote:
> [[[ To any NSA and FBI agents reading my email: please consider]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> 
>   > "Note: To be PCI compliant, you must load Stripe.js directly from
>   > https://js.stripe.com. You cannot include it in a bundle or host
>   > it yourself. This package wraps the global Stripe function
>   > provided by the Stripe.js script as an ES module."
> 
> That is hard for me to understand, since I don't know what "PCI
> compliant" means (or who is expected to comply with "PCI" or why).

PCI probably refers to "Payment Card Industry" [1]: they set some
standards people processing payments better follow or else.

It's one of those cases where private industry gets to write things
which amount to law. Much worse than traditional law because there
is no democratic oversight to it.

Typically they tend (by accident or by design) to be hostile to
free software (the above is a good example of how that happens:
they attach some magic property to having "loaded Stripe.js from
[some specific URL]" thus hampering the copy, enhancement or
distribution; you're only allowed to study (unless they serve
obfuscated Javascript: I don't feel like looking).

> Also, what is a "ES module" and what are the implications of that?

That might be an "EcmaScript module" [2], given the context.

> I wonder if users could run the free version of that JS code
> while talking with Stripe.

It's kind of free. If you modify it you stop being compliant,
thus being allowed to use it.

Cheers

[1] https://en.wikipedia.org/wiki/Payment_Card_Industry_Data_Security_Standard
[2] https://flaviocopes.com/es-modules/

-- 
t


signature.asc
Description: PGP signature


Re: [PATCH] Add new entity \-- serving as markup separator/escape symbol

2022-07-28 Thread tomas
On Thu, Jul 28, 2022 at 09:17:32PM +0800, Ihor Radchenko wrote:
> Ihor Radchenko  writes:
> 
> > I am attaching a tentative patch that will make Org export remove
> > zero-width spaces when those spaces actually separate the object
> > boundaries.
> >
> > Any objections?
> 
> Given the raised objections, zero-width space does not appear to be a
> useful escape symbol because it has its valid uses as a standalone space
> symbol.
> 
> The raised objections can be solved using some kind of intricate
> heuristics, but I do not feel like it is a good direction to go. The
> code will be too complex and fragile.
> 
> Therefore, I am proposing a different approach for shielding
> fontification: introducing a special entity.
> 
> The new entity is \--, which is a valid boundary between emphasis
> markup. It will be removed during export (replaced by "").

[...]

I like that approach very much. I'm impressed, really.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: org-time-stamp-custom-formats with out the name of the day of the week

2022-09-03 Thread tomas
On Fri, Sep 02, 2022 at 09:33:40PM +0800, Ihor Radchenko wrote:
> Uwe Brauer  writes:
> 
> > I see, the question simply is this:
> >
> > How can I achieve that org-time-stamp inserts the date *without* the day
> > name?!
> 
> This cannot currently be customized. However, you can change
> org-time-stamp-formats constant. Removing the %a should be safe.

FWIW, I have this in an (eval-after-load 'org ...)

  (setq org-time-stamp-formats
 '("<%Y-%m-%d>" ."<%Y-%m-%d %H:%M>"))

since years (> 5) and haven't observed any side effects. But then
I don't meet every nook and cranny of org (I bow in awe to those
who meet half of them :-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Org Publish HTML and PDF With GPG Files

2022-09-05 Thread tomas
On Mon, Sep 05, 2022 at 09:08:13PM -0700, David Masterson wrote:
> l...@tosk.in writes:
> 
> > Ihor Radchenko yanta...@gmail.com writes:
> >> 
> >> > David Masterson dsmaster...@gmail.com writes:
> >> > 
> >> > > Does org-publish have options for files with org-crypt entries?
> >> > 
> >> > We do not have an explicit option, but you can add org-decrypt-entries
> >> > to your org-export-before-processing-hook.
> >> 
> >> Thanks
> 
> > Is there a specific way of setting this in the config?
> > I tried adding `(add-hook 'org-export-before-processing-hook
> > #'org-decrypt-entries)` to my init.el, but publishing fails with the
> > error "run-hook-with-args: Wrong number of arguments: (0 . 0), 1"
> 
> Been awhile -- what's the purpose of the '#' character?

Its nickname is "sharp-quote" (actually the whole #' thingy is called
like that). As ' is just a shorthand for 'quote' (i.e. 'foo is a
shorthand for (quote foo), #' is a shorthand for 'function, i.e.
#'foo stands for (function foo), meaning "the function the symbol
foo refers to".

Being Emacs Lisp, you could just have said 'foo, but this has quite
a few downsides, one of them being that you blindside your compiler
(And your human readers).

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: per-file (or, really, per buffer) allowing/disallowing code block execution

2022-09-08 Thread tomas
On Thu, Sep 08, 2022 at 12:34:25PM +, Fedja Beader wrote:
> Hello Richard, Ihor and Steven,
> 
> I'm aware that file-local variables exist, but it seems that
> all documentation for them put them *into the file*, which is not secure for 
> files downloaded from the internet. What is to stop a malicious file from 
> setting an "yes, execute me automatically" variable?

While loading the file, only "safe variables" are set without
warning (actually it's a bit more complex: specific variable-
value pairs can be marked as "safe".

See e.g. "12.12 File Local Variables" in the elisp manual.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Apology [was: Re: Org HTML export accessibility (was: org exported pdf files))

2022-09-29 Thread tomas
On Fri, Sep 30, 2022 at 07:05:40AM +1000, Tim Cross wrote:
> 
> Dear all,
> 
> I think I owe everyone an apology [...]

> For those interested and because it might help with understanding in
> this area, I thought I'd outline the actual cause of my frustration [...]

No, I for one are grateful for the chance to understand your
perspective. Lacking your experience, I'm dependent on the
likes of you to get an idea on perspectives I've no experience
with.

So thanks!

Cheers
-- 
tomás 


signature.asc
Description: PGP signature


Re: Break lines in Query replace. Help.

2022-10-08 Thread tomas
On Sat, Oct 08, 2022 at 01:19:28PM +0200, Ypo wrote:
> I want to make a "query replace", where
> 
> " - " should be substituted by
> 
> "breakline - "
> 
> 
> How do I insert in a query replace a breakline?
> 
> "\\ - " seems to work only for LaTeX export.
> 
> "^J - " writes down ^J literally, and doesn't work as a break line.

It's C-Q C-J (aka ^Q^J). The CTRL-Q "quotes" the next char (handy also
for other control characters -- see also 7.1 "Inserting Text" in the
fine manual).

Cheers
-- 
t
> 
> 
> Best regards
> 


signature.asc
Description: PGP signature


Re: GPL violation related to Org by priprietary app (was: Best android app)

2022-10-25 Thread tomas
On Wed, Oct 26, 2022 at 12:12:46AM +1100, Tim Cross wrote:

[...]

> Even if it was violated, this is not something the maintainers are
> empowered to act on anyway [...]

This depends perhaps on what one understands by "act on". If that
means "go to court" you are, of course, right. If that means just
"make aware FSF legal of a possible violation", then the question
here boils just down to "do we have enough confidence to justify
annoying FSF legal with this?

> Also, based on my limited legal experience and past dealings with
> trademarks, copyright and licenses, I don't think there has been either
> a GPL license violation or a trade mark violation.  However, if someone
> believes differently, they should refer the matter to the FSF legal
> office.

Exactly.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: bug#58774: 29.0.50; [WISH]: Let us make EWW browse WWW Org files correctly

2022-10-26 Thread tomas
On Wed, Oct 26, 2022 at 11:16:15PM +0200, Dr. Arne Babenhauserheide wrote:

[...]

> > That is not business of web server, HTTP or browser. Those are
> > delivery, retrieval and presentation tools
> 
> Yet there is so such separation between eww and org-mode.
  

I think this was a typo for "no".

> If you want that separation, you have to open the org-file in a second
> Emacs process.
> 
> If you don’t want that separation, you have to add other precautions.

Agree fully.

And to those saying "...but you do M-x package install, too": it is
much easier to trust a couple of sources (ELPA, the Debian archives,
what have you) than to trust the whole of the Internet (or, to put
it in less confrontative terms, some random web site).

Yes, those few sources can (and ocassionaly do!) go rogue. But trust
is like that.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Error opening an .org file

2022-10-27 Thread tomas
On Thu, Oct 27, 2022 at 05:11:32PM +0200, Renato Pontefice wrote:
> When I try to open a simple file in emacs, I receive this error
> 
> Warning (initialization): An error occurred while loading 
> ‘/Users/renatopontefice/.emacs.d/init.el’:
> 
> Invalid read syntax: ), 1, 0

I don't understand: this error complains about 'init.el', does
not happen at start, but much later, when you try to open an
.org file?

> To ensure normal operation, you should investigate and remove the
> cause of the error in your initialization file.  Start Emacs with
> the ‘--debug-init’ option to view a complete error backtrace. Disable showing 
> Disable logging

Have you tried starting Emacs with that option? What happens
then?

> So the prob is on my init.el file. What error it could be? 

We can only guess. Given our lack of information, our guesses
will be almost certainly wrong :-)

So give us a chance:

 - try starting Emacs with --debug-on-init, an possibly report
   results here
 - try bisecting the file: remove parts of it (always taking
   care of the syntax), see in which "half" the error occurs
 - post your init.el here (BE CAREFUL: please, double-check
   that it doesn't contain sensitive information: passwords,
   personal information, things your employer could consider
   to be trade secrets, that kind of stuff).

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions)

2022-10-28 Thread tomas
On Sat, Oct 29, 2022 at 04:05:19AM +, Ihor Radchenko wrote:
> Rudolf Adamkovič  writes:
> 
> > Ihor Radchenko  writes:
> >
> >> I do not think that it make sense to display that buffer when the code
> >> finishes successfully. I can see this kind of behaviour
> >> breaking/spamming automated scripts or export---code working in the
> >> past may throw error output into unsuspecting users.
> >
> > But the exit code has nothing to do with the standard error.

[...]

> > For example, I use a program for work that uploads data to a certain
> > 3rd-party server.  It exits with a zero code but also shows extremely
> > important notices on error output.  As an "unsuspecting user", if I used
> > Babel to run the program, I would end up in a trouble.

[...]

> Dear All,
> 
> As explained in the above quote, it may be reasonable to display stderr
> in the shell (and possibly other) src blocks upon execution.
> 
> + Stderr may contain important information even if the code block
>   succeeds
> - Displaying stderr will raise *Error* buffer, which may or may not be
>   expected or desired.
> 
> What do you think?

My take as an Org user is that this makes a lot of sense. I don't know
whether there is an elegant way to accomodate all the use cases in
an elegant way, but to provide a concrete example where I'd have found
it handy...

While preparing a handout for an introduction to shell programming
(at a very basic level), I wanted to embed little examples with
their results. Org rocks at this kind of task.

But in this case it's important to show everything the students are
going to see. One could argue that the error part is even the most
important.

So what I needed was not only the stderr (optionally somehow separated
from stdout -- optionally as someone would see it in some terminal
session), but also all the above even when the exit code was nonzero.

Ideally, a display of that exit code, too.

I ended up massaging prologue and epilogue, which worked nicely,
but sadly is language dependent for a set of concepts which are,
one could argue, independent of the language [1].

So yes, I would be thrilled by such a possibility.

Cheers

[1] These are OS conventions. So also a language of sorts, but at
another level.

-- 
tomás


signature.asc
Description: PGP signature


Re: [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions)

2022-10-29 Thread tomas
On Fri, Oct 28, 2022 at 11:43:39PM -0700, Samuel Wales wrote:
> long ago i made the contents of my shell blocks look like this:
> 
> {
>   code
> } 2>&1
> :

As I hinted at, I also wanted to have the exit code documented. So
my setup was a bit more involved than this. Plus, I didn't want all
that code scaffolding to show up in the typeset results (my audience
had enough to digest as it was), so I hid all that in the prologue/
epilogue.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions)

2022-10-29 Thread tomas
On Sat, Oct 29, 2022 at 09:09:04AM +, Ihor Radchenko wrote:
> to...@tuxteam.de writes:
> 
> > As I hinted at, I also wanted to have the exit code documented [...]

> Note that what we are discussing here is different from your
> description. A popup window accumulating stderr is displayed upon code
> evaluation. stderr does not go into results.
> 
> What you are describing would better fit into a new :results option.

Oh, I missed the popup part. Sounds useful for yet another profile,
yes.

Thanks and sorry for the noise.

And thanks for your incredible work on Org. Do you ever sleep?

In awe
-- 
tomás


signature.asc
Description: PGP signature


Re: Position 972

2022-10-29 Thread tomas
On Sat, Oct 29, 2022 at 06:29:28PM +0200, Renato Pontefice wrote:
> Bruno,
> With the common you told me I reach che 972 /M-g c 972) and I found this:
> 
> ;;Org mode configuration
>  Enable Org mode
> (require ‘org)
> 
> Could be this the error?
> 
> Now I’ve erased the two ;; save init.el and restart emacs, but now I obtain:

No, no: you have to put (at least one) ; in front of "Enable".

Thing is: a semicolon marks a comment (so Emacs doesn't try to read
it as a program), and this line "Enable Org mode" is meant as a
comment. The mark is missing.

The whole thing should look like this:

;;Org mode configuration
;; Enable Org mode
(require ‘org)

(actually it doesn't matter how many ; are in front of Enable, but
two would correspond to the convention).

Cheers
-- 
tomás


signature.asc
Description: PGP signature


Re: Position 972

2022-10-29 Thread tomas
On Sat, Oct 29, 2022 at 06:29:33PM +, Juan Manuel Macías wrote:
> Renato Pontefice writes:
> 
> > Symbol's value as variable is void: ‘org
> 
> It's 'org not ‘org. Notice the difference between the quotes[1]. (Did you
> modify that part? It was correct before).

Perhaps it was Google (through gmail) who modified it. They do that kind
of things. We don't know.

@Renato: it seems your init.el is badly mangled. Please, go through it
and look for pieces of private information. If there are any, remove
them and post the rest for us to see (this has been suggested a couple
of times). That will be a lot quicker than to chase every single bug
in the dark.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Position 972

2022-10-29 Thread tomas
On Sat, Oct 29, 2022 at 06:16:30PM +, Juan Manuel Macías wrote:

[...]

> Renato, adding to what Tomas and Bruno have explained to you very well,
> you have another case in the init that you sent me by mail. Notice the
> third line here:

Oh, I get it that Juan Manuel has received one copy of the init.el.

Then I take back my last mail :-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Init.el

2022-10-29 Thread tomas
On Sat, Oct 29, 2022 at 09:08:08PM +0200, Renato Pontefice wrote:
> I’m sorry, but I’m in a big big confusion…I regreat but I’m unable to correct 
> the prob the is originated to my init.el and the conclusion is that I cannot 
> use emac.
> I ask if you can correct my init.el (that I post)

OK, below is your file, each line preceded by >, as is usual
in quoting mails. My comments are mixed in-between, I hope
this is readable for you:

> ;; -ss*- mode: elisp -*-
> 
> 
> ;;--setta il formato della data diversamente --
> ;;(setq-default org-display-custom-times t)
> (setq org-time-stamp-custom-formats '("<%a %d %m %Y>" . "<%a %d %m %Y 
> %H:%M>"))
> 
> ;;- comandi per gestire la grandezza della finestraprincipale di emacs 
> -
> (setq initial-frame-alist
>(append '((width . 200) (height . 400) (top 45) (left 45) ())
>initial-frame-alist))
> 
> ;;---(add-to-list 'default-frame-alist '(height . 24))
> (add-to-list 'default-frame-alist '(width . 80)) 
> 
> ;; fà partire in AGENDA la settimana dal giorno 1---
> (setq calendar-week-start-day 1)
> 
> ;;---settaggi carattere e dimensione di default del carattere--
> (set-face-attribute 'default nil :font "Andale Mono" :height 160 )
> 
> ;; Disable the splash screen (to enable it agin, replace the t with 0)
> (setq inhibit-splash-screen t)
> 
> ;; Enable transient mark mode
> (transient-mark-mode 1)
> 
> ;;Org mode configuration
> Enable Org mode

This "Enable Org mode" has to be preceded by a semicolon,
like so:

  ;; Enable Org mode

(we had this one already)

> (require 'org)

This one is actually unnecessary, because it is done again a couple
of lines below. But it should be harmless.

> 
> ;; Make Org mode work with files ending in .org
> (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
> The above is the default in recent emacsen

This one should be commented out, like the "Enable..." above:

  ;; The above is...

> (require 'org)
> (setq org-log-done t)
> 
> ;; set maximum indentation for description lists
> (setq org-list-description-max-indent 5)
> 
> ;; prevent demoting heading also shifting text inside sections
> (setq org-adapt-indentation nil)
> 
> ;; determina le sequenze di stato al TODO
> (setq org-todo-keywords
>  '((sequence "TODO" "IN-PROGRESS" "WAITING" "DONE")))
> 
> ;;-- file utilizzati  per TODO list in Agenda
> (setq org-agenda-files '( "~/org/agenda/"   
> ;;  "~/org/agenda/amorc.org "
> ;;  "~/org/agenda/amorc.org "
> ;; "~/org/agenda/renato.org "
>  ))
> ;; mappa alcuni tasti per ottenere le parentesi graffe e quadre
> (global-set-key "\M-(" (lambda () (interactive) (insert "{")))
> (global-set-key "\M-)" (lambda () (interactive) (insert "}")))
> (global-set-key "\M-7" (lambda () (interactive) (insert "#")))
> (global-set-key "\M-8" (lambda () (interactive) (insert "[")))
> (global-set-key "\M-9" (lambda () (interactive) (insert "]")))
> 
> (global-set-key "\M-9" (lambda () (interactive) (insert "]")))
> 
> ;;---Aggiunge il TIMESTAMP quando chiudo uno statemet TODO
> (setq org-log-done 'time)
> 
> ;;fa aggiungere una nota di testo quando si chiude un TODO
> (setq org-log-done 'note)
> 
> ;;--setta dei tasti comodi da utilizzare in emacs
> (global-set-key (kbd "C-c l") #'org-store-link)
> (global-set-key (kbd "C-c a") #'org-agenda)
> (global-set-key (kbd "C-c c") #'org-capture)
> 
> ;;--- azioni applicate ai TODO
> (setq org-todo-keywords
>  '((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED")))
> (custom-set-variables

The above should be commented out, since the rest of the expression
is commented out, too. Otherwise you get unbalanced parentheses.
Change the above line to this:

  ;; (custom-set-variables

>  ;;custom-set-variables was added by Custom.
>  ;;If you edit it by hand, you could mess it up, so be careful.
> ;; Your init file should contain only one such instance.
> ;; If there is more than one, they won't work right.
> ;; '(package-selected-packages '(org-contacts frame-tabs ebdb)))
> ::(custom-set-faces
> ;;  custom-set-faces was added by Custom.
> ;; If you edit it by hand, you could mess it up, so be careful.
> ;; Your init file should contain only one such instance.
> ;; If there is more than one, they won't work right.
> ;;)
> ;;-apre emacs-org mode in modalità Agenda
> (org-agenda-list)
> (delete-other-windows)

With these changes the file parses successfully in "my" Emacs.

Hope that helps

-- 
tomás


signature.asc
Description: PGP signature


Re: [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions)

2022-10-29 Thread tomas
On Sun, Oct 30, 2022 at 03:31:32AM +, Ihor Radchenko wrote:
> to...@tuxteam.de writes:
> 
> >> What you are describing would better fit into a new :results option.
> >
> > Oh, I missed the popup part. Sounds useful for yet another profile,
> > yes.
> 
> If you need it, feel free to open a separate feature request for extra
> :results options in ob-shell. Possibly providing more details how you
> envision this header argument to work.

I'll mull over it. Perhaps I come up with some (patch) proposal.

> > And thanks for your incredible work on Org. Do you ever sleep?
> 
> Remember that we may have radically different time zones. What appears
> to be nightly emails may not necessarily be sent at night. 

I'm aware of that. My awe is more directed at your bandwidth than at
your timings.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions)

2022-10-30 Thread tomas
On Sun, Oct 30, 2022 at 07:09:30AM +, Ihor Radchenko wrote:
> to...@tuxteam.de writes:
> 
> >> If you need it, feel free to open a separate feature request for extra
> >> :results options in ob-shell. Possibly providing more details how you
> >> envision this header argument to work.
> >
> > I'll mull over it. Perhaps I come up with some (patch) proposal.
> 
> Thinking more about it in the context of the current feature request,
> displaying the stderr buffer unconditionally may be undesired when the
> script already does 2>&1 or, potentially, uses imaginary :results stderr
> header argument.

Definitely. It's not for everyone.

> >> > And thanks for your incredible work on Org. Do you ever sleep?

[...]

> I use Org mode and Org agenda to manage the maintenance 😀

Still genuinely impressed.

Cheers
-- 
t


signature.asc
Description: PGP signature


  1   2   3   >