[O] hiwin-mode and org-indent face

2015-08-01 Thread Linus Arver
Hello,

I use hiwin-mode [1] which changes the background color of all faces in
the inactive window to a different color (I am assuming this is how it
works). Unfortunately it does not change the background color for the
'org-indent' face which I believe is used to set the color for the
indentation if you enable the 'indent' option [2]. Is this hiwin-mode's
problem or org-mode's problem? Any ideas?

Please cc me as I'm not subscribed to the list.

Thanks,
Linus

[1]: https://github.com/tomoya/hiwin-mode
[2]: http://imgur.com/gallery/0tYRGBt



Re: [O] including files and org-src-preserve-indentation

2015-02-20 Thread Linus Arver
For the record, attached are the files for the ECM I used to test.

-L

On Fri, Feb 20, 2015 at 07:27:18PM -0800, Linus Arver wrote:
> On Sun, Feb 15, 2015 at 06:36:29PM +0100, Nicolas Goaziou wrote:
> > Hello,
> > 
> > Linus Arver  writes:
> > 
> > >> When I call org-publish-current-project, the included file's TAB
> > >> characters automatically become converted into spaces. Is there an
> > >> orgmode way of preventing this auto-conversion?
> > 
> > I cannot reproduce it. Could you provide an ECM?
> 
> So, after I created a minimal complete example (ECM), I loaded in the
> latest org-mode (Git HEAD) and realized that the problem does not exist
> in Org. It is with the `htmlize` [1] package. That is, if I simply
> uninstall that package from my MELPA folder, the tabs stay as tabs,
> regardless of what version of Org (latest Git HEAD or 8.2.10) I use.
> 
> > Also, what happens if
> > you do a regular export (no publishing)?
> 
> If I call `org-html-export-to-html`, I get the same behavior. I.e., if I
> have `htmlize` installed, the tabs get converted into spaces. If I
> remove `htmlize`, the tabs are preserved nicely.
> 
> I would file a bug report upstream, but it appears that `htmlize` does
> not have a website. It looks like the official version of `htmlize` [2]
> has "untabify" (grep it) hardcoded into the program, so a quick fix may
> not be in order any time soon.
> 
> Meanwhile from the Org side, perhaps we can have a way to let the user
> select which program to use for syntax highlighting? Maybe something
> external like Pygments [3]?
> 
> It would be helpful if Org could tell the user that it found (or did not
> find) the `htmlize` package and that it was used (or not used) when
> calling either `org-publish-current-project` or
> `org-html-export-to-html`.
> 
> -L
> 
> [1]: http://melpa.org/#/htmlize
> [2]: http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el.cgi
> [3]: http://pygments.org/
;; activate debugging
(setq debug-on-error t
debug-on-signal nil
debug-on-quit nil)

;; add latest org-mode to load path
(add-to-list 'load-path (expand-file-name 
"~/syscfg/emacs/elpa/htmlize-20130207.120"))

(setq org-src-preserve-indentation t)

(setq org-publish-project-alist
'(
("foobar"
:base-directory "~/foobar"
:base-extension "org"
:publishing-directory "~/foobar/public_html"
:publishing-function org-html-publish-to-html
:section-numbers t
:with-toc t
:html-preamble t
:html-head ""
)
)
)


foo.org
Description: Lotus Organizer
main :: IO ()
main = do
	putStrLn "hello world"


Re: [O] including files and org-src-preserve-indentation

2015-02-20 Thread Linus Arver
On Sun, Feb 15, 2015 at 06:36:29PM +0100, Nicolas Goaziou wrote:
> Hello,
> 
> Linus Arver  writes:
> 
> >> When I call org-publish-current-project, the included file's TAB
> >> characters automatically become converted into spaces. Is there an
> >> orgmode way of preventing this auto-conversion?
> 
> I cannot reproduce it. Could you provide an ECM?

