emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Bug] org-indent-mode underindents body in variable-pitch-mode
@ 2014-10-21 18:14 Tobias Getzner
  2014-11-27 14:57 ` Anders Johansson
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Getzner @ 2014-10-21 18:14 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

After updating to Emacs 24.4 and org-mode 20141020, I’ve noticed that
org-indent-mode now underindents item bodies when variable-pitch-mode is
used. I. e., in the following document, «lorem», «ipsum», and «etc.» will
fall successively short of the item’s respective indent level.

* first
lorem
** second
ipsum
*** third
etc.

My last working version was 20140915 on Emacs 24.3.

Kind regards,
Tobias

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bug] org-indent-mode underindents body in variable-pitch-mode
  2014-10-21 18:14 [Bug] org-indent-mode underindents body in variable-pitch-mode Tobias Getzner
@ 2014-11-27 14:57 ` Anders Johansson
  2014-11-27 16:26   ` Anders Johansson
  0 siblings, 1 reply; 4+ messages in thread
From: Anders Johansson @ 2014-11-27 14:57 UTC (permalink / raw)
  To: emacs-orgmode

Tobias Getzner <tobias.getzner <at> gmx.de> writes:

> 
> Hello,
> 
> After updating to Emacs 24.4 and org-mode 20141020, I’ve noticed that
> org-indent-mode now underindents item bodies when variable-pitch-mode is
> used. I. e., in the following document, «lorem», «ipsum», and «etc.» will
> fall successively short of the item’s respective indent level.
> 
> * first
> lorem
> ** second
> ipsum
> *** third
> etc.
> 
> My last working version was 20140915 on Emacs 24.3.
> 
> Kind regards,
> Tobias
> 

Hi,
I'm experiencing the exact same problem. Debugging might be a little tricky
if it involves changes in both Emacs and org.

I think the problem depends on the text-properties wrap-prefix and
line-prefix being set to a number of spaces and a number of stars,
respectively, in headlines and only spaces in body text. When variable-pitch
fonts don't have as wide stars as spaces we get a mismatch. But I don't know
how this can have worked better before.
 
Doesn't anyone else use variable-pitch-mode for org and suffer from this?

Cheers,
Anders Johansson  

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bug] org-indent-mode underindents body in variable-pitch-mode
  2014-11-27 14:57 ` Anders Johansson
@ 2014-11-27 16:26   ` Anders Johansson
  2014-12-01 15:21     ` Anders Johansson
  0 siblings, 1 reply; 4+ messages in thread
From: Anders Johansson @ 2014-11-27 16:26 UTC (permalink / raw)
  To: emacs-orgmode

Anders Johansson <mejlaandersj <at> gmail.com> writes:

> 
> Tobias Getzner <tobias.getzner <at> gmx.de> writes:
> 
> > 
> > Hello,
> > 
> > After updating to Emacs 24.4 and org-mode 20141020, I’ve noticed that
> > org-indent-mode now underindents item bodies when variable-pitch-mode is
> > used. I. e., in the following document, «lorem», «ipsum», and «etc.» will
> > fall successively short of the item’s respective indent level.
> > 
> > * first
> > lorem
> > ** second
> > ipsum
> > *** third
> > etc.
> > 
> > My last working version was 20140915 on Emacs 24.3.
> > 
> > Kind regards,
> > Tobias
> > 
> 
> Hi,
> I'm experiencing the exact same problem. Debugging might be a little tricky
> if it involves changes in both Emacs and org.
> 
> I think the problem depends on the text-properties wrap-prefix and
> line-prefix being set to a number of spaces and a number of stars,
> respectively, in headlines and only spaces in body text. When variable-pitch
> fonts don't have as wide stars as spaces we get a mismatch. But I don't know
> how this can have worked better before.
> 
> Doesn't anyone else use variable-pitch-mode for org and suffer from this?
> 
> Cheers,
> Anders Johansson  
> 
> 

Hi again,
Ok, I have tracked it down a bit. It must be due to changes in Emacs outside
of org.
I tried with the combination Emacs 24.3.1 and org:
Org-mode version 8.2.10 (8.2.10-20-gaa65ac-elpa @
/home/aj/.emacs.d/elpa/org-20141124/) 

