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 16:16:56 +0200 Message-ID: References: <4DE6CC11.6050309@gmail.com> <13614.1306982954@alphaville.dokosmarshall.org> <4DE71FEA.6010201@gmail.com> <15241.1306994317@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]:37409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QS8hv-0000IW-85 for emacs-orgmode@gnu.org; Thu, 02 Jun 2011 10:17:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QS8hr-0002ZH-Gn for emacs-orgmode@gnu.org; Thu, 02 Jun 2011 10:17:06 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:64786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QS8hq-0002YX-Ib for emacs-orgmode@gnu.org; Thu, 02 Jun 2011 10:17:02 -0400 Received: by eyd9 with SMTP id 9so340679eyd.0 for ; Thu, 02 Jun 2011 07:17:00 -0700 (PDT) In-Reply-To: <15241.1306994317@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 07:58, Nick Dokos wrote: > Scott Randby wrote: >=20 >> On 06/01/2011 10:49 PM, Nick Dokos wrote: >>> Scott Randby wrote: >>>=20 >>>> This is a problem that has been bugging me for some time because I = use >>>> visual-line-mode a lot when I'm working on my org-mode files. >>>>=20 >>>> Say I have visual-line-mode turned on when I'm editing an org-mode = file. >>>> If I do C-c C-l, put in the link address, hit , put in a >>>> description, and hit , then the long lines in the document = are no >>>> longer wrapped even though "(Org Wrap)" still appears on the mode = line. >>>> The only way I've been able to get wrapping back is to do M-x >>>> visual-line-mode twice (which is just leaving the mode and then = bringing >>>> it back. This is very inconvenient, especially when I want to enter >>>> several links. Is this a bug or is there an easy way to remind = Emacs >>>> that it is in visual-line-mode and that it should wrap long lines? >>>>=20 >>>> I have org-mode 7.5 on Emacs 23.2.1 >>>>=20 >>>=20 >>> Cannot reproduce this either on emacs 23.1.1 or emacs 24.0.50 - the = only >>> versions I have available here. org-mode is from earlier today. >>>=20 >>> The word-wrap documentation suggests some interaction with >>> truncate-lines and truncate-partial-width-windows, so that might be = a >>> path of investigation. But when I try setting truncate-lines to t >>> (which does truncate long lines even though "Wrap" is still on the = mode >>> line) and then do (visual-line-mode 1), the variable is set back to = nil >>> again. In any case, inserting links does not cause any other = changes, no >>> matter what I set the variable to. >>=20 >> In my .emacs, I have pop-up-windows set to nil. If I change that = setting >> to t, then visual-line-mode keeps working when C-c C-l is used to = insert >> a link. Changing pop-up-windows back to nil causes the bad behavior. >>=20 >> One reason I want pop-up-windows to be set to nil is because I >> frequently use C-x C-b to look at the buffer list. If pop-up-windows = is >> set to t, then C-x C-b opens the buffer list in a pop-up window while >> the active cursor is in the other window. This is ridiculous. >>=20 >> I found this message about org-mode and pop-up windows in the mailing >> list archives: >>=20 >> http://lists.gnu.org/archive/html/emacs-orgmode/2009-04/msg00712.html >>=20 >> While the issue described is not the same as mine, the complaint = about >> org-mode not playing nice when pop-up-windows is set to nil is still = valid. >>=20 >=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. 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???? > When I comment that out, I get the behavior you expect. The question = is: > why is truncate-lines set to t? To get just one line per link, so to get a nicely organized selection buffer. - Carsten > I don't know the answer to that, but it > seems to be unnecessary: I think it could be let-bound instead or = explicitly > reset to its former value afterwards. >=20 > The problems described by Samuel in the link you provided may be = caused=20 > by the same setting, but I haven't looked in detail. >=20 > Nick >=20