So, after I created a minimal complete example (ECM), I loaded in the
latest org-mode (Git HEAD) and realized that the problem does not exist
in Org. It is with the `htmlize` [1] package. That is, if I simply
uninstall that package from my MELPA folder, the tabs stay as tabs,
regardless of what version of Org (latest Git HEAD or 8.2.10) I use.

> Also, what happens if
> you do a regular export (no publishing)?

If I call `org-html-export-to-html`, I get the same behavior. I.e., if I
have `htmlize` installed, the tabs get converted into spaces. If I
remove `htmlize`, the tabs are preserved nicely.

I would file a bug report upstream, but it appears that `htmlize` does
not have a website. It looks like the official version of `htmlize` [2]
has "untabify" (grep it) hardcoded into the program, so a quick fix may
not be in order any time soon.

Meanwhile from the Org side, perhaps we can have a way to let the user
select which program to use for syntax highlighting? Maybe something
external like Pygments [3]?

It would be helpful if Org could tell the user that it found (or did not
find) the `htmlize` package and that it was used (or not used) when
calling either `org-publish-current-project` or
`org-html-export-to-html`.

-L

[1]: http://melpa.org/#/htmlize
[2]: http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el.cgi
[3]: http://pygments.org/



Re: [O] including files and org-src-preserve-indentation

2015-02-07 Thread Linus Arver
My more detailed configuration is below.

Emacs  : GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.7)
 of 2015-01-17 on bisson
Package: Org-mode version 8.2.10 (release_8.2.10 @ 
/usr/share/emacs/24.4/lisp/org/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-latex-format-inlinetask-function 'ignore
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook 
change-major-mode-hook org-show-block-all append local] 5]
 #[nil "\300\301\302\303\304$\207" [org-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-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-html-format-headline-function 'ignore
 org-src-preserve-indentation t
 org-html-format-inlinetask-function 'ignore
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-publish-project-alist '(("eh" :base-directory "~/prog/elementary-haskell/" 
:publishing-directory
  "~/prog/elementary-haskell/public_html" :publishing-function 
org-html-publish-to-html :section-numbers t
  :with-toc t :html-preamble t :html-head
  "")
 )
 )

Thanks,
-L

On Wed, Jan 21, 2015 at 04:34:50PM -0800, Linus Arver wrote:
> Hello list,
> 
> I have line like this in my .org file:
> 
> #+include: "src/frankenB.hs" :src haskell -n
> 
> That file has literal TAB characters in it. I also have
> 
> (setq org-src-preserve-indentation t)
> 
> in my .emacs.
> 
> When I call org-publish-current-project, the included file's TAB
> characters automatically become converted into spaces. Is there an
> orgmode way of preventing this auto-conversion?
> 
> I'm using orgmode 8.2.10 with emacs 24.4.
> 
> Thanks,
> -L



[O] including files and org-src-preserve-indentation

2015-01-22 Thread Linus Arver
Hello list,

I have line like this in my .org file:

#+include: "src/frankenB.hs" :src haskell -n

That file has literal TAB characters in it. I also have

(setq org-src-preserve-indentation t)

in my .emacs.

When I call org-publish-current-project, the included file's TAB
characters automatically become converted into spaces. Is there an
orgmode way of preventing this auto-conversion?

I'm using orgmode 8.2.10 with emacs 24.4.

Thanks,
-L



Re: [O] [dev] org-indent-mode patch

2011-03-18 Thread Linus Arver
Hello,

