Re: File Scoped Properties?

2020-03-05 Thread Fraga, Eric
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.  It's a
form of security to ensure you don't have a file do something you don't
want it to do.  If you are happy for that variable to be set by files in
this way generally, Emacs does give you the option of saving this
information in the customization file and you won't get asked
again.

It's not that setting this variable this way is dangerous per se.  But,
for instance, this variable could be set by some file you receive from
somebody else to a destination that is off your computer, e.g. using
tramp.  This is the closest that Emacs comes to being vulnerable to
viruses (computer, not COVID-19 ;-)).

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-354-g9d5880



Re: Typo in Org Manual

2020-03-05 Thread Kyle Meyer
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.)

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



Re: [PATCH] Do not ignore org-odt-styles-file

2020-03-05 Thread Kyle Meyer
Thanks for the patch.

Eric Timmons  writes:

> :odt-styles-file was duplicated in ox-odt's org-export-define-backend
> form. This lead to the org-odt-styles-file custom being completely ignored.

That change looks good, and, while I'm not an ox-odt user, light testing
on my end confirms the issue and fix.

Could you update your patch to follow the conventions outlined at
?  In particular, add (1)
a change-log entry to the commit message and (2) a TINYCHANGE cookie.
Also, it's typical for commit subjects in this project to start with
": ...".



Re: [PATCH]: org-attach.el: Use `force' arg everywhere in `org-attach-delete-all'

2020-03-05 Thread Kyle Meyer
Applied with 70c1eec55.



RE: File Scoped Properties?

2020-03-05 Thread Gustav Wikström
Hi Tim,

First you must make sure to allow property inheritance. That can be done by 
setting org-attach-use-inheritance to t. Then add the DIR property to a 
property block for the file, or using a property keyword. I.e. either this:

#+begin_src org
  :PROPERTIES:
  :DIR:  ~/.foo/data
  :END:
#+end_src

#+begin_src org
  ,#+PROPERTY DIR ~/.foo/data
#+end_src

Running org-attach with option s will give you a prompt that will set DIR for 
you. If you invoke that before first headline it should result in a DIR 
property that applies for the whole buffer (when org-attach-use-inheritance is 
set to t that is). Note that property blocks before first headline is a new 
feature for version 9.4 and currently only exist in the master branch.

Regards
Gustav

From: Emacs-orgmode  On Behalf Of 
Tim Visher
Sent: den 5 mars 2020 16:28
To: Emacs Org Mode mailing list 
Subject: File Scoped Properties?

Hello,

I'm trying to get org-attach to use a different data directory for a particular 
file.

My understanding is that this is controlled by `org-attach-id-dir` by default 
but can be overridden at the file or entry level by use of the `DIR` property. 
I can successfully override it at the entry level by adding `DIR` to the 
entries properties but I can't figure out how to set it for all entries in the 
file.

I tried:

```
#+DIR: ~/.foo/data
```

as the first line of the file.

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.

Any ideas?

--

In Christ,

Timmy V.

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


Re: Nested quote blocks?

2020-03-05 Thread Tim Visher
On Thu, Mar 5, 2020 at 1:45 AM Fraga, Eric  wrote:

