Re: [PATCH] Fix some emacs-30 byte-compile warnings

2023-02-17 Thread Robert Pluim
>>>>> On Fri, 17 Feb 2023 14:08:04 +, Ihor Radchenko  
>>>>> said:

Ihor> Robert Pluim  writes:
Ihor> 3 unexpected results:
Ihor> FAILED  test-org-table/copy-field
Ihor> FAILED  test-org-table/references/mode-string-N
Ihor> FAILED  test-org-table/references/mode-string-none
>> 
>> Hmm, at least the first one is because the code in the 't' branch of
>> (if (and (eq elements "") (not keep-empty))
>> 
>> in org-table-make-reference now runs, and it results in
>> 
>> (eval '(identity))'
>> 
>> Of course fixing that causes other problems 

Ihor> Meanwhile, I fixed all the other warnings.
Ihor> 
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=eea8da0315b4d9c43272f4ee87d752e651f1a0c0
Ihor> Now, only this org-table problem remains.

Ihor> It is clearly a bug of some kind - the code is not doing what it
Ihor> intended originally. But we need to understand org-table.el better to
Ihor> fix this...

Iʼve not had time to look at it further (probably my subconscious not
wanting to deal with org-table.el :-))

Robert
-- 



Re: [PATCH] Fix one remaining emacs-30 byte-compile warning

2023-01-25 Thread Robert Pluim
> On Tue, 24 Jan 2023 10:29:17 +0100, Arash Esbati  said:

Arash> Hi all,
Arash> Robert sent a patch[1] which pacifies emacs-30 compiler warning.  He
Arash> missed one which is fixed by the patch below.  It is against org-mode
Arash> master (6b15897a56).

I didnʼt miss it, it was next on my list, since I didnʼt want to mix
different types of fixes in the same commit. Of course my fixes are
incomplete, as Ihor has pointed out, so more work is needed there. 

Arash> +use it to set a major mode there, e.g.,

I prefer ':' to ',' in such situations, but I donʼt recall what the
official position is (if there is one).

Robert
-- 



Re: [PATCH] Fix some emacs-30 byte-compile warnings

2023-01-23 Thread Robert Pluim
>>>>> On Mon, 23 Jan 2023 14:04:42 +, Ihor Radchenko  
>>>>> said:

Ihor> Robert Pluim  writes:
>> The emacs 30 byte-compiler warns about uses of `eq'
>> and similar with constant strings which might have unintended
>> semantics. Patch is against emacs master.

Ihor> Thanks, but it will break some tests:

Ihor> 3 unexpected results:
Ihor>FAILED  test-org-table/copy-field
Ihor>FAILED  test-org-table/references/mode-string-N
Ihor>FAILED  test-org-table/references/mode-string-none

Hmm, at least the first one is because the code in the 't' branch of
(if (and (eq elements "") (not keep-empty))

in org-table-make-reference now runs, and it results in

(eval '(identity))'

Of course fixing that causes other problems 

Iʼll get back to this maybe tomorrow.

Robert
-- 



[PATCH] Fix some emacs-30 byte-compile warnings

2023-01-23 Thread Robert Pluim


The emacs 30 byte-compiler warns about uses of `eq'
and similar with constant strings which might have unintended
semantics. Patch is against emacs master.

-- >8 --
* lisp/org/ob-octave.el (org-babel-octave-evaluate-session): Use
`delete' instead of `delq' when deleting a constant string.
* lisp/org/org-agenda.el (org-agenda-format-item): Use `string=' when
comparing to a constant string.
* lisp/org/org-element.el (org-element-cache-map): Use `equal' when
comparing to a constant list.
* lisp/org/org-table.el (org-table-make-reference): Use `string=' when
comparing to a constant string.
---
diff --git c/lisp/org/ob-octave.el i/lisp/org/ob-octave.el
index 9bf16b9849..e411961e92 100644
--- c/lisp/org/ob-octave.el
+++ i/lisp/org/ob-octave.el
@@ -243,7 +243,7 @@ org-babel-octave-evaluate-session
   (`output
(setq results
 (if matlabp
-(cdr (reverse (delq "" (mapcar #'org-strip-quotes
+(cdr (reverse (delete "" (mapcar #'org-strip-quotes
(mapcar #'org-trim raw)
   (cdr (member org-babel-octave-eoe-output
(reverse (mapcar #'org-strip-quotes
diff --git c/lisp/org/org-agenda.el i/lisp/org/org-agenda.el
index 2d194ad341..b0587d5d92 100644
--- c/lisp/org/org-agenda.el
+++ i/lisp/org/org-agenda.el
@@ -7326,7 +7326,7 @@ org-agenda-format-item
  (let ((s (org-format-outline-path 
(org-get-outline-path)
(1- 
(frame-width))
nil 
org-agenda-breadcrumbs-separator)))
-   (if (eq "" s) "" (concat s 
org-agenda-breadcrumbs-separator))
+   (if (string= "" s) "" (concat s 
org-agenda-breadcrumbs-separator))
(setq time (cond (s2 (concat
  (org-agenda-time-of-day-to-ampm-maybe s1)
  "-" (org-agenda-time-of-day-to-ampm-maybe s2)
diff --git c/lisp/org/org-element.el i/lisp/org/org-element.el
index 389acf8250..e427966f57 100644
--- c/lisp/org/org-element.el
+++ i/lisp/org/org-element.el
@@ -7558,7 +7558,7 @@ org-element-cache-map
  ;; beginning.
  (next-element-re (pcase granularity
 ((or `headline
- (guard (eq '(headline)
+ (guard (equal '(headline)
 restrict-elements)))
  (cons
   (org-with-limited-levels
@@ -7566,7 +7566,7 @@ org-element-cache-map
   'match-beg))
 (`headline+inlinetask
  (cons
-  (if (eq '(inlinetask) restrict-elements)
+  (if (equal '(inlinetask) 
restrict-elements)
   (org-inlinetask-outline-regexp)
 org-element-headline-re)
   'match-beg))
diff --git c/lisp/org/org-table.el i/lisp/org/org-table.el
index 5116b1127f..fbfdc253f9 100644
--- c/lisp/org/org-table.el
+++ i/lisp/org/org-table.el
@@ -2861,7 +2861,7 @@ org-table-make-reference
   (if lispp
  (if (eq lispp 'literal)
  elements
-   (if (and (eq elements "") (not keep-empty))
+   (if (and (string= elements "") (not keep-empty))
""
  (prin1-to-string
   (if numbers (string-to-number elements) elements

Robert
-- 



Re: [off topic] List all non-latin characters in a buffer

2022-09-09 Thread Robert Pluim
> On Fri, 19 Aug 2022 16:50:54 +0200, Uwe Brauer  said:

 "JMM" == Juan Manuel Macías  writes:
Uwe> Hi Juan


>> Sorry for the offtopic, but I thought this homemade function I wrote
>> some time ago for my work might perhaps be useful to some Orgers. When
>> executed in a buffer, the `list-non-latin-chars' function opens a window
>> displaying a list of all the non (basic) Latin characters present in
>> that document. Each item in the list contains the character, its Unicode
>> canonical name, and its hexadecimal code. For example:

Uwe> Very very nice,

Uwe> Till now I used only a very simple search function

Uwe> (defun my-search-no-ascii ()
Uwe> "Simple function to search for no ASCII symbols in a file."
Uwe>   (interactive)
Uwe>   (skip-chars-forward "\001-\177"))

Equivalently you can do
 (skip-chars-forward "[[:ascii:]]")

(or use `re-search-forward' with the [:nonascii:] character class.)

Robert
-- 



Re: [SOLVED] Re: Something has happened such that I can't export to latex

2022-07-31 Thread Robert Pluim
> On Sat, 30 Jul 2022 08:25:46 +0100, Sharon Kimble 
>  said:
Sharon> ===
Sharon> /autogen.sh
Sharon> /configure
Sharon> make bootstrap
Sharon> make
Sharon> ===

Sharon> And I suspect that the lone 'make' caused the problems, but I 
haven't done a test build to try it out.

Sharon> I don't know where I got the bootstrap build mantra from, I must've 
found it online somewhere some time ago.

If youʼve got a completely clean Emacs checkout, then thereʼs no real
difference between 'make' and 'make bootstrap'. The thing to know
about 'make bootstrap' is that you donʼt need to run 'make' again
afterwards, since everything will already have been built.

Sharon> But thank you to all who tried to find a solution.

Iʼm glad you sorted it.

Robert
-- 



Re: Something has happened such that I can't export to latex

2022-07-29 Thread Robert Pluim
> On Fri, 29 Jul 2022 13:24:46 +0100, Sharon Kimble 
>  said:
>> What does your local.mk contain? I donʼt think the default org
>> makefile references loadup.el anywhere.
>> 

Sharon> Does this help? Its been a very long time since I looked at it, and 
I don't think that I changed anything in it then.

Hmm, that doesnʼt reference loadup.el at all, which is normally passed
to temacs during the Emacs build process, not when running emacs
itself. Can you try removing the ʼ@ʼ from the start of the lines in
the recipe for $(LISPI) in lisp/Makefile and re-running the make? If
that contains loadup we need to figure out why.

Robert
-- 



Re: Something has happened such that I can't export to latex

2022-07-29 Thread Robert Pluim
> On Fri, 29 Jul 2022 09:48:09 +0100, Sharon Kimble 
>  said:

Sharon> Morning all.

Sharon> =
Sharon> foo$ git pull
Sharon> From https://git.savannah.gnu.org/git/emacs/org-mode
Sharon>5be0c709b3..d37c0ee5fa  main   -> origin/main
Sharon> Updating 5be0c709b3..d37c0ee5fa
Sharon> Fast-forward
Sharon>  lisp/org.el  | 2 +-
Sharon>  lisp/ox-latex.el | 7 +--
Sharon>  mk/org-fixup.el  | 2 +-
Sharon>  3 files changed, 7 insertions(+), 4 deletions(-)

Sharon> foo$ make autoloads
Sharon> make -C lisp autoloads
Sharon> make[1]: Entering directory '/home/boudiccas/git/org-mode/lisp'
Sharon> rm -f org-version.el org-loaddefs.el org-version.elc 
org-loaddefs.elc org-install.elc
Sharon> org-version: 9.5.4 (release_9.5.4-684-gd37c0e)
Sharon> Warning: Lisp directory '/usr/local/share/emacs/29.0.50/lisp': No 
such file or directory
Sharon> Cannot open load file: No such file or directory, loadup.el
Sharon> make[1]: *** [Makefile:72: org-version.el] Error 255
Sharon> make[1]: Leaving directory '/home/boudiccas/git/org-mode/lisp'
Sharon> make: *** [mk/targets.mk:133: autoloads] Error 2
Sharon> =

What does your local.mk contain? I donʼt think the default org
makefile references loadup.el anywhere.

Robert
-- 



Re: [PATCH] describe how to override Author

2022-06-30 Thread Robert Pluim
>>>>> On Thu, 30 Jun 2022 21:19:36 +0800, Ihor Radchenko  
>>>>> said:

Ihor> Robert Pluim  writes:
>> >> Occasional committers would probably not read org-maintenance.org, and
>> >> those are the people this section is aimed at, I think. Plus itʼs the
>> >> kind of thing you need to catch early: once the commit has been pushed
>> >> itʼs too late.
>> 
Ihor> Not really. org-contribute.org is the page directly linked from
Ihor> orgmode.org. It is aiming for new contributors with no write access.
>> 
>> This particular change is in "Your first commit as an Org
>> maintainer". Perhaps that node should be moved to org-maintenance.org?

Ihor> I do not think so. I am seeing this section as a "crash course" for 
the
Ihor> new maintainers. We should only provide the critical information 
there.
Ihor> Not too much, not too less. Something to not scare people with the
Ihor> details.

I guess we disagree about whether knowing about the distinction
between 'Author:' and 'Commit:' is critical or not. For a free
software project correct attribution of changes is very important, so
committers should pay attention to it (and by extension the
documentation should educate them about it at the earliest
opportunity). But youʼre the maintainer :-)

Ihor> The elaborate details should be in org-maintenance.org, which is
Ihor> directly mentioned at the end of the "first commit" section.

In "Where can I track bugs, patches and updates?" or somewhere else?
BTW, Iʼm having trouble parsing this sentence from there:

You don't much more: confirming bugs is a critical contribution.

Thereʼs at least one word missing betweeen "donʼt" and "much" there.

Robert
-- 



Re: [PATCH] describe how to override Author

2022-06-30 Thread Robert Pluim
>>>>> On Wed, 29 Jun 2022 18:10:00 +0800, Ihor Radchenko  
>>>>> said:

Ihor> Robert Pluim  writes:

>> Iʼd be worried if the org maintainer(s) didnʼt know how to override
>> Author :-)

Ihor> I have bad news for you... Simply because I never ever had a need to 
do
Ihor> it :) Not like selecting this option from Magit dispatch is difficult.

But you were at least aware that it was possible :-)

>> Occasional committers would probably not read org-maintenance.org, and
>> those are the people this section is aimed at, I think. Plus itʼs the
>> kind of thing you need to catch early: once the commit has been pushed
>> itʼs too late.

Ihor> Not really. org-contribute.org is the page directly linked from
Ihor> orgmode.org. It is aiming for new contributors with no write access.

This particular change is in "Your first commit as an Org
maintainer". Perhaps that node should be moved to org-maintenance.org?

Ihor> More elaborate things like backwards compatibility, copyright process
Ihor> assistance, etc are documented in org-maintenance.org.
Ihor> Modifying submitted diffs/patches appears to lay within the more
Ihor> elaborate category IMHO.

Ihor> I guess that you intended to attach the updated patch, but haven't?

No, since weʼre still discussing where it should go.

Robert
-- 



Re: [PATCH] describe how to override Author

2022-06-28 Thread Robert Pluim
>>>>> On Mon, 27 Jun 2022 17:53:30 +0800, Ihor Radchenko  
>>>>> said:

Ihor> Robert Pluim  writes:
>> diff --git a/org-contribute.org b/org-contribute.org

Ihor> Maybe add the details to org-maintenance.org instead?
Ihor> This is more of a technical detail needed for maintainers, not for the
Ihor> committers.

Iʼd be worried if the org maintainer(s) didnʼt know how to override
Author :-)

Occasional committers would probably not read org-maintenance.org, and
those are the people this section is aimed at, I think. Plus itʼs the
kind of thing you need to catch early: once the commit has been pushed
itʼs too late.

>> +1. Command line: src_sh{git commit --author='First Last 
'}

Ihor> I think we usually prefer source blocks to inline source blocks.

OK, changed.

>> +2. =VC=: Set the 'Author:' field in log-edit mode (requires setting
>> +   `log-edit-setup-add-author').

Ihor> 'Author:' -> =Author:=
Ihor> `log-edit-setup-add-author' -> ~log-edit-setup-add-author~ 

OK, changed.

Robert
-- 



[PATCH] describe how to override Author

2022-06-26 Thread Robert Pluim


Robert> The thing thatʼs missing is any discussion of how to ensure the 
Author
Robert> of the commit is set correctly. When applying git patches it all
Robert> works, but not when applying diffs. Iʼll read through the
Robert> org-contribute section and see if I can come up with some verbiage.

Something like this? (I hope Iʼve got the syntax right, I seldom write
org for exporting purposes). The emacs CONTRIBUTE guidelines talk
about setting 'Author', but I guess not everyone reads those...

diff --git a/org-contribute.org b/org-contribute.org
index a3cb6f2b..c01bf417 100644
--- a/org-contribute.org
+++ b/org-contribute.org
@@ -270,6 +270,19 @@ * Your first commit as an Org maintainer
 locally and make sure you have a clean commit history before merging
 it into the =bugfix= or =main= branch.
 
+When applying patches written by other people, please ensure that the
+=Author= information of the resulting commit(s) is correct.  When
+applying patches created with =git format-patch= this will happen
+automatically, but when applying simple diffs you will need to
+override the author. Here are three ways to do that, depending on
+which method you use to commit to git:
+
+1. Command line: src_sh{git commit --author='First Last '}
+2. =VC=: Set the 'Author:' field in log-edit mode (requires setting
+   `log-edit-setup-add-author').
+3. =Magit=: Override the author using the =-A= flag from magit's commit
+   transient.
+
 To check our Git workflow in more details, please read 
[[file:org-maintenance.org][Org maintenance]].
 
 * Commit messages and ChangeLog entries



Re: ox-latex table tabbing support.

2022-06-26 Thread Robert Pluim
> On Sat, 25 Jun 2022 11:32:21 +0800, Ihor Radchenko  
> said:

Ihor> em...@vergauwen.me writes:
>> Hi Robert, 
>> I used the instructions provide on 
>> https://orgmode.org/worg/org-contribute.html#first-patch.
>> For me, it was a first too, send a patch via email. Can I 
>> prevent these issues in the future or use a different method
>> to send my patches?

I donʼt think you did anything wrong, although if you'd committed the
changes locally and run 'git format-patch' to produce the patch file,
your authorship would have been included (Ihor's link below discusses
it at length)

Ihor> I think we describe one method in
Ihor> https://orgmode.org/worg/org-contribute.html#org5355fd7

Ihor> You can also find my personal suggestions and walkthrough in
Ihor> https://orgmode.org/list/87levyzwsk.fsf@localhost

The thing thatʼs missing is any discussion of how to ensure the Author
of the commit is set correctly. When applying git patches it all
works, but not when applying diffs. Iʼll read through the
org-contribute section and see if I can come up with some verbiage.

Robert
-- 



Re: ox-latex table tabbing support.

2022-06-24 Thread Robert Pluim
>>>>> On Fri, 24 Jun 2022 17:20:37 +0300, Daniel Fleischer  
>>>>> said:

Daniel> Robert Pluim [2022-06-24 Fri 15:37]  wrote:
>> Hi Daniel, I see this was committed with you as Author: and Bob as
>> Created-by:, which is somewhat unusual. I canʼt find anything about
>> Created-by in the descriptions of org-mode's processes (and this is
>> the only instance I can see in the commit logs).

Daniel> That patch was actually just a diff, so I created a commit so it was
Daniel> my name. I came up with the "created-by" field to
Daniel> attribute the work to Bob. Is there another way it should have been 
done?

git commit --author='Bob Vergauwen '

which would show you as the committer, and Bob as the author.

Robert
-- 



Re: ox-latex table tabbing support.

2022-06-24 Thread Robert Pluim
> On Tue, 21 Jun 2022 07:43:12 +0300, Daniel Fleischer  
> said:

Daniel> Hi Bob,
Daniel> Thank you very much for the patch. It was merged to master in 
4a0d951c.
Daniel> Also, you were added to the orgmode contributes at
Daniel> https://orgmode.org/worg/contributors.html.

Hi Daniel, I see this was committed with you as Author: and Bob as
Created-by:, which is somewhat unusual. I canʼt find anything about
Created-by in the descriptions of org-mode's processes (and this is
the only instance I can see in the commit logs).

Robert
-- 



Re: [PATCH v3] ol.el: add description format parameter to org-link-parameters

2022-06-21 Thread Robert Pluim
> On Tue, 21 Jun 2022 13:03:32 +0100, Hugo Heagren  said:

Hugo> They're very nearly just right, but for some reason
Hugo> `test-ol-with-link-parameters-as' doesn't always reset the parameters
Hugo> correctly for me. However I have them set to originally, it sets
Hugo> `:default-description' to a lambda. This might be a quirk at my end
Hugo> though -- if someone else could have a look I'd be very grateful.

They way your macro is defined, it uses `orig-parameters' in a way
that it will leak into the global namespace. Better would be to do

(let ((orig-parameters org-link-parameters))
   ...
  (setq org-link-parameters orig-parameters)

Robert
-- 



[PATCH] org.el (org-read-date): Point to Info documentation

2022-06-21 Thread Robert Pluim
I was just about to start implementing calendar navigation commands
for org-read-date, except that they all already exist :-). Theyʼre
just not documented in the docstring, only in the manual. Patch
adding a cross-reference attached.

Robert
-- 
>From bded6dfd8d6340d8330f8c1f11a46a140082f3b5 Mon Sep 17 00:00:00 2001
From: Robert Pluim 
Date: Tue, 21 Jun 2022 11:36:24 +0200
Subject: [PATCH] org.el (org-read-date): Point to Info documentation

* lisp/org.el (org-read-date): Add reference to Info documentation,
mainly because that describes all the available calendar navigation
commands.
---
 lisp/org.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/org.el b/lisp/org.el
index 5b034ae12..c1fb8df4f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13327,6 +13327,9 @@ (defun org-read-date ( with-time to-time from-string prompt
 While prompting, a calendar is popped up - you can also select the
 date with the mouse (button 1).  The calendar shows a period of three
 months.  To scroll it to other months, use the keys `>' and `<'.
+There are many other calendar navigation commands available, see
+Info node `(org) The date/time prompt' for a full list.
+
 If you don't like the calendar, turn it off with
(setq org-read-date-popup-calendar nil)
 
-- 
2.35.1.607.gf01e51a7cf



Re: [PATCH] Don't quote symbols in defcustom types

2022-06-14 Thread Robert Pluim
>>>>> On Tue, 14 Jun 2022 22:19:23 +0800, Ihor Radchenko  
>>>>> said:

Ihor> Robert Pluim  writes:
>>>>>>> On Tue, 14 Jun 2022 22:04:10 +0800, Ihor Radchenko 
 said:
>> 
Ihor> Daniel Fleischer  writes:
>> >> Thanks for the patch, merged. 
>> 
Ihor> BTW, should it be a TINYCHANGE?
>> 
>> What's a TINYCHANGE?

Ihor> See https://orgmode.org/worg/org-contribute.html#first-patch
Ihor> We need to put this word at the end of commit messages for 
contributors
Ihor> without FSF copyright assignment.

The first patch I sent last week in <87ilp81pcx@gmail.com>
mentioned that I have assigned copyright to the FSF for Emacs.

Robert
-- 



Re: [PATCH] Don't quote symbols in defcustom types

2022-06-14 Thread Robert Pluim
> On Tue, 14 Jun 2022 22:04:10 +0800, Ihor Radchenko  
> said:

Ihor> Daniel Fleischer  writes:
>> Thanks for the patch, merged. 

Ihor> BTW, should it be a TINYCHANGE?

What's a TINYCHANGE?

Robert
-- 



Re: [PATCH] Don't quote symbols in defcustom types

2022-06-14 Thread Robert Pluim
>>>>> On Tue, 14 Jun 2022 13:12:54 +0300, Daniel Fleischer  
>>>>> said:

Daniel> Robert Pluim [2022-06-14 Tue 11:28] wrote:
>> A couple of places in org main quoted symbols in defcustom types, but
>> the type itself is already quoted, so thatʼs not necessary.

Daniel> Is it harmful though?

Thereʼs the absolutist argument of "itʼs wrong!", or the practical
argument of "it causes warnings when byte compiling". Take your pick.

>> -  (const :tag "Overlays" 'overlays)
>> -  (const :tag "Text properties" 'text-properties)))
>> +  (const :tag "Overlays" overlays)
>> +  (cnost :tag "Text properties" text-properties)))

Daniel> Typo here `cnost`.

Of course there is. Murphy and all that. Updated patch attached

Robert
-- 


>From 2c75a28bff8842f731611ebd7838c5f13122ac4d Mon Sep 17 00:00:00 2001
From: Robert Pluim 
Date: Mon, 13 Jun 2022 16:15:10 +0200
Subject: [PATCH] Don't quote symbols in defcustom types

* lisp/org-fold-core.el (org-fold-core-style):
* lisp/org-persist.el (org-persist-remote-files):
(org-persist-default-expiry):
Don't quote the symbol given as value for a const.
---
 lisp/org-fold-core.el | 4 ++--
 lisp/org-persist.el   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/org-fold-core.el b/lisp/org-fold-core.el
index 5dda133fb..3ba63b725 100644
--- a/lisp/org-fold-core.el
+++ b/lisp/org-fold-core.el
@@ -302,8 +302,8 @@ (defcustom org-fold-core-style 'text-properties
   :group 'org
   :package-version '(Org . "9.6")
   :type '(choice
-  (const :tag "Overlays" 'overlays)
-  (const :tag "Text properties" 'text-properties)))
+  (const :tag "Overlays" overlays)
+  (const :tag "Text properties" text-properties)))
 
 (defvar-local org-fold-core-isearch-open-function #'org-fold-core--isearch-reveal
   "Function used to reveal hidden text found by isearch.
diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index 068f58cec..ab1365220 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -196,7 +196,7 @@ (defcustom org-persist-remote-files 100
   :type '(choice (const :tag "Never" nil)
  (const :tag "Always" t)
  (number :tag "Keep not more than X files")
- (const :tag "Check if exist on remote" 'check-existence)))
+ (const :tag "Check if exist on remote" check-existence)))
 
 (defcustom org-persist-default-expiry 30
   "Default expiry condition for persistent data.
@@ -207,7 +207,7 @@ (defcustom org-persist-default-expiry 30
 it should be a function returning non-nil when the data is expired.  The
 function will be called with a single argument - collection."
   :group 'org-persist
-  :type '(choice (const :tag "Never" 'never)
+  :type '(choice (const :tag "Never" never)
  (const :tag "Always" nil)
  (number :tag "Keep N days")
  (function :tag "Function")))
-- 
2.35.1.607.gf01e51a7cf



Re: [PATCH] New remote resource download policy

2022-06-14 Thread Robert Pluim
> On Sun, 12 Jun 2022 22:43:07 +0800, Timothy  said:

Timothy> Hi All,
Timothy> As was raised in the `#+include: URL' thread
Timothy> (), currently 
Org will
Timothy> automatically download files without confirmation in various 
circumstances.

Timothy> This patch introduces two variables to control Org’s attitude 
towards
Timothy> downloading files, and hooks them into the relevant parts of the 
codebase.

I think that would be a good addition. 
 
Timothy> +(defcustom org-download-remote-resources 'prompt
Timothy> +  "The policy applied to requests to obtain remote resources.
Timothy> +
Timothy> +This affects keywords like #+setupfile and #+incude on export,
Timothy> +`org-persist-write:url',and `org-attach-attach' in
Timothy> +non-interactive Emacs sessions.
Timothy> +
Timothy> +This recognises four possible values:
Timothy> +- t, remote resources should always be downloaded.
Timothy> +- prompt, you will be prompted to download resources nt 
considered safe.

'prompted when downloading unsafe resources'

maybe?

Does this need a 'prompt-always option? I guess thatʼs what you get
with the default value of `org-safe-remote-resources', but maybe it
makes sense to be explicit?

Robert
-- 



[PATCH] Don't quote symbols in defcustom types

2022-06-14 Thread Robert Pluim

A couple of places in org main quoted symbols in defcustom types, but
the type itself is already quoted, so thatʼs not necessary.

Thanks

Robert
-- 
>From 3163652a7eecbf84c767c6740822e00cf842e607 Mon Sep 17 00:00:00 2001
From: Robert Pluim 
Date: Mon, 13 Jun 2022 16:15:10 +0200
Subject: [PATCH] Don't quote symbols in defcustom types

* lisp/org-fold-core.el (org-fold-core-style):
* lisp/org-persist.el (org-persist-remote-files):
(org-persist-default-expiry):
Don't quote the symbol given as value for a const.
---
 lisp/org-fold-core.el | 4 ++--
 lisp/org-persist.el   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/org-fold-core.el b/lisp/org-fold-core.el
index 5dda133fb..939702c5c 100644
--- a/lisp/org-fold-core.el
+++ b/lisp/org-fold-core.el
@@ -302,8 +302,8 @@ (defcustom org-fold-core-style 'text-properties
   :group 'org
   :package-version '(Org . "9.6")
   :type '(choice
-  (const :tag "Overlays" 'overlays)
-  (const :tag "Text properties" 'text-properties)))
+  (const :tag "Overlays" overlays)
+  (cnost :tag "Text properties" text-properties)))
 
 (defvar-local org-fold-core-isearch-open-function #'org-fold-core--isearch-reveal
   "Function used to reveal hidden text found by isearch.
diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index 068f58cec..ab1365220 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -196,7 +196,7 @@ (defcustom org-persist-remote-files 100
   :type '(choice (const :tag "Never" nil)
  (const :tag "Always" t)
  (number :tag "Keep not more than X files")
- (const :tag "Check if exist on remote" 'check-existence)))
+ (const :tag "Check if exist on remote" check-existence)))
 
 (defcustom org-persist-default-expiry 30
   "Default expiry condition for persistent data.
@@ -207,7 +207,7 @@ (defcustom org-persist-default-expiry 30
 it should be a function returning non-nil when the data is expired.  The
 function will be called with a single argument - collection."
   :group 'org-persist
-  :type '(choice (const :tag "Never" 'never)
+  :type '(choice (const :tag "Never" never)
  (const :tag "Always" nil)
  (number :tag "Keep N days")
  (function :tag "Function")))
-- 
2.35.1.607.gf01e51a7cf



[PATCH] Escape single left quotes in docstrings

2022-06-14 Thread Robert Pluim

The emacs-29 byte compiler now complains about unescaped single left
quote. Patch attached.

Robert
-- 
>From d86ba4e5522a33f6960207327f6a84b58caa3d04 Mon Sep 17 00:00:00 2001
From: Robert Pluim 
Date: Tue, 14 Jun 2022 11:29:12 +0200
Subject: [PATCH] Escape single left quotes in docstrings

* lisp/ob-core.el (org-babel-default-header-args):
* lisp/ob-julia.el (org-babel-julia-evaluate-external-process):
(org-babel-julia-evaluate-session):
* lisp/ob-lua.el (org-babel-lua-read-string):
* lisp/ob-table.el (org-sbe):
* lisp/oc-basic.el (org-cite-basic--shorten-names):
* lisp/org-agenda.el (org-agenda-sorting-strategy):
(org-agenda--mark-blocked-entry):
(org-agenda-set-restriction-lock):
* lisp/org-fold-core.el (org-fold-core--specs):
(org-fold-core-remove-folding-spec):
(org-fold-core-get-folding-spec):
(org-fold-core--isearch-overlays):
* lisp/org-plot.el (org--plot/prime-factors):
* lisp/org-table.el (org-table-collapse-header):
* lisp/org.el (org-special-ctrl-o):
(org-latex-to-html-convert-command):
* lisp/ox-html.el (org-html--unlabel-latex-environment):
* lisp/ox-publish.el (org-publish-find-property):
Use \\=' when there's a need for a single left quote in a docstring.

The emacs-29 byte compiler complains about such usage.
---
 lisp/ob-core.el   | 2 +-
 lisp/ob-julia.el  | 8 
 lisp/ob-lua.el| 2 +-
 lisp/ob-table.el  | 2 +-
 lisp/oc-basic.el  | 2 +-
 lisp/org-agenda.el| 6 +++---
 lisp/org-fold-core.el | 8 
 lisp/org-plot.el  | 2 +-
 lisp/org-table.el | 2 +-
 lisp/org.el   | 4 ++--
 lisp/ox-html.el   | 2 +-
 lisp/ox-publish.el| 2 +-
 12 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 09d6adfe0..bfb263cfb 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -484,7 +484,7 @@ (defvar org-babel-default-header-args
 evaluates to a string.  The closure is evaluated when the source
 block is being evaluated (e.g. during execution or export), with
 point at the source block.  It is not possible to use an
-arbitrary function symbol (e.g. 'some-func), since org uses
+arbitrary function symbol (e.g. \\='some-func), since org uses
 lexical binding.  To achieve the same functionality, call the
 function within a closure (e.g. (lambda () (some-func))).
 
diff --git a/lisp/ob-julia.el b/lisp/ob-julia.el
index abddca361..be0110f48 100644
--- a/lisp/ob-julia.el
+++ b/lisp/ob-julia.el
@@ -250,8 +250,8 @@ (defun org-babel-julia-evaluate
 (defun org-babel-julia-evaluate-external-process
 (body result-type result-params column-names-p)
   "Evaluate BODY in external julia process.
-If RESULT-TYPE equals 'output then return standard output as a
-string.  If RESULT-TYPE equals 'value then return the value of the
+If RESULT-TYPE equals \\='output then return standard output as a
+string.  If RESULT-TYPE equals \\='value then return the value of the
 last statement in BODY, as elisp."
   (cl-case result-type
 (value
@@ -274,8 +274,8 @@ (defun org-babel-julia-evaluate-external-process
 (defun org-babel-julia-evaluate-session
 (session body result-type result-params column-names-p)
   "Evaluate BODY in SESSION.
-If RESULT-TYPE equals 'output then return standard output as a
-string.  If RESULT-TYPE equals 'value then return the value of the
+If RESULT-TYPE equals \\='output then return standard output as a
+string.  If RESULT-TYPE equals \\='value then return the value of the
 last statement in BODY, as elisp."
   (cl-case result-type
 (value
diff --git a/lisp/ob-lua.el b/lisp/ob-lua.el
index 48de0dbad..c8c28498e 100644
--- a/lisp/ob-lua.el
+++ b/lisp/ob-lua.el
@@ -395,7 +395,7 @@ (defun org-babel-lua-evaluate-session
 (org-babel-lua-table-or-string results)
 
 (defun org-babel-lua-read-string (string)
-  "Strip 's from around Lua string."
+  "Strip single quotes from around Lua string."
   (org-unbracket-string "'" "'" string))
 
 (provide 'ob-lua)
diff --git a/lisp/ob-table.el b/lisp/ob-table.el
index 2f092998d..0f6d41c5e 100644
--- a/lisp/ob-table.el
+++ b/lisp/ob-table.el
@@ -84,7 +84,7 @@ (defmacro org-sbe (source-block  variables)
  #+end_src
 
 NOTE: The quotation marks around the function name,
-'source-block', are optional.
+\\='source-block\\=', are optional.
 
 NOTE: By default, string variable names are interpreted as
 references to source-code blocks, to force interpretation of a
diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el
index 873986d07..a937f7513 100644
--- a/lisp/oc-basic.el
+++ b/lisp/oc-basic.el
@@ -329,7 +329,7 @@ (defun org-cite-basic--shorten-names (names)
   "Return a list of family names from a list of full NAMES.
 
 To better accomomodate corporate names, this will only shorten
-personal names of the form 'family, given'."
+personal names of the form \"family, given\"."
   (when (stringp names)
 (mapconcat
  (lambda (name)
diff --git a/lisp/org-agenda.el b/

Re: Ambiguity in commit message conventions for org

2022-06-10 Thread Robert Pluim
>>>>> On Fri, 10 Jun 2022 23:11:09 +0800, Ihor Radchenko  
>>>>> said:

Ihor> Robert Pluim  writes:
Ihor> See https://orgmode.org/worg/org-contribute.html
>> 
>> Those conventions are slightly different than Emacs', with one point
>> of ambiguity. They say
>> ...
>> 
>> The summary line contains the 'lisp' directory, but the ChangeLog entry
>> doesnʼt, and in the example just after itʼs the other way around:

Ihor> You are right. The example is indeed a bit confusing. The main
Ihor> difference between Emacs' and Org's converntions is in summary line. 
We
Ihor> are less formal about and prefer shorter summaries. You can drop the
Ihor> directory or even file name if it saves space and does not create
Ihor> amiguity.

Emacs convention is to not mention the file name in the summary,
unless itʼs a one-file change, in which case you put the filename with
'* ' prepended (although some contributors prefer not to do that).

I went for 'dir/filename' in the summary, since Iʼm lazy and can copy
that from the ChangeLog commit message :-)

Robert
-- 



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Robert Pluim
>>>>> On Fri, 10 Jun 2022 23:03:38 +0800, Ihor Radchenko  
>>>>> said:

Ihor> Robert Pluim  writes:
>> Ok. I will, or rather I would, but Iʼm obviously doing something wrong
>> when building org:
>> 
>> Debugger entered--Lisp error: (wrong-type-argument listp "Packages that 
conflict with Org mode")
>> org-element-secondary-p(#("Conflicts" 0 9 (:parent (headline (:raw-value 
"Packages that conflict with Org mode" :begin 739020 :end 744524 :pre-blank 0 
:contents-begin 739061 :contents-end 744523 :robust-begin 739148 :robust-end 
744521 :level 3 :priority nil :tags nil :todo-keyword nil :todo-type nil 
:post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil 
:post-affiliated 739020 :DESCRIPTION "Packages that lead to conflicts." 
:ALT_TITLE "Conflicts" :title "Packages that conflict with Org mode" :parent 
(headline (:raw-value "Interaction with Other Packages" :begin 735540 :end 
744524 :pre-blank 0 :contents-begin 735575 :contents-end 744523 :robust-begin 
735658

Ihor> Oops. It was not caught by tests. Fixed on main now. You can pull the
Ihor> latest main. The error should disappear.

Working fine now, thanks. Doc patch attached (I have copyright
assignment on file for Emacs).

Thanks

Robert
-- 


>From 5437667a97dcd03a2993bfde93b0253590fae74a Mon Sep 17 00:00:00 2001
From: Robert Pluim 
Date: Fri, 10 Jun 2022 17:53:12 +0200
Subject: [PATCH] doc/org-manual.org: Reference org-cyclic and org-block

* doc/org-manual.org (Footnotes): Add org-cyclic and org-block to note
about org diary functions.  Add function indices for org-{date,
anniversary, cyclic, block}.
---
 doc/org-manual.org | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 32a45f884..d560562c5 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -22046,6 +22046,10 @@ * Footnotes
 However, any date inserted or modified by Org adds that day name, for
 reading convenience.
 
+#+findex: org-date
+#+findex: org-anniversary
+#+findex: org-cyclic
+#+findex: org-block
 [fn:60] When working with the standard diary expression functions, you
 need to be very careful with the order of the arguments.  That order
 depends evilly on the variable ~calendar-date-style~.  For example, to
@@ -22053,10 +22057,11 @@ * Footnotes
 =(diary-date 12 1 2005)= or =(diary-date 1 12 2005)= or =(diary-date
 2005 12 1)=, depending on the settings.  This has been the source of
 much confusion.  Org mode users can resort to special versions of
-these functions like ~org-date~ or ~org-anniversary~.  These work just
-like the corresponding ~diary-~ functions, but with stable ISO order
-of arguments (year, month, day) wherever applicable, independent of
-the value of ~calendar-date-style~.
+these functions, namely ~org-date~, ~org-anniversary~, ~org-cyclic, and
+~org-block~.  These work just like the corresponding ~diary-~
+functions, but with stable ISO order of arguments (year, month, day)
+wherever applicable, independent of the value of
+~calendar-date-style~.
 
 [fn:61] See the variable ~org-read-date-prefer-future~.  You may set
 that variable to the symbol ~time~ to even make a time before now
-- 
2.35.1.607.gf01e51a7cf



Ambiguity in commit message conventions for org

2022-06-10 Thread Robert Pluim
> On Fri, 10 Jun 2022 20:59:22 +0800, Ihor Radchenko  
> said:

Ihor> Just submit a patch here. Against the Org mode repository.
Ihor> Org mode development happens in Org mode repository and in this 
mailing
Ihor> list, not in Emacs repo.

Ihor> See https://orgmode.org/worg/org-contribute.html

Those conventions are slightly different than Emacs', with one point
of ambiguity. They say

* Line 1 of the commit message should always be a short description of
 the overall change. Line 1 does not get a dot at the end and does not
 start with a star. Generally, it starts with the filename that has been
 changed, followed by a colon, like this: 

lisp/ol-man.el: Restore file
* Line 2 is an empty line.
* Line 3 starts the ChangeLog entry. It looks like this: 

* org-timer.el (org-timer-cancel-timer, org-timer-stop): Enhance
message.

The summary line contains the 'lisp' directory, but the ChangeLog entry
doesnʼt, and in the example just after itʼs the other way around:

Here is an example for such a message: 


org-capture.el: Fix the case of using a template file

* lisp/org-capture.el (org-capture-set-plist): Make sure txt is a
string before calling `string-match'.
(org-capture-templates): Fix customization type.

* doc/org.texi (Capture): Document using a file for a template.

Thanks

Robert
-- 



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Robert Pluim
>>>>> On Fri, 10 Jun 2022 20:59:22 +0800, Ihor Radchenko  
>>>>> said:

Ihor> Robert Pluim  writes:
>> I can send a patch against the org-mode repository main branch, or fix
>> it directly in the emacs repo. What's the preferred workflow for this
>> kind of change?

Ihor> Just submit a patch here. Against the Org mode repository.
Ihor> Org mode development happens in Org mode repository and in this 
mailing
Ihor> list, not in Emacs repo.

Ok. I will, or rather I would, but Iʼm obviously doing something wrong
when building org:

  rltb:~/repos/org-mode (main)> cat local.mk
  EMACS   := /home/rpluim/repos/emacs-28/src/emacs
  rltb:~/repos/org-mode (main)> git pull
  Already up to date.
  rltb:~/repos/org-mode (main)> git status
  On branch main
  Your branch is up to date with 'origin/main'.

  nothing to commit, working tree clean
  rltb:~/repos/org-mode (main)> make doc
  make -C doc info
  make[1]: Entering directory '/home/rpluim/repos/org-mode/doc'
  /home/rpluim/repos/emacs-28/src/emacs  -Q -batch --eval '(setq 
vc-handled-backends nil org-startup-folded nil org-element-cache-persistent 
nil)'  \
--eval '(add-to-list `load-path "../lisp")' \
--eval '(load "../mk/org-fixup.el")'\
--eval '(org-make-manual)'
  Loading /home/rpluim/repos/org-mode/mk/org-fixup.el (source)...
  Debugger entered--Lisp error: (wrong-type-argument listp "Packages that 
conflict with Org mode")
org-element-secondary-p(#("Conflicts" 0 9 (:parent (headline (:raw-value 
"Packages that conflict with Org mode" :begin 739020 :end 744524 :pre-blank 0 
:contents-begin 739061 :contents-end 744523 :robust-begin 739148 :robust-end 
744521 :level 3 :priority nil :tags nil :todo-keyword nil :todo-type nil 
:post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil 
:post-affiliated 739020 :DESCRIPTION "Packages that lead to conflicts." 
:ALT_TITLE "Conflicts" :title "Packages that conflict with Org mode" :parent 
(headline (:raw-value "Interaction with Other Packages" :begin 735540 :end 
744524 :pre-blank 0 :contents-begin 735575 :contents-end 744523 :robust-begin 
735658
  :robust-end 744521 :level 2 :priority nil :tags nil :todo-keyword nil 
:todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp 
nil :post-affiliated 735540 :DESCRIPTION "With other Emacs packages." 
:ALT_TITLE "Interaction" :title "Interaction with Other Packages" :parent ... 
...) (section ... ... ...) (headline ... ...) #4) ...) (section (:begin 739061 
:end 744524 :contents-begin 739061 :contents-end 744523 :robust-begin 739061
  :robust-end 744521 :post-blank 1 :post-affiliated 739061 :mode section 
:granularity nil :parent #4) (keyword (:key "CINDEX" :value "shift-selection" 
:begin 739150 :end 739176 :post-blank 0 :post-affiliated 739150 :mode nil 
:granularity nil :parent #7)) (keyword (:key "VINDEX" :value 
"org-support-shift-select" :begin 739176 :end 739211 :post-blank 0 
:post-affiliated 739176 :mode nil :granularity nil :parent #7)) (paragraph 
(:begin 739211 :end 739889 :contents-begin 739211 :contents-end 739888 
:post-blank 1 :post-affiliated 739211 :mode nil :granularity nil :parent #7) 
#("In Emacs, shift-selection combines motions o..." 0 155 ...) (export-snippet 
...) #("S-" 0 10 ...) (export-snippet ...) #("commands to change 
timestamps,\nTODO keywords..." 0 93 ...) (export-snippet ...) #("S-" 0 
10 ...) (export-snippet ...) #("commands outside of specific contexts do 
not..." 0 82 ...) (code ...) #

Ihor> See https://orgmode.org/worg/org-contribute.html

Ihor> Also, if you think that any of the extra diary functions from Org can 
be
Ihor> useful for Emacs, you can propose to include them directly into
Ihor> diary-lib.el via M-x submit-emacs-patch (Emacs >=28) or
Ihor> M-x report-emacs-bug. The latter is also for patches, unlike the 
command
Ihor> name suggests.

Iʼll put that on my list (Iʼm guessing you'd want compatibility shims
in org-mode if I did that).

Robert
-- 



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Robert Pluim
> On Fri, 10 Jun 2022 12:27:23 +0100, Angel de Vicente 
>  said:

>> If you use `org-cyclic' and `org-block' you donʼt need to worry about
>> that anymore.

Angel> I tried (briefly :-)) to look for some place where org-cyclic and
Angel> org-block are documented, but failed. But I tried, and they do work
Angel> nicely. So they always assume 'iso' style regardless of the value of
Angel> 'calendar-date-style'? 

Yes. They donʼt appear in the info documentation anywhere that I can
see. Thereʼs a footnote in (info "(org) Weekly/daily agenda") about
`org-anniversary' and `org-date' though.

I can send a patch against the org-mode repository main branch, or fix
it directly in the emacs repo. What's the preferred workflow for this
kind of change?

Robert
-- 



Re: Timestamp with repeater interval AND END DATE?

2022-06-10 Thread Robert Pluim
> On Tue, 31 May 2022 15:36:01 +0100, Angel de Vicente 
>  said:
Angel> ,
Angel> | *** Badminton 20:45-22:15
Angel> | <%%(and (diary-cyclic 7 2022 05 30) (diary-block 2022 05 30 
2022 06 30))>
Angel> `

Angel> (the s-exp entry above assumes 'calendar-date-style' is set to 'iso')

If you use `org-cyclic' and `org-block' you donʼt need to worry about
that anymore.

Robert
-- 



Re: org-startup-folded does not work with directory local variables

2022-05-04 Thread Robert Pluim
>>>>> On Wed, 04 May 2022 22:46:56 +0800, Ihor Radchenko  
>>>>> said:

Ihor> Robert Pluim  writes:
Ihor> This is no different. org-startup-folded controls loading of Org mode.
Ihor> However, Emacs applies directory-local variables and file-local
Ihor> variables _after_ loading Org mode. Org cannot do much about it 
without
Ihor> hacking Emacs defaults.
>> 
>> Weʼre in agreement there. My point is that itʼs not a bug (although I
>> guess you could ask for a feature to apply local/directory variables
>> before applying the mode

Ihor> It's not exactly a bug, but feature request to Emacs is exactly what I
Ihor> was implying.

Right. My predictatron says itʼs unlikely to be greeted
enthusiastically.

>> , but in this case thereʼs an easy
>> workaround).

Ihor> I am not sure which workaround you are referring to.
Ihor> Setting org-startup-folded globally? On per-file basis? the former is
Ihor> global and will apply to broader scope than a directory-local 
variable.
Ihor> The latter only works in a single file (and works instead of 
file-local
Ihor> variable).

I was talking about #+STARTUP: (Iʼm assuming #+SETUPFILE: also works,
but I haven't tried it).

Robert
-- 



Re: org-startup-folded does not work with directory local variables

2022-05-04 Thread Robert Pluim
>>>>> On Wed, 04 May 2022 21:46:14 +0800, Ihor Radchenko  
>>>>> said:

Ihor> Robert Pluim  writes:
Ihor> I recommend reporting this to Emacs bug tracker.
>> 
>> I donʼt think this is a bug: directory-local variables are supposed to
>> behave the same as file-local variables, and setting
>> org-startup-folded in a local variable section also doesnʼt get
>> applied.

Ihor> This is no different. org-startup-folded controls loading of Org mode.
Ihor> However, Emacs applies directory-local variables and file-local
Ihor> variables _after_ loading Org mode. Org cannot do much about it 
without
Ihor> hacking Emacs defaults.

Weʼre in agreement there. My point is that itʼs not a bug (although I
guess you could ask for a feature to apply local/directory variables
before applying the mode, but in this case thereʼs an easy
workaround).

Robert
-- 



Re: org-startup-folded does not work with directory local variables

2022-05-04 Thread Robert Pluim
> On Wed, 04 May 2022 18:37:47 +0800, Ihor Radchenko  
> said:

Ihor> Max Fujimoto  writes:
>> Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo 
version 1.17.6)
>> 
>> The variable org-startup-folded does not work expected in
>> .dir-locals.el.The option "#+startup: fold" works as expected.

Ihor> This is because Emacs loads directory-local variables _after_ Org mode
Ihor> is loaded. That is, you set org-startup-folded after startup is
Ihor> complete.

Ihor> I recommend reporting this to Emacs bug tracker.

I donʼt think this is a bug: directory-local variables are supposed to
behave the same as file-local variables, and setting
org-startup-folded in a local variable section also doesnʼt get
applied.

Robert
-- 



Re: [PATCH] CONTRIBUTE: Link WORG page when explaining commit message format

2022-04-15 Thread Robert Pluim
> On Fri, 15 Apr 2022 17:33:33 +0800, Ihor Radchenko  
> said:
Ihor> - Org mode no longer uses ChangeLog entries to document changes.
Ihor> - Instead, special commit messages are used, as described in the
Ihor> - `CONTRIBUTE' file in the main Emacs repository.
Ihor> + Instead, special commit messages are used.  The commit message
Ihor> + format generally follows Emacs conventions, as described in the
Ihor> + `CONTRIBUTE' file in the main Emacs repository.  Several more
Ihor> + Org-specific conventions are described in
Ihor> + 
[[https://orgmode.org/worg/org-contribute.html#commit-messages][worg/org-contribute#commit-messages]].

It might be good to mention `magit-generate-changelog' there as an
easy way to produce the ChangeLog format entry (it doesnʼt require you
to iterate over the diff hunks, and you can call it from the magit
commit buffer).

Robert
-- 



bug#54670: Clocktable :step errors

2022-04-04 Thread Robert Pluim
> On Fri, 1 Apr 2022 15:49:45 +, Craig Smith 
>  said:
Craig> Online documentation states the :step month, semimonth or year 
commands are valid.  The below link is one such instance.

Craig> 
https://www.gnu.org/software/emacs/manual/html_node/org/The-clock-table.html

Craig> But, I have tried the :step commands with Emacs 25.3.1 on Windows 10,
Craig> Emacs 26.3 on Windows XP and Emacs 26.3 on my Android phone through
Craig> Termux.  All three versions do not accept the :step month, :step
Craig> semimonth or :step year command.  I have concluded the :step month,
Craig> semimonth or year commands were valid at one time and online
Craig> documentation has not caught up with the change.  It is not a big
Craig> problem, but Ι thought worth bringing to your attention.

I think itʼs the other way around: those variants were added in a
later version of org than the one youʼre using (and the online manual
thus describes them). Theyʼre definitely available in emacs-27 and
later. From memory, current org still supports emacs-26, so you could
try installing the latest packaged org from ELPA.

Robert
-- 





bug#52341: Fwd: 29.0.50; org-priority 'SPC to remove' doesn't work

2021-12-07 Thread Robert Pluim
> On Mon, 06 Dec 2021 20:48:46 -0500, Kyle Meyer  said:
Kyle> Right, this stems from org-priority feeding " " to string-to-number 
and
Kyle> ending up with 0 instead of the ?\s (32) that's used downstream to
Kyle> signal "remove".  The problem goes back to when support for numeric
Kyle> priorities was added in Org v9.4's 4f98694bf (Allow numeric values for
Kyle> priorities, 2020-01-30).

Kyle> I suppose one solution would be to check for " " and translate that to
Kyle> the ?\s so that the remove is triggered.  I'll plan to apply the 
change
Kyle> below to Org's bugfix branch in a day or two unless the author of the
Kyle> above commit (+cc) or someone else has another suggestion.

That fixes part of the issue, but still when using numeric priorities,
removal will be 'SPC RET' rather than 'SPC'.

Robert
-- 





Re: On zero width spaces and Org syntax

2021-12-06 Thread Robert Pluim
> On Sat, 04 Dec 2021 07:43:35 +0100, Marcin Borkowski  
> said:
Marcin> 2. We modify Emacs itself to somehow highlight the ZWS.  There is 
(kind
Marcin> of) a precedent – a no-breaking space is already fontified with
Marcin> =nobreak-space= face.  At the very least, make whitespace-mode 
somehow
Marcin> show ZWSs (which it doesn't now, and I'd probably say it's a bug).

Thereʼs no need to modify Emacs: see
`glyphless-char-display-control'. ZWS falls under 'format-control'.

Robert
-- 



Re: Org-syntax: Intra-word markup

2021-12-02 Thread Robert Pluim
> On Thu, 02 Dec 2021 13:36:48 +, autofrettage 
>  said:

autofrettage> Someone brought up edge and corner cases, so I simply have to 
mention the German gender stars ("Gendersternchen").
autofrettage> In an effort to make German gender neutral, some individuals 
use '*' in the midst of some words, e.g. rower.
autofrettage> Ordinary German:
autofrettage> male rower = Ruderer
autofrettage> female rower = Ruderin

autofrettage> Gender neutral German with gender star:
autofrettage> any kind of rower = Ruder*in

But with the 'female' suffix? Thatʼs almost as bad as 'écriture
inclusive'. Surely 'Ruder**'? 

Robert
-- 



Re: [Aside] Generating commit messages for Org

2021-11-26 Thread Robert Pluim
> On Sun, 21 Nov 2021 04:27:45 +0800, Timothy  said:

Timothy> Hi All,
Timothy> A few hours ago I noticed that I’ve made a few very minor mistakes 
in some of my
Timothy> recent commit messages for Org. Realistically I don’t think I’m 
going to stop
Timothy> making occasional mistake any time soon, eve if they do become 
rarer. So, I’ve
Timothy> whipped up a magit hook that looks at the diff and fills in a 
/correct/ skeleton
Timothy> in the commit message buffer.

Timothy> For example, here’s what I get if a queue a few of my currently 
unstaged changes
Timothy> ┌
Timothy> │ * lisp/org.el (org-place-formula-image, org-format-latex):
Timothy> │ 
Timothy> │ * lisp/org-macs.el (org-compile-file, org-async-queue):
Timothy> └

Timothy> This currently works with elisp functions/variables/etc. and 
headings from
Timothy> documentation files. I’m sure it has a few rough edges, but it’s 
looking
Timothy> promising so far.

I suggest you look at `add-change-log-entry-other-window' and/or
`magit-generate-changelog'.

Robert
-- 



Re: Specifying shells for remote ob-shell sessions?

2021-06-25 Thread Robert Pluim
> On Thu, 24 Jun 2021 16:15:44 -0700, David Dynerman 
>  said:

David> Dear Org Mode Friends,
David> I’m having some trouble getting the shell I want to run on remote
David> hosts in session ob-shell blocks - it seems that no matter what shell
David> I specify, session blocks will always run /bin/sh. I’m not sure if
David> this is an org or tramp configuration issue on my end, or a bug in
David> org.

Tramp will always use /bin/sh on the remote host, unless you tell it
not to.

See (info "(tramp) Remote shell setup") for how to override that (I
donʼt remember offhand if /ssh: supports overriding, otherwise you can
switch to /sshx: which definitely does)

Robert
-- 



Re: org-agenda no longer clocks out then in

2021-06-25 Thread Robert Pluim
> On Thu, 24 Jun 2021 12:42:37 -0600, "Tory S. Anderson" 
>  said:

Tory> My minimal loadup doesn't exhibit the problem. So, tracing the 
function "org-agenda-clock-in" that my =C-x TAB= is bound to, I see this.
Tory> On the broken one I see the following:

Tory> #+begin_src lisp
Tory>   
=1 -> 
(org-agenda-clock-in nil)
Tory> 1 <- org-agenda-clock-in: !non-local\ exit!
Tory> #+end_src


Tory> Whereas on the clean working one I see:

Tory> #+begin_src lisp
Tory>   
=1 -> 
(org-agenda-clock-in nil)
Tory> 1 <- org-agenda-clock-in: 0
Tory> #+end_src

Tory> But find-grep doesn't find anything in my dependencies that matches
Tory> "non-local". This looks likely to be related to the original
Tory> problem. Any idea how I can find the source of this !non-local? This
Tory> is my first time using emacs function tracing.

'non-local exit' is the tracing telling you that one of the functions
it called returned unexpectedly, rather than returning a result. You
might get a better result by doing

(setq debug-on-error t)

instead of tracing. If org-agenda-clock-in then signals an error
you'll get a backtrace.

Robert
-- 



Re: suggestion to change default org-latex-pdf-process to latexmk

2021-06-02 Thread Robert Pluim
> On Wed, 02 Jun 2021 17:29:49 +0100, Colin Baxter  said:

Colin> I'm beginning to think this change of the default should not
Colin> happen. From this thread it seems to be that the chances of it 
breaking
Colin> existing work flow is high.

Colin> I really don't understand why the changed is needed.

It sounds like a better idea is to update the defcustom to offer
latexmk as an option, with copious documentation as to when it
could/should be used.

Robert
-- 



Re: org-capture-templates: %date is too long

2021-03-12 Thread Robert Pluim
> On Fri, 12 Mar 2021 16:58:27 +0100, Uwe Brauer  said:


Uwe> Well, in order to run it I added an interactive call, but then 
Uwe> %:date reminded unimpressed by this setting


Uwe> the result was 

Uwe> | user | u...@ucm.es | 3 |3 | [] | Fri, 12 Mar 2021 
16:14:35 +0100 |

My mistake, itʼs a defconst, not a defvar, so it may well have been
inserted verbatim into the org code.

Robert
-- 



Re: org-capture-templates: %date is too long

2021-03-09 Thread Robert Pluim
> On Thu, 04 Mar 2021 21:24:03 +0100, Uwe Brauer  said:

Uwe> I am not acquainted with let-bound (only with let)

'let-bound' is a shorthand for saying 'binding a value using let'

Uwe> So are you saying I should may use defadvice to modify org-capture?

Well, you have control over how org-capture is invoked, so you could
do:

(defun my-org-capture ()
   (let ((org-time-stamp-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a>")))
(org-capture)))

although you could do it with advice if you wanted. Untested, of course :-)

Robert
-- 



Re: org-capture-templates: %date is too long

2021-03-04 Thread Robert Pluim
> On Thu, 04 Mar 2021 15:22:21 +0100, Uwe Brauer  said:
Uwe> Sorry, you misunderstood me, this time string, inserts the time string,
Uwe> when I execute the capture, but I want to extract the time string, when
Uwe> the message was received. This is why I used 
Uwe> %:date
Uwe> in my first attempt, that works but inserts 
Uwe> Tue, 2 Mar 2021 19:35:03 +0100  

Uwe> Which I find way too long.

Uwe> Just 
Uwe> Tue, 2 Mar 2021 

Uwe> Would be fine or 02.03.2021

Uwe> But not the hour, seconds etc

It looks like the %:date handling respects the
'org-time-stamp-formats' variable, so if you can arrange for that to
be let-bound appropriately during the capture process, it might do the
right thing.

Robert
-- 



Re: encryption problems using org-mode

2021-02-15 Thread Robert Pluim
> On Mon, 15 Feb 2021 13:38:42 +, Colin Baxter  said:

Colin> This has worked until today. Now if data.org.gpg is opened I get an
Colin> error.

Colin> Debugger entered--Lisp error: (void-variable minor-modes)
Colin>   (sensitive-mode t)

My crystal ball says youʼre tracking emacs-master, and you've been
bitten by the renaming of minor-modes to local-minor-modes. A
bootstrap will fix that.

Robert



Re: [Resolved]Re: OT: M-S-$ Not Working

2021-02-08 Thread Robert Pluim
> On Sat, 6 Feb 2021 22:52:17 +0700, Maxim Nikulin  
> said:

Maxim> P.S. Have you checked that it is possible to swap Ctrl and Caps in
Maxim> wayland session? If not it is likely worth filing a bug. It seems
Maxim> wayland will be default soon. Some Xkb stuff is already broken in
Maxim> gnome (rather intentionally). My first experience with wayland was
Maxim> that it took enough time to realize why I could not authenticate. Gdm
Maxim> was using wayland by default and in password fields (hidden input!)
Maxim> shift does not allow several capital letters in a row.

I donʼt know about swapping Ctrl and Caps, but I have Caps -> Meta,
Alt -> Ctrl, Ctrl -> Meta, Windows -> Super under Wayland, so I
suspect you'll be ok.

Robert



Re: [WDYT, mini] key h in agenda for quick help

2021-02-05 Thread Robert Pluim
> On Fri, 05 Feb 2021 11:34:41 +0100, Marco Wahl  
> said:

Marco> Hi all!
Marco> What do you think about binding key h to function describe-mode in 
Org
Marco> agenda?  Basically pressing key h would open a window showing the key
Marco> bindings in the agenda.  There would also be additional information.

Marco> The implementation could be just the line

Marco> (org-defkey org-agenda-mode-map (kbd "h") #'describe-mode)

Marco> Also not that key h has no default binding in Org agenda yet!

Itʼs bound to 'org-agenda-holidays'

Marco> The connoisseur of course knows that describe-mode is already just a
Marco> {C-h m} away from the Org agenda.  Anyway I think having {h} in the
Marco> agenda would be nice.  This would also be consistent with
Marco> e.g. help-mode.

Meh. People should learn. Bah humbug ;-)

Robert



Re: patch to change org-adapt-indentation customization documentation

2020-11-18 Thread Robert Pluim
Greg Minshall  writes:

> Robert,
>
>> The whole point of customize is that you shouldn't have to worry about
>> what the actual lisp value is. The actual lisp value only matters if
>> you directly set the value without using customize.
>
> thanks for the response.  i've included the documentation for
> org-adapt-indentation below.  since the documentation talks about values
> and associated behaviors, it might be helpful to mention the values in
> the customization dialog.  an alternative maybe would be to re-do the
> documentation to highlight the three customization phrases:
> 
> "Adapt indentation for all lines"
> "Adapt indentation for headline data lines"
> "Do not adapt indentation at all"
> 
> and not change the customization dialog?
>

Yes, I think that would be better.

> i, anyway, was very uncertain, even after several rounds, as to which
> customization option would give me the behavior i had read about in the
> documentation.

That means the docstring is probably the thing that needs adjusting.

Robert



Re: Changed list indentation behavior: how to revert?

2020-11-17 Thread Robert Pluim
"Dr. Arne Babenhauserheide"  writes:

> I have seen no uproar here. Discussions here were friendly and
> constructive. The discusssions are long, because there aren’t easy
> solutions to managing changes in UX in central places.
>
> And a significant share of the discussion was about the question whether
> the new interaction is better or worse and whether this actually is
> insignificant.

Iʼll add my 0.02€ and say that I donʼt know if this change affected
me, since Iʼm lazy enough that I always do C-RET to start a new
headline, as it frees me from having to worry about the number of
stars to add.

Robert



Re: patch to change org-adapt-indentation customization documentation

2020-11-17 Thread Robert Pluim
Greg Minshall  writes:

> for some reason, i was motivated to look at changing
> org-adapt-indentation.  i found that the help text talked about values
> t, 'headline-data, and nil, but that the customization text didn't
> (though, of course, it *set* those values).  the following might make it
> clearer.
>

The whole point of customize is that you shouldn't have to worry about
what the actual lisp value is. The actual lisp value only matters if
you directly set the value without using customize.

Robert



Re: Use-case: simple nodes and todo-list

2020-10-09 Thread Robert Pluim
> On Fri, 09 Oct 2020 10:17:56 +0200, c.bu...@posteo.jp said:

c> Hello,
c> I still read something about org-mode.

c> It is a complex and powerfull tool. I now try fit/transform my current
c> workflow and use-cases to org-mode. So maybe you can give me a simple
c> yes-now if this could be fullfilled with org-mode.

c> 1. Simple notes with keywords and endless time to life

Yes. org *allows* you to invent a complex deadline/scheduling
workflow, but at its most basic you just write:

* Project 1 :work:
** Task 1
** Task 2
* Project 2 :play:

and just stick your notes in there (you can do things with lists,
checkboxes, etc, but Iʼd start simple).

c> I have notes (most of them as post-its on the wall and monitor in my
c> office) with information's I am not able or willing to remember. But I
c> need this information's every few days. e.g. numbers for bank-account,
c> projects, persons
c> I find this information's by place (post-it glued to a specific place
c> in my office). When they are digitized I would use keywords or in-text
c> search. e.g. searching for the project name "my project" to find its
c> number.

Everyone has their own system, but I put "stuff I donʼt need often" in
one org file, then I have a 'work' file and a 'play' file. Ordinary
emacs search commands are enough, but again org has support for
searching by tags, name etc.

c> 2.ToDo List without time information's
c> Currently I use a one-page-paper handwritten as a ToDo List. I
c> re-create it every week. It helps me. I make priorities with some
c> colors or underlines. And it (maybe) makes my workload visible to my
c> leaders when sitting in a meeting and having the ToDo list on the
c> table. ;)
c> In the past I also tried "taskwarrior". Very powerfull, I loved
c> it. But it did not fit to my workflow. I know this is apocalyptic and
c> hard to imagine but deadlines are useless in my workflow. :D So
c> taskwarrior did not helped be it just build up more pressure to
c> me. Simple explanation: My work is influenced by to much unknown
c> external spontaneous factors. It is useless to make
c> plans/deadlines. Yes it is horror, I work on it. But I am not on that
c> level of the hierarchy to make the fundamental needed changes.


* TODO get milk :housekeeping:
* TODO feed cat :housekeeping:pets:

(and the 'housekeeping' stuff is also completely optional).

For priorities org has support for 3 levels of priority built in, so
you'd have:

* TODO [#B] get milk   :housekeeping:
* TODO [#A] feed cat  :housekeeping:pets:

There are convenient key bindings for setting the priorites on items.

For what you've described, Iʼd start by reading (info "(org) TODO
Items"), and stopping when you've reached the level you want to use.

Robert
-- 



Re: Two tables with same data but different sorting

2020-10-05 Thread Robert Pluim
>>>>> On Mon, 5 Oct 2020 11:21:24 +0200, Axel Kielhorn 
>>>>>  said:

>> Am 05.10.2020 um 10:32 schrieb Robert Pluim :
>> 
>>>>>>> On Mon, 5 Oct 2020 10:08:08 +0200, Axel Kielhorn 
 said:
>> 
>> From the docstring:
>>>> Return the last link of LIST.  Its car is the last element.
>> 
Axel> But I get:
Axel> Wrong type argument: stringp, ("30 $“)
>> 
>> You need to do (car (last …))

Axel> So =first= returns an element, but =last= returns a list.
Axel> I get it.

You'll have to get a time machine and take it up with the common lisp
folks from about 40 years ago :-)

Robert
-- 



Re: Two tables with same data but different sorting

2020-10-05 Thread Robert Pluim
> On Mon, 5 Oct 2020 10:08:08 +0200, Axel Kielhorn 
>  said:

>From the docstring:
>> Return the last link of LIST.  Its car is the last element.

Axel> But I get:
Axel> Wrong type argument: stringp, ("30 $“)

You need to do (car (last ...))

and you'll want some calls to 'string-to-number', since

(string< "30 $" "127 $")
=> nil

Robert
-- 



Re: Two tables with same data but different sorting

2020-10-02 Thread Robert Pluim
> On Fri, 2 Oct 2020 08:25:03 +0200, Axel Kielhorn 
>  said:

>> Am 01.10.2020 um 17:47 schrieb John Kitchin :
>> 
>> Glad it was helpful. You might also try (seventh row1) or (nth 6 row1). 
I think it is the same thing, but more obvious to read!

Axel> I agree that „first second …“ would be easier for an english speaker.
Axel> Having the ordinal number 1 based but the nth number 0 based is 
irritating (and sadly there is no „last“ or „penultimate“).

? C-h f last

last is a compiled Lisp function in `subr.el'.

(last LIST  N)

  Probably introduced at or before Emacs version 1.1.
  This function does not change global state, including the match data.

Return the last link of LIST.  Its car is the last element.
If LIST is nil, return nil.
If N is non-nil, return the Nth-to-last link of LIST.
If N is bigger than the length of LIST, return LIST.

Axel> Actually I was looking for something like last element or the element 
before the last element.

element before last would be

(car (last lst 2))


Robert
-- 



Re: org-table-sum

2020-09-28 Thread Robert Pluim
> On Mon, 28 Sep 2020 14:50:38 +0200, Jeremie Juste 
>  said:
>> 
>> You could make org-table-sum use calc, which would achieve the same. I
>> donʼt think there'd be any complaints about floating-point additions
>> suddenly being more accurate (famous last words)
Jeremie> I have investigated a little further about using calc. I haven't 
come up
Jeremie> with a solution yet. I don't know yet which function calc is using 
to
Jeremie> perform this operation. I have tried calcFunc-vsum but fell back 
on the
Jeremie> same issue.

Jeremie> #+BEGIN_SRC elisp
Jeremie> (calcFunc-vsum 85.6 .1)
Jeremie> #+end_src   

I donʼt think calcFunc-vsum is intended to be called by lisp code
directly. Iʼd investigate how TBLFM calls it, and see if that can be
moved into org-table-sum.

Robert
-- 



Re: org-table-sum

2020-09-28 Thread Robert Pluim
> On Sun, 27 Sep 2020 01:07:22 +0200, Jeremie Juste 
>  said:

Jeremie> Hello,
Jeremie> Thanks for the input.

Jeremie> From what I understand, it seems that org-table-sum is not 
behaving as
Jeremie> expected. I don't know if it would be interesting to split the 
function
Jeremie> into 2. One for summing of time values and one for summing 
integers?

I suspect that the people using org-table sum would not want to split
the function in two: itʼs a useful utility function (and why split off
the integer summing? Thatʼs always going to be accurate).

Jeremie> For the sum of integers (possibly real numbers) it might be 
interesting
Jeremie> to make a function use TBLFM directly? 

You could make org-table-sum use calc, which would achieve the same. I
donʼt think there'd be any complaints about floating-point additions
suddenly being more accurate (famous last words)

Robert
-- 



Re: org-table-sum

2020-09-25 Thread Robert Pluim
> On Thu, 24 Sep 2020 16:48:14 -0400, Kyle Meyer  said:

>> I did not find a way to reproduce this with other numbers, but the
>> order seems to matter.

Kyle> See .

Exactly. Which is why you should use 'calc' with floating point
numbers, it handles them correctly. i.e.

| 171.00 |
|   4.07 |
|   4.44 |
|   2.61 |
|  12.21 |
|   6.69 |
|  19.72 |
|  23.09 |
|   6.23 |
|  15.28 |
| 250.00 |
| 250.00 |
| 250.00 |
|  78.85 |
||
||
#+TBLFM:@>$1=vsum(@1$1..@-1$1)

Put point in that empty cell and do 'C-u C-c C-c'

Robert



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

2020-09-15 Thread Robert Pluim
> On Mon, 14 Sep 2020 15:17:02 +0100, Colin Baxter  said:

>writes:
>> 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

Colin> I remember I had this epa/epg issue a while ago, I think with
Colin> emacs-26.3. Putting the variable as `epa-pinentry-mode' worked for 
me, but
Colin> `epg-pinentry-mode' didn't. I've not looked at it since. It still 
works
Colin> for me with emacs-27.1 and I thought it best to leave it alone. :-)

epa-pinentry-mode is a variable defined in `epg-config.el'.
Its value is nil

  This variable is an alias for `epg-pinentry-mode'.
  This variable is obsolete since 27.1;
  use `epg-pinentry-mode' instead.

That means you should be good for at least another two emacs releases
or so (5 years, 8? who knows).

Robert



Re: Headline generation as in diary?

2020-09-03 Thread Robert Pluim
>>>>> On Thu, 03 Sep 2020 16:46:48 +0200, Michael Heerdegen 
>>>>>  said:

Michael> Robert Pluim  writes:
>> It can? Thatʼs not documented, as far as I can tell.

Michael> As a user, I read "Diary-style expression entries" in the org 
manual as
Michael> including my own defined diary sexps - excluding them would be a
Michael> surprise that should be documented (no, I don't want that to 
happen!).

Ah, I wasnʼt aware that "diary-style expression entries" and "lisp
expression with %% prepended" were the same thing.

And itʼs not likely to go away: org just runs those expressions
through `eval'.

Robert



Re: Headline generation as in diary?

2020-09-03 Thread Robert Pluim
> On Thu, 03 Sep 2020 21:35:54 +0800, Ihor Radchenko  
> said:

>> When dealing with complicated date rules it can likely happen that a
>> diary sexp doesn't fit into one line.

Ihor> Diary sexp can be a user-defined function. If your sexp needs to span
Ihor> multiple lines, it is probably worth defining a function and simply
Ihor> using <%%(your-function)> as a timestamp.

It can? Thatʼs not documented, as far as I can tell.

Robert



Re: Headline generation as in diary?

2020-09-02 Thread Robert Pluim
>>>>> On Wed, 02 Sep 2020 15:45:36 +0200, Michael Heerdegen 
>>>>>  said:

Michael> Robert Pluim  writes:
>> How about:
>> 
>> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
>> index 78fe13303..9049b3a42 100644
>> --- a/lisp/org-agenda.el
>> +++ b/lisp/org-agenda.el
>> @@ -5772,7 +5772,7 @@ displayed in agenda view."
>> r (replace-match "" nil nil r)))
>> (if (string-match "\\S-" r)
>> (setq txt r)
>> -  (setq txt "SEXP entry returned empty string"))
>> +  (setq txt (org-no-properties (org-get-heading t t t t
>> (setq txt (org-agenda-format-item extra txt level category tags 'time))
>> (org-add-props txt props 'org-marker marker
>> 'date date 'todo-state todo-state

Michael> Thanks for looking at this.

Michael> Ok - That gives me a headline in the agenda, but a wrong one (more 
or
Michael> less, a random headline in the same file, at a seemingly unrelated
Michael> location).

OK. Thatʼs as far as my org-hacking knowledge goes, so perhaps someone
else here has an idea of the right way to invoke "tell me what heading
Iʼm in, as a string".

>> >> **  Just before midnight on a few days 23:00-24:00
>> >> <%%(org-block 2020 8 31 2020 9 2)>
>> >> <%%(org-block 2020 9 10 2020 9 12)>
>> 
Michael> But it seems those time stamps are not allowed to span
Michael> multiple lines
Michael> (at least I don't get it work).  Seems org doesn't
Michael> recognize them as
Michael> such?
>> 
>> Itʼs working fine for me in org-9.3.6. Note that I have my default
>> agenda view set to a fortnight, and those dates span two different
>> weeks.

Michael> I didn't mean time spans.  What doesn't work for me are time 
_stamps_
Michael> that span multiple text lines.

You've lost me. Can you show me an example?

Robert



Re: Headline generation as in diary?

2020-09-02 Thread Robert Pluim
>>>>> On Tue, 01 Sep 2020 23:56:55 +0200, Michael Heerdegen 
>>>>>  said:

Michael> Robert Pluim  writes:
>> Itʼs triggered by the %%(, I believe, but not in headlines.

Michael> Yes, I see that in the code.

Michael> But actually I seem to have the opposite problem: I can't make the
Michael> original headline appear in the agenda.  When the sexp doesn't 
return a
Michael> string the agenda will contain a line saying "SEXP entry returned 
empty
Michael> string" instead of showing the headline.

It seems `org-anniversary' supports %d for year and thatʼs about it,
which is not surprising, since itʼs just a wrapper around
`diary-anniversary'.

How about:

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 78fe13303..9049b3a42 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5772,7 +5772,7 @@ displayed in agenda view."
r (replace-match "" nil nil r)))
(if (string-match "\\S-" r)
(setq txt r)
- (setq txt "SEXP entry returned empty string"))
+ (setq txt (org-no-properties (org-get-heading t t t t
(setq txt (org-agenda-format-item extra txt level category tags 
'time))
(org-add-props txt props 'org-marker marker
   'date date 'todo-state todo-state

(Iʼm guessing yet-another-config-variable is unnecessary)

>> You can use them in timestamps as well, which is useful for weird time
>> periods
>> 
>> **  Just before midnight on a few days 23:00-24:00
>> <%%(org-block 2020 8 31 2020 9 2)>
>> <%%(org-block 2020 9 10 2020 9 12)>

Michael> But it seems those time stamps are not allowed to span multiple 
lines
Michael> (at least I don't get it work).  Seems org doesn't recognize them 
as
Michael> such?

Itʼs working fine for me in org-9.3.6. Note that I have my default
agenda view set to a fortnight, and those dates span two different
weeks.

Robert



Re: Headline generation as in diary?

2020-09-01 Thread Robert Pluim
> On Tue, 01 Sep 2020 17:18:42 +0200, Michael Heerdegen 
>  said:

Michael> Eric S Fraga  writes:
>> No, not necessarily.  I have entries like this:
>> 
>> %%(diary-anniversary 1981 03 17) Somebody's birthday (%d years)
>> 
>> and the agenda view shows "Somebody's birthday (19 years)"; the actual
>> heading for this entry is ignored.

Michael> Where in an entry do you specify such specifications?

Below the headline, after the properties.

>> However, I don't know if other diary- functions work the same way.

They do, although there are org- versions of most (all?) of them that
you should use, since they consistently use ISO8601 date order,
unlike the diary functions. The manual is a bit lacking in this area,
I think.

Michael> Yes, the interesting part then is: when does org behave like this, 
and
Michael> can this behavior be forced?

Itʼs triggered by the %%(, I believe, but not in headlines. You can
use them in timestamps as well, which is useful for weird time periods

**  Just before midnight on a few days 23:00-24:00
<%%(org-block 2020 8 31 2020 9 2)>
<%%(org-block 2020 9 10 2020 9 12)>

Robert



Re: org-caldav-sync hangs

2020-08-13 Thread Robert Pluim
> On Thu, 13 Aug 2020 11:00:34 +0200, "Loris Bennett" 
>  said:

Loris> Thanks for the suggestions.  Unfortunately all the relevant Org file
Loris> pass linting and regenerating .org-id-locations didn't help.

Loris> What I do occasionally see is this error:

Loris>   up-list: Scan error: "Unbalanced parentheses", 388, 126

Loris> However I don't even know whether this is coming from Org or not, so 
I
Loris> can't tell whether it is relevant.

(setq debug-on-message "Unbalanced parentheses")

Robert



Re: Q: placement of initialization for org-time-stamp-formats

2020-07-03 Thread Robert Pluim
> On Fri, 3 Jul 2020 15:18:40 +0200, hj-orgmod...@hj.proberto.com said:

hj-orgmode-1>  Hello again.

hj-orgmode-1>  After a lot of searching and trying, I finally figured one 
thing that
hj-orgmode-1> seems to work: ( I am no lisp programmer, so I don't know what
hj-orgmode-1> negative side effects might this have) ; I've added into
hj-orgmode-1> dotspacemacs/user-config section inside .spacemacs :

hj-orgmode-1>  (add-hook 'org-load-hook
hj-orgmode-1>   (lambda ()
hj-orgmode-1>     (setq org-time-stamp-formats '("<%Y-%m-%d %a>"
hj-orgmode-1> . "<%Y-%m-%d %a %H:%M:%S %Z>")) ))

hj-orgmode-1>  Does that look like this should have no undesirable side 
effects?

Thatʼs normally written

(with-eval-after-load "org"
  (setq org-time-stamp-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a%H:%M:%S 
%Z>")))

Robert



Re: issue tracker?

2020-05-26 Thread Robert Pluim
> On Mon, 25 May 2020 13:20:30 +0200, Roland Everaert 
>  said:

Roland> No, I was not aware of it.  Yet, if I understand the objective of 
the Emacs
Roland> ML and Debbugs, it is for, when you have a crash with emacs or, at 
least,
Roland> an error stack trace when evaluating some lisp code. This is 
different from
Roland> the intent here to define how to switch a thread started as a simple
Roland> conversation to a tracked conversation, as a bug, feature request or
Roland> suggestion, an the other way around.

Roland> Sorry if I was not clear about it or if I misunderstand the purpose 
of
Roland> Debbugs and the Emacs ML.

The definition of 'emacs bug' is fairly loose. It ranges from 'emacs
crashed' to 'when I do this funky org-mode thing with 1000 lines of
config, thereʼs an extra space at eol' and everything in between, and
also covers feature requests.

Robert



Re: [RFC PATCH] specify a time, not number of minutes to keep, with org-resolve-clock

2020-02-03 Thread Robert Pluim
> On Sat, 01 Feb 2020 15:34:54 +0100, Bastien  said:
Bastien> And since is it a good outcome to have more people signing the FSF
Bastien> papers, I recommend requesting contributors to sign the copyright
Bastien> assignment for every >15 lines contributions (significant or not).

Not only that: without copyright assignment you need to keep track of
whether an individual has contributed more than 15 significant lines
*total*, which is a hassle.

Robert



Re: Discrepancy between documentation and implementation regarding comments

2019-10-29 Thread Robert Pluim
>>>>> On Tue, 29 Oct 2019 15:14:37 +0100, Thibault Polge  said:

Thibault> Robert Pluim writes:
>> end of line *is* a whitespace character, but Iʼm not going to argue
>> that. Iʼm going to argue that this doesnʼt cover the case of a '#' at
>> EOB without a newline, hence saying 'zero or more' would be better.

Thibault> But zero-or-more would mean that this line:

Thibault> #Alpha

Thatʼs the problem with human language, itʼs imprecise. I meant

^[ \t]*#[ \t]*$

Robert



Re: Discrepancy between documentation and implementation regarding comments

2019-10-29 Thread Robert Pluim
> On Mon, 28 Oct 2019 17:16:55 +0100, Nicolas Goaziou 
>  said:

Nicolas> Hello,
Nicolas> Thibault Polge  writes:

>> Thanks Nicolas, just a small detail though: unless this is a planned
>> (breaking) change, I believe the description you linked should read:
>> 
>> A “comment line” starts with *zero or more whitespace characters,
>> followed by* a hash sign, followed by a whitespace character or an end
>> of line.

Nicolas> True. I fixed that.

end of line *is* a whitespace character, but Iʼm not going to argue
that. Iʼm going to argue that this doesnʼt cover the case of a '#' at
EOB without a newline, hence saying 'zero or more' would be better.

(and if it really is *one* whitespace character, thatʼs a breaking
change from at least org-9.2.6, which allows zero-or-more).

Robert



Re: Discrepancy between documentation and implementation regarding comments

2019-10-27 Thread Robert Pluim
> On Sun, 27 Oct 2019 11:07:20 +0100, Thibault Polge  said:

Thibault> Hello,
Thibault> According to Org-Mode documentation[1],

>> Lines starting with zero or more whitespace characters followed by one
>> ‘#’ and a whitespace are treated as comments and, as such, are not
>> exported.

'whitespace' in emacs normally covers newline as well. Of course org
might mean 'at least one space or tab', but as you say, thatʼs not
what the implementation does. eg in org 9.2.6, org-fill-element does

(re-search-backward "^[ \t]*#[ \t]*$" begin t)

However org-at-comment-p does

(looking-at "^[ \t]*# ")

so thereʼs some possible inconsistency there.

FWIW, Iʼd vote for expressing it as 'zero or more whitespace followed
by one # followed by zero or more whitespace'

Robert



Re: [O] Dates with repeaters, times and range

2019-10-03 Thread Robert Pluim
> On Wed, 2 Oct 2019 09:31:33 +, "Fraga, Eric"  said:

Eric> On Tuesday,  1 Oct 2019 at 23:38, Nathan Neff wrote:
>> I have a meeting that's scheduled from 10:00 - 11:00 for the next three
>> days.

Eric> This is discussed in the FAQ on the org mode website.

Eric> Quick answer: not possible the way you wish.  Instead, the easiest
Eric> solution is to make a one day entry and then use M-x
Eric> org-clone-subtree-with-time-shift RET.

This works for me:

**  Meeting 08:30-15:00
<%%(org-block 2019 10 2 2019 10 4)>


You can even make the period discontiguous:

**  Meeting 08:30-15:00
<%%(org-block 2019 10 2 2019 10 4)>
<%%(org-block 2019 10 7 2019 10 8)>



Re: [O] Bug: Operator associativity problem [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]

2019-09-26 Thread Robert Pluim
> On Wed, 25 Sep 2019 20:16:26 +0200, Justus Winter 
>  said:

Justus> "Fraga, Eric"  writes:
>> On Wednesday, 25 Sep 2019 at 11:50, Justus Winter wrote:
>>> I noticed a operator associativity problem when evaluating formulas in
>>> tables.  To reproduce, enter:
>>> 
>>> | :=6/2*3 |
>>> 
>>> And evaluate the formula.  This results in:
>>> 
>>> | 1 |
>>> #+TBLFM: @1$1=6/2*3
>> 
>> Yes, this is a property (feature, ?) of Emacs Calc.

Justus> Wow!  Re-reading the org-mode documentation I see that it is 
prominently
Justus> mentioned indeed, and that it is an precedence thing, not an
Justus> associativity one.

See 'calc-multiplication-has-precedence'

Robert


signature.asc
Description: PGP signature


Re: [O] Insert time in Org-mode

2019-06-25 Thread Robert Pluim
> On Tue, 25 Jun 2019 18:41:15 +0200, gmx  said:

gmx> Hello,
gmx> How to insert the current time? I have a table in which I want to
gmx> indicate the beginning of an oral exam (firt column), the end (second
gmx> column), and (third column) make the difference between the two (I can
gmx> do that).

C-u M-x org-time-stamp

will prompt for a date and insert it along with the current time (I
bind org-time-stamp to "C-c ." for convenience)

Robert



Re: [O] Compile failure

2019-06-24 Thread Robert Pluim
> On Mon, 24 Jun 2019 08:49:07 -0400 (EDT), William Denton  
> said:

William> The current source isn't compiling, at least for me (this is with 
an
William> Emacs freshly compiled from source):

William> $ make
William> make -C doc clean;  make -C lisp clean;
William> make[1]: Entering directory '/usr/local/src/org-mode/doc'
William> rm -f org orgguide *.pdf *.html *_letter.tex org-version.inc \
William>   org-version.tex *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys 
\
William>   *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs *.log *.html 
*.ps
William> make[1]: Leaving directory '/usr/local/src/org-mode/doc'
William> make[1]: Entering directory '/usr/local/src/org-mode/lisp'
William> rm -f org-version.el org-loaddefs.el org-version.elc 
org-loaddefs.elc
William> org-install.elc
William> rm -f *.elc
William> make[1]: Leaving directory '/usr/local/src/org-mode/lisp'
William> make -C lisp compile
William> make[1]: Entering directory '/usr/local/src/org-mode/lisp'
William> rm -f org-version.el org-loaddefs.el org-version.elc 
org-loaddefs.elc
William> org-install.elc
William> org-version: 9.2.4 (release_9.2.4-381-g226363)
William> emacs: could not resolve realpath of "(null)": No such file or 
directory
William> Makefile:70: recipe for target 'org-version.el' failed
William> make[1]: *** [org-version.el] Error 1
William> make[1]: Leaving directory '/usr/local/src/org-mode/lisp'
William> mk/targets.mk:95: recipe for target 'compile' failed
William> make: *** [compile] Error 2

Thatʼs an emacs issue, not an org-mode issue. If you specify the full
path to your emacs binary instead of using a symlink, does it compile?

Robert



[O] bug#34684: 26.1; Strange characters when inserting date

2019-03-11 Thread Robert Pluim
> On Mon, 11 Mar 2019 16:13:16 +, "Wong, Philip" 
>  said:

Philip> Chinese, Sunday to Saturday:日一二三四五六

Philip> Attempting M-: (I hope I did this right, I pressed Alt +
Philip> Shift + :, then copied and pasted your command)

Philip> No output but it says this on the bottom: 'Trailing
Philip> garbage following expression'

I guess that means you typed literally ' RET'. Eli meant: type the
command up to the closing ')', and then hit the 'Enter' key, which we
normally refer to as 'RET'.

Robert





[O] bug#34684: 26.1; Strange characters when inserting date

2019-03-11 Thread Robert Pluim
> On Mon, 11 Mar 2019 09:41:41 +, "Wong, Philip" 
>  said:

Philip> Sorry, I don't understand what you mean by emacs -Q.  How
Philip> exactly am I supposed to run this command?

Philip> I tried ctrl c and then started typing 'emacs -Q' but it
Philip> did nothing.

I guess youʼre starting emacs by clicking on some icon? You need to
start it from the command line, with an argument of -Q, probably from
cmd.exe or similar (I am Emacs-on-windows ignorant).

Robert





Re: [O] [RFC] Fixing link encoding once and for all

2019-03-05 Thread Robert Pluim
Neil Jerram  writes:

> Thanks for explaining that.  It's not mentioned in the manual though
> (https://www.gnu.org/software/emacs/manual/html_node/emacs/Regexps.html);
> are you sure that it's supported in Emacs regexps?
>

Itʼs described in the next node:



Robert



[O] bug#34684: 26.1; Strange characters when inserting date

2019-03-01 Thread Robert Pluim
Eli Zaretskii  writes:

>> From: Robert Pluim 
>> Cc: philip.w...@warwick.ac.uk,  34...@debbugs.gnu.org
>> Date: Fri, 01 Mar 2019 14:47:21 +0100
>> 
>> > That's only so if the above produces the same garbled result as in the
>> > original report.  Does it?
>> 
>> Didnʼt I send this yesterday?
>> 
>> $ LANG=zh_HK src/emacs -Q -l ss.el
>> (require 'org)
>> (org-time-stamp)
>> <2019-03-01 五>
>> 
>> I think '五' is 'Five', but donʼt quote me on that.
>
> This is not garbage by any measure.  Please compare with what the OP
> reported.

We are miscommunicating. I was demonstrating that in my setup,
org-time-stamp produces the correct output => itʼs a configuration
issue.

> What, if anything, is wrong with the OP's configuration is exactly the
> issue here.

Right.

Robert





[O] bug#34684: 26.1; Strange characters when inserting date

2019-03-01 Thread Robert Pluim
Eli Zaretskii  writes:

>> From: Robert Pluim 
>> Cc: Eli Zaretskii ,  34...@debbugs.gnu.org
>> Date: Fri, 01 Mar 2019 11:00:01 +0100
>> 
>> > It could be some snafu in Org, though, e.,g. if it doesn't know how to
>> > support that value of $LANG.  In any case, should be reported to Org
>> > developers first.
>> 
>> org-time-stamp just calls essentially
>> 
>> (insert (format-time-string "<%Y-%m-%d %a>" (current-time)))
>> 
>> so itʼs hard to see how this could be an issue in Org.
>
> That's only so if the above produces the same garbled result as in the
> original report.  Does it?

Didnʼt I send this yesterday?

$ LANG=zh_HK src/emacs -Q -l ss.el
(require 'org)
(org-time-stamp)
<2019-03-01 五>

I think '五' is 'Five', but donʼt quote me on that.

So at least for me itʼs working correctly (in both *scratch* and an
Org-mode buffer), which means thereʼs something wrong in the
reporter's configuration somewhere.

Robert





[O] bug#34684: 26.1; Strange characters when inserting date

2019-03-01 Thread Robert Pluim
Robert Pluim  writes:

> Eli Zaretskii  writes:
>
>>> From: Robert Pluim 
>>> Cc: Eli Zaretskii ,  34...@debbugs.gnu.org
>>> Date: Fri, 01 Mar 2019 11:00:01 +0100
>>> 
>>> > It could be some snafu in Org, though, e.,g. if it doesn't know how to
>>> > support that value of $LANG.  In any case, should be reported to Org
>>> > developers first.
>>> 
>>> org-time-stamp just calls essentially
>>> 
>>> (insert (format-time-string "<%Y-%m-%d %a>" (current-time)))
>>> 
>>> so itʼs hard to see how this could be an issue in Org.
>>
>> That's only so if the above produces the same garbled result as in the
>> original report.  Does it?
>
> Didnʼt I send this yesterday?
>
> $ LANG=zh_HK src/emacs -Q -l ss.el
> (require 'org)
> (org-time-stamp)
> <2019-03-01 五>
>
> I think '五' is 'Five', but donʼt quote me on that.
>
> So at least for me itʼs working correctly (in both *scratch* and an
> Org-mode buffer), which means thereʼs something wrong in the
> reporter's configuration somewhere.

And also

(insert (format-time-string "<%Y-%m-%d %a>" (current-time)))

produces the same result for me.





[O] bug#34684: 26.1; Strange characters when inserting date

2019-03-01 Thread Robert Pluim
Eli Zaretskii  writes:

>> Iʼm assuming thereʼs an issue with buffer-file-coding-system or
>> similar.
>
> Unlikely: buffer-file-coding-system has no effect whatsoever on the
> text that is inserted into a buffer, it only has effect when you want
> to save the buffer or send it to some sub-process.
>
> It could be some snafu in Org, though, e.,g. if it doesn't know how to
> support that value of $LANG.  In any case, should be reported to Org
> developers first.

org-time-stamp just calls essentially

(insert (format-time-string "<%Y-%m-%d %a>" (current-time)))

so itʼs hard to see how this could be an issue in Org.

Does this happen when running 'emacs -Q'?

Robert





[O] bug#34684: 26.1; Strange characters when inserting date

2019-02-28 Thread Robert Pluim
Eli Zaretskii  writes:

>> From: "Wong, Philip" 
>> Date: Thu, 28 Feb 2019 14:16:25 +
>> 
>> When I insert a date by pressing CTRL+C then period then enter I get 
>> “<2019-02-28 ¶g¥|>”.
>> 
>> I’m not sure what the strange character is (¶g¥|), can someone help?
>
> Please show a complete recipe, starting from "emacs -Q", to reproduce
> the issue.  When I type "Ctrl-C ." in "emacs -Q", Emacs says that
> sequence is not bound to any command, so I wonder what is needed to
> "insert a date" in your scenario.

>From the output, this is 'org-time-stamp', which produces
<2019-02-28 Thu> here. Based on this in the report:

Important settings:
  value of $LANG: ZHH
  locale-coding-system: cp1252

Iʼm assuming thereʼs an issue with buffer-file-coding-system or
similar. If I do

LANG=zh_HK src/emacs -Q
(require 'org)
(org-time-stamp) => <2019-02-28 四>

where that character after the date is CJK IDEOGRAPH-56DB

(and now Iʼve exhausted what I know about Asian characters)

Robert





Re: [O] Arithmetic range error

2019-02-07 Thread Robert Pluim
Colin Baxter  writes:

> Hello,
>
> Publishing an org file today, the html output looks ok but I get the
> compilation error:
>
> Arithmetic range error: "floor", 1549541220.7500212
>
> I get the error with org-version 9.2.1 (release_9.2.1-200-g18b85a)
> but not with org-version 8.2.10.
>
> Looking at 'org-publish-cache-ctime-of-src' in the file `ox-publish.el',
> its not obvious to me where the error is coming from. Ditto after
> looking in NEWS and the git commit logs.

Thatʼs emacs signalling that thereʼs an overflow when converting that
float to an integer. It seems much too small for that, though. Which
version of emacs is this, on what platform?

Robert



Re: [O] (9.2) Noweb blocks not expanded in Python blocks : it should be a bug...

2019-02-04 Thread Robert Pluim
John Kitchin  writes:

> #+RESULTS:
> : <<\([^
> : ].+?[^ ]\|[^
> : ]\)>>

That regex looks malformed, and will only match strings with 1 or 3 or
more characters between << and >>. If someone knows what itʼs supposed
to be matching we can fix it. eg it looks like it wants to allow

<>

Is that something that should be accepted?

Robert



Re: [O] Bug: ODT export fails if NAME: and ref: equation [9.1.14 (9.1.14-1-g4931fc-elpa @ /home/kdm/.emacs.d/elpa/org-20180910/)]

2018-11-08 Thread Robert Pluim
Nicolas Goaziou  writes:

> Hello,
>
> Ken Mankoff  writes:
>
>> On Mon, Nov 5, 2018, 13:59 Nicolas Goaziou >
>>>
>>> What would be the expected output?
>>>
>>
>> There is no output. It doesn't even export. It's a showstopper. No
>> references to equations allowed or the exporter fails.
>
> I know. I can reproduce your problem. But I know nothing about ODT, so
> it would help if you could tell me what should be the desired output. At
> the moment, referencing anything else than a headline or a target is
> unsupported in this back-end, AFAICT.

FWIW, the original example works for me if I set
'org-latex-to-mathml-convert-command' to
"latexmlmath \"%i\" --presentationmathml=%o"

as described at


(interestingly I didnʼt have to set #+OPTIONS: LaTeX:t)

Robert



Re: [O] OT: gmane seems to be back

2018-10-31 Thread Robert Pluim
Colin Baxter  writes:

>> Nick Dokos  writes:
>
> > Achim Gratz  writes:
> >> Am 30.10.2018 um 16:57 schrieb Nick Dokos:
> >>> For a couple of weeks, I had not been able to connect to gmane,
> >>> so I finally gave up and changed my preferences so that I could
> >>> receive the email from the list.  I have not seen any
> >>> acknowledgement anywhere that it was down BTW - did anybody here
> >>> notice? Or was it just me?
> >> 
> >> Plain NNTP wasn't down at all, but connections that use TLS
> >> stopped working some time ago and probably still don't work.
>
> > I have this in my .gnus.el:
>
> > (setq gnus-select-method '(nntp "news.gmane.org"
> > (nntp-open-connection-function nntp-open-tls-stream)
> > (nntp-port-number 563) ;; (nntp-port-number 119)
> > (nnir-search-engine gmane) ))
>
> My gnus works fine (always has) with just the first line. The
> nntp-open-tls-stream and port-numbers appear not to be required. And I
> thought gmane.org was could no longer be searched with nnir.

If you do that then you connect to port 119 using cleartext and the
connection is (potentially) upgraded using STARTTLS. Thatʼs not the
same as making a TLS connection to port 563. Whether this matters for
reading news is entirely a personal decision.

The gmane search interface is sadly indeed defunct.

Robert



[O] bug#32906: org-in-src-block-p always returns nil

2018-10-03 Thread Robert Pluim
Eivind Otto Hjelle  writes:

> I thought I had updated emacs to the latest version, but apparently not.
> After upgrading to emacs-26 the command org-in-src-block-p works as
> expected. Thanks!

Thanks for checking. Closing.

Regards

Robert





[O] bug#32906: org-in-src-block-p always returns nil

2018-10-02 Thread Robert Pluim
Eivind Otto Hjelle  writes:

> The function 'org-in-src-block-p' always returns nil on my system
> running Windows 10.
>
> How to reproduce this bug starting from 'emacs -Q':
> Define a function 'test-org-in-src-block-p' in the scratch buffer as
> follows:
>
> (defun test-org-in-src-block-p ()
>   (interactive)
>   (print (org-in-src-block-p)))
>
> Navigate to a src block in org mode and call 'M-x
> test-org-in-src-block-p'. Now nil is printed to the message buffer.

Works for me in emacs-26. Would it be possible to try that version?

Regards

Robert





Re: [O] org-end-of-line and in table interaction

2018-09-29 Thread Robert Pluim
Nicolas Goaziou  writes:

> Robert Pluim  writes:
>
>> It does call 'end-of-line'. If thatʼs the intended semantics, itʼs not
>> entirely clear from the docstring (and I will adjust my code).
>
> The first sentence is:
>
>   Go to the end of line, but before ellipsis, if any.
>
> If you think that's ambiguous, would you want to suggest a different
> wording? Or do you think we should add a more explicit reference to
> `end-of-line' function somewhere in the docstring? 

I thought it was for headlines only because the next paragraph talks
about headlines, but that was entirely my misreading.

Robert



Re: [O] org-end-of-line and in table interaction

2018-09-28 Thread Robert Pluim
Nicolas Goaziou  writes:

> Robert Pluim  writes:
>
>> I was under the impression that 'org-end-of-line' is intended to do
>> something only when in a heading, since it does:
>>
>> (looking-at org-complex-heading-regexp)))
>>
>> hence my patch to make it not do anything in tables.
>
> It is meant to do something special on a heading and call `end-of-line'
> everywhere else. Are you saying that `org-end-of-line' doesn't call
> `end-of-line', as it should?

It does call 'end-of-line'. If thatʼs the intended semantics, itʼs not
entirely clear from the docstring (and I will adjust my code).

Robert



Re: [O] org-end-of-line and in table interaction

2018-09-28 Thread Robert Pluim
Nicolas Goaziou  writes:

> Hello,
>
> Robert Pluim  writes:
>
>> I have
>>
>> (add-hook 'org-tab-first-hook 'org-end-of-line)
>>
>> This causes  inside a table to always create another row, rather
>> than moving to the next field. The patch below fixes this for me,
>> although Iʼm not sure itʼs the right solution.
>
> Why would you want to patch Org source instead of fixing the function
> you attach to the hook?

Yes, I could wrap org-end-of-line in a (when (not (org-at-table-p))),
but that would fix it only for me. I was under the impression that
'org-end-of-line' is intended to do something only when in a heading,
since it does:

   (looking-at org-complex-heading-regexp)))

hence my patch to make it not do anything in tables.

Robert



[O] org-end-of-line and in table interaction

2018-09-28 Thread Robert Pluim
Hi,

I have

(add-hook 'org-tab-first-hook 'org-end-of-line)

This causes  inside a table to always create another row, rather
than moving to the next field. The patch below fixes this for me,
although Iʼm not sure itʼs the right solution.

diff --git a/org.el b/org.el
index 45be987..f22e9a1 100644
--- a/org.el
+++ b/org.el
@@ -23608,6 +23608,7 @@ (defun org-end-of-line ( n)
   (`(,_ . ,C-e) C-e) (_ org-special-ctrl-a/e)))
deactivate-mark)
 ;; First move to a visible line.
+(when (not (org-at-table-p))
 (if (bound-and-true-p visual-line-mode)
(beginning-of-visual-line n)
   (move-beginning-of-line n))
@@ -23651,7 +23652,7 @@ (defun org-end-of-line ( n)
(when (/= bol (line-beginning-position))
  (goto-char bol)
  (end-of-line
- (t (end-of-line)
+ (t (end-of-line))
 
 (define-key org-mode-map "\C-a" 'org-beginning-of-line)
 (define-key org-mode-map "\C-e" 'org-end-of-line)



Re: [O] Bug: Removing and adding deadline bug in org agenda [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]

2018-09-18 Thread Robert Pluim
Kevin Foley  writes:

> My mistake, I misread, thanks for the correction Robert.  FWIW I also am
> unable to reproduce on 9.1.14
>
> I would still suggest using C-c C-d with . as it seems like a simpler
> workflow.

Yes, that is a lot simpler than remove/add.

Robert



Re: [O] Bug: Removing and adding deadline bug in org agenda [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]

2018-09-18 Thread Robert Pluim
Kevin Foley  writes:

> The issue is once you use C-u C-c C-d to remove the deadline with your
> point on the same line as the deadline, that line is removed and the point
> stays in the same place.  That means point is now on Task 2 so calling
> `org-deadline' there will apply to Task 2.
>

I believe the C-u C-c C-d is being done from the agenda buffer, not
the org buffer, so the agenda should be able to keep track of the task
location.

Having said that, Iʼve not been able to reproduce this with Org 9.1.14

Robert



Re: [O] repeating timestamps with an end date

2018-08-01 Thread Robert Pluim
Eric S Fraga  writes:

> On Monday, 30 Jul 2018 at 15:25, Robert Pluim wrote:
>> Hi,
>>
>> is there a generic way to specify an end date for a repeating event? 
>
> The short answer is no.
>
> The longer answer is to consider using
> org-clone-subtree-with-time-shift.  Make the entry you want and then make
> the repeating entries.  I use this for lectures, for instance, and then
> delete particular entries that might correspond to cancelled lectures.

That will work, but it feels inelegant. I guess Iʼll stick to using
'diary-block' and similar.

Thanks

Robert



[O] repeating timestamps with an end date

2018-07-30 Thread Robert Pluim
Hi,

is there a generic way to specify an end date for a repeating event? I
can do something like

* 10:00-12:00 an event
  <%%(org-class 2018 8 1 2018 8 31 2)>

to have something repeat every Tuesday in August, but that doesnʼt
work for other repeating intervals. Iʼd much rather be able to do
something like

* an event
  <2018-08-01 Wed 10:00-12:00+1w>--<2018-08-14>

but that makes it appear in the agenda every day.

Thanks

Robert



[O] bug#31468: 24.5; org mode do not export current heading

2018-05-17 Thread Robert Pluim
Michel Damiens  writes:

> Hello Robert
> I think I did not read correctly the documentation : I believed that the
> heading would be in a div container with class outline-1 and the text
> inside would be in a div with class outline-text-1
> Thanks a lot for your help !

Youʼre welcome. Closing the bug.

Regards

Robert





[O] bug#31468: 24.5; org mode do not export current heading

2018-05-17 Thread Robert Pluim

[please keep the bug address in CC]

Michel Damiens  writes:

> no change for the heading with with emacs -Q :
>
> 
> 
> Descartes et la constitution de l'écriture symbolique
> mathématique
> 
> L'Ars Magna de Cardan (1545) est écrit avec des notations
> actuellement difficilement déchiffrables. Par contre les notations de la
> Géométrie de Descartes (1637) nous semblent lisibles.
> Diophante :
> Algébristes arabes :
> Algébristes italiens :
> Coss :
> Viète :
> Descartes :
> Leibniz :
> 

Is that not correct? You have in your :PROPERTIES:

:EXPORT_TITLE: Descartes et la constitution de l'écriture symbolique 
mathématique

Removing that, the title class with emacs-24 -Q becomes the same as
the org headline. Note that emacs -Q for me uses org-8.2.10

Robert





[O] bug#31468: 24.5; org mode do not export current heading

2018-05-16 Thread Robert Pluim
Michel Damiens  writes:

[please keep the bug address in CC ]

> Hello
> my og-mode version is 9.1.13
> I'm not able to upgrade to emacs-26 for the moment : I'm not working on my
> own system.
> How do you think that sort of problem would depend on emacs version ?

Features and bugs can be very different between different emacs
versions. However, Iʼve just tried 9.1.13 on emacs-24, and I donʼt see
an issue, which suggests itʼs due to some local configuration Is it
possible for you to come up with a reproduction recipe starting from
'emacs -Q'?

Regards

Robert





[O] bug#23917: Please consider making Bug #23917 a blocker for 25.1 (was Re: org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks)

2016-07-22 Thread Robert Pluim
Eli Zaretskii  writes:

>> From: npost...@users.sourceforge.net
>> Cc: 23...@debbugs.gnu.org,  nljlistb...@gmail.com,  jwieg...@gmail.com,  
>> rpl...@gmail.com,  monn...@iro.umontreal.ca,  alex.ben...@linaro.org
>> Date: Thu, 21 Jul 2016 21:08:43 -0400
>> 
>> I made the same adjustments to the saved sub_start and sub_end
>> variables, but I had a mistake in that adjustment which caused the false
>> positives.  Fixed in the attached v2 patch.  We could just drop the
>> check, though I've already found it useful to catch bugs
>> (https://github.com/joaotavora/yasnippet/issues/720).
>> 
>> If I drop the checks (see attached v3 patch), then after following the
>> bug#23869 recipe, I get:
>> 
>> ## -*- Octave -*-
>> -module(bug).
>> -export([identity/1, is_even/1, size/1, reverse/1]).
>
> OK, let's wait for a few days to give time to the people who were
> affected by the issue to test the patch, and if no new issues come up,
> please push the version with the error code to emacs-25.
>

Patch v2 fixes 'emacs -Q' and my normal capture templates, and I'm
using the patched emacs for this email. I'll keep running with it for
the next few days.

Regards

Robert





  1   2   >