Re: Typo in Org Manual

2020-03-06 Thread Kyle Meyer
Sebastian Miele  writes:

> Kyle Meyer  writes:

>> If we were to simply replace "six" with "nine", I think the
>> description could still be confusing because it's ambiguous whether
>> "between" includes the ends. (I would tend to read the above
>> description as exclusive.)
>
> At least for me, "nine" would not be confusing at all, because among the
> sensible interpretations of the range specification, "nine" uniquely
> identifies the maximally inclusive one.

Fair enough.

> If it were a problem, then the preceding and following examples all have
> the same problem, too, except maybe the hline example.

Hmm, I looked over those before sending the email and didn't find any of
them ambiguous.  Perhaps I'm just inclined to read "between" ambiguously
and gloss over everything else.  Either way...

Later Sebastian Miele  writes:

> Sebastian Miele  writes:
>>
>> But how about instead changing the first sentence of the "Range
>> references" section from
>>
>>   You may reference a rectangular range of fields by specifying two
>>   field references connected by two dots ‘..’.
>>
>> to
>>
>>   You may reference a rectangular range of fields, including the ends,
>>   by specifying two field references connected by two dots ‘..’.
>>
>> ?
>
> I think even better would be to just add the following after the
> sentence mentioned above:
>
>   The ends are included in the range.

... this sounds good to me.  I went with that, along with replacing
"six" with "nine".

Thanks for the suggestion and for catching the error.



Re: Typo in Org Manual

2020-03-06 Thread Nick Dokos
Sebastian Miele  writes:

> Sebastian Miele  writes:
>>
>> But how about instead changing the first sentence of the "Range
>> references" section from
>>
>>   You may reference a rectangular range of fields by specifying two
>>   field references connected by two dots ‘..’.
>>
>> to
>>
>>   You may reference a rectangular range of fields, including the ends,
>>   by specifying two field references connected by two dots ‘..’.
>>
>> ?
>
> I think even better would be to just add the following after the
> sentence mentioned above:
>
>   The ends are included in the range.
>
>

Yes, a general statement (outside of this particular example) seems
like a good idea. Then changing the "six" to "nine" does not need any
further elaboration.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: File Scoped Properties?

2020-03-06 Thread Tim Visher
Thanks for the response, Eric. :)

On Fri, Mar 6, 2020 at 1:51 AM Fraga, Eric  wrote:

> On Thursday,  5 Mar 2020 at 10:28, Tim Visher wrote:
> > I _am_ able to get it to work by adding a file local variable like
> >
> > ```
> > # Local Variables:
> > # org-attach-id-dir: "~/.foo/data"
> > # End:
> > ```
> >
> > but then whenever I open the file it tells me it's possibly not safe to
> set
> > that.
>
> You've already received a more org-ish response but I'll give you an
> Emacs response to this part of your post: Emacs is simply making sure
> you are aware that a variable is being set when visiting a file.
>

Yep. That's fully understood. I'm less clear on why certain variables are
considered safe and some are not but that doesn't seem relevant. I've done
enough with file local and directory local variables in the past that I
have a pretty clear understanding of what they do.

My question was more around why I had to do it at all since based on my
reading of the manual it seems like I should've been able to do this with
some kind of file-wide property. Specifically, I've never been able to wrap
my head around `(info "(org) Property Syntax")`.

"Properties are key–value pairs. When they are associated with a single
entry or with a tree…," for instance, seems to imply by "When they are
associated with a single entry…" that they can be associated with all the
entries (or a particular tree or node).

Anyway, I think between you and Gustav I finally have this sorted.

   1. To set properties at the top level of a file you need to use the
   `#+PROPERTY:  ` syntax. I've been trying to
   figure out how I misinterpreted that in the past and I _think_ it was
   because I assumed that the `#+PROPERTY` was actually `#+` as in
   `#+DIR` rather than `#+PROPERTY: DIR`. It looks like to set a file local
   property in an org file you _must_ (at least on 9.3 or earlier) use the
   `#+PROPERTY:  ` syntax.

   2. Even then by default org-attach property inheritance is set to
   `'selective` and `org-use-property-inheritance` is set to off. I've now
   customized `org-use-property-inheritance` to `'("DIR")` which I believe
   says that I consider the `DIR` property to be a possible candidate for
   inheritance and no others. I'm a little concerned about performance
   implications as the manual gives me all kinds of scary warnings but we'll
   see about that.

Anyway this appears to work as I expect it to. I don't have to set a
file-local variable to anything. I'm using org properties. And
`org-attach-dir` now returns the proper directory for this file.

Thanks all! If you think I'm still misunderstanding something please
correct me. :)

--

In Christ,

Timmy V.

https://blog.twonegatives.com
https://five.sentenc.es


please mention the blog-admin package for blogging with nikola

2020-03-06 Thread dalanicolai
Hi,

Please mention the blog-admin 
package for blogging with Nikola on the worg site. I chose to blog with
Nikola because I found on the worg site
 that is support org-mode. It