> > IIUC, your solution should work but it's necessarily tied to specific
> > export backends, right?
>
> It is partly but the general concept of using special blocks works for
> HTML also.  You end up with code that looks like this:
>
> ,
> | 
> | 
> | and this is the inner block
> | 
> |
> | 
> `
>
> which means you can customize its appearance using appropriate CSS code.


Sounds great. I'll try to hack on this when I have some free time. :)


[PATCH] strike-through text in tables

2020-03-05 Thread Mark E. Shoulson

  
  
Make a org-mode table.  In one of the cells of the table, have
  some text that is +struck out+.  Note that the struck-out text is
  default text color (black, for me), and not org-table text color
  (blue, for me).  It's even worse if you're running
  org-variable-pitch-mode, because the text also won't be set in a
  fixed-pitch face, and so will screw up the alignment of table
  text.  I found out why.



When org-do-emphasis-faces constructs the new face that it
  applies to the text, it passes the lookup value from the
  org-emphasis-alist to font-lock-prepend-text-property, which makes
  a list, composing it with the existing face.  This would fail for
  strike-though mode in a table, since the org-emphasis-alist lookup
  would return (:strike-through t), resulting in a face of
  (:strike-through t org-table), which is an invalid face, and then
  emacs has no choice but to render it unfaced.


Attaching a patch for the issue.  Rather than try to figure out
  how to make org-do-emphasis-faces somehow smart enough to deal
  with this situation (I'm not sure it's possible, in general), I
  took the easy way out and defined an org-strike-through face which
  can be used in org-empasis-alist.


Humbly submitted for your approval...


~mark

  

>From 9a489ddf9d411bfc907a5b765d015e757b0b6903 Mon Sep 17 00:00:00 2001
From: "Mark E. Shoulson" 
Date: Thu, 5 Mar 2020 10:03:37 -0500
Subject: [PATCH] org-faces.el: Add org-strike-through face

org-faces.el: Create org-strike-through face.
org.el: Use org-strike-through-face in org-emphasis-alist.
---
 lisp/org-faces.el | 4 
 lisp/org.el   | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/org-faces.el b/lisp/org-faces.el
index d78b606ec..107ea9763 100644
--- a/lisp/org-faces.el
+++ b/lisp/org-faces.el
@@ -427,6 +427,10 @@ For source-blocks `org-src-block-faces' takes precedence."
   :group 'org-faces
   :version "22.1")
 