On Mon, Mar 14, 2011 at 08:51:27AM +0100, Carsten Dominik wrote:
> Hi Nicolas,
> 
> On 13.3.2011, at 17:21, Nicolas wrote:
> 
> > Hello,
> > 
> > I'd like to submit the following org-indent-mode patch for testing.
> > 
> > git://github.com/ngz/org-mode-lists.git indent-patch-no-timer
> > 
> > It implements two things:
> > 
> > 1. It indents correctly text when using visual-line-mode;
> > 2. It removes the idle timer previous implementation was using, which
> >   means it won't refresh indentation more often than necessary.
> > 
> > Unfortunately, there is a price to pay:
> > 
> > 1. Initialization will be much longer for large Org files, but I've
> >   added a message to the user saying so.
> > 2. It is a bit slower, as the algorithm has more things to check.
> > 
> > 
> > Last point is obviously my main concern. Although not noticeable on my
> > not-so-recent laptop, I don't know how it behaves on old machines.
> > 
> > That's why a testing is necessary to determine (bugs and) if it is
> > usable. Any help welcome.
> > initial testing seems to show that this works well, very nice.
> 
> The delay at the beginning is long, and it might be annoying
> when org pulls in a buffer just to look something up,
> without org-inhibit-startup scoped into the file loading.
> 
> Maybe one could arrange for the initialization to happen just
> before the buffer is first *displayed* (I do not know if that
> is possible).

>From my tests, the delay at the beginning is only long for a file with
unreasonably long lists. I tested a sample file with 1000 lists each
with 1140 characters and it took me roughly 12 seconds on an Intel Q6600
2.4Ghz. On the other hand, 1000 lists with 304 characters took me a
little over 3 seconds. Lastly, 1000 lists with only 102 characters each
took me just over a second. So, I think the startup delay is very
reasonable, since only very long list lines slow down the startup time,
and such list items are almost always rarer than shorter list items.

> Just one nitpicking:  The idle timer may force updating when
> not necessary - but using after-change-functions will update after
> each character inserted.  So in fact your code might be updating
> more often at least while typing - maybe not while looking at
> the buffer and jumping around.  I am not a fast typist, but maybe
> fast typists will notice significant delays, in particular
> while writing inside a very long section?

In my 1000 list (1140-characters per list) file, I smashed my keys as
fast as I could inside one of those lists, and there was no slowdown at
all. The only time there was a slowdown was when I held down a key to
let it repeat (although I have an unusually fast key repeat rate on my
keyboard --- I have "xset r rate 250 80" in my ~/.xinitrc). According to
the xset man page this means 80 characters per second.

-Linus



[Orgmode] Re: [PATCH] indentation for section headings vs bulleted lists

2011-02-20 Thread Linus Arver
On Mon, Feb 21, 2011 at 12:26:30AM +0100, Nicolas wrote:
> Hello,
> 
> Here is an attempt to solve the problem at hand.
> 
> Linus, would you mind testing it and reporting back?
> 

Brilliant, I just applied your patch to the git version and everything
works nicely as I had hoped!

Thank you so much, Nicolas!

-Linus

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


[Orgmode] Re: indentation for section headings vs bulleted lists

2011-02-20 Thread Linus Arver
On Sun, Feb 20, 2011 at 01:19:43PM +0100, Nicolas wrote:
> Firstly, org-indent-mode only works by sections. That means the whole
> section gets the same indent prefix, whatever can be inside. Thus, lists
> cannot be treated differently for now.

While I am not technically knowledgeable with org-mode's internals, it
surprises me that lists and section headings are treated differently for
org-indent-mode. I guess I won't be able to use lists for a while...
(I suppose the other option is to use real indentation, manually, to
break up a long list line into smaller chunks, but that solution to me
is just ugly and hacky. It would be great to get uniform behavior for
both sections as well as lists.)

> Secondly, org-indent-mode is not indenting anything: it only fakes it.
> While this is fine for headings, this causes problems with lists, which
> are depending on real indentation.

I did not know that lists were dependant on real indentation. Now I
know.

> Anyway, I'm on it. I'll post a patch as soon as I find and implement a
> decent way to solve this.
> 
> 
> Regards,
> 
> -- 
> Nicolas

Thanks for taking up the challenge, Nicolas!

-Linus

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


Re: [Orgmode] indentation for section headings vs bulleted lists

2011-02-19 Thread Linus Arver
On Sat, Feb 19, 2011 at 10:35:11AM +0100, Bastien wrote:
> Hi Linus,
> 
> Linus Arver  writes:
> 
> > I'm running emacs-org-mode 7.4.
> > (http://aur.archlinux.org/packages.php?ID=18206).
> 
> There has been important changes to the way Org handles lists in the git
> repo.  You can either check them but cloning this repo or wait for the
> next release.
> 
> HTH,
> 
> -- 
>  Bastien

I've switched to the git version of org-mode, and there is no change in
behavior. I am including a link to a screenshot, with a very good
example of the behavior (with physical line numbers showing), to see if
anyone can reproduce the behavior on their system.

Screenshot: http://img593.imageshack.us/i/20110219231411681x766sc.png/

Again, I'm very curious why org-mode's indenting code treats bulleted
lists differently than section headings.

I'm also attaching the raw .org file with this message as a reference.

-Linus
#+STARTUP: indent

- asd fas fdsf sdf sdfasdf sadf sadf adf asdf sadf sadf dsf sf dsf dsaf asdf 
dsaf df adf dsaf dsaf dfa df asdf dsf adsf dsf dsf adsf dasf adsf dfa sdf dsaf 
dsaf dsa dfa fd fdsa dsf saf dasf df df dsf dsf sdf ds fds d fdf dsaf dsf dsf 
dsf df
  - asd fas fdsf sdf sdfasdf sadf sadf adf asdf sadf sadf dsf sf dsf dsaf asdf 
dsaf df adf dsaf dsaf dfa df asdf dsf adsf dsf dsf adsf dasf adsf dfa sdf dsaf 
dsaf dsa dfa fd fdsa dsf saf dasf df df dsf dsf sdf ds fds d fdf dsaf dsf dsf 
dsf df
- asd fas fdsf sdf sdfasdf sadf sadf adf asdf sadf sadf dsf sf dsf dsaf 
asdf dsaf df adf dsaf dsaf dfa df asdf dsf adsf dsf dsf adsf dasf adsf dfa sdf 
dsaf dsaf dsa dfa fd fdsa dsf saf dasf df df dsf dsf sdf ds fds d fdf dsaf dsf 
dsf dsf df
  - asd fas fdsf sdf sdfasdf sadf sadf adf asdf sadf sadf dsf sf dsf dsaf 
asdf dsaf df adf dsaf dsaf dfa df asdf dsf adsf dsf dsf adsf dasf adsf dfa sdf 
dsaf dsaf dsa dfa fd fdsa dsf saf dasf df df dsf dsf sdf ds fds d fdf dsaf dsf 
dsf dsf df

* asd fas fdsf sdf sdfasdf sadf sadf adf asdf sadf sadf dsf sf dsf dsaf asdf 
dsaf df adf dsaf dsaf dfa df asdf dsf adsf dsf dsf adsf dasf adsf dfa sdf dsaf 
dsaf dsa dfa fd fdsa dsf saf dasf df df dsf dsf sdf ds fds d fdf dsaf dsf dsf 
dsf df
** asd fas fdsf sdf sdfasdf sadf sadf adf asdf sadf sadf dsf sf dsf dsaf asdf 
dsaf df adf dsaf dsaf dfa df asdf dsf adsf dsf dsf adsf dasf adsf dfa sdf dsaf 
dsaf dsa dfa fd fdsa dsf saf dasf df df dsf dsf sdf ds fds d fdf dsaf dsf dsf 
dsf df
*** asd fas fdsf sdf sdfasdf sadf sadf adf asdf sadf sadf dsf sf dsf dsaf asdf 
dsaf df adf dsaf dsaf dfa df asdf dsf adsf dsf dsf adsf dasf adsf dfa sdf dsaf 
dsaf dsa dfa fd fdsa dsf saf dasf df df dsf dsf sdf ds fds d fdf dsaf dsf dsf 
dsf df
 asd fas fdsf sdf sdfasdf sadf sadf adf asdf sadf sadf dsf sf dsf dsaf asdf 
dsaf df adf dsaf dsaf dfa df asdf dsf adsf dsf dsf adsf dasf adsf dfa sdf dsaf 
dsaf dsa dfa fd fdsa dsf saf dasf df df dsf dsf sdf ds fds d fdf dsaf dsf dsf 
dsf df
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] indentation for section headings vs bulleted lists

