emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Links and visual-line-mode


From: Nick Dokos
Subject: Re: [O] Links and visual-line-mode
Date: Thu, 02 Jun 2011 12:41:23 -0400

Carsten Dominik <address@hidden> wrote:


> Thanks Nick.  Seems like Emacs is not sure in which
> buffer it is at that moment, because it has not yet been displayed.
> Could you please try to following paranoid patch?
> 
> Thanks.
> 
> - Carsten
> 
> diff --git a/lisp/org.el b/lisp/org.el
> index 1ca03f4..b43a877 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -8889,7 +8889,8 @@ Use TAB to complete link prefixes, then RET for =
> type-specific completion support
>                 (reverse org-stored-links) "\n"))))
>        (let ((cw (selected-window)))
>       (select-window (get-buffer-window "*Org Links*" 'visible))
> -     (setq truncate-lines t)
> +     (with-current-buffer "*Org Links*"
> +       (set (make-local-variable 'truncate-lines) t))
>       (unless (pos-visible-in-window-p (point-max))
>         (org-fit-window-to-buffer))
>       (and (window-live-p cw) (select-window cw)))
> 

Both this and the simpler

> -     (setq truncate-lines t)
> +     (with-current-buffer "*Org Links*"
> +       (setq truncate-lines t))

seem to work in my simple test.

Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]