took me a lot of time and effort to finally stumble upon this simple
solution to maintain my blog from emacs. Anyway, mentioning this package
can persuade people to blog with Nikola, and it can save them a lot of time
searching for easy good solutions (Eventually I actually, redundantly,
started coding a similar extension myself). Thank's a lot! Keep up the
great work :)

Best regards,
Daniel Nicolai


Bug: org-agenda-tag-filter-preset not respected [9.3.6 (9.3.6-19-gf360f9-elpaplus @ /home/jorge/.config/emacs/elpa/27.0/develop/org-plus-contrib-20200302/)]

2020-03-06 Thread Jorge P. de Morais Neto
Hi.  Since version org-plus-contrib-20200302, my agenda is buggy.  The
bug did not occur in previous versions.  To reproduce the bug:

1. Move away your .emacs.d, so that Emacs starts with a pristine
   configuration.
2. Start Emacs and eval the following Elisp:
--8<---cut here---start->8---
(setq package-archives
  '(("org" . "https://orgmode.org/elpa/;)
   ("gnu" . "https://elpa.gnu.org/packages/;)))
(setq org-agenda-custom-commands
  '(("w" "Buggy"
((tags "now" nil))
((org-agenda-tag-filter-preset
  '("+@w" "-dummy"))
(setq org-agenda-files '("~/unison/report_org-agenda_bug/report_org_bug.org"))
(setq org-tag-alist
 '(("now" . ?n)
   ("dummy")
   ("@w"  . ?w)))
--8<---cut here---end--->8---

3. Install the latest org-plus-contrib package.
4. Write to ~/unison/report_org-agenda_bug/report_org_bug.org the
   following text:
--8<---cut here---start->8---
* This entry should not appear in the agenda:now:
--8<---cut here---end--->8---

5. Execute M-x org-agenda RET w
6. Note that the offending entry does appear in the agenda.  It should
   not appear, since it lacks the "@w" tag -- see the value of
   org-agenda-tag-filter-preset.

This occurred in an updated Emacs 27 snapshot (guix package emacs-next).

Regards


Emacs  : GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.13)
Package: Org mode version 9.3.6 (9.3.6-19-gf360f9-elpaplus @ 
/home/jorge/.config/emacs/elpa/27.0/develop/org-plus-contrib-20200302/)
-- 
- 
- I am Brazilian.  I hope my English is correct and I welcome feedback.
- Free Software Supporter:
  



MarginFigure environment in LaTeX export

2020-03-06 Thread Louis Gostiaux

Hello,

Here is a patch to allow the margin value for float option in figure 
environment.


The marginfigure environment is proposed by the LateX sidenotes package 
and is commonly used in book editions. I needed it to edit with 
EmacsOrgmode a book with the Tufte-book class. I could use this new 
export properly and I now want to propose it to the OrgMode users.


Please tell me if the submission procedure is correct,

Louis Gostiaux.

>From 45f1484c390276fd714ae91ca5dcc489e9b3ef16 Mon Sep 17 00:00:00 2001
From: lgostiau 
Date: Fri, 6 Mar 2020 10:50:53 +0100
Subject: [PATCH] Included margin float value for figure environment, to be
 used with LaTeX sidenotes package

---
 lisp/ox-latex.el | 9 +
 1 file changed, 9 insertions(+)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index c0af8157d..4d391c2fa 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -2374,6 +2374,7 @@ used as a communication channel."
 		  (cond ((string= float "wrap") 'wrap)
 			((string= float "sideways") 'sideways)
 			((string= float "multicolumn") 'multicolumn)
+			((string= float "margin") 'margin)
 			((and (plist-member attr :float) (not float)) 'nonfloat)
 			((or float
 			 (org-element-property :caption parent)
@@ -2491,6 +2492,14 @@ used as a communication channel."
 			(if center "\\centering" "")
 			comment-include image-code
 			(if caption-above-p "" caption)))
+	(`margin (format "\\begin{marginfigure}
+%s%s
+%s%s
+%s\\end{marginfigure}"
+			   (if caption-above-p caption "")
+			   (if center "\\centering" "")
+			   comment-include image-code
+			   (if caption-above-p "" caption)))
   (`figure (format "\\begin{figure}%s
 %s%s
 %s%s
-- 
2.17.1



Re: Typo in Org Manual

2020-03-06 Thread Sebastian Miele
Sebastian Miele  writes:
>
> But how about instead changing the first sentence of the "Range
> references" section from
>
>   You may reference a rectangular range of fields by specifying two
>   field references connected by two dots ‘..’.
>
> to
>
>   You may reference a rectangular range of fields, including the ends,
>   by specifying two field references connected by two dots ‘..’.
>
> ?

I think even better would be to just add the following after the
sentence mentioned above:

  The ends are included in the range.



Re: Typo in Org Manual

2020-03-06 Thread Sebastian Miele
Kyle Meyer  writes:
>
> Sebastian Miele  writes:
>
> > In an example for Org table range references it says:
> >
> > ‘@2$1..@4$3’   six fields between these two fields (same as ‘A2..C4’)
>
> Oh, that mistake has been around for a long time.
>
> > However, it are nine fields instead of six.
>
> If we were to simply replace "six" with "nine", I think the
> description could still be confusing because it's ambiguous whether
> "between" includes the ends. (I would tend to read the above
> description as exclusive.)

At least for me, "nine" would not be confusing at all, because among the
sensible interpretations of the range specification, "nine" uniquely
identifies the maximally inclusive one.

If it were a problem, then the preceding and following examples all have
the same problem, too, except maybe the hline example.

> How about "nine fields between and including these two fields"? Any
> other suggestions?

In my opinion this is not necessary. The examples (assuming "nine"
instead of "six") make it clear enough, that always the maximally
inclusive sensible interpretation of the range specification is used.

But how about instead changing the first sentence of the "Range
references" section from

  You may reference a rectangular range of fields by specifying two
  field references connected by two dots ‘..’.

to

  You may reference a rectangular range of fields, including the ends,
  by specifying two field references connected by two dots ‘..’.

?



Re: Shift select

2020-03-06 Thread Neil Jerram
On Fri, 6 Mar 2020 at 08:17, Josh  wrote:

> One more question,
>
> I turned on shift-select with the following line in my .emacs. It works,
> but of course, on headings, it doesn't work because it changes the TODO
> status of the heading (shift left-right) or the priority of the heading
> (shift up-down). How would I make shift select still work on headings, and
> assign those other functions to other bindings?
>
> (setq org-support-shift-select t)


The help text for this variable (C-h v org-support-shift-select) includes:

"If you set this variable to the symbol ‘always’, then the keys
will not be special in headlines, property lines, and item lines,
to make shift selection work there as well.  If this is what you
want, you can use the following alternative commands:
‘C-c C-t’ and ‘C-c ,’ to change TODO state and priority,
‘C-u C-u C-c C-t’ can be used to switch TODO sets,
‘C-c -’ to cycle item bullet types,
and properties can be edited by hand or in column view."

Does that answer your question?

Best wishes,
 Neil


Re: Binding literal tab to C-Tab

2020-03-06 Thread Joost Kremers



On Fri, Mar 06 2020, Josh wrote:

Hi all,

I have a need to insert literal tab characters into my org-mode 
files
frequently. I would like to bind a key to insert literal tabs 
(ASCII 9). I
thought Control-TAB would be a good option. So I inserted the 
following lines
into my .emacs file. It works when in normal emacs, but not in 
org-mode. Is
there a way to get this to work in org-mode? If this is a bad 
key combination

for org-mode, I'm ok switching to another key combo.


Well, C-TAB is already bound in Org (to 
`org-force-cycle-archived`), but if you have no use for that 
command, you can of course rebind it. Since `global-set-key` 
creates global bindings, which are shadowed by local bindings, 
your binding has no effect in Org buffers. You need to bind C-TAB 
in `org-mode-map`:


   (define-key org-mode-map (kbd "C-") #'my-insert-tab-char)

HTH

--
Joost Kremers
Life has its moments



Re: Binding literal tab to C-Tab

2020-03-06 Thread Marco Wahl
Hi.

Josh  writes:

> I have a need to insert literal tab characters into my org-mode files
> frequently. I would like to bind a key to insert literal tabs (ASCII
> 9). I thought Control-TAB would be a good option. So I inserted the
> following lines into my .emacs file. It works when in normal emacs,
> but not in org-mode. Is there a way to get this to work in org-mode?
> If this is a bad key combination for org-mode, I'm ok switching to
> another key combo.

What about using quoted-insert?  C-q TAB


Ciao,
-- Marco



Shift select

2020-03-06 Thread Josh

One more question,

I turned on shift-select with the following line in my .emacs. It works, 
but of course, on headings, it doesn't work because it changes the TODO 
status of the heading (shift left-right) or the priority of the heading 
(shift up-down). How would I make shift select still work on headings, and 
assign those other functions to other bindings?


(setq org-support-shift-select t)

Thanks!

Josh



Binding literal tab to C-Tab

2020-03-06 Thread Josh

Hi all,

I have a need to insert literal tab characters into my org-mode files 
frequently. I would like to bind a key to insert literal tabs (ASCII 9). I 
thought Control-TAB would be a good option. So I inserted the following 
lines into my .emacs file. It works when in normal emacs, but not in 
org-mode. Is there a way to get this to work in org-mode? If this is a bad 
key combination for org-mode, I'm ok switching to another key combo.


(defun my-insert-tab-char ()
  "Insert a tab char. (ASCII 9, \t)"
  (interactive)
  (insert "\t"))

(global-set-key (kbd "C-") 'my-insert-tab-char)

Thanks!

Josh