2011-02-18 Thread Linus Arver
On Fri, Feb 18, 2011 at 03:18:38PM -0300, Darlan Cavalcante Moreira wrote:
> 
> In fact, lists are indented like this, but indentation has meaning.
> 
> I remember some recent changes announced here in the mailing list to how
> lists are handled in org that made lists more powerful. It seems now that
> if some text is part or not of the list is controlled by
> indentation. Therefore, if you write
> #+begin_src org
> - blah blah blah blah
>   bleh bleh bleh bleh
> blih blih blih blih
> #+end_src
> then "bleh bleh bleh bleh" is part of the list (as if it were in the same
> line of "blah blah blah blah"), but not "blih blih blih blih". You can test
> this by exporting and seeing the result.
> 

I think I failed to explain the problem more accurately. In my original
post, I stated the following behavior:

* blah blah blah blah
  blah blah blah blah
  blah blah blah blah
** blah blah blah blah
   blah blah blah blah
   blah blah blah blah
- blah blah blah blah
blah blah blah blah
blah blah blah blah
 - blah blah blah blah
 blah blah blah blah
 blah blah blah blah

In the above example, there are *only* 4 physical lines of text. That
is, there are only 4 newline characters in the actual text file. The

#+STARTUP: indent

property, from what I understand, merely takes the 4 actual lines and
"soft wraps" them intelligently, so as to create a series of *fake*
newlines and indents, to give the illusion of multiple, neatly-indented
lines.

My problem was that org-mode handles section headings (*) properly, but
not bulleted list items (-) for some reason, choosing to indent on the
location of the bullet (-) itself, and not the beginning of the actual
leading text. I.e., instead of

 - blah blah blah blah<--- a *single* line
 blah blah blah blah
 blah blah blah blah
   - blah blah blah blah  <--- another single line
   blah blah blah blah
   blah blah blah blah

I want org-mode to indent it like this:

 - blah blah blah blah
   blah blah blah blah
   blah blah blah blah
   - blah blah blah blah
 blah blah blah blah
 blah blah blah blah

Again, this is a soft wrap issue. I'll try to use the latest git version
of org-mode and see if that helps.

-Linus

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


Re: [Orgmode] indentation for section headings vs bulleted lists

2011-02-18 Thread Linus Arver
On Fri, Feb 18, 2011 at 09:52:14AM +0100, Bastien wrote:
> Hi Linus,
> 
> Linus Arver  writes:
> 
> > This is very nice. But regular bulleted lists are indented like this:
> >
> > - blah blah blah blah
> > blah blah blah blah
> > blah blah blah blah
> >  - blah blah blah blah
> >  blah blah blah blah
> >  blah blah blah blah
> 
> I cannot reproduce this with latest git Org.  What Org version are you
> running?
> 
> -- 
>  Bastien

I'm running emacs-org-mode 7.4.
(http://aur.archlinux.org/packages.php?ID=18206).

-Linus


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


[Orgmode] indentation for section headings vs bulleted lists

2011-02-17 Thread Linus Arver
Hello, I have

#+STARTUP: indent

in my .org file. I notice that section headings get indented like this:

* blah blah blah blah
  blah blah blah blah
  blah blah blah blah
** blah blah blah blah
   blah blah blah blah
   blah blah blah blah

This is very nice. But regular bulleted lists are indented like this:

- blah blah blah blah
blah blah blah blah
blah blah blah blah
 - blah blah blah blah
 blah blah blah blah
 blah blah blah blah

How do I make it so that bulleted lists are indented just like the section 
headings?

-Linus

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