There it works. But never in 24.4, regardless of org version.

How Emacs handles line-prefix and wrap-prefix must have changed in some way.
I don't know if that is a bug in Emacs or something org should accommodate
for though.

Cheers,
Anders Johansson




And then it worked.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bug] org-indent-mode underindents body in variable-pitch-mode
  2014-11-27 16:26   ` Anders Johansson
@ 2014-12-01 15:21     ` Anders Johansson
  0 siblings, 0 replies; 4+ messages in thread
From: Anders Johansson @ 2014-12-01 15:21 UTC (permalink / raw)
  To: emacs-orgmode

Anders Johansson <mejlaandersj <at> gmail.com> writes:

> 
> Anders Johansson <mejlaandersj <at> gmail.com> writes:
> 
> > 
> > Tobias Getzner <tobias.getzner <at> gmx.de> writes:
> > 
> > > 
> > > Hello,
> > > 
> > > After updating to Emacs 24.4 and org-mode 20141020, I’ve noticed that
> > > org-indent-mode now underindents item bodies when variable-pitch-mode is
> > > used. I. e., in the following document, «lorem», «ipsum», and «etc.» will
> > > fall successively short of the item’s respective indent level.
> > > 
> > > * first
> > > lorem
> > > ** second
> > > ipsum
> > > *** third
> > > etc.
> > > 
> > > My last working version was 20140915 on Emacs 24.3.
> > > 
> > > Kind regards,
> > > Tobias
> > > 
> > 
> > Hi,
> > I'm experiencing the exact same problem. Debugging might be a little tricky
> > if it involves changes in both Emacs and org.
> > 
> > I think the problem depends on the text-properties wrap-prefix and
> > line-prefix being set to a number of spaces and a number of stars,
> > respectively, in headlines and only spaces in body text. When variable-pitch
> > fonts don't have as wide stars as spaces we get a mismatch. But I don't know
> > how this can have worked better before.
> > 
> > Doesn't anyone else use variable-pitch-mode for org and suffer from this?
> > 
> > Cheers,
> > Anders Johansson  
> > 
> > 
> 
> Hi again,
> Ok, I have tracked it down a bit. It must be due to changes in Emacs outside
> of org.
> I tried with the combination Emacs 24.3.1 and org:
> Org-mode version 8.2.10 (8.2.10-20-gaa65ac-elpa  <at> 
> /home/aj/.emacs.d/elpa/org-20141124/) 
> 
> There it works. But never in 24.4, regardless of org version.
> 
> How Emacs handles line-prefix and wrap-prefix must have changed in some way.
> I don't know if that is a bug in Emacs or something org should accommodate
> for though.
> 
> Cheers,
> Anders Johansson
> 
> And then it worked.
> 
> 

Ok,

I'm quite sure this depends on the changes discussed here:
http://lists.gnu.org/archive/html/bug-gnu-emacs/2013-08/msg00776.html

which (as far as I understand it) means that wrap-prefix (and line-prefix?)
now uses the currently active face (or something like that) instead of
default. The "working" indent in variable-pitch-mode thus depended on
wrap-prefix and line-prefix having the "wrong" (default) face instead of the
variable-pitch face that is now used.

One workaround is to customize the face org-indent in some way to make it
roughly match the width of your stars:

(set-face-attribute 'org-indent nil :family "YOUR_DEFAULT_FAMILY")

This worked ok for me.
Just inheriting default didn't seem to work. I think that is overridden by
variable-pitch mode.

I don't know if this could be generalized in a good way that could be put
into org-mode since the desired width (or family) depends on each users
configuration.

One possibility could be if it would be possible to get the pixel-width of a
star in some way and then set line-prefix to a correct pixel-width (multiple
of this).

Cheers,
Anders Johansson

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-01 15:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-21 18:14 [Bug] org-indent-mode underindents body in variable-pitch-mode Tobias Getzner
2014-11-27 14:57 ` Anders Johansson
2014-11-27 16:26   ` Anders Johansson
2014-12-01 15:21     ` Anders Johansson

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).