+(defface org-strike-through '((t (:strike-through t)))
+  "Face for struck-through text."
+  :group 'org-faces)
+
 (defface org-quote '((t (:inherit org-block)))
   "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks.
 Active when `org-fontify-quote-and-verse-blocks' is set."
diff --git a/lisp/org.el b/lisp/org.el
index 31133c554..8b27e4708 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3677,7 +3677,7 @@ You need to reload Org or to restart Emacs after setting this.")
 ("_" underline)
 ("=" org-verbatim verbatim)
 ("~" org-code verbatim)
-("+" (:strike-through t)))
+("+" org-strike-through))
   "Alist of characters and faces to emphasize text.
 Text starting and ending with a special character will be emphasized,
 for example *bold*, _underlined_ and /italic/.  This variable sets the
-- 
2.24.1



File Scoped Properties?

2020-03-05 Thread Tim Visher
Hello,

I'm trying to get org-attach to use a different data directory for a
particular file.

My understanding is that this is controlled by `org-attach-id-dir` by
default but can be overridden at the file or entry level by use of the
`DIR` property. I can successfully override it at the entry level by adding
`DIR` to the entries properties but I can't figure out how to set it for
all entries in the file.

I tried:

```
#+DIR: ~/.foo/data
```

as the first line of the file.

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.

Any ideas?

--

In Christ,

Timmy V.

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


Re: Debugging at least 2 regressions in org-mode master breaking ox-hugo

2020-03-05 Thread Kaushal Modi
On Thu, Mar 5, 2020 at 9:04 AM Bastien  wrote:

> Hi Kaushal,
>
> Kaushal Modi  writes:
>
> > I'm just pinging again on this thread to bring it to attention.
>
> I'm reading the list but I didn't find the time to reply to the
> threads yet, I'll get back to this.
>
> Thanks,
>

Thanks, no hurry. I just wanted to make sure that these issues are read
before Org 9.4 drops, and also that regression in Org maint is noted.


Re: Debugging at least 2 regressions in org-mode master breaking ox-hugo

2020-03-05 Thread Bastien
Hi Kaushal,

Kaushal Modi  writes:

> I'm just pinging again on this thread to bring it to attention.

I'm reading the list but I didn't find the time to reply to the
threads yet, I'll get back to this.

Thanks,

-- 
 Bastien



Re: Debugging at least 2 regressions in org-mode master breaking ox-hugo

2020-03-05 Thread Kaushal Modi
Hello,

I'm just pinging again on this thread to bring it to attention.

Thanks.

Kaushal


Re: Bug: org-agenda fails to interpret UTF-8 filenames in some cases

2020-03-05 Thread Fraga, Eric
On Thursday,  5 Mar 2020 at 11:41, Lubos Boucek wrote:
> Hello,
>
> After adding file "úkoly.org" (filename written with Czech keyboard)
> with `C-c [`, immediate `M-x org-agenda t` goes through. However,
> after restarting emacs, the same command stops with warning
> "Non-existent agenda file c:/Users/lubos/Documents/org/úkoly.org.
> [R]emove from list or [A]bort?".

This looks like an encoding issue.  Have a look at your emacs
customization file (.emacs, .emacs.d/init.el, wherever customized
variable settings are placed in your case) and fix the file name
properly there?

I know that I have the following line (as the first line) in some of my
emacs files:

# -*- coding: utf-8; -*-

Maybe put that in your org customization file?

But I should warn you that I still find encoding issues perplexing in
Emacs.
-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-354-g9d5880


Bug: org-agenda fails to interpret UTF-8 filenames in some cases

2020-03-05 Thread Lubos Boucek
Hello,

After adding file "úkoly.org" (filename written with Czech keyboard)
with `C-c [`, immediate `M-x org-agenda t` goes through. However,
after restarting emacs, the same command stops with warning
"Non-existent agenda file c:/Users/lubos/Documents/org/úkoly.org.
[R]emove from list or [A]bort?".

Curiously, another character like 'č' doesn't trigger the warning. And
even more curiously, if the file "úkoly.org" has been added after
adding a file with 'č' in its name, there is no such problem.

Thank you in advance for any investigation. Some diagnostics (before
adding either file) follows:


Windows 7

Emacs  : GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29
Package: Org mode version 9.3.6 (9.3.6-17-g389288-elpa @
c:/Users/lubos/AppData/Roaming/.emacs.d/elpa/org-20200224/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-link-shell-confirm-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-agenda-files '("c:/Users/lubos/Documents/org/odkazy.org"
"c:/Users/lubos/Documents/org/ukoly.org"
"c:/Users/lubos/Documents/org/books.org"
"c:/Users/lubos/Documents/org/tasks.org"
"c:/Users/lubos/Documents/org/usernames.org")
 org-modules '(org-bbdb org-bibtex org-docview org-gnus org-info org-irc org-mhe
   org-rmail org-w3m org-drill)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-all append local] 5]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-babel-show-result-all
append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes
 org-eldoc-load)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-src-lang-modes '(("arduino" . arduino) ("redis" . redis) ("php" . php)
  ("C" . c) ("C++" . c++) ("asymptote" . asy) ("bash" . sh)
  ("beamer" . latex) ("calc" . fundamental) ("cpp" . c++)
  ("ditaa" . artist) ("dot" . fundamental)
  ("elisp" . emacs-lisp) ("ocaml" . tuareg)
  ("screen" . shell-script) ("shell" . sh) ("sqlite" . sql))
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-speed-command-hook '(org-speed-command-activate
  org-babel-speed-command-activate)
 org-font-lock-set-keywords-hook '(org-drill-add-cloze-fontification)
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("attachment" :follow org-attach-open-link :export
org-attach-export-link :complete org-attach-complete-link)
   ("id" :follow org-id-open) ("w3m" :store org-w3m-store-link)
   ("rmail" :follow org-rmail-open :store org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link)
   ("info" :follow org-info-open :export org-info-export :store
org-info-store-link)
   ("gnus" :follow org-gnus-open :store org-gnus-store-link)
   ("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export
:complete org-bbdb-complete-link :store org-bbdb-store-link)
   ("file+sys") ("file+emacs")
   ("shell" :follow org-link--open-shell)
   ("news" :follow
#[257 "\301\300\302 Q!\207" ["news" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("mailto" :follow
#[257 "\301\300\302 Q!\207" ["mailto" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("https" :follow
#[257 "\301\300\302 Q!\207" ["https" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("http" :follow
#[257 "\301\300\302 Q!\207" ["http" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("ftp" :follow
#[257 "\301\300\302 Q!\207" ["ftp" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("help" :follow org-link--open-help)
   ("file" :complete org-link-complete-file)