From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Links and visual-line-mode Date: Thu, 2 Jun 2011 18:04:46 +0200 Message-ID: <9AE27AB2-8407-4467-A600-A1EFA6270890@gmail.com> References: <4DE6CC11.6050309@gmail.com> <13614.1306982954@alphaville.dokosmarshall.org> <4DE71FEA.6010201@gmail.com> <15241.1306994317@alphaville.dokosmarshall.org> <20189.1307029869@alphaville.dokosmarshall.org> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSAOJ-0001Hc-22 for emacs-orgmode@gnu.org; Thu, 02 Jun 2011 12:05:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSAOH-0005U3-3G for emacs-orgmode@gnu.org; Thu, 02 Jun 2011 12:04:58 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:34238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSAOG-0005Tu-RT for emacs-orgmode@gnu.org; Thu, 02 Jun 2011 12:04:56 -0400 Received: by eyd9 with SMTP id 9so382994eyd.0 for ; Thu, 02 Jun 2011 09:04:55 -0700 (PDT) In-Reply-To: <20189.1307029869@alphaville.dokosmarshall.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: Scott Randby , "[Orgmode]" On 2.6.2011, at 17:51, Nick Dokos wrote: > Carsten Dominik wrote: >=20 >>> Yes, with pop-up-windows set to nil, I can reproduce it too. >>> The problem is that truncate-lines is set to t inside = org-insert-link. >>=20 >> Yes, but only after the focus was switched to the *Org Link* buffer = which is >> shown in order to select a link. truncate-lines is automatically = buffer-local, >> so it should not effect its value in other buffers. Is = truncate-lines modified after inserting a link???? >>=20 >=20 > Here's what I see with a minimal .emacs and a simple org file (both of = them appended): >=20 > - emacs -Q -l minimal.emacs > - check truncate-lines: it is nil in the foo.org buffer > - TAB to expand the heading - I get a wrapped line as expected > - go to the end, C-c C-l foo bar > - by the time of the first I am back at the foo.org buffer and = the line is truncated; > checking truncate-lines shows it to be t. 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))) >=20 > Nick >=20 > GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of = 2011-04-13 > Org-mode version 7.5 (baseline.261.g3433) >=20 > minimal.emacs: > --8<---------------cut here---------------start------------->8--- > ;;; -*- mode: emacs-lisp -*- > ;;; constant part > (add-to-list 'load-path (expand-file-name = "~/src/emacs/org/org-mode/lisp")) > (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . = org-mode)) > (require 'org-install) > (global-set-key "\C-cl" 'org-store-link) > (global-set-key "\C-ca" 'org-agenda) >=20 > (setq org-startup-truncated nil) > (setq pop-up-windows nil) > (setq-default truncate-lines nil) > (find-file "~/src/org/visual/scott-randby/foo.org") > (visual-line-mode 1) > --8<---------------cut here---------------end--------------->8--- >=20 >=20 > foo.org: > --8<---------------cut here---------------start------------->8--- >=20 > * foo >=20 > [[foo][bar]] > bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar = bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar = bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar = bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar = bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar=20 >=20 > [[foo][bar]] [[foo][bar]] > --8<---------------cut here---------------end--------------->8--- >=